[Style KCM] Port to new design
Needs ReviewPublic

Authored by broulik on Wed, Oct 2, 12:02 PM.


Group Reviewers
Maniphest Tasks
T7296: Widget style

This ports the widget style KCM to use a grid view KCM with live preview thumbnails and inline configure button.

  • Icon and tool bar settings have been moved into a popup, similar to Icons KCM, to leave more room for the rather large thumbnails.
  • Overall cleanup of unused/defunct features and modernized codebase
  • Support for non-Linux is dropped, i.e. it assumes "Breeze" as the default, no "native" (e.g. Mac or Windows style) as we want our apps to follow whatever other platform they run in, rather than offering this KCM there

Closes T7296

Test Plan

"Advanced" settings

Widget preview glows on hover like they used to

Edit button (all the KCMs seem to use the pen rather than configure icon)

  • Applying style works live
  • Applying icon and toolbar settings work live
  • Configuring a style works and updates the preview live once you close the style config dialog

Two issues remaining

  • Just found I broke the kcminit stuff: "Module "kcm_style" was not found or does not actually have a kcminit function" (will fix kcminit)
  • On destruction of the qtcurve style it seems to freeze/deadlock (I put a workaround in place)
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffff45f2254 in QtLinuxFutex::_q_futex (val3=0, addr2=0x0, val2=0, val=<optimized out>, op=0, addr=<optimized out>) at thread/qfutex_p.h:92
#2  QtLinuxFutex::futexWait<QBasicAtomicInteger<unsigned int> > (expectedValue=<optimized out>, futex=...) at thread/qfutex_p.h:107
#3  futexSemaphoreTryAcquire_loop<false> (timeout=-1, nn=8589934593, curValue=<optimized out>, u=...) at thread/qsemaphore.cpp:219
#4  futexSemaphoreTryAcquire<false> (timeout=-1, n=n@entry=1, u=...) at thread/qsemaphore.cpp:262
#5  QSemaphore::acquire (this=this@entry=0x7fffffffd830, n=n@entry=1) at thread/qsemaphore.cpp:326
#6  0x00007ffff4805980 in QMetaObject::activate (sender=sender@entry=0x555556e292f0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=<optimized out>, argv@entry=0x7fffffffd8c0) at kernel/qobject.cpp:3771
#7  0x00007ffff4805dd7 in QMetaObject::activate (sender=sender@entry=0x555556e292f0, m=m@entry=0x7ffff4c82540 <QObject::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffd8c0) at kernel/qobject.cpp:3660
#8  0x00007ffff4805e7f in QObject::destroyed (this=this@entry=0x555556e292f0, _t1=<optimized out>, _t1@entry=0x555556e292f0) at .moc/moc_qobject.cpp:219
#9  0x00007ffff480c9da in QObject::~QObject (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:911
#10 0x00007fff12cfb34f in QtCurve::Style::~Style (this=0x555556e292f0, __in_chrg=<optimized out>) at ./qt5/style/qtcurve.cpp:785
#11 0x00007fff12cfb649 in QtCurve::Style::~Style (this=0x555556e292f0, __in_chrg=<optimized out>) at ./qt5/style/qtcurve.cpp:795
#12 0x00007fff12d2d784 in QtCurve::StylePlugin::~StylePlugin (this=0x555556e27cb0, __in_chrg=<optimized out>) at ./qt5/style/qtcurve_plugin.cpp:164
#13 0x00007fff12d2d859 in QtCurve::StylePlugin::~StylePlugin (this=0x555556e27cb0, __in_chrg=<optimized out>) at ./qt5/style/qtcurve_plugin.cpp:172
#14 0x00007ffff47c8ee7 in QLibraryPrivate::unload (this=this@entry=0x5555557e6230, flag=flag@entry=QLibraryPrivate::UnloadSys) at plugin/qlibrary.cpp:579
#15 0x00007ffff47ba9f2 in QFactoryLoaderPrivate::~QFactoryLoaderPrivate (this=0x5555558004f0, __in_chrg=<optimized out>) at plugin/qfactoryloader.cpp:179
#16 0x00007ffff47bab39 in QFactoryLoaderPrivate::~QFactoryLoaderPrivate (this=0x5555558004f0, __in_chrg=<optimized out>) at plugin/qfactoryloader.cpp:182
#17 0x00007ffff480cf9b in QScopedPointerDeleter<QObjectData>::cleanup (pointer=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:60
#18 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer (this=0x7ffff5ce2918, __in_chrg=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:107
#19 QObject::~QObject (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:891
#20 0x00007ffff564bad9 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

Diff Detail

R119 Plasma Desktop
Lint Skipped
Unit Tests Skipped
broulik created this revision.Wed, Oct 2, 12:02 PM
Restricted Application added a project: Plasma. · View Herald TranscriptWed, Oct 2, 12:02 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Wed, Oct 2, 12:02 PM
broulik edited the test plan for this revision. (Show Details)Wed, Oct 2, 12:05 PM
ngraham accepted this revision as: VDG.Wed, Oct 2, 4:49 PM
ngraham added a subscriber: ngraham.

This is fantastic. From a UI perspective, I think it's perfect.

ngraham edited the summary of this revision. (Show Details)
broulik updated this revision to Diff 67342.Sat, Oct 5, 11:35 AM
  • Rename style.desktop to kcm_style.desktop
  • Fix application not exiting (waited for the widgets to close)
  • Try loading the style before applying it and show an error if it fails
broulik edited the test plan for this revision. (Show Details)Mon, Oct 7, 10:45 AM
broulik updated this revision to Diff 67427.Mon, Oct 7, 12:33 PM
  • Don't let current style mess with preview palette
broulik updated this revision to Diff 67698.Fri, Oct 11, 11:55 AM
broulik edited the test plan for this revision. (Show Details)
  • Add workaround for QtCurve
broulik updated this revision to Diff 67699.Fri, Oct 11, 11:56 AM
  • Remove unrelated change