Skip to content

Commit bbe1aae

Browse files
authored
Fix save style dialog expansion
and declutter the UI
1 parent 5047571 commit bbe1aae

File tree

1 file changed

+88
-113
lines changed

1 file changed

+88
-113
lines changed

src/ui/qgsvectorlayersavestyledialog.ui

Lines changed: 88 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,42 @@
1414
<string>Save layer style</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout">
17-
<item row="2" column="0" colspan="2">
18-
<widget class="QWidget" name="mSaveToDbWidget" native="true">
19-
<layout class="QGridLayout" name="gridLayout_3">
17+
<item row="0" column="1">
18+
<widget class="QComboBox" name="mStyleTypeComboBox">
19+
<property name="sizePolicy">
20+
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
21+
<horstretch>0</horstretch>
22+
<verstretch>0</verstretch>
23+
</sizepolicy>
24+
</property>
25+
</widget>
26+
</item>
27+
<item row="0" column="0">
28+
<widget class="QLabel" name="mModeLabel">
29+
<property name="text">
30+
<string>Save style</string>
31+
</property>
32+
</widget>
33+
</item>
34+
<item row="3" column="0" colspan="2">
35+
<widget class="QDialogButtonBox" name="buttonBox">
36+
<property name="orientation">
37+
<enum>Qt::Horizontal</enum>
38+
</property>
39+
<property name="standardButtons">
40+
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
41+
</property>
42+
</widget>
43+
</item>
44+
<item row="1" column="0" colspan="2">
45+
<widget class="QWidget" name="mSaveToFileWidget" native="true">
46+
<property name="sizePolicy">
47+
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
48+
<horstretch>0</horstretch>
49+
<verstretch>0</verstretch>
50+
</sizepolicy>
51+
</property>
52+
<layout class="QGridLayout" name="gridLayout_2">
2053
<property name="leftMargin">
2154
<number>0</number>
2255
</property>
@@ -30,83 +63,38 @@
3063
<number>0</number>
3164
</property>
3265
<item row="0" column="0">
33-
<widget class="QLabel" name="nameLabel">
66+
<widget class="QLabel" name="label">
3467
<property name="text">
35-
<string>Style name</string>
36-
</property>
37-
<property name="buddy">
38-
<cstring>mDbStyleNameEdit</cstring>
68+
<string>File</string>
3969
</property>
4070
</widget>
4171
</item>
4272
<item row="0" column="1">
43-
<widget class="QLineEdit" name="mDbStyleNameEdit"/>
73+
<widget class="QgsFileWidget" name="mFileWidget" native="true"/>
4474
</item>
4575
<item row="1" column="0">
46-
<widget class="QLabel" name="descriptionLabel">
76+
<widget class="QLabel" name="label_3">
4777
<property name="text">
48-
<string>Description</string>
78+
<string>Categories</string>
4979
</property>
5080
</widget>
5181
</item>
5282
<item row="1" column="1">
53-
<widget class="QPlainTextEdit" name="mDbStyleDescriptionEdit"/>
54-
</item>
55-
<item row="2" column="0" colspan="2">
56-
<widget class="QLabel" name="label_2">
57-
<property name="text">
58-
<string>Optionally pick an input form for attribute editing (QT Designer UI format), it will be stored in the database</string>
59-
</property>
60-
<property name="textFormat">
61-
<enum>Qt::PlainText</enum>
62-
</property>
63-
<property name="scaledContents">
64-
<bool>false</bool>
65-
</property>
66-
<property name="wordWrap">
67-
<bool>true</bool>
68-
</property>
69-
</widget>
70-
</item>
71-
<item row="3" column="0">
72-
<widget class="QLabel" name="mUILabel">
73-
<property name="text">
74-
<string>UI</string>
75-
</property>
76-
<property name="buddy">
77-
<cstring>mDbStyleNameEdit</cstring>
78-
</property>
79-
</widget>
80-
</item>
81-
<item row="3" column="1">
82-
<widget class="QgsFileWidget" name="mDbStyleUIFileWidget" native="true"/>
83-
</item>
84-
<item row="4" column="0">
85-
<widget class="QPushButton" name="mHelpButton">
86-
<property name="text">
87-
<string>Help</string>
88-
</property>
89-
</widget>
90-
</item>
91-
<item row="4" column="1">
92-
<widget class="QCheckBox" name="mDbStyleUseAsDefault">
93-
<property name="text">
94-
<string>Use as default style for this layer</string>
83+
<widget class="QListView" name="mStyleCategoriesListView">
84+
<property name="sizePolicy">
85+
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
86+
<horstretch>0</horstretch>
87+
<verstretch>0</verstretch>
88+
</sizepolicy>
9589
</property>
9690
</widget>
9791
</item>
9892
</layout>
9993
</widget>
10094
</item>
101-
<item row="1" column="0" colspan="2">
102-
<widget class="QWidget" name="mSaveToFileWidget" native="true">
103-
<property name="sizePolicy">
104-
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
105-
<horstretch>0</horstretch>
106-
<verstretch>0</verstretch>
107-
</sizepolicy>
108-
</property>
109-
<layout class="QGridLayout" name="gridLayout_2">
95+
<item row="2" column="0" colspan="2">
96+
<widget class="QWidget" name="mSaveToDbWidget" native="true">
97+
<layout class="QGridLayout" name="gridLayout_3">
11098
<property name="leftMargin">
11199
<number>0</number>
112100
</property>
@@ -120,75 +108,55 @@
120108
<number>0</number>
121109
</property>
122110
<item row="0" column="0">
123-
<widget class="QLabel" name="label">
111+
<widget class="QLabel" name="nameLabel">
124112
<property name="text">
125-
<string>File</string>
113+
<string>Style name</string>
114+
</property>
115+
<property name="buddy">
116+
<cstring>mDbStyleNameEdit</cstring>
126117
</property>
127118
</widget>
128119
</item>
129120
<item row="0" column="1">
130-
<widget class="QgsFileWidget" name="mFileWidget" native="true"/>
121+
<widget class="QLineEdit" name="mDbStyleNameEdit"/>
131122
</item>
132123
<item row="1" column="0">
133-
<widget class="QLabel" name="label_3">
124+
<widget class="QLabel" name="descriptionLabel">
134125
<property name="text">
135-
<string>Categories</string>
126+
<string>Description</string>
136127
</property>
137128
</widget>
138129
</item>
139130
<item row="1" column="1">
140-
<widget class="QListView" name="mStyleCategoriesListView">
141-
<property name="sizePolicy">
142-
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
143-
<horstretch>0</horstretch>
144-
<verstretch>0</verstretch>
145-
</sizepolicy>
131+
<widget class="QPlainTextEdit" name="mDbStyleDescriptionEdit"/>
132+
</item>
133+
<item row="2" column="0">
134+
<widget class="QLabel" name="mUILabel">
135+
<property name="text">
136+
<string>UI</string>
137+
</property>
138+
<property name="buddy">
139+
<cstring>mDbStyleNameEdit</cstring>
140+
</property>
141+
</widget>
142+
</item>
143+
<item row="3" column="1">
144+
<widget class="QCheckBox" name="mDbStyleUseAsDefault">
145+
<property name="text">
146+
<string>Use as default style for this layer</string>
147+
</property>
148+
</widget>
149+
</item>
150+
<item row="2" column="1">
151+
<widget class="QgsFileWidget" name="mDbStyleUIFileWidget" native="true">
152+
<property name="toolTip">
153+
<string>Optionally pick an input form for attribute editing (QT Designer UI format), it will be stored in the database</string>
146154
</property>
147155
</widget>
148156
</item>
149157
</layout>
150158
</widget>
151159
</item>
152-
<item row="0" column="1">
153-
<widget class="QComboBox" name="mStyleTypeComboBox">
154-
<property name="sizePolicy">
155-
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
156-
<horstretch>0</horstretch>
157-
<verstretch>0</verstretch>
158-
</sizepolicy>
159-
</property>
160-
</widget>
161-
</item>
162-
<item row="0" column="0">
163-
<widget class="QLabel" name="mModeLabel">
164-
<property name="text">
165-
<string>Save style</string>
166-
</property>
167-
</widget>
168-
</item>
169-
<item row="4" column="0" colspan="2">
170-
<widget class="QDialogButtonBox" name="buttonBox">
171-
<property name="orientation">
172-
<enum>Qt::Horizontal</enum>
173-
</property>
174-
<property name="standardButtons">
175-
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
176-
</property>
177-
</widget>
178-
</item>
179-
<item row="3" column="0">
180-
<spacer name="verticalSpacer">
181-
<property name="orientation">
182-
<enum>Qt::Vertical</enum>
183-
</property>
184-
<property name="sizeHint" stdset="0">
185-
<size>
186-
<width>20</width>
187-
<height>40</height>
188-
</size>
189-
</property>
190-
</spacer>
191-
</item>
192160
</layout>
193161
</widget>
194162
<customwidgets>
@@ -199,6 +167,13 @@
199167
<container>1</container>
200168
</customwidget>
201169
</customwidgets>
170+
<tabstops>
171+
<tabstop>mStyleTypeComboBox</tabstop>
172+
<tabstop>mStyleCategoriesListView</tabstop>
173+
<tabstop>mDbStyleNameEdit</tabstop>
174+
<tabstop>mDbStyleDescriptionEdit</tabstop>
175+
<tabstop>mDbStyleUseAsDefault</tabstop>
176+
</tabstops>
202177
<resources/>
203178
<connections>
204179
<connection>

0 commit comments

Comments
 (0)