Refactor touch docker.
AbandonedPublic

Authored by woltherav on Sep 27 2018, 9:14 PM.

Details

Reviewers
None
Group Reviewers
Krita
Summary

This refactors the touchdocker to use qtquick controls.

I need to ask @leinir or @ahiemstra why exactly their old Button.qml does try to get the image from the IconImageProvider a few times, but when asking a QtQuickControls Button or regular Image to do so it only does so once(which is a bit annoying because it then only asks for an icon when the image size is 0x0 :/)

Anyway, this simplifies the code a bit.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
woltherav requested review of this revision.Sep 27 2018, 9:14 PM
woltherav created this revision.
woltherav edited the summary of this revision. (Show Details)

I understand that it's entirely up to Krita devs what suits best, but I really think that QQC1 shouldn't be used anymore. It is depracted and replaced by QQC2 (Although the latter is still lacking some stuff).
This is not a comment on this patch specifically, but to the whole QtQuick code in Krita.
Who knows, maybe I work on that one day if no one took the task.. :D

I understand that it's entirely up to Krita devs what suits best, but I really think that QQC1 shouldn't be used anymore. It is depracted and replaced by QQC2 (Although the latter is still lacking some stuff).
This is not a comment on this patch specifically, but to the whole QtQuick code in Krita.
Who knows, maybe I work on that one day if no one took the task.. :D

Uhm, I just followed the include that was written in the documentation for button http://doc.qt.io/qt-5/qml-qtquick-controls-button.html

Uhm, I just followed the include that was written in the documentation for button http://doc.qt.io/qt-5/qml-qtquick-controls-button.html

QQC1: http://doc.qt.io/qt-5/qtquickcontrols-index.html
QQC2: http://doc.qt.io/qt-5/qtquickcontrols2-index.html
QQC1 Button: http://doc.qt.io/qt-5/qml-qtquick-controls-button.html
QQC2 Button: http://doc.qt.io/qt-5/qml-qtquick-controls2-button.html

Of course, as I said, this shouldn't just be changed here, but everywhere where QtQuickControls are used in Krita. If this is the only use, then it will be much better to start using QQC2 (after setting up all the build stuff).

rempt added a subscriber: rempt.Sep 28 2018, 8:51 AM

Yes, we'd have to use QQ2 controls. We don't currently package them though... So pushing something that makes use of them needs a corresponding change in the 3rdparty ext_qt definition so they get installed, and the packaging scripts for Windows and Linux Appimages. We don't package qml-based plugins on macOS because I cannot figure out how to sign a dmg when the qtquick engine later adds cached stuff to the app bundle.

woltherav abandoned this revision.Sep 28 2018, 4:01 PM

Yes, we'd have to use QQ2 controls. We don't currently package them though... So pushing something that makes use of them needs a corresponding change in the 3rdparty ext_qt definition so they get installed, and the packaging scripts for Windows and Linux Appimages. We don't package qml-based plugins on macOS because I cannot figure out how to sign a dmg when the qtquick engine later adds cached stuff to the app bundle.

ah, if that's the case I'll remove the Qt.Quick entry and will just refactor the code to use the repeaters/rows/columns. That won't need a review request.