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