Skip to content

Commit a178b85

Browse files
committedApr 1, 2013
Data defined symbol UI clean up
- Reduce margins - Remove cell selection - Adjust first column width
1 parent 9d6428f commit a178b85

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed
 

‎src/gui/symbology-ng/qgsdatadefinedsymboldialog.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ QgsDataDefinedSymbolDialog::QgsDataDefinedSymbolDialog( const QMap< QString, QPa
1717
}
1818

1919
mTableWidget->setRowCount( properties.size() );
20+
2021
int i = 0;
2122
QMap< QString, QPair< QString, QString > >::const_iterator it = properties.constBegin();
2223
for ( ; it != properties.constEnd(); ++it )
@@ -25,6 +26,8 @@ QgsDataDefinedSymbolDialog::QgsDataDefinedSymbolDialog( const QMap< QString, QPa
2526
QCheckBox* cb = new QCheckBox( this );
2627
cb->setChecked( !it.value().second.isEmpty() );
2728
mTableWidget->setCellWidget( i, 0, cb );
29+
mTableWidget->setColumnWidth(0, cb->width() );
30+
2831

2932
//property name
3033
QTableWidgetItem* propertyItem = new QTableWidgetItem( it.value().first );

‎src/ui/qgsdatadefinedsymboldialogbase.ui

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,26 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>400</width>
10-
<height>300</height>
9+
<width>406</width>
10+
<height>282</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>Data defined properties</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout">
17+
<property name="leftMargin">
18+
<number>0</number>
19+
</property>
20+
<property name="topMargin">
21+
<number>0</number>
22+
</property>
23+
<property name="rightMargin">
24+
<number>0</number>
25+
</property>
26+
<property name="bottomMargin">
27+
<number>3</number>
28+
</property>
1729
<item row="1" column="0">
1830
<widget class="QDialogButtonBox" name="mButtonBox">
1931
<property name="orientation">
@@ -26,6 +38,35 @@
2638
</item>
2739
<item row="0" column="0">
2840
<widget class="QTableWidget" name="mTableWidget">
41+
<property name="frameShape">
42+
<enum>QFrame::NoFrame</enum>
43+
</property>
44+
<property name="selectionMode">
45+
<enum>QAbstractItemView::NoSelection</enum>
46+
</property>
47+
<property name="showGrid">
48+
<bool>false</bool>
49+
</property>
50+
<property name="gridStyle">
51+
<enum>Qt::NoPen</enum>
52+
</property>
53+
<attribute name="horizontalHeaderVisible">
54+
<bool>true</bool>
55+
</attribute>
56+
<attribute name="horizontalHeaderHighlightSections">
57+
<bool>false</bool>
58+
</attribute>
59+
<attribute name="verticalHeaderVisible">
60+
<bool>false</bool>
61+
</attribute>
62+
<attribute name="verticalHeaderHighlightSections">
63+
<bool>false</bool>
64+
</attribute>
65+
<row>
66+
<property name="text">
67+
<string>New Row</string>
68+
</property>
69+
</row>
2970
<column>
3071
<property name="text">
3172
<string/>

0 commit comments

Comments
 (0)
Please sign in to comment.