Opened 4 weeks ago

Last modified 4 weeks ago

#57574 accepted defect

Several Qt apps do not display correctly in 'dark mode' (Mojave)

Reported by: szhorvat (Szabolcs Horvát) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: mojave Cc:
Port: qt5-qtcreator, owncloud-client, djview-qt5

Description

Several Qt apps do not display correctly with Mojave's dark mode.

One example is Qt Creator's Preferences dialog. I attached a screenshot. Another example is ownCloud.

Typically, white text is displayed on white background, making it unreadable (and the program unusable).

The reason why I consider this a MacPorts issue is that the official builds of these programs (e.g. the Qt Creator build that one can download from http://qt.io/) simply do not switch to dark mode, and therefore do not suffer from this problem.

It would be useful if the MacPorts builds also disabled dark mode, if this is easy to do.

Attachments (1)

Screenshot 2018-11-11 12.10.44.png (614.8 KB) - added by szhorvat (Szabolcs Horvát) 4 weeks ago.
Qt Creator preferences screenshot in dark mode

Download all attachments as: .zip

Change History (7)

Changed 4 weeks ago by szhorvat (Szabolcs Horvát)

Qt Creator preferences screenshot in dark mode

comment:1 Changed 4 weeks ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Owner: set to MarcusCalhoun-Lopez
Status: newaccepted

comment:2 Changed 4 weeks ago by szhorvat (Szabolcs Horvát)

Port: djview-qt5 added

comment:3 Changed 4 weeks ago by szhorvat (Szabolcs Horvát)

djview-qt5 is affected as well.

It seems that Qt 5.11 does not officially support building with the Mojave 10.14 SDK, but Qt 5.12. Maybe Qt 5.12 will fix the worst problems when it is released?

http://blog.qt.io/blog/2018/11/08/qt-macos-10-14-mojave/

comment:4 Changed 4 weeks ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

I tried a few (simple) workarounds, but none worked.
I am not sure it is worth the time and effort to find a solution ourselves when, as you note, upstream will be releasing a fixed version soon enough.

Since the upstream developers will not be adding dark mode to any version of Qt except 5.12 (see, e.g., here and here), I think we should close this ticket as "won't fix."

comment:5 Changed 4 weeks ago by szhorvat (Szabolcs Horvát)

Will MacPorts automatically transition all/most ports to Qt 5.12 when that version is released? Or will they stay on Qt 5.11 even after Qt 5.12 is included in MacPorts?

comment:6 Changed 4 weeks ago by szhorvat (Szabolcs Horvát)

The end of this page shows a simple method to opt out of dark mode by adding a key to Info.plist

https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_app

Note: See TracTickets for help on using tickets.