Use own fork of QQuickStyleItem
ClosedPublic

Authored by mart on May 30 2017, 3:20 PM.

Details

Summary

use a local copy of qqc1 qquickstyleitem, remove all qqc1 usage

Test Plan

all of kirigami gallery works with the new style

Diff Detail

Repository
R858 Qt Quick Controls 2: Desktop Style
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.May 30 2017, 3:20 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 30 2017, 3:20 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.May 30 2017, 3:59 PM

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)

plugin/kquickstyleitem.cpp
188 ↗(On Diff #14984)

This won't compile; there's not such member var.

(I know this is the bit of code I ported...sorry!)

401–402 ↗(On Diff #14984)

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.

plugin/kquickstyleitem_p.h
4 ↗(On Diff #14984)

We should add us here and in the cpp

271 ↗(On Diff #14984)

unused?

This revision is now accepted and ready to land.May 30 2017, 3:59 PM
This revision was automatically updated to reflect the committed changes.