Commit graph

12 commits

Author SHA1 Message Date
Kai Uwe Broulik
5ea54eda5d [kcmkwin/kwindecoration] Don't exec() QDialog
Using nested event loops with QML is always troublesome.

BUG: 421053
FIXED-IN: 5.18.6

Differential Revision: https://phabricator.kde.org/D29473
2020-05-06 15:15:03 +02:00
Cyril Rossi
687fcd8203 KCM KWinDecoration port to KConfigXT
Summary: Port to KConfigXt and also consider immutable element

Reviewers: #kwin, ervin, bport, mart, davidedmundson

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25949
2020-01-14 11:01:10 +01:00
Filip Fila
fd69924e51 [kcmkwin/kwindecoration] Better presentation of tabs
Summary:
Tabs in the Window Decoration KCM look awkward now because the frame is drawing an extra line while the tab bar is also drawing its line.

This patch just slightly alters an existing hack so that the frame's top line can't be seen.

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25582
2019-11-28 19:39:21 +01:00
Nate Graham
a151edd29b [kcmkwin/kwindecoration] Fix default window size in KCMShell
This also fixes a binding loop.

BUG: 413557
FIXED-IN: 5.17.2
2019-10-28 12:43:33 -06:00
Kai Uwe Broulik
2ce1d99221 [kcmkwin/kwindecoration] Elide "theme default border size" CheckBox
Otherwise the layout explodes.
Unfortunately it seems Layouts don't shrink the items within even if there's not enough room at all, so I need this fillWidth + maximumWidth workaround.

Differential Revision: https://phabricator.kde.org/D24885
2019-10-23 13:48:21 +02:00
Nate Graham
35f6f79dda [kcmkwin/kwindecoration] Slightly improve tab bar's integration with frame
Summary:
The QML Window Decorations KCM uses a fake tab bar with code copied from Plasma-pa, due
to the lack of a real QML tab widget (see https://bugs.kde.org/show_bug.cgi?id=394296).
As a result, we have to manufacture our own by combining a TabBar with a frame in which
the content sits, and any change made to one needs to be applied to the other as well.

The Plasma-pa version just received a minor change in D22533. This patch implements the
same change for the Window Decorations KCM so they don't look inconsistent with one
another.

Test Plan: Before-and-afters are identical to the images in D22533

Reviewers: #kwin, #vdg, filipf

Reviewed By: #vdg, filipf

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22886
2019-08-01 16:44:28 -06:00
Roman Gilg
d51b8dc093 [decorations] Let KDecoration plugins recommend a border size per default
Summary:
This is an alternative solution to T8707 and in comparision to D13276 a less
drastic change to KWin's default behavior.

Instead of changing the border size default for all KDecoration plugins by
switching the default from border size Normal to None introduce new
functionality, which allows a KDecoration plugin to recommend a border size in
its metadata. By default KWin listens for these recommendations and sets the
border size accordingly.

If there is no metadata recommending a border size, KWin falls back to the
current setting of Normal sized borders.

A user is able to override the recommendations from the KCM, which has been
extended accordingly.

Test Plan: Manually with adjusted metadata of Breeze.

Reviewers: #kwin, #plasma, #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: hpereiradacosta, filipf, anemeth, davidedmundson, abetts, graesslin, ngraham, zzag, kwin

Tags: #kwin

Maniphest Tasks: T8707

Differential Revision: https://phabricator.kde.org/D13284
2019-06-06 22:24:45 +02:00
Nate Graham
48cacae8cf [kcmkwin/kwindecoration] Refine drag-and-drop button UI
Summary:
- Reduce the fake titlebar's height so it matches the real titlebar a bit better
- Reduce background opacity while dropping button to diminish visual noise
- Increase label size
- Re-word label for greater clarity
- Remove redundant icon (the text is enough)

BUG: 407109
FIXED-IN: 5.16.0

Test Plan: {F6804068, size=full}

Reviewers: #vdg, #kwin, GB_2, davidedmundson

Reviewed By: #vdg, #kwin, GB_2, davidedmundson

Subscribers: GB_2, abetts, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20968
2019-05-02 17:07:22 -06:00
Kai Uwe Broulik
bc25e7c474 [kcmkwin/kwindecoration] Use new API to set cell size properly
Thanks to 5cfdbaa4b081a030a01477fd13c20f710fe58d4b in kdeclarative the implicitCellWidth
and implicitCellHeight of the GridView can be adjusted without hacks.

Differential Revision: https://phabricator.kde.org/D19729
2019-03-14 09:34:48 +01:00
Kai Uwe Broulik
50e74c5517 [kcmkwin/kwindecoration] Set implicit size
Ensures the KCM opens with a sane default size when opened standalone via kcmshell

Differential Revision: https://phabricator.kde.org/D19730
2019-03-14 09:34:27 +01:00
Vlad Zagorodniy
82b3e2a63a Resurrect show tooltips option
Summary:
In KDE 4, there was a very handy option to disable decoration tooltips.
Decoration tooltips were lost in transition to KDE Plasma 5, and so
the option.

Given that decoration tooltips were brought back to KDE Plasma 5, "Show
decoration button tooltips" option can be still useful for people(like me)
who may wish to disable them because of personal preference.

Reviewers: #kwin, broulik, mart

Reviewed By: #kwin, mart

Subscribers: ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19152
2019-03-05 00:38:55 +02:00
Valerio Pilo
8350c0f2ce [kcmkwin/kwindecoration] Rewrite the KWin decorations settings as a ConfigModule
Summary:
* Wrote new KCM based on KQuickAddons::ConfigModule.
* Remade QMLs for Buttons and Themes tabs.
* Updated bridge model code for new plugin lookup API (fixes warnings).
* Fixed decoration shadow changing messing with the previews sizes.
* Fixed button drag and drop issues (see D18104).
* Fixed default settings button behavior and detection of settings changes.
* Updated Get Hot New Stuff.
* Removed apply button in previewbridge.cpp: After applying changes, a theme's KCModule is invalidated.

BUG: 389431
BUG: 350122
BUG: 346222
BUG: 342816
BUG: 397595

{F6574963} | {F6574962} | {F6574961} | {F6574960}

Test Plan:
* Verified saving and loading for every setting
* Checked shadows of Breeze and Oxygen
* Tested all possible drag&drop operations on both sides of the fake titlebar
* Changed color schemes (with `kcmshell5 colors`) while showing the Themes tab to see if all previews update correctly their palettes
* Tested on a fresh Neon-developer account, via kcmshell and systemsettings

Reviewers: #vdg, abetts, ngraham, #kwin, davidedmundson

Reviewed By: #vdg, #kwin, davidedmundson

Subscribers: zzag, GB_2, ngraham, broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18458
2019-02-10 13:01:04 +01:00