Bug 448122 - [Regression] Unchecking "Draw a circle around close button" does not set it to false in breezerc
Summary: [Regression] Unchecking "Draw a circle around close button" does not set it t...
Status: RESOLVED FIXED
Alias: None
Product: Breeze
Classification: Plasma
Component: general (show other bugs)
Version: 5.23.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-08 16:39 UTC by Luke Horwell
Modified: 2022-01-13 18:02 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Horwell 2022-01-08 16:39:43 UTC
SUMMARY

In System Settings, under Window Decorations, there is a check box to turn on/off the circle drawn around the close button. By default, this is checked. Unchecking this does not write "OutlineCloseButton=false" in breezerc, causing the circle to be drawn for close tab buttons, with only the circle outline disappearing on the window decoration's close button, causing this inconsistency.

From a VM snapshot, 5.22.5 is a last known good version. 5.23.3 inhibits the bad behaviour, but it may have regressed as early as 5.23.0.


STEPS TO REPRODUCE

1. Check "Draw a circle around close button" for Breeze's window decoration and apply.
2. "OutlineCloseButton=true" appears in ~/.config/breezerc
3. Open tabs in Dolphin: both the tab close button and window close button draw a circle as expected.

4. Uncheck "Draw a circle around close button" and apply.
5. "OutlineCloseButton=true" disappears from ~/.config/breezerc
6. Dolphin's close tab button shows the outline, but does disappear on the window's close button.

7. Manually add "OutlineCloseButton=false" to ~/.config/breezerc
8. Relaunch Dolphin. Both the close tab buttons and window decorations no longer draw a circle.


OBSERVED RESULT

Unchecking the option causes the close button shape to be inconsistent across Breeze. Very confusing as the user tries looking in other areas (like Breeze's "Application Style") in case there were separate settings for widgets and window decorations, which is currently not the case.


EXPECTED RESULT

Unchecking the option turns off the circle outline for both widgets (e.g. close tab) and window decoration's close button.

The feature is functional by manually setting 'false' in ~/.config/breezerc:
```
[Common]
OutlineCloseButton=false
```

It seems like the code may be deleting the line under the assumption that unchecked values = delete/blank the key, but this doesn't work in this context as no key = true, so the tab close button will always be drawn unless the user was aware of the config file or this bug.


SOFTWARE/OS VERSIONS
OS: Arch Linux
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2


ADDITIONAL INFORMATION

Bug 419474 is related in that this an unexpected link between a window decoration setting and one that affects the application style too. An idea could be to add "Draw a circle around close button" to the application style's settings instead.
Comment 1 Nate Graham 2022-01-13 04:51:17 UTC
> By default, this is checked
In fact it is not checked by default. Therefore the lack of a setting is interpreted as "false". For better or worse, this is the way all defaults work throughout KDE software; only when a setting it using a non-default value does there need to be a setting written to the config file, and when it returns to its default value, the config file entry is deleted.

Perhaps your distro is patching the default to be true but changed the code incorrectly? If you click on the "Defaults" button in the dialog window that contains this checkbox, what happens?
Comment 2 Luke Horwell 2022-01-13 12:11:47 UTC
> If you click on the "Defaults" button in the dialog window that contains this checkbox, what happens?

It's unchecked, my bad. Sorry! I think my confusion came from seeing this in the code:
https://invent.kde.org/plasma/breeze/-/blob/d3490373c2988c4c062351874dae4a2bf3981174/kstyle/breeze.kcfg#L34-37

I checked on KDE Neon, the problem happens there too.

Thanks for clarifying how defaults should work in configuration files, that makes sense. I've created a merge request to fix this: 
https://invent.kde.org/plasma/breeze/-/merge_requests/167

Glad it's a simple negation and nothing complex. Can confirm recompiling Breeze with this correction fixes the issue.
Comment 3 Nate Graham 2022-01-13 18:02:04 UTC
Git commit f2d33bd33e3b823cbb485a03d656226ae0575a6a by Nate Graham, on behalf of Luke Horwell.
Committed on 13/01/2022 at 18:02.
Pushed by ngraham into branch 'master'.

Fix OutlineCloseButton default for close tab buttons

Under Window Decorations, the option "Draw a circle around close button"
is unchecked by default. This normally applies to both window and tab close buttons, but tab buttons permanently had the circle visible because this boolean was incorrect.

This made it impossible for the user to disable this style via GUI. `OutlineCloseButton=false` had to be explicitly added to `~/.config/breezerc`.

Fixes a regression that started in the 5.23 cycle.
FIXED-IN: 5.24

M  +1    -1    kstyle/breeze.kcfg

https://invent.kde.org/plasma/breeze/commit/f2d33bd33e3b823cbb485a03d656226ae0575a6a
Comment 4 Nate Graham 2022-01-13 18:02:26 UTC
Git commit eb73e004f329aa6d76f1ededfe964836ac364960 by Nate Graham, on behalf of Luke Horwell.
Committed on 13/01/2022 at 18:02.
Pushed by ngraham into branch 'Plasma/5.24'.

Fix OutlineCloseButton default for close tab buttons

Under Window Decorations, the option "Draw a circle around close button"
is unchecked by default. This normally applies to both window and tab close buttons, but tab buttons permanently had the circle visible because this boolean was incorrect.

This made it impossible for the user to disable this style via GUI. `OutlineCloseButton=false` had to be explicitly added to `~/.config/breezerc`.

Fixes a regression that started in the 5.23 cycle.
FIXED-IN: 5.24


(cherry picked from commit f2d33bd33e3b823cbb485a03d656226ae0575a6a)

M  +1    -1    kstyle/breeze.kcfg

https://invent.kde.org/plasma/breeze/commit/eb73e004f329aa6d76f1ededfe964836ac364960