[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
This commit is contained in:
Nate Graham 2019-08-01 16:34:25 -06:00
parent 5c39795b88
commit 35f6f79dda

View file

@ -42,8 +42,16 @@ Kirigami.Page {
implicitWidth: tabLayout.implicitWidth
implicitHeight: tabLayout.implicitHeight
// TODO: replace this TabBar-plus-Frame-in-a-ColumnLayout with whatever shakes
// out of https://bugs.kde.org/show_bug.cgi?id=394296
ColumnLayout {
id: tabLayout
// Tab styles generally assume that they're touching the inner layout,
// not the frame, so we need to move the tab bar down a pixel and make
// sure it's drawn on top of the frame
Layout.bottomMargin: -1
z: 1
anchors.fill: parent
spacing: 0
Controls.TabBar {