Bug 398973 - The window decorations configuration pop-up needs a Defaults icon
Summary: The window decorations configuration pop-up needs a Defaults icon
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.13.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: junior-jobs
: 404813 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-09-23 03:50 UTC by Andrew Crouthamel
Modified: 2020-01-16 20:02 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Crouthamel 2018-09-23 03:50:53 UTC
SUMMARY
This is for kwindecoration. The window decorations configuration pop-up that occurs when you Configure a window decoration, needs an icon for the Defaults button.

STEPS TO REPRODUCE
1. Open Window Decoration
2. Click Configure... on a window decoration
3. Observe the Default button

EXPECTED RESULT
Defaults button has an icon, like the Defaults one seen on the main Window Decoration window.

ACTUAL RESULT
No icon on the Default button.

SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: 5.13.5
KDE Frameworks Version: 5.50.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
Comment 1 Andrew Crouthamel 2018-09-24 15:46:27 UTC
Another note. The defaults icon currently used in the main window is not the same one used elsewhere. May be best to standardize on the other one.
Comment 2 David Edmundson 2018-09-27 09:30:18 UTC
Confirmed.

It uses QDialogButtonBox correctly, yet the icon for defaults isn't being applied there. Even inside QtDesigner. 

QDialogButtonBox doesn't set icons for:
    case QDialogButtonBox::YesToAll:
    case QDialogButtonBox::NoToAll:
    case QDialogButtonBox::SaveAll:
    case QDialogButtonBox::Abort:
    case QDialogButtonBox::Retry:
    case QDialogButtonBox::Ignore:
    case QDialogButtonBox::RestoreDefaults:

Doing so means changing QDialogButtonBox then QStyle to add an SP_DialogDefaults enum and then changing kstyle :/

(or I do a shoddy lazy kwin oneliner)
Comment 3 David Edmundson 2018-09-27 09:41:29 UTC
I'll fix properly in Qt.

In the meantime, it can be a nice junior job for someone's first patch.

kcmwin/kwindecoration/declarative-plugin/previewbridge.cpp
~line 213

get the restore defaults button, set an icon explicitly. Ideally using KStandardGuiItem to get the icon name.
Comment 4 David Edmundson 2019-02-27 11:53:01 UTC
*** Bug 404813 has been marked as a duplicate of this bug. ***
Comment 5 David Edmundson 2019-02-27 12:10:56 UTC
I forgot to push my patch:

https://codereview.qt-project.org/254494
Comment 6 Björn Feber 2019-04-21 12:06:26 UTC
Should we still do the workaround or just close this?
Comment 7 Patrick Silva 2019-04-21 12:27:36 UTC
Is your patch included in Qt 5.13 beta2 David?
This bug persists here.


Operating System: Arch Linux 
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.13.0 beta2
Comment 8 Björn Feber 2019-04-21 13:23:22 UTC
Made a patch: https://phabricator.kde.org/D20709
Comment 9 David Edmundson 2019-04-21 16:14:49 UTC
>Is your patch included in Qt 5.13 beta2 David?

Yes, but we need the matching breeze side to set the icon. That's not merged as it's hard to merge a frameworks patch against non-released code in case it changes later.
Comment 10 Björn Feber 2019-10-04 18:09:43 UTC
Looks like the enum is only in Qt 5.14: https://github.com/qt/qtbase/blob/9a9bdebb92eda34939c8a7442f06d24ded82b799/src/widgets/styles/qstyle.cpp#L2116
Comment 11 Björn Feber 2019-10-04 18:15:18 UTC
(In reply to Björn Feber from comment #10)
> Looks like the enum is only in Qt 5.14:
> https://github.com/qt/qtbase/blob/9a9bdebb92eda34939c8a7442f06d24ded82b799/
> src/widgets/styles/qstyle.cpp#L2116

I can make a patch that sets it for Qt 5.14 or higher though if you want.
Comment 12 Björn Feber 2019-10-04 19:34:01 UTC
(In reply to Björn Feber from comment #11)
> I can make a patch that sets it for Qt 5.14 or higher though if you want.

Here it is: https://phabricator.kde.org/D24415
Comment 13 Björn Feber 2019-10-08 14:20:05 UTC
Git commit 50593c5618998535cc9f482aa25565c5aeb368ce by Björn Feber.
Committed on 08/10/2019 at 14:19.
Pushed by bfeber into branch 'master'.

Add standard icons to support to all entries in QDialogButtonBox

Summary:
Implement the new enumarations introduced in Qt 5.14: https://codereview.qt-project.org/c/qt/qtbase/+/254494/

Test Plan: Can't really test since Qt 5.14 is not released yet, but QDialogButtonBox buttons should now all have icons.

Reviewers: #frameworks, #vdg, davidedmundson, ngraham

Reviewed By: #vdg, davidedmundson, ngraham

Subscribers: ndavis, dhaumann, davidedmundson, #vdg, kde-frameworks-devel, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D24415

M  +17   -1    src/kstyle/kstyle.cpp

https://commits.kde.org/frameworkintegration/50593c5618998535cc9f482aa25565c5aeb368ce
Comment 14 Patrick Silva 2020-01-16 20:02:41 UTC
I can confirm that this bug is fixed on Plasma 5.18 beta + Qt 5.14. :)
Thank you all.

Operating System: Arch Linux 
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.0