Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2:Update
qqc2-desktop-style
0001-Don-t-use-parent-height-width-for-implicit...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Don-t-use-parent-height-width-for-implicit-ToolSepar.patch of Package qqc2-desktop-style
From fe96943b6574547866aad0bd542baa6797dd6b42 Mon Sep 17 00:00:00 2001 From: Noah Davis <noahadvs@gmail.com> Date: Tue, 25 Aug 2020 13:53:09 -0600 Subject: [PATCH] Don't use parent height/width for implicit ToolSeparator sizing I realized this was pretty much all wrong, so I rewrote the whole thing with a structure inspired by the Default QQC2 theme. Padding property was removed since it was originally added to give the separator back the padding that it lost by having the same height as the parent. BUG: 425949 (cherry picked from commit 1f0f210ad1d8286ba7a8254664489f922cbba0c3) --- org.kde.desktop/ToolSeparator.qml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/org.kde.desktop/ToolSeparator.qml b/org.kde.desktop/ToolSeparator.qml index 197cd46..80d172f 100644 --- a/org.kde.desktop/ToolSeparator.qml +++ b/org.kde.desktop/ToolSeparator.qml @@ -12,20 +12,14 @@ import org.kde.kirigami 2.4 as Kirigami T.ToolSeparator { id: controlRoot - topPadding: 0 - bottomPadding: 0 - leftPadding: Kirigami.Units.smallSpacing - rightPadding: Kirigami.Units.smallSpacing + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + implicitContentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding) - implicitWidth: separator.width + controlRoot.leftPadding + controlRoot.rightPadding - implicitHeight: parent.height - - background: Kirigami.Separator { - id: separator - anchors { - top: controlRoot.top - bottom: controlRoot.bottom - horizontalCenter: controlRoot.horizontalCenter - } + contentItem: Kirigami.Separator { + // implicitHeight is the same as ToolBar implicitHeight minus ToolBar padding if not horizontal + implicitHeight: horizontal ? Math.floor(Kirigami.Units.devicePixelRatio) : 40 - (Kirigami.Units.smallSpacing * 2) + implicitWidth: horizontal ? 40 - (Kirigami.Units.smallSpacing * 2) : Math.floor(Kirigami.Units.devicePixelRatio) } } -- 2.25.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor