[KDE/Mac] Review Request 126198: [OS X] adaptations for the KdePlatformTheme
elvis.angelaccio at kdemail.net
Thu May 19 13:10:27 UTC 2016
> On May 17, 2016, 2:37 p.m., Martin Gräßlin wrote:
> > given that Plasma integration got removed I suggest to create a dedicated osx-integration repository for it as well.
> René J.V. Bertin wrote:
> I quite like the way things are, but yes, I've played with that idea.
> I guess I can simply fork `frameworkintegration`, change the project name in the toplevel CMake file and strip everything except for the platformtheme.
> How does this work from that point onwards?
> Martin Gräßlin wrote:
> > I guess I can simply fork frameworkintegration, change the project name in the toplevel CMake file and strip everything except for the platformtheme.
> That's kind of how I did it for plasma-integration with git filter-tree.
> > How does this work from that point onwards?
> My suggestion would be to create something like an "OSX integration" project in the metadata and have then all your repositories grouped there including the new platform theme.
> René J.V. Bertin wrote:
> This is something I'm completely new to; what metadata are we talking about here?
> Also, can anyone with commit access to existing repositories also create new ones on the server, and in what category would you suggest putting this?
> Boudhayan Gupta wrote:
> For now, start with a scratch repo. Sysadmin will take care of the rest for you.
> René J.V. Bertin wrote:
> As I said, creating or proposing a new KDE package/repository is completely new for me, even that instruction is still ambiguous. I take it you're not talking about a scratch repo that exists only on one of my disks, possibly not even on a remote mirror like github, but rather something that would alert the sysadmins who will then take the appropriate actions?
> I guess I should look through the developer/contributor instructions again, I most certainly skipped this level of information when I first (and last...) read that documentation.
Here you can find the instructions to create a scratch repo: https://community.kde.org/Sysadmin/GitKdeOrgManual#Personal_scratch_repositories
This is an automatically generated e-mail. To reply, visit:
On May 16, 2016, 7:49 p.m., René J.V. Bertin wrote:
> This is an automatically generated e-mail. To reply, visit:
> (Updated May 16, 2016, 7:49 p.m.)
> Review request for KDE Software on Mac OS X, KDE Frameworks, Plasma, and Valorie Zimmerman.
> Repository: frameworkintegration
> The KdePlatformTheme plugin can be enabled on OS X with a minimal patch to Qt5; all that is required is to include the `qgenericunixservices` and `qgenericunixthemes` components in the build, and to append `"kde"` to the list returned by `QCocoaIntegration::themeNames()` for instance under the condition that `KDE_SESSION_VERSION` is set to a suitable value in the environment.
> This will allow KF5 and Qt5 applications to use the theme selected through KDE if FrameworkIntegration is installed and KDE_SESSION_VERSION is set, which seems like a sufficiently specific set of conditions that is easy to avoid by users who prefer to use the Mac native theme.
> While requestion the KDE theme is also possible through `-style kde` or `env QT_STYLE_OVERRIDE=kde` the use of the KdePlatformTheme plugin appears to be the only way to get the full theme, including the font and colour selection. In my opinion it is above all the font customisation which is a very welcome feature for Qt/Mac; by default Qt applications use the default system font (Lucida Grande 13pt or even 14pt) throughout. This is a good UI font, but not at that size (and most "native" OS X applications indeed use a range of smaller sizes, depending on role.
> It does have introduce a number of regressions, which the current patch aims to address. The most visible and problematic of these regressions is the loss of the Mac-style menu bar and thus of all menu items (actions).
> The fix is straightforward : on OS X (and similarly affected platforms?), an instance of the native Cocoa platform theme is created through the private API, and used as a fallback rather than immediately falling back to the default implementations from `QPlatformTheme`. In addition, methods missing from (not overridden by) `KdePlatformTheme` are provided on OS X and call the corresponding methods from the native theme. It is this change which restores the menubar and even the Dock menu functionality.
> One minor regression remains but should be easy to fix (elsewhere?): the Preferences menu loses its keyboard shortcut (Command-,).
> Given the fallback nature of the native platform instance I have preferred to print a warning rather than using something like `qFatal`, above all because the message printed by qFatal tends to get lost on OS X. I can replace my use of `qWarning` with a dialog giving the choice between continuing or exiting the application - code that would be called in the menu methods because only there is it certain that the application actually needs a menubar.
> In line with experience and feedback from the KDE(4)-Mac community I have decided to force the use of native dialogs rather than the ones from the KdePlatformPlugin.
> In addition I set the fallback value for `ShowIconsOnPushButtons` to false in line with platform guidelines, and ensure that the autotests are not built as app bundles.
> CMakeLists.txt 6ea1cba
> src/CMakeLists.txt 1c54eb2
> src/platformtheme/CMakeLists.txt PRE-CREATION
> src/platformtheme/config-platformtheme.h.cmake PRE-CREATION
> src/platformtheme/frameworksintegration-5.16-font.sh PRE-CREATION
> src/platformtheme/frameworksintegration-5.16-font.upd PRE-CREATION
> src/platformtheme/kdemactheme.h PRE-CREATION
> src/platformtheme/kdemactheme.mm PRE-CREATION
> src/platformtheme/kdeplatformfiledialogbase.cpp PRE-CREATION
> src/platformtheme/kdeplatformfiledialogbase_p.h PRE-CREATION
> src/platformtheme/kdeplatformfiledialoghelper.h PRE-CREATION
> src/platformtheme/kdeplatformfiledialoghelper.cpp PRE-CREATION
> src/platformtheme/kdeplatformsystemtrayicon.h PRE-CREATION
> src/platformtheme/kdeplatformsystemtrayicon.cpp PRE-CREATION
> src/platformtheme/kdeplatformtheme.h PRE-CREATION
> src/platformtheme/kdeplatformtheme.cpp PRE-CREATION
> src/platformtheme/kdeplatformtheme.json PRE-CREATION
> src/platformtheme/kdirselectdialog.cpp PRE-CREATION
> src/platformtheme/kdirselectdialog_p.h PRE-CREATION
> src/platformtheme/kfiletreeview.cpp PRE-CREATION
> src/platformtheme/kfiletreeview_p.h PRE-CREATION
> src/platformtheme/kfontsettingsdata.h PRE-CREATION
> src/platformtheme/kfontsettingsdata.cpp PRE-CREATION
> src/platformtheme/kfontsettingsdatamac.h PRE-CREATION
> src/platformtheme/kfontsettingsdatamac.mm PRE-CREATION
> src/platformtheme/khintssettings.h PRE-CREATION
> src/platformtheme/khintssettings.cpp PRE-CREATION
> src/platformtheme/khintssettingsmac.h PRE-CREATION
> src/platformtheme/khintssettingsmac.mm PRE-CREATION
> src/platformtheme/main_mac.cpp PRE-CREATION
> Diff: https://git.reviewboard.kde.org/r/126198/diff/
> On Mac OS X with Qt 5.5.1, KF5 frameworks 5.16.0 and QtCurve git/head.
> I have not verified to what extent my use of a private `QGuiApplication` API links builds to a specific Qt version (I consider that nothing shocking and a minor price to pay).
> >>> Do I need to add some glue to the CMake file so that it will warn if the private headerfiles are not available? Apparently no changes were required to find them.
> File Attachments
> purely native OS X theme
> native theme but with `-style kde`
> using the KDEPlatformTheme
> on Linux, using a purely "native" theme
> KDEPlatformTheme with the "macintosh" native theme selected
> kate built by Christoph Cullman as a completely standalone app bundle
> kate/MacPorts in fully native Mac mode (but using XDG-compliant QSPs).
> kate/MacPorts using the QtCurve style (but the native platform plugin)
> kate/MacPorts using the KdeMacTheme plugin and the macintosh style
> kate/MacPorts using the KdeMacTheme plugin and the QtCurve style
> René J.V. Bertin
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kde-mac