diff --git a/src/Gui/Stylesheets/FreeCAD Dark.qss b/src/Gui/Stylesheets/FreeCAD Dark.qss index 7b17dfa0b3..44ba4ba450 100644 --- a/src/Gui/Stylesheets/FreeCAD Dark.qss +++ b/src/Gui/Stylesheets/FreeCAD Dark.qss @@ -2885,6 +2885,10 @@ QPushButton[objectName="buttonIFCPropertiesDelete"] { min-width: 100px; } +QGroupBox[objectName="matOpsGrpBox"] QPushButton { + min-width: 235px; +} + /* 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 { background-color: @ThemeAccentColor1; diff --git a/src/Gui/Stylesheets/FreeCAD Light.qss b/src/Gui/Stylesheets/FreeCAD Light.qss index 392de79236..1981d29924 100644 --- a/src/Gui/Stylesheets/FreeCAD Light.qss +++ b/src/Gui/Stylesheets/FreeCAD Light.qss @@ -2890,6 +2890,10 @@ PushButton[objectName="buttonIFCPropertiesDelete"] { min-width: 100px; } +QGroupBox[objectName="matOpsGrpBox"] QPushButton { + min-width: 235px; +} + /* 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 { background-color: @ThemeAccentColor1; diff --git a/src/Mod/BIM/bimcommands/BimMaterial.py b/src/Mod/BIM/bimcommands/BimMaterial.py index a8f896e24e..29061417e7 100644 --- a/src/Mod/BIM/bimcommands/BimMaterial.py +++ b/src/Mod/BIM/bimcommands/BimMaterial.py @@ -121,13 +121,18 @@ class BIM_Material: buttonClear.clicked.connect(self.onClearSearch) lay.addLayout(searchLayout) + createButtonsLayoutBox = QtGui.QGroupBox( + translate("BIM", " Material operations"), self.dlg + ) + createButtonsLayoutBox.setObjectName("matOpsGrpBox") + createButtonsLayout = QtGui.QGridLayout() + # create - createLayout = QtGui.QHBoxLayout() buttonCreate = QtGui.QPushButton( translate("BIM", "Create new material"), self.dlg ) buttonCreate.setIcon(QtGui.QIcon(":/icons/Arch_Material.svg")) - createLayout.addWidget(buttonCreate) + createButtonsLayout.addWidget(buttonCreate, 0, 0) buttonCreate.clicked.connect(self.onCreate) # create multi @@ -135,9 +140,8 @@ class BIM_Material: translate("BIM", "Create new multi-material"), self.dlg ) buttonMulti.setIcon(QtGui.QIcon(":/icons/Arch_Material_Multi.svg")) - createLayout.addWidget(buttonMulti) + createButtonsLayout.addWidget(buttonMulti, 0, 1) buttonMulti.clicked.connect(self.onMulti) - lay.addLayout(createLayout) # merge dupes opsLayout = QtGui.QHBoxLayout() @@ -145,7 +149,7 @@ class BIM_Material: translate("BIM", "Merge duplicates"), self.dlg ) buttonMergeDupes.setIcon(QtGui.QIcon(":/icons/view-refresh.svg")) - opsLayout.addWidget(buttonMergeDupes) + createButtonsLayout.addWidget(buttonMergeDupes, 1, 0) buttonMergeDupes.clicked.connect(self.onMergeDupes) # delete unused @@ -153,9 +157,11 @@ class BIM_Material: translate("BIM", "Delete unused"), self.dlg ) buttonDeleteUnused.setIcon(QtGui.QIcon(":/icons/delete.svg")) - opsLayout.addWidget(buttonDeleteUnused) + createButtonsLayout.addWidget(buttonDeleteUnused, 1, 1) buttonDeleteUnused.clicked.connect(self.onDeleteUnused) - lay.addLayout(opsLayout) + + createButtonsLayoutBox.setLayout(createButtonsLayout) + lay.addWidget(createButtonsLayoutBox) # add standard buttons buttonBox = QtGui.QDialogButtonBox(self.dlg)