Opened 8 years ago

Last modified 8 years ago

#4217 new defect

OM Resolution issue

Reported by: Adam Dershowitz Owned by: Adeel Asghar
Priority: low Milestone: Future
Component: OMEdit Version:
Keywords: Cc: Martin Sjölund, fragom@…

Description

I recently built OM on a MacBook Pro with a "retina" display.
The highlighted parts of selected tabs are only showing has half highlighted. I have attached a screen grab. Not the selected model (PID_Controller) and the selected window (Modeling). Each tab is half light and half dark.
Additionally, when loading a model there is a scripting error, as shown, that might be related ([2] 09:56:25 Scripting Error
QFont::setPixelSize: Pixel size <= 0 (0))
I suspect that the issue relates to how qt4 or OM read screen resolution.
This is only a minor cosmetic issue, as OM seems to operate fine. But, I thought that it was worth having a ticket in the system.

Attachments (3)

WindowGrab.tiff (264.3 KB ) - added by Adam Dershowitz 8 years ago.
WindowGrab2.tiff (281.1 KB ) - added by Adam Dershowitz 8 years ago.
main.log (23.8 KB ) - added by Adam Dershowitz 8 years ago.
Built attempt with qt5

Download all attachments as: .zip

Change History (23)

by Adam Dershowitz, 8 years ago

Attachment: WindowGrab.tiff added

comment:1 by Adeel Asghar, 8 years ago

The warning is related to webkit (https://bugs.webkit.org/show_bug.cgi?id=114175) and is already fixed so perhaps time to update to Qt5.
I guess the warning is showing up because you have Documentation Browser opened. Close it and restart OMEdit.

I have no idea why the tabs are not fully highlighted. I will investigate more about it.

by Adam Dershowitz, 8 years ago

Attachment: WindowGrab2.tiff added

comment:2 by Adam Dershowitz, 8 years ago

I did then try to open a model, and I didn't get that warning. So, I then opened Documentation Viewer, and it does show up a second time.
So, it seems that it shows up once for startup, and then again for Documentation Viewer.

comment:3 by Adeel Asghar, 8 years ago

Can you try Qt5?

comment:4 by Adam Dershowitz, 8 years ago

I'm not sure how. If I just install the qt5 port, will OMEdit find it when I next build? I don't see any OM variant for qt5 (the usual macport flags for different variations of a port).

comment:5 by Adeel Asghar, 8 years ago

Cc: Martin Sjölund added

Yes it should work automatically.

comment:6 by Adam Dershowitz, 8 years ago

I used macports to install qt5. I then upgraded openmodelica-devel. It built fine and has the same half-tab issue.
But, I don't see any evidence that it is using qt5, instead of qt4. For one thing, macports indicates that it still depends on qt4 not on qt5.
Is there any way I can verify which library OM is using?

comment:7 by Martin Sjölund, 8 years ago

You need to use otool to see which library OMEdit was linked against. We have the dependency on qt4 because last time I tried compiling against qt5 even simple HelloWorld kind of Qt applications failed.

comment:8 by Adam Dershowitz, 8 years ago

Otool shows that OMEdit is still linked against qt4. So, it didn't pickup on the new library.

comment:9 by Martin Sjölund, 8 years ago

Probably due to the Portfile:

PortGroup           qt4 1.0

comment:10 by Adam Dershowitz, 8 years ago

I tried changing that to qt5, but it failed to configure:

:info:configure checking for qmake in env.vars QMAKE and QTDIR... no
:info:configure checking for qmake... no
:info:configure checking for qmake-mac... no
:info:configure checking for qmake-qt4... no
:info:configure configure: error: Could not find qmake (QT4)
:info:configure configure: error: ./configure failed for OMPlot

I then changed it to:

PortGroup			qmake5 1.0

But it failed as well for a different reason. I've attached that log file.
Is there any benefit in to going to qt5? Or was it just curiosity to test it out?

by Adam Dershowitz, 8 years ago

Attachment: main.log added

Built attempt with qt5

in reply to:  10 comment:11 by Adeel Asghar, 8 years ago

Replying to dersh:

I tried changing that to qt5, but it failed to configure:

:info:configure checking for qmake in env.vars QMAKE and QTDIR... no
:info:configure checking for qmake... no
:info:configure checking for qmake-mac... no
:info:configure checking for qmake-qt4... no
:info:configure configure: error: Could not find qmake (QT4)
:info:configure configure: error: ./configure failed for OMPlot

I then changed it to:

PortGroup			qmake5 1.0

But it failed as well for a different reason. I've attached that log file.
Is there any benefit in to going to qt5? Or was it just curiosity to test it out?

Qt 5 has better support for high resolution screens than Qt 4.

comment:12 by Adam Dershowitz, 8 years ago

Actually, the current version (1.12.0~dev-251) won't build for me right now with qt4 either. But, I don't think that is related. Probably some other change.

comment:13 by Adam Dershowitz, 8 years ago

Is it useful if I create a separate ticket for the fact that the build now fails?
The error that I'm seeing relates to OMEditGUI, so I think that it might relate to this changeset:
[https://trac.openmodelica.org/OpenModelica/changeset/289fa10daf07f4a80d7dda737e98a36c1e5ec9e7/OMEdit
]

Which does relate to to qt4/qt5.

in reply to:  13 comment:14 by Adeel Asghar, 8 years ago

Replying to dersh:

Is it useful if I create a separate ticket for the fact that the build now fails?
The error that I'm seeing relates to OMEditGUI, so I think that it might relate to this changeset:
[https://trac.openmodelica.org/OpenModelica/changeset/289fa10daf07f4a80d7dda737e98a36c1e5ec9e7/OMEdit
]

Which does relate to to qt4/qt5.

Yeah Qt4 builds are already fixed as you figured it out so no need for extra ticket.

comment:15 by Adam Dershowitz, 8 years ago

As this indicates https://www.openmodelica.org/forum/default-topic/2092-mac-os-sierra-10-12-2-documentationbrowser the Documentation Browser remains completely blank. I had not realized that when I first created this ticket.
If this is the same resolution issue, then it is no longer just cosmetic and low priority, since this window is not at all usable.

comment:16 by Adeel Asghar, 8 years ago

Cc: fragom@… added

comment:17 by Adeel Asghar, 8 years ago

The following error is handled now in a3afbd6/OMEdit.

QFont::setPixelSize: Pixel size <= 0 (0))

The other display issues are because of Qt4 not being able to handle high resolution.

comment:18 by Adam Dershowitz, 8 years ago

Does that fix mean that the Document Browser will now work? Or that the tab size looking funny has been fixed (which is just cosmetic)?

I'll try a rebuild shortly on my machine.

comment:19 by Adeel Asghar, 8 years ago

It fixes the Documentation Browser.

comment:20 by anonymous, 8 years ago

I have the same problem under El Capitan on my 5K iMac.
Would it be possible to get a fixed binary uploaded to the website.

Note: See TracTickets for help on using tickets.