From ef0252f935f0e3682aa1e4534c17de9e524f615c Mon Sep 17 00:00:00 2001 From: Syres916 <46537884+Syres916@users.noreply.github.com> Date: Mon, 10 Mar 2025 13:49:57 +0000 Subject: [PATCH] [BIM} Correct styling of DeleteIFCProperties window and add GroupBox --- src/Gui/Stylesheets/FreeCAD Dark.qss | 8 ++- src/Gui/Stylesheets/FreeCAD Light.qss | 8 ++- .../BIM/Resources/ui/dialogIfcProperties.ui | 50 +++++++++++-------- src/Mod/BIM/bimcommands/BimIfcProperties.py | 4 +- 4 files changed, 43 insertions(+), 27 deletions(-) diff --git a/src/Gui/Stylesheets/FreeCAD Dark.qss b/src/Gui/Stylesheets/FreeCAD Dark.qss index 0b10fa8325..7b17dfa0b3 100644 --- a/src/Gui/Stylesheets/FreeCAD Dark.qss +++ b/src/Gui/Stylesheets/FreeCAD Dark.qss @@ -2877,9 +2877,13 @@ Start page /** * Special handling for WB Tab Bar */ - #WbTabBar #WbTabBarMore { +#WbTabBar #WbTabBarMore { padding-right: 12px; - } +} + +QPushButton[objectName="buttonIFCPropertiesDelete"] { + min-width: 100px; +} /* Below is a fix for indentation in properties, but this is a QT 6 bug only and so is disabled since Windows is as I write this still on QT 5. */ /* QTreeView::item:selected:active#groupsTreeView { diff --git a/src/Gui/Stylesheets/FreeCAD Light.qss b/src/Gui/Stylesheets/FreeCAD Light.qss index 77bc028e28..392de79236 100644 --- a/src/Gui/Stylesheets/FreeCAD Light.qss +++ b/src/Gui/Stylesheets/FreeCAD Light.qss @@ -2882,9 +2882,13 @@ Start page /** * Special handling for WB Tab Bar */ - #WbTabBar #WbTabBarMore { +#WbTabBar #WbTabBarMore { padding-right: 12px; - } +} + +PushButton[objectName="buttonIFCPropertiesDelete"] { + min-width: 100px; +} /* Below is a fix for indentation in properties, but this is a QT 6 bug only and so is disabled since Windows is as I write this still on QT 5. */ /* QTreeView::item:selected:active#groupsTreeView { diff --git a/src/Mod/BIM/Resources/ui/dialogIfcProperties.ui b/src/Mod/BIM/Resources/ui/dialogIfcProperties.ui index fd51047426..784f5d0277 100644 --- a/src/Mod/BIM/Resources/ui/dialogIfcProperties.ui +++ b/src/Mod/BIM/Resources/ui/dialogIfcProperties.ui @@ -6,7 +6,7 @@ 0 0 - 567 + 1200 608 @@ -162,26 +162,34 @@ - - - - - - - - - - - Delete selected property/set - - - - - - - - - + + + true + + + IFC Properties + + + + + + + + + + + + Delete selected property/set + + + + + + + + + + diff --git a/src/Mod/BIM/bimcommands/BimIfcProperties.py b/src/Mod/BIM/bimcommands/BimIfcProperties.py index 8dde26e648..02a8f42b16 100644 --- a/src/Mod/BIM/bimcommands/BimIfcProperties.py +++ b/src/Mod/BIM/bimcommands/BimIfcProperties.py @@ -75,7 +75,7 @@ class BIM_IfcProperties: # restore saved values self.form.onlySelected.setChecked(PARAMS.GetInt("IfcPropertiesSelectedState", 0)) self.form.onlyVisible.setChecked(PARAMS.GetInt("IfcPropertiesVisibleState", 0)) - w = PARAMS.GetInt("BimIfcPropertiesDialogWidth", 567) + w = PARAMS.GetInt("BimIfcPropertiesDialogWidth", 1200) h = PARAMS.GetInt("BimIfcPropertiesDialogHeight", 608) self.form.resize(w, h) @@ -145,7 +145,7 @@ class BIM_IfcProperties: self.form.searchField.editTextChanged.connect(self.update) self.form.comboProperty.currentIndexChanged.connect(self.addProperty) self.form.comboPset.currentIndexChanged.connect(self.addPset) - self.form.buttonDelete.clicked.connect(self.removeProperty) + self.form.buttonIFCPropertiesDelete.clicked.connect(self.removeProperty) self.form.treeProperties.setSortingEnabled(True) # center the dialog over FreeCAD window