From 4e59f1c266bfaa664882999861a6a907b5820980 Mon Sep 17 00:00:00 2001 From: Ismael Asensio Date: Sat, 22 Jan 2022 02:23:06 +0100 Subject: [PATCH] FooterToolbar: Match also padding to the modules' buttons Set the padding in the sidebar footer to match the value of the breeze default padding (6px), so the "Highlight Changes" button is consistent with the footer buttons in the modules. The value is hardcoded for now, until we can get the margin values from the QStyle (the same existent comment applies). --- sidebar/package/contents/ui/FooterToolbar.qml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sidebar/package/contents/ui/FooterToolbar.qml b/sidebar/package/contents/ui/FooterToolbar.qml index dc2c4417..9e96d7ed 100644 --- a/sidebar/package/contents/ui/FooterToolbar.qml +++ b/sidebar/package/contents/ui/FooterToolbar.qml @@ -10,15 +10,20 @@ import QtQuick.Controls 2.5 as QQC2 import org.kde.systemsettings 1.0 QQC2.ToolBar { - // Match height of SystemSettings-provided footer for KCMs - // The magic number 13 comes from adding the following: - // - 6 * 2 for 6px Breeze top and bottom margin values - // - 1 to account for the height of the separator line in the toolbar + // Match height and padding of SystemSettings-provided footer for KCMs + // FIXME: get margin values from the QStyle instead of hardcoding them + // 6px are the Breeze layout margin values + // + 1 on top to account for the height of the separator line in the toolbar + topPadding: 6 + 1 + bottomPadding: 6 + leftPadding: 6 + rightPadding: 6 + // TODO: remove this sizer button if System Settings is ever changed to // use toolbuttons instead of pushbuttons, as then the heights will // automatically be equal - height: sizerButton.height + 13 + height: sizerButton.height + topPadding + bottomPadding QQC2.Button { id: sizerButton text: "I don't exist" -- GitLab