About: Use Qt.createComponent to create About page across Global Menu and PageHeader
This MR unifies how the Global Menu shortcut and the PageHeader create the About Page, and moves them to using Qt.createComponent
to create the AboutPage form card from Kirigami.
Right now on master
, the About Page is displayed in two ways:
- From the
PageHeader
, it opens as a separate window. This window has odd resizing properties; when opened it has a wide width, but when resized it snaps back down and seems to obey the definedmaximumWidth
. - From the Global Menu, it opens in-window rather than spawning a separate dialog box.
This is inconsistent, and I originally set out to unify this behaviour. I settled on unifying them based on the Global Menu behaviour of opening in-application, as this seems to be the standard for Kirigami applications. With this decision, I remembered that Plasma System Monitor recently moved from using using a dedicated About.qml
, which closely resembled what Francis has, to using Qt.createComponent
to create a Kirigami component that automatically pulls the KAboutData
defined in main.cpp
. See plasma/plasma-systemmonitor!277 (merged) for more information on the Plasma System Monitor-specific change.
Note that this functionality requires kirigami-addons >= 1.1.0
, I can see that Francis targets the latest version of kirigami-addons
in some manifest files, but I am not sure if this needs to be added to i.e. CMakeLists.txt
the same way it was in Plasma System Monitor.
The above may be a dealbreaker, and if so we can revert back to using one of the previous behaviours; that is, to either spawn an About dialog window, or to use pageStack.layers.push("About.qml")
approach to display the About page in-window, but I think it would be desired to use the same approach across the Global Menu and PageHeader
regardless of which approach is taken. With this MR I wanted to unify the behaviour, and thought using the Kirigami-Addons component would be a clean way to do so, but I am open to feedback on what the preferred approach is.
Thanks!