-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kirigami and Qt Quick Controls 2 compatibility #1
Comments
We can base the style on Plasma Framework which includes styles for QQC2 and Kirigami. In turn, Plasma Framework is styled using Plasma themes (tutorial, details, and example themes). The latter allow to style widgets, colors by making SVGs. As a result, much of the styling can be done using SVGs directly. If something will be missing, Plasma Framework can be forked, code changed and it distributed with some other name. If needed, QQC2 maybe styled as described in https://doc.qt.io/qt-5/qtquickcontrols2-customize.html Edit: added link to theme details |
Here, I am going through controls as in https://github.com/qwazix/glacier-controls-spec and summarize what was found regarding each of them.
|
As Nemo is moving to Qt 5.12 and beyond, it makes sense to ensure compatibility with Kirigami (KDE Tier 1 Framework / aka framework without external dependencies) and Qt Quick Controls 2. Much of Nemo UX can be implemented using QQC2 and Kirigami instead of developing and maintaining separate set of controls. Would have to go through each one-by-one at some point, but for now, would like to mainly know general opinion regarding it.
Approach for styling QQC2 and Kirigami is similar. We would have to write the style and install it accordingly. As an example, assuming that the theme for Qt is configured correctly, header styling can be achieved by adding
style/Nemo/ApplicationWindow.qml
:and having
AbstractApplicationHeader.qml
styled with the DropShadow leading toIn this example (kirigami-gallery), we have already consistent with Nemo header guidelines:
Right now, header cannot be styled itself. However, it should be possible to add separate header type if we need it in Kirigami sources. That would allow pull-down gesture and complex toolbars implemented via Action.
As for landscape mode header, not sure how to implement that at this stage and that maybe a limitation. Same goes for corner cases such as headers with too many children. Which is probably not that important anyway.
Kirigami has two types of drawers (global, accessible in this form of toolbar as on the screenshot from the left top, ☰ symbol) and context (not shown, but can be made available by apps, usually on the right). How to avoid them is not clear to me yet except not using this in Nemo apps. These drawers are harder to reach on gesture-based navigation system (window gets minimized instead of drawer pulled). If it is possible to restyle them into corresponding pages, I don't know.
I'll better stop here for now and ask for general opinion on the subject.
The text was updated successfully, but these errors were encountered: