D6028: Use own fork of QQuickStyleItem
This revision was automatically updated to reflect the committed changes. Closed by commit R858:9623a35f63d2: Use own fork of QQuickStyleItem (authored by mart). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D6028?vs=14984=14988#toc REPOSITORY R858 Qt Quick Controls 2: Desktop Style CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6028?vs=14984=14988 REVISION DETAIL https://phabricator.kde.org/D6028 AFFECTED FILES CMakeLists.txt org.kde.desktop/Button.qml org.kde.desktop/CheckBox.qml org.kde.desktop/CheckDelegate.qml org.kde.desktop/CheckIndicator.qml org.kde.desktop/ComboBox.qml org.kde.desktop/Dial.qml org.kde.desktop/Dialog.qml org.kde.desktop/Drawer.qml org.kde.desktop/Frame.qml org.kde.desktop/GroupBox.qml org.kde.desktop/ItemDelegate.qml org.kde.desktop/Label.qml org.kde.desktop/Menu.qml org.kde.desktop/MenuItem.qml org.kde.desktop/Popup.qml org.kde.desktop/ProgressBar.qml org.kde.desktop/RadioButton.qml org.kde.desktop/RadioDelegate.qml org.kde.desktop/RadioIndicator.qml org.kde.desktop/RangeSlider.qml org.kde.desktop/ScrollBar.qml org.kde.desktop/Slider.qml org.kde.desktop/SpinBox.qml org.kde.desktop/Switch.qml org.kde.desktop/SwitchDelegate.qml org.kde.desktop/SwitchIndicator.qml org.kde.desktop/TabBar.qml org.kde.desktop/TabButton.qml org.kde.desktop/TextArea.qml org.kde.desktop/TextField.qml org.kde.desktop/ToolBar.qml org.kde.desktop/ToolButton.qml org.kde.desktop/ToolTip.qml org.kde.desktop/private/DefaultListItemBackground.qml plugin/CMakeLists.txt plugin/SystemPaletteSingleton.qml plugin/TextSingleton.qml plugin/kquickpadding_p.h plugin/kquickstyleitem.cpp plugin/kquickstyleitem_p.h plugin/qmldir plugin/qqc2desktopstyleplugin.cpp plugin/qqc2desktopstyleplugin.h plugin/qsgdefaultninepatchnode.cpp plugin/qsgdefaultninepatchnode_p.h plugin/qsgninepatchnode.cpp plugin/qsgninepatchnode.h To: mart, #plasma, davidedmundson Cc: plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
D6028: Use own fork of QQuickStyleItem
davidedmundson accepted this revision. davidedmundson added a comment. This revision is now accepted and ready to land. looks good. (well except for how horrible that borrowed Qt class is) We need to fix the OS X code path. (even if we just comment out the current stuff) INLINE COMMENTS > kquickstyleitem.cpp:188 > +if (style() == QLatin1String("mac")) { > +if (platformFont == QPlatformTheme::PushButtonFont) > +menu->setProperty("__xOffset", 12); This won't compile; there's not such member var. (I know this is the bit of code I ported...sorry!) > kquickstyleitem.cpp:401-402 > +opt->font = font; > +opt->fontMetrics = QFontMetrics(font); > +m_font = opt->font; > +} I know this is inherited code, but I'm in review mode. This m_font stuff is (and was) truly broken. The code in updateHints is: initStyleOption(); updateSizeHint(); if (m_styleoption->state & QStyle::State_Mini) { m_font.setPointSize(9.); Which means we're changing the font *after* we've set it to the font metrics of the QStyleItem. I'm thinking we could can move it all to be at the top of this method. m_font = qApp->font(classNameForType()); if (mini) {m_font.setSize(...) Lets make that a job for later though. > kquickstyleitem_p.h:4 > +** Copyright (C) 2016 The Qt Company Ltd. > +** Contact: https://www.qt.io/licensing/ > +** We should add us here and in the cpp > kquickstyleitem_p.h:271 > +protected: > +QWidget *m_dummywidget; > +QStyleOption *m_styleoption; unused? REPOSITORY R858 Qt Quick Controls 2: Desktop Style BRANCH mart/qquickstyleitemfork REVISION DETAIL https://phabricator.kde.org/D6028 To: mart, #plasma, davidedmundson Cc: plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
D6028: Use own fork of QQuickStyleItem
mart created this revision. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel. REVISION SUMMARY use a local copy of qqc1 qquickstyleitem, remove all qqc1 usage TEST PLAN all of kirigami gallery works with the new style REPOSITORY R858 Qt Quick Controls 2: Desktop Style BRANCH mart/qquickstyleitemfork REVISION DETAIL https://phabricator.kde.org/D6028 AFFECTED FILES CMakeLists.txt org.kde.desktop/Button.qml org.kde.desktop/CheckBox.qml org.kde.desktop/CheckDelegate.qml org.kde.desktop/CheckIndicator.qml org.kde.desktop/ComboBox.qml org.kde.desktop/Dial.qml org.kde.desktop/Dialog.qml org.kde.desktop/Drawer.qml org.kde.desktop/Frame.qml org.kde.desktop/GroupBox.qml org.kde.desktop/ItemDelegate.qml org.kde.desktop/Label.qml org.kde.desktop/Menu.qml org.kde.desktop/MenuItem.qml org.kde.desktop/Popup.qml org.kde.desktop/ProgressBar.qml org.kde.desktop/RadioButton.qml org.kde.desktop/RadioDelegate.qml org.kde.desktop/RadioIndicator.qml org.kde.desktop/RangeSlider.qml org.kde.desktop/ScrollBar.qml org.kde.desktop/Slider.qml org.kde.desktop/SpinBox.qml org.kde.desktop/Switch.qml org.kde.desktop/SwitchDelegate.qml org.kde.desktop/SwitchIndicator.qml org.kde.desktop/TabBar.qml org.kde.desktop/TabButton.qml org.kde.desktop/TextArea.qml org.kde.desktop/TextField.qml org.kde.desktop/ToolBar.qml org.kde.desktop/ToolButton.qml org.kde.desktop/ToolTip.qml org.kde.desktop/private/DefaultListItemBackground.qml plugin/CMakeLists.txt plugin/SystemPaletteSingleton.qml plugin/TextSingleton.qml plugin/kquickpadding_p.h plugin/kquickstyleitem.cpp plugin/kquickstyleitem_p.h plugin/qmldir plugin/qqc2desktopstyleplugin.cpp plugin/qqc2desktopstyleplugin.h plugin/qsgdefaultninepatchnode.cpp plugin/qsgdefaultninepatchnode_p.h plugin/qsgninepatchnode.cpp plugin/qsgninepatchnode.h To: mart, #plasma, davidedmundson Cc: plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas