From 4a719a784dbf766cf2783187541d19be8fdc57dc Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Sat, 12 Jul 2025 14:41:37 +0200 Subject: [PATCH] Stylesheets: Remove padding and marign resets. Setting margins and padding to 0 on * disables margins supplied by the QStyle. That was required when QStyle was not enforced but now it can cause trouble. --- src/Gui/Stylesheets/FreeCAD.qss | 69 +-------------------------------- 1 file changed, 2 insertions(+), 67 deletions(-) diff --git a/src/Gui/Stylesheets/FreeCAD.qss b/src/Gui/Stylesheets/FreeCAD.qss index 904f1f3327..e58f6dbf7a 100644 --- a/src/Gui/Stylesheets/FreeCAD.qss +++ b/src/Gui/Stylesheets/FreeCAD.qss @@ -71,19 +71,16 @@ Resetting everything helps to unify styles across different operating systems --------------------------------------------------------------------------- */ * { - padding: 0px; - margin: 0px; border-style: none; border-image: none; border-radius: 0px; border-color: @GeneralBorderColor; border-style: none; outline: none; - color:@TextForegroundColor; + color: @TextForegroundColor; selection-background-color: @TextSelectBackgroundColor; - selection-color:@TextForegroundColor; + selection-color: @TextForegroundColor; gridline-color: @GeneralGridLinesColor; - spacing: 0px; } /* specific reset for elements inside QToolBar */ @@ -2083,39 +2080,6 @@ https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtableview --------------------------------------------------------------------------- */ -QTreeView { - qproperty-indentation: 10; - selection-background-color: transparent; -} - -QTreeView::branch { - background-color: transparent; -} - -QTreeView::branch:has-siblings:!adjoins-item {} - -QTreeView::branch:has-siblings:adjoins-item {} -QTreeView::branch:!has-children:!has-siblings:adjoins-item {} -QTreeView::branch:closed:has-children:has-siblings { - border-image: none; - image: url(qss:@IconsLocationFolderName/arrow-right-@StylesheetIconsColor.svg); -} - -QTreeView::branch:has-children:!has-siblings:closed { - border-image: none; - image: url(qss:@IconsLocationFolderName/arrow-right-@StylesheetIconsColor.svg); -} - -QTreeView::branch:open:has-children:has-siblings { - border-image: none; - image: url(qss:@IconsLocationFolderName/arrow-down-@StylesheetIconsColor.svg); -} - -QTreeView::branch:open:has-children:!has-siblings { - border-image: none; - image: url(qss:@IconsLocationFolderName/arrow-down-@StylesheetIconsColor.svg); -} - QTreeView::indicator, QListView::indicator, QTableView::indicator, @@ -2608,35 +2572,6 @@ QMdiSubWindow:active { border:2px solid @UserHighlight1Color; } -/*================================================================================================== -Settings menu #groupsTreeView: -==================================================================================================*/ - -QTreeView::branch#groupsTreeView:closed:has-children:has-siblings { - border-image: none; - image: url(qss:@IconsLocationFolderName/arrow-right-@StylesheetIconsColor.svg); -} - -QTreeView::branch#groupsTreeView:open:has-children:has-siblings { - border-image: none; - image: url(qss:@IconsLocationFolderName/arrow-down-@StylesheetIconsColor.svg); -} - -QTreeView::branch#groupsTreeView:open:has-children:!has-siblings { - - border-image: none; - image: url(qss:@IconsLocationFolderName/arrow-down-@StylesheetIconsColor.svg); -} - -QTreeView::branch#groupsTreeView:has-children:!has-siblings:closed { - border-image: none; - image: url(qss:@IconsLocationFolderName/arrow-right-@StylesheetIconsColor.svg); -} - -QTreeView::branch#groupsTreeView:has-siblings:!adjoins-item { - border-image: none; -} - /*================================================================================================== Start page ==================================================================================================*/