From 35f6f79dda79c1858268bfafdff535423b1147c9 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Thu, 1 Aug 2019 16:34:25 -0600 Subject: [PATCH] [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 --- kcmkwin/kwindecoration/package/contents/ui/main.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kcmkwin/kwindecoration/package/contents/ui/main.qml b/kcmkwin/kwindecoration/package/contents/ui/main.qml index 2afb3647b0..5c8316df1d 100644 --- a/kcmkwin/kwindecoration/package/contents/ui/main.qml +++ b/kcmkwin/kwindecoration/package/contents/ui/main.qml @@ -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 {