Opened 7 years ago

Last modified 7 years ago

#4217 new defect

OM Resolution issue

Reported by: dersh Owned by: adeas31
Priority: low Milestone: Future
Component: OMEdit Version:
Keywords: Cc: sjoelund.se, 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 dersh 7 years ago.
WindowGrab2.tiff (281.1 KB) - added by dersh 7 years ago.
main.log (23.8 KB) - added by dersh 7 years ago.
Built attempt with qt5

Download all attachments as: .zip

Change History (23)

Changed 7 years ago by dersh

comment:1 Changed 7 years ago by adeas31

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.

Changed 7 years ago by dersh

comment:2 Changed 7 years ago by dersh

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 Changed 7 years ago by adeas31

Can you try Qt5?

comment:4 Changed 7 years ago by dersh

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 Changed 7 years ago by adeas31

  • Cc sjoelund.se added

Yes it should work automatically.

comment:6 Changed 7 years ago by dersh

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 Changed 7 years ago by sjoelund.se

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 Changed 7 years ago by dersh

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

comment:9 Changed 7 years ago by sjoelund.se

Probably due to the Portfile:

PortGroup           qt4 1.0

comment:10 follow-up: Changed 7 years ago by 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?

Changed 7 years ago by dersh

Built attempt with qt5

comment:11 in reply to: ↑ 10 Changed 7 years ago by adeas31

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 Changed 7 years ago by dersh

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 follow-up: Changed 7 years ago by 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.

comment:14 in reply to: ↑ 13 Changed 7 years ago by adeas31

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 Changed 7 years ago by dersh

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 Changed 7 years ago by adeas31

  • Cc fragom@… added

comment:17 Changed 7 years ago by adeas31

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 Changed 7 years ago by dersh

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 Changed 7 years ago by adeas31

It fixes the Documentation Browser.

comment:20 Changed 7 years ago by anonymous

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.