Merge pull request #20109 from Syres916/IFCPropertiesWindow_Fix

[BIM] Correct styling of DeleteIFCProperties button and add GroupBox for the two lower comboboxes and the button
This commit is contained in:
Yorik van Havre
2025-03-11 12:48:45 +00:00
committed by GitHub
4 changed files with 43 additions and 27 deletions

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>567</width>
<width>1200</width>
<height>608</height>
</rect>
</property>
@@ -162,26 +162,34 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QComboBox" name="comboProperty"/>
</item>
<item>
<widget class="QComboBox" name="comboPset"/>
</item>
<item>
<widget class="QPushButton" name="buttonDelete">
<property name="text">
<string>Delete selected property/set</string>
</property>
<property name="icon">
<iconset theme="gtk-delete">
<normaloff/>
</iconset>
</property>
</widget>
</item>
</layout>
<widget class="QGroupBox" name="GroupBoxIfcProperties">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>IFC Properties</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QComboBox" name="comboProperty"/>
</item>
<item>
<widget class="QComboBox" name="comboPset"/>
</item>
<item>
<widget class="QPushButton" name="buttonIFCPropertiesDelete">
<property name="text">
<string>Delete selected property/set</string>
</property>
<property name="icon">
<iconset theme="gtk-delete">
<normaloff/>
</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">

View File

@@ -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