Skip to content

Commit cecb3d1

Browse files
committedAug 12, 2014
Port some more color buttons to QgsColorButtonV2
1 parent 766f078 commit cecb3d1

10 files changed

+360
-201
lines changed
 

‎src/app/qgsannotationwidget.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,15 @@ QgsAnnotationWidget::QgsAnnotationWidget( QgsAnnotationItem* item, QWidget * par
4444
mFrameColorButton->setColor( mItem->frameColor() );
4545
mFrameColorButton->setColorDialogTitle( tr( "Select frame color" ) );
4646
mFrameColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
47+
mFrameColorButton->setContext( "symbology" );
48+
mFrameColorButton->setNoColorString( tr( "Transparent frame" ) );
49+
mFrameColorButton->setShowNoColor( true );
4750
mBackgroundColorButton->setColor( mItem->frameBackgroundColor() );
4851
mBackgroundColorButton->setColorDialogTitle( tr( "Select background color" ) );
4952
mBackgroundColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
53+
mBackgroundColorButton->setContext( "symbology" );
54+
mBackgroundColorButton->setNoColorString( tr( "Transparent" ) );
55+
mBackgroundColorButton->setShowNoColor( true );
5056

5157
const QgsMarkerSymbolV2* symbol = mItem->markerSymbol();
5258
if ( symbol )

‎src/app/qgsdecorationcopyrightdialog.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ QgsDecorationCopyrightDialog::QgsDecorationCopyrightDialog( QgsDecorationCopyrig
4242
cboPlacement->setCurrentIndex( mDeco.mPlacementIndex );
4343
// color
4444
pbnColorChooser->setColor( mDeco.mLabelQColor );
45+
pbnColorChooser->setContext( "gui" );
46+
pbnColorChooser->setColorDialogTitle( tr( "Select text color" ) );
47+
4548
QTextCursor cursor = txtCopyrightText->textCursor();
4649
txtCopyrightText->selectAll();
4750
txtCopyrightText->setTextColor( mDeco.mLabelQColor );

‎src/app/qgsdecorationscalebardialog.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ QgsDecorationScaleBarDialog::QgsDecorationScaleBarDialog( QgsDecorationScaleBar&
5959
cboStyle->setCurrentIndex( mDeco.mStyleIndex );
6060

6161
pbnChangeColor->setColor( mDeco.mColor );
62+
pbnChangeColor->setContext( "gui" );
63+
pbnChangeColor->setColorDialogTitle( tr( "Select scalebar color" ) );
6264
}
6365

6466
QgsDecorationScaleBarDialog::~QgsDecorationScaleBarDialog()

‎src/app/qgslabelinggui.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,23 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
141141

142142
populateFontCapitalsComboBox();
143143

144+
// color buttons
145+
mPreviewBackgroundBtn->setColorDialogTitle( tr( "Select fill color" ) );
146+
mPreviewBackgroundBtn->setContext( "labelling" );
147+
btnTextColor->setColorDialogTitle( tr( "Select text color" ) );
148+
btnTextColor->setContext( "labelling" );
149+
btnTextColor->setDefaultColor( Qt::black );
150+
btnBufferColor->setColorDialogTitle( tr( "Select buffer color" ) );
151+
btnBufferColor->setContext( "labelling" );
152+
btnBufferColor->setDefaultColor( Qt::white );
153+
mShapeBorderColorBtn->setColorDialogTitle( tr( "Select border color" ) );
154+
mShapeBorderColorBtn->setContext( "labelling" );
155+
mShapeFillColorBtn->setColorDialogTitle( tr( "Select fill color" ) );
156+
mShapeFillColorBtn->setContext( "labelling" );
157+
mShadowColorBtn->setColorDialogTitle( tr( "Select shadow color" ) );
158+
mShadowColorBtn->setContext( "labelling" );
159+
mShadowColorBtn->setDefaultColor( Qt::black );
160+
144161
// set up quadrant offset button group
145162
mQuadrantBtnGrp = new QButtonGroup( this );
146163
mQuadrantBtnGrp->addButton( mPointOffsetAboveLeft, ( int )QgsPalLayerSettings::QuadrantAboveLeft );
@@ -344,6 +361,7 @@ void QgsLabelingGui::init()
344361
chkPreserveRotation->setChecked( lyr.preserveRotation );
345362

346363
mPreviewBackgroundBtn->setColor( lyr.previewBkgrdColor );
364+
mPreviewBackgroundBtn->setDefaultColor( lyr.previewBkgrdColor );
347365
setPreviewBackground( lyr.previewBkgrdColor );
348366

349367
mScaleBasedVisibilityChkBx->setChecked( lyr.scaleVisibility );

‎src/app/qgsoptions.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
101101

102102
mIdentifyHighlightColorButton->setColorDialogTitle( tr( "Identify highlight color" ) );
103103
mIdentifyHighlightColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
104+
mIdentifyHighlightColorButton->setContext( "gui" );
105+
mIdentifyHighlightColorButton->setDefaultColor( QGis::DEFAULT_HIGHLIGHT_COLOR );
104106

105107
QSettings settings;
106108

@@ -616,20 +618,28 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
616618
int myBlue = settings.value( "/qgis/default_selection_color_blue", 0 ).toInt();
617619
int myAlpha = settings.value( "/qgis/default_selection_color_alpha", 255 ).toInt();
618620
pbnSelectionColor->setColor( QColor( myRed, myGreen, myBlue, myAlpha ) );
619-
pbnSelectionColor->setColorDialogTitle( tr( "Selection color" ) );
621+
pbnSelectionColor->setColorDialogTitle( tr( "Set selection color" ) );
620622
pbnSelectionColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
623+
pbnSelectionColor->setContext( "gui" );
624+
pbnSelectionColor->setDefaultColor( QColor( 255, 255, 0, 255 ) );
621625

622626
//set the default color for canvas background
623627
myRed = settings.value( "/qgis/default_canvas_color_red", 255 ).toInt();
624628
myGreen = settings.value( "/qgis/default_canvas_color_green", 255 ).toInt();
625629
myBlue = settings.value( "/qgis/default_canvas_color_blue", 255 ).toInt();
626630
pbnCanvasColor->setColor( QColor( myRed, myGreen, myBlue ) );
631+
pbnCanvasColor->setColorDialogTitle( tr( "Set canvas color" ) );
632+
pbnCanvasColor->setContext( "gui" );
633+
pbnCanvasColor->setDefaultColor( Qt::white );
627634

628635
// set the default color for the measure tool
629636
myRed = settings.value( "/qgis/default_measure_color_red", 222 ).toInt();
630637
myGreen = settings.value( "/qgis/default_measure_color_green", 155 ).toInt();
631638
myBlue = settings.value( "/qgis/default_measure_color_blue", 67 ).toInt();
632639
pbnMeasureColor->setColor( QColor( myRed, myGreen, myBlue ) );
640+
pbnMeasureColor->setColorDialogTitle( tr( "Set measuring tool color" ) );
641+
pbnMeasureColor->setContext( "gui" );
642+
pbnMeasureColor->setDefaultColor( QColor( 222, 155, 67 ) );
633643

634644
capitaliseCheckBox->setChecked( settings.value( "/qgis/capitaliseLayerName", QVariant( false ) ).toBool() );
635645

@@ -703,6 +713,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
703713
mGridColorButton->setColor( gridColor );
704714
mGridColorButton->setColorDialogTitle( tr( "Select grid color" ) );
705715
mGridColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
716+
mGridColorButton->setContext( "gui" );
717+
mGridColorButton->setDefaultColor( QColor( 190, 190, 190, 100 ) );
706718

707719
//default composer grid style
708720
QString gridStyleString;
@@ -758,6 +770,8 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
758770
myAlpha = settings.value( "/qgis/digitizing/line_color_alpha", 200 ).toInt();
759771
mLineColorToolButton->setColor( QColor( myRed, myGreen, myBlue, myAlpha ) );
760772
mLineColorToolButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
773+
mLineColorToolButton->setContext( "gui" );
774+
mLineColorToolButton->setDefaultColor( QColor( 255, 0, 0, 200 ) );
761775

762776
//default snap mode
763777
mDefaultSnapModeComboBox->insertItem( 0, tr( "To vertex" ), "to vertex" );

‎src/ui/qgsannotationwidgetbase.ui

Lines changed: 102 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,90 +6,144 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>221</width>
9+
<width>319</width>
1010
<height>172</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>Form</string>
1515
</property>
16-
<layout class="QGridLayout" name="gridLayout_2">
17-
<item row="0" column="0">
16+
<layout class="QGridLayout" name="gridLayout">
17+
<item row="0" column="0" colspan="2">
1818
<widget class="QCheckBox" name="mMapPositionFixedCheckBox">
1919
<property name="text">
2020
<string>Fixed map position</string>
2121
</property>
2222
</widget>
2323
</item>
2424
<item row="1" column="0">
25-
<layout class="QGridLayout" name="gridLayout">
26-
<item row="3" column="1">
27-
<widget class="QgsColorButton" name="mFrameColorButton">
28-
<property name="text">
29-
<string/>
25+
<widget class="QLabel" name="mMapMarkerLabel">
26+
<property name="text">
27+
<string>Map marker</string>
28+
</property>
29+
<property name="buddy">
30+
<cstring>mMapMarkerButton</cstring>
31+
</property>
32+
</widget>
33+
</item>
34+
<item row="1" column="1">
35+
<widget class="QPushButton" name="mMapMarkerButton">
36+
<property name="text">
37+
<string/>
38+
</property>
39+
</widget>
40+
</item>
41+
<item row="2" column="0">
42+
<widget class="QLabel" name="mFrameWidthLabel">
43+
<property name="text">
44+
<string>Frame width</string>
45+
</property>
46+
<property name="buddy">
47+
<cstring>mFrameWidthSpinBox</cstring>
48+
</property>
49+
</widget>
50+
</item>
51+
<item row="2" column="1">
52+
<widget class="QDoubleSpinBox" name="mFrameWidthSpinBox"/>
53+
</item>
54+
<item row="3" column="0">
55+
<widget class="QLabel" name="mBackgroundColorLabel">
56+
<property name="text">
57+
<string>Background color</string>
58+
</property>
59+
</widget>
60+
</item>
61+
<item row="3" column="1">
62+
<layout class="QHBoxLayout" name="horizontalLayout_2">
63+
<item>
64+
<widget class="QgsColorButtonV2" name="mBackgroundColorButton">
65+
<property name="minimumSize">
66+
<size>
67+
<width>120</width>
68+
<height>0</height>
69+
</size>
70+
</property>
71+
<property name="maximumSize">
72+
<size>
73+
<width>120</width>
74+
<height>16777215</height>
75+
</size>
3076
</property>
31-
</widget>
32-
</item>
33-
<item row="2" column="0">
34-
<widget class="QLabel" name="mBackgroundColorLabel">
3577
<property name="text">
36-
<string>Background color</string>
78+
<string/>
3779
</property>
3880
</widget>
3981
</item>
40-
<item row="0" column="0">
41-
<widget class="QLabel" name="mMapMarkerLabel">
42-
<property name="text">
43-
<string>Map marker</string>
82+
<item>
83+
<spacer name="horizontalSpacer_2">
84+
<property name="orientation">
85+
<enum>Qt::Horizontal</enum>
4486
</property>
45-
<property name="buddy">
46-
<cstring>mMapMarkerButton</cstring>
87+
<property name="sizeHint" stdset="0">
88+
<size>
89+
<width>40</width>
90+
<height>20</height>
91+
</size>
4792
</property>
48-
</widget>
93+
</spacer>
4994
</item>
50-
<item row="2" column="1">
51-
<widget class="QgsColorButton" name="mBackgroundColorButton">
52-
<property name="text">
53-
<string/>
95+
</layout>
96+
</item>
97+
<item row="4" column="0">
98+
<widget class="QLabel" name="mFrameColorLabel">
99+
<property name="text">
100+
<string>Frame color</string>
101+
</property>
102+
</widget>
103+
</item>
104+
<item row="4" column="1">
105+
<layout class="QHBoxLayout" name="horizontalLayout">
106+
<item>
107+
<widget class="QgsColorButtonV2" name="mFrameColorButton">
108+
<property name="minimumSize">
109+
<size>
110+
<width>120</width>
111+
<height>0</height>
112+
</size>
113+
</property>
114+
<property name="maximumSize">
115+
<size>
116+
<width>120</width>
117+
<height>16777215</height>
118+
</size>
54119
</property>
55-
</widget>
56-
</item>
57-
<item row="0" column="1">
58-
<widget class="QPushButton" name="mMapMarkerButton">
59120
<property name="text">
60121
<string/>
61122
</property>
62123
</widget>
63124
</item>
64-
<item row="1" column="0">
65-
<widget class="QLabel" name="mFrameWidthLabel">
66-
<property name="text">
67-
<string>Frame width</string>
125+
<item>
126+
<spacer name="horizontalSpacer">
127+
<property name="orientation">
128+
<enum>Qt::Horizontal</enum>
68129
</property>
69-
<property name="buddy">
70-
<cstring>mFrameWidthSpinBox</cstring>
130+
<property name="sizeHint" stdset="0">
131+
<size>
132+
<width>40</width>
133+
<height>20</height>
134+
</size>
71135
</property>
72-
</widget>
73-
</item>
74-
<item row="1" column="1">
75-
<widget class="QDoubleSpinBox" name="mFrameWidthSpinBox"/>
76-
</item>
77-
<item row="3" column="0">
78-
<widget class="QLabel" name="mFrameColorLabel">
79-
<property name="text">
80-
<string>Frame color</string>
81-
</property>
82-
</widget>
136+
</spacer>
83137
</item>
84138
</layout>
85139
</item>
86140
</layout>
87141
</widget>
88142
<customwidgets>
89143
<customwidget>
90-
<class>QgsColorButton</class>
91-
<extends>QPushButton</extends>
92-
<header>qgscolorbutton.h</header>
144+
<class>QgsColorButtonV2</class>
145+
<extends>QToolButton</extends>
146+
<header>qgscolorbuttonv2.h</header>
93147
</customwidget>
94148
</customwidgets>
95149
<resources/>

‎src/ui/qgsdecorationcopyrightdialog.ui

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</iconset>
2020
</property>
2121
<layout class="QGridLayout" name="gridLayout">
22-
<item row="0" column="0" colspan="2">
22+
<item row="0" column="0">
2323
<widget class="QCheckBox" name="cboxEnabled">
2424
<property name="text">
2525
<string>Enable copyright label</string>
@@ -29,7 +29,7 @@
2929
</property>
3030
</widget>
3131
</item>
32-
<item row="1" column="0" colspan="2">
32+
<item row="1" column="0">
3333
<widget class="QLabel" name="label_2">
3434
<property name="text">
3535
<string>&amp;Enter your copyright label here:</string>
@@ -45,7 +45,7 @@
4545
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
4646
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
4747
p, li { white-space: pre-wrap; }
48-
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
48+
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
4949
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Verdana'; font-size:10pt;&quot;&gt;© QGIS 2013&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
5050
</property>
5151
</widget>
@@ -115,6 +115,42 @@ p, li { white-space: pre-wrap; }
115115
</property>
116116
</widget>
117117
</item>
118+
<item row="5" column="1">
119+
<layout class="QHBoxLayout" name="horizontalLayout">
120+
<item>
121+
<widget class="QgsColorButtonV2" name="pbnColorChooser">
122+
<property name="minimumSize">
123+
<size>
124+
<width>120</width>
125+
<height>0</height>
126+
</size>
127+
</property>
128+
<property name="maximumSize">
129+
<size>
130+
<width>120</width>
131+
<height>16777215</height>
132+
</size>
133+
</property>
134+
<property name="text">
135+
<string/>
136+
</property>
137+
</widget>
138+
</item>
139+
<item>
140+
<spacer name="horizontalSpacer">
141+
<property name="orientation">
142+
<enum>Qt::Horizontal</enum>
143+
</property>
144+
<property name="sizeHint" stdset="0">
145+
<size>
146+
<width>40</width>
147+
<height>20</height>
148+
</size>
149+
</property>
150+
</spacer>
151+
</item>
152+
</layout>
153+
</item>
118154
<item row="6" column="0" colspan="2">
119155
<widget class="QDialogButtonBox" name="buttonBox">
120156
<property name="orientation">
@@ -125,21 +161,14 @@ p, li { white-space: pre-wrap; }
125161
</property>
126162
</widget>
127163
</item>
128-
<item row="5" column="1">
129-
<widget class="QgsColorButton" name="pbnColorChooser">
130-
<property name="text">
131-
<string/>
132-
</property>
133-
</widget>
134-
</item>
135164
</layout>
136165
</widget>
137166
<layoutdefault spacing="6" margin="11"/>
138167
<customwidgets>
139168
<customwidget>
140-
<class>QgsColorButton</class>
141-
<extends>QPushButton</extends>
142-
<header>qgscolorbutton.h</header>
169+
<class>QgsColorButtonV2</class>
170+
<extends>QToolButton</extends>
171+
<header>qgscolorbuttonv2.h</header>
143172
</customwidget>
144173
</customwidgets>
145174
<tabstops>

‎src/ui/qgsdecorationscalebardialog.ui

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>342</width>
9+
<width>356</width>
1010
<height>255</height>
1111
</rect>
1212
</property>
@@ -127,6 +127,42 @@
127127
</property>
128128
</widget>
129129
</item>
130+
<item row="2" column="1">
131+
<layout class="QHBoxLayout" name="horizontalLayout">
132+
<item>
133+
<widget class="QgsColorButtonV2" name="pbnChangeColor">
134+
<property name="minimumSize">
135+
<size>
136+
<width>120</width>
137+
<height>0</height>
138+
</size>
139+
</property>
140+
<property name="maximumSize">
141+
<size>
142+
<width>120</width>
143+
<height>16777215</height>
144+
</size>
145+
</property>
146+
<property name="text">
147+
<string/>
148+
</property>
149+
</widget>
150+
</item>
151+
<item>
152+
<spacer name="horizontalSpacer">
153+
<property name="orientation">
154+
<enum>Qt::Horizontal</enum>
155+
</property>
156+
<property name="sizeHint" stdset="0">
157+
<size>
158+
<width>40</width>
159+
<height>20</height>
160+
</size>
161+
</property>
162+
</spacer>
163+
</item>
164+
</layout>
165+
</item>
130166
<item row="3" column="0">
131167
<widget class="QLabel" name="textLabel1_3">
132168
<property name="sizePolicy">
@@ -153,7 +189,7 @@
153189
</property>
154190
</widget>
155191
</item>
156-
<item row="4" column="0" colspan="2">
192+
<item row="4" column="0">
157193
<widget class="QCheckBox" name="chkEnable">
158194
<property name="sizePolicy">
159195
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@@ -195,21 +231,14 @@
195231
</property>
196232
</widget>
197233
</item>
198-
<item row="2" column="1">
199-
<widget class="QgsColorButton" name="pbnChangeColor">
200-
<property name="text">
201-
<string/>
202-
</property>
203-
</widget>
204-
</item>
205234
</layout>
206235
</widget>
207236
<layoutdefault spacing="6" margin="11"/>
208237
<customwidgets>
209238
<customwidget>
210-
<class>QgsColorButton</class>
211-
<extends>QPushButton</extends>
212-
<header>qgscolorbutton.h</header>
239+
<class>QgsColorButtonV2</class>
240+
<extends>QToolButton</extends>
241+
<header>qgscolorbuttonv2.h</header>
213242
</customwidget>
214243
</customwidgets>
215244
<tabstops>

‎src/ui/qgslabelingguibase.ui

Lines changed: 51 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<rect>
9595
<x>0</x>
9696
<y>0</y>
97-
<width>607</width>
97+
<width>602</width>
9898
<height>300</height>
9999
</rect>
100100
</property>
@@ -278,16 +278,16 @@
278278
</spacer>
279279
</item>
280280
<item>
281-
<widget class="QgsColorButton" name="mPreviewBackgroundBtn">
281+
<widget class="QgsColorButtonV2" name="mPreviewBackgroundBtn">
282282
<property name="minimumSize">
283283
<size>
284-
<width>64</width>
284+
<width>100</width>
285285
<height>0</height>
286286
</size>
287287
</property>
288288
<property name="maximumSize">
289289
<size>
290-
<width>64</width>
290+
<width>100</width>
291291
<height>16777215</height>
292292
</size>
293293
</property>
@@ -524,8 +524,8 @@
524524
<rect>
525525
<x>0</x>
526526
<y>0</y>
527-
<width>580</width>
528-
<height>403</height>
527+
<width>566</width>
528+
<height>388</height>
529529
</rect>
530530
</property>
531531
<layout class="QVBoxLayout" name="verticalLayout_2">
@@ -861,7 +861,7 @@
861861
</widget>
862862
</item>
863863
<item row="6" column="1">
864-
<widget class="QgsColorButton" name="btnTextColor">
864+
<widget class="QgsColorButtonV2" name="btnTextColor">
865865
<property name="sizePolicy">
866866
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
867867
<horstretch>0</horstretch>
@@ -870,13 +870,13 @@
870870
</property>
871871
<property name="minimumSize">
872872
<size>
873-
<width>100</width>
873+
<width>120</width>
874874
<height>0</height>
875875
</size>
876876
</property>
877877
<property name="maximumSize">
878878
<size>
879-
<width>100</width>
879+
<width>120</width>
880880
<height>16777215</height>
881881
</size>
882882
</property>
@@ -1229,8 +1229,8 @@ font-style: italic;</string>
12291229
<rect>
12301230
<x>0</x>
12311231
<y>0</y>
1232-
<width>223</width>
1233-
<height>315</height>
1232+
<width>383</width>
1233+
<height>389</height>
12341234
</rect>
12351235
</property>
12361236
<layout class="QVBoxLayout" name="verticalLayout_14">
@@ -1669,17 +1669,6 @@ font-style: italic;</string>
16691669
</widget>
16701670
</item>
16711671
</layout>
1672-
<zorder>mDirectSymbRightFrame</zorder>
1673-
<zorder>mDirectSymbPlacementDDBtn</zorder>
1674-
<zorder>mDirectSymbLeftDDBtn</zorder>
1675-
<zorder>mDirectSymbLeftLabel</zorder>
1676-
<zorder>mDirectSymbRightLabel</zorder>
1677-
<zorder>mDirectSymbPlacementLabel</zorder>
1678-
<zorder>mDirectSymbRevChkBx</zorder>
1679-
<zorder>mDirectSymbRightDDBtn</zorder>
1680-
<zorder>mDirectSymbLeftFrame</zorder>
1681-
<zorder>mDirectSymbRevDDBtn</zorder>
1682-
<zorder>mDirectSymbPlacementFrame</zorder>
16831672
</widget>
16841673
</item>
16851674
</layout>
@@ -1840,8 +1829,8 @@ font-style: italic;</string>
18401829
<rect>
18411830
<x>0</x>
18421831
<y>0</y>
1843-
<width>231</width>
1844-
<height>209</height>
1832+
<width>298</width>
1833+
<height>257</height>
18451834
</rect>
18461835
</property>
18471836
<layout class="QVBoxLayout" name="verticalLayout_12">
@@ -2076,7 +2065,7 @@ font-style: italic;</string>
20762065
</widget>
20772066
</item>
20782067
<item row="2" column="1">
2079-
<widget class="QgsColorButton" name="btnBufferColor">
2068+
<widget class="QgsColorButtonV2" name="btnBufferColor">
20802069
<property name="sizePolicy">
20812070
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
20822071
<horstretch>0</horstretch>
@@ -2085,13 +2074,13 @@ font-style: italic;</string>
20852074
</property>
20862075
<property name="minimumSize">
20872076
<size>
2088-
<width>100</width>
2077+
<width>120</width>
20892078
<height>0</height>
20902079
</size>
20912080
</property>
20922081
<property name="maximumSize">
20932082
<size>
2094-
<width>100</width>
2083+
<width>120</width>
20952084
<height>16777215</height>
20962085
</size>
20972086
</property>
@@ -2198,8 +2187,8 @@ font-style: italic;</string>
21982187
<rect>
21992188
<x>0</x>
22002189
<y>0</y>
2201-
<width>358</width>
2202-
<height>570</height>
2190+
<width>362</width>
2191+
<height>697</height>
22032192
</rect>
22042193
</property>
22052194
<layout class="QVBoxLayout" name="verticalLayout_21">
@@ -2326,7 +2315,7 @@ font-style: italic;</string>
23262315
</widget>
23272316
</item>
23282317
<item row="18" column="1">
2329-
<widget class="QgsColorButton" name="mShapeBorderColorBtn">
2318+
<widget class="QgsColorButtonV2" name="mShapeBorderColorBtn">
23302319
<property name="sizePolicy">
23312320
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
23322321
<horstretch>0</horstretch>
@@ -2335,13 +2324,13 @@ font-style: italic;</string>
23352324
</property>
23362325
<property name="minimumSize">
23372326
<size>
2338-
<width>100</width>
2327+
<width>120</width>
23392328
<height>0</height>
23402329
</size>
23412330
</property>
23422331
<property name="maximumSize">
23432332
<size>
2344-
<width>100</width>
2333+
<width>120</width>
23452334
<height>16777215</height>
23462335
</size>
23472336
</property>
@@ -2740,7 +2729,7 @@ font-style: italic;</string>
27402729
<widget class="QgsPenJoinStyleComboBox" name="mShapePenStyleCmbBx"/>
27412730
</item>
27422731
<item row="17" column="1">
2743-
<widget class="QgsColorButton" name="mShapeFillColorBtn">
2732+
<widget class="QgsColorButtonV2" name="mShapeFillColorBtn">
27442733
<property name="sizePolicy">
27452734
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
27462735
<horstretch>0</horstretch>
@@ -2749,13 +2738,13 @@ font-style: italic;</string>
27492738
</property>
27502739
<property name="minimumSize">
27512740
<size>
2752-
<width>100</width>
2741+
<width>120</width>
27532742
<height>0</height>
27542743
</size>
27552744
</property>
27562745
<property name="maximumSize">
27572746
<size>
2758-
<width>100</width>
2747+
<width>120</width>
27592748
<height>16777215</height>
27602749
</size>
27612750
</property>
@@ -2971,8 +2960,8 @@ font-style: italic;</string>
29712960
<rect>
29722961
<x>0</x>
29732962
<y>0</y>
2974-
<width>280</width>
2975-
<height>351</height>
2963+
<width>325</width>
2964+
<height>424</height>
29762965
</rect>
29772966
</property>
29782967
<layout class="QVBoxLayout" name="verticalLayout_22">
@@ -3039,7 +3028,7 @@ font-style: italic;</string>
30393028
<number>0</number>
30403029
</property>
30413030
<item row="10" column="1">
3042-
<widget class="QgsColorButton" name="mShadowColorBtn">
3031+
<widget class="QgsColorButtonV2" name="mShadowColorBtn">
30433032
<property name="sizePolicy">
30443033
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
30453034
<horstretch>0</horstretch>
@@ -3048,13 +3037,13 @@ font-style: italic;</string>
30483037
</property>
30493038
<property name="minimumSize">
30503039
<size>
3051-
<width>100</width>
3040+
<width>120</width>
30523041
<height>0</height>
30533042
</size>
30543043
</property>
30553044
<property name="maximumSize">
30563045
<size>
3057-
<width>100</width>
3046+
<width>120</width>
30583047
<height>16777215</height>
30593048
</size>
30603049
</property>
@@ -3437,8 +3426,8 @@ font-style: italic;</string>
34373426
<rect>
34383427
<x>0</x>
34393428
<y>0</y>
3440-
<width>290</width>
3441-
<height>700</height>
3429+
<width>377</width>
3430+
<height>831</height>
34423431
</rect>
34433432
</property>
34443433
<layout class="QVBoxLayout" name="verticalLayout_11">
@@ -4737,8 +4726,8 @@ font-style: italic;</string>
47374726
<rect>
47384727
<x>0</x>
47394728
<y>0</y>
4740-
<width>302</width>
4741-
<height>520</height>
4729+
<width>421</width>
4730+
<height>622</height>
47424731
</rect>
47434732
</property>
47444733
<layout class="QVBoxLayout" name="verticalLayout_8">
@@ -5473,35 +5462,35 @@ font-style: italic;</string>
54735462
<layoutdefault spacing="6" margin="11"/>
54745463
<customwidgets>
54755464
<customwidget>
5476-
<class>QgsCollapsibleGroupBox</class>
5477-
<extends>QGroupBox</extends>
5478-
<header>qgscollapsiblegroupbox.h</header>
5479-
<container>1</container>
5465+
<class>QgsColorButtonV2</class>
5466+
<extends>QToolButton</extends>
5467+
<header>qgscolorbuttonv2.h</header>
54805468
</customwidget>
54815469
<customwidget>
5482-
<class>QgsLabelPreview</class>
5483-
<extends>QLabel</extends>
5484-
<header>qgslabelpreview.h</header>
5470+
<class>QgsDataDefinedButton</class>
5471+
<extends>QToolButton</extends>
5472+
<header>qgsdatadefinedbutton.h</header>
54855473
</customwidget>
54865474
<customwidget>
5487-
<class>QgsPenJoinStyleComboBox</class>
5475+
<class>QgsBlendModeComboBox</class>
54885476
<extends>QComboBox</extends>
5489-
<header>qgspenstylecombobox.h</header>
5477+
<header>qgsblendmodecombobox.h</header>
54905478
</customwidget>
54915479
<customwidget>
5492-
<class>QgsColorButton</class>
5493-
<extends>QPushButton</extends>
5494-
<header>qgscolorbutton.h</header>
5480+
<class>QgsPenJoinStyleComboBox</class>
5481+
<extends>QComboBox</extends>
5482+
<header>qgspenstylecombobox.h</header>
54955483
</customwidget>
54965484
<customwidget>
5497-
<class>QgsBlendModeComboBox</class>
5498-
<extends>QComboBox</extends>
5499-
<header>qgsblendmodecombobox.h</header>
5485+
<class>QgsCollapsibleGroupBox</class>
5486+
<extends>QGroupBox</extends>
5487+
<header>qgscollapsiblegroupbox.h</header>
5488+
<container>1</container>
55005489
</customwidget>
55015490
<customwidget>
5502-
<class>QgsDataDefinedButton</class>
5503-
<extends>QToolButton</extends>
5504-
<header>qgsdatadefinedbutton.h</header>
5491+
<class>QgsLabelPreview</class>
5492+
<extends>QLabel</extends>
5493+
<header>qgslabelpreview.h</header>
55055494
</customwidget>
55065495
<customwidget>
55075496
<class>QgsFieldExpressionWidget</class>

‎src/ui/qgsoptionsbase.ui

Lines changed: 80 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
<item>
252252
<widget class="QStackedWidget" name="mOptionsStackedWidget">
253253
<property name="currentIndex">
254-
<number>2</number>
254+
<number>6</number>
255255
</property>
256256
<widget class="QWidget" name="mOptionsPageGeneral">
257257
<layout class="QVBoxLayout" name="verticalLayout_3">
@@ -271,8 +271,8 @@
271271
<rect>
272272
<x>0</x>
273273
<y>0</y>
274-
<width>613</width>
275-
<height>606</height>
274+
<width>610</width>
275+
<height>640</height>
276276
</rect>
277277
</property>
278278
<layout class="QVBoxLayout" name="verticalLayout_28">
@@ -934,8 +934,8 @@
934934
<rect>
935935
<x>0</x>
936936
<y>0</y>
937-
<width>644</width>
938-
<height>860</height>
937+
<width>655</width>
938+
<height>862</height>
939939
</rect>
940940
</property>
941941
<layout class="QVBoxLayout" name="verticalLayout_22">
@@ -1618,9 +1618,9 @@
16181618
<property name="geometry">
16191619
<rect>
16201620
<x>0</x>
1621-
<y>0</y>
1622-
<width>686</width>
1623-
<height>764</height>
1621+
<y>-263</y>
1622+
<width>710</width>
1623+
<height>796</height>
16241624
</rect>
16251625
</property>
16261626
<layout class="QVBoxLayout" name="verticalLayout_29">
@@ -2258,8 +2258,8 @@
22582258
<rect>
22592259
<x>0</x>
22602260
<y>0</y>
2261-
<width>475</width>
2262-
<height>316</height>
2261+
<width>626</width>
2262+
<height>549</height>
22632263
</rect>
22642264
</property>
22652265
<layout class="QVBoxLayout" name="verticalLayout_25">
@@ -2270,7 +2270,7 @@
22702270
</property>
22712271
<layout class="QGridLayout" name="gridLayout_7">
22722272
<item row="0" column="4">
2273-
<widget class="QgsColorButton" name="pbnCanvasColor">
2273+
<widget class="QgsColorButtonV2" name="pbnCanvasColor">
22742274
<property name="sizePolicy">
22752275
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
22762276
<horstretch>0</horstretch>
@@ -2279,13 +2279,13 @@
22792279
</property>
22802280
<property name="minimumSize">
22812281
<size>
2282-
<width>100</width>
2282+
<width>120</width>
22832283
<height>0</height>
22842284
</size>
22852285
</property>
22862286
<property name="maximumSize">
22872287
<size>
2288-
<width>100</width>
2288+
<width>120</width>
22892289
<height>16777215</height>
22902290
</size>
22912291
</property>
@@ -2334,7 +2334,7 @@
23342334
</widget>
23352335
</item>
23362336
<item row="0" column="1">
2337-
<widget class="QgsColorButton" name="pbnSelectionColor">
2337+
<widget class="QgsColorButtonV2" name="pbnSelectionColor">
23382338
<property name="sizePolicy">
23392339
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
23402340
<horstretch>0</horstretch>
@@ -2343,13 +2343,13 @@
23432343
</property>
23442344
<property name="minimumSize">
23452345
<size>
2346-
<width>100</width>
2346+
<width>120</width>
23472347
<height>0</height>
23482348
</size>
23492349
</property>
23502350
<property name="maximumSize">
23512351
<size>
2352-
<width>100</width>
2352+
<width>120</width>
23532353
<height>16777215</height>
23542354
</size>
23552355
</property>
@@ -2586,9 +2586,9 @@
25862586
<property name="geometry">
25872587
<rect>
25882588
<x>0</x>
2589-
<y>0</y>
2590-
<width>647</width>
2591-
<height>657</height>
2589+
<y>-92</y>
2590+
<width>684</width>
2591+
<height>625</height>
25922592
</rect>
25932593
</property>
25942594
<layout class="QVBoxLayout" name="verticalLayout_30">
@@ -2658,7 +2658,7 @@
26582658
</widget>
26592659
</item>
26602660
<item>
2661-
<widget class="QgsColorButton" name="mIdentifyHighlightColorButton">
2661+
<widget class="QgsColorButtonV2" name="mIdentifyHighlightColorButton">
26622662
<property name="sizePolicy">
26632663
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
26642664
<horstretch>0</horstretch>
@@ -2667,13 +2667,13 @@
26672667
</property>
26682668
<property name="minimumSize">
26692669
<size>
2670-
<width>100</width>
2670+
<width>120</width>
26712671
<height>0</height>
26722672
</size>
26732673
</property>
26742674
<property name="maximumSize">
26752675
<size>
2676-
<width>100</width>
2676+
<width>120</width>
26772677
<height>16777215</height>
26782678
</size>
26792679
</property>
@@ -2857,7 +2857,7 @@
28572857
</spacer>
28582858
</item>
28592859
<item row="2" column="1">
2860-
<widget class="QgsColorButton" name="pbnMeasureColor">
2860+
<widget class="QgsColorButtonV2" name="pbnMeasureColor">
28612861
<property name="sizePolicy">
28622862
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
28632863
<horstretch>0</horstretch>
@@ -2866,13 +2866,13 @@
28662866
</property>
28672867
<property name="minimumSize">
28682868
<size>
2869-
<width>100</width>
2869+
<width>120</width>
28702870
<height>0</height>
28712871
</size>
28722872
</property>
28732873
<property name="maximumSize">
28742874
<size>
2875-
<width>100</width>
2875+
<width>120</width>
28762876
<height>16777215</height>
28772877
</size>
28782878
</property>
@@ -3083,8 +3083,8 @@
30833083
<rect>
30843084
<x>0</x>
30853085
<y>0</y>
3086-
<width>486</width>
3087-
<height>301</height>
3086+
<width>626</width>
3087+
<height>549</height>
30883088
</rect>
30893089
</property>
30903090
<layout class="QVBoxLayout" name="verticalLayout_39">
@@ -3124,25 +3124,40 @@
31243124
</property>
31253125
<layout class="QGridLayout" name="gridLayout_9">
31263126
<item row="0" column="0">
3127-
<layout class="QHBoxLayout" name="horizontalLayout_32">
3128-
<item>
3129-
<widget class="QLabel" name="label_66">
3130-
<property name="text">
3131-
<string>Grid style</string>
3132-
</property>
3133-
</widget>
3134-
</item>
3135-
<item>
3136-
<widget class="QComboBox" name="mGridStyleComboBox"/>
3137-
</item>
3138-
<item>
3139-
<widget class="QgsColorButton" name="mGridColorButton">
3140-
<property name="text">
3141-
<string>Color...</string>
3142-
</property>
3143-
</widget>
3144-
</item>
3145-
</layout>
3127+
<widget class="QLabel" name="label_66">
3128+
<property name="text">
3129+
<string>Grid style</string>
3130+
</property>
3131+
</widget>
3132+
</item>
3133+
<item row="0" column="2">
3134+
<widget class="QComboBox" name="mGridStyleComboBox"/>
3135+
</item>
3136+
<item row="0" column="3">
3137+
<widget class="QLabel" name="label_4">
3138+
<property name="text">
3139+
<string>Grid color</string>
3140+
</property>
3141+
</widget>
3142+
</item>
3143+
<item row="0" column="4">
3144+
<widget class="QgsColorButtonV2" name="mGridColorButton">
3145+
<property name="minimumSize">
3146+
<size>
3147+
<width>120</width>
3148+
<height>0</height>
3149+
</size>
3150+
</property>
3151+
<property name="maximumSize">
3152+
<size>
3153+
<width>120</width>
3154+
<height>16777215</height>
3155+
</size>
3156+
</property>
3157+
<property name="text">
3158+
<string/>
3159+
</property>
3160+
</widget>
31463161
</item>
31473162
</layout>
31483163
</widget>
@@ -3263,9 +3278,9 @@
32633278
<property name="geometry">
32643279
<rect>
32653280
<x>0</x>
3266-
<y>0</y>
3267-
<width>480</width>
3268-
<height>616</height>
3281+
<y>-91</y>
3282+
<width>610</width>
3283+
<height>640</height>
32693284
</rect>
32703285
</property>
32713286
<layout class="QVBoxLayout" name="verticalLayout_31">
@@ -3387,7 +3402,7 @@
33873402
</spacer>
33883403
</item>
33893404
<item row="0" column="3">
3390-
<widget class="QgsColorButton" name="mLineColorToolButton">
3405+
<widget class="QgsColorButtonV2" name="mLineColorToolButton">
33913406
<property name="sizePolicy">
33923407
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
33933408
<horstretch>0</horstretch>
@@ -3396,13 +3411,13 @@
33963411
</property>
33973412
<property name="minimumSize">
33983413
<size>
3399-
<width>100</width>
3414+
<width>120</width>
34003415
<height>0</height>
34013416
</size>
34023417
</property>
34033418
<property name="maximumSize">
34043419
<size>
3405-
<width>100</width>
3420+
<width>120</width>
34063421
<height>16777215</height>
34073422
</size>
34083423
</property>
@@ -3755,8 +3770,8 @@
37553770
<rect>
37563771
<x>0</x>
37573772
<y>0</y>
3758-
<width>450</width>
3759-
<height>366</height>
3773+
<width>626</width>
3774+
<height>549</height>
37603775
</rect>
37613776
</property>
37623777
<layout class="QVBoxLayout" name="verticalLayout_6">
@@ -3885,8 +3900,8 @@
38853900
<rect>
38863901
<x>0</x>
38873902
<y>0</y>
3888-
<width>622</width>
3889-
<height>696</height>
3903+
<width>650</width>
3904+
<height>707</height>
38903905
</rect>
38913906
</property>
38923907
<layout class="QGridLayout" name="gridLayout_15">
@@ -4139,8 +4154,8 @@
41394154
<rect>
41404155
<x>0</x>
41414156
<y>0</y>
4142-
<width>293</width>
4143-
<height>216</height>
4157+
<width>626</width>
4158+
<height>549</height>
41444159
</rect>
41454160
</property>
41464161
<layout class="QVBoxLayout" name="verticalLayout_32">
@@ -4229,8 +4244,8 @@
42294244
<rect>
42304245
<x>0</x>
42314246
<y>0</y>
4232-
<width>501</width>
4233-
<height>678</height>
4247+
<width>610</width>
4248+
<height>685</height>
42344249
</rect>
42354250
</property>
42364251
<layout class="QVBoxLayout" name="verticalLayout_33">
@@ -4580,17 +4595,17 @@
45804595
</widget>
45814596
<layoutdefault spacing="6" margin="11"/>
45824597
<customwidgets>
4598+
<customwidget>
4599+
<class>QgsColorButtonV2</class>
4600+
<extends>QToolButton</extends>
4601+
<header>qgscolorbuttonv2.h</header>
4602+
</customwidget>
45834603
<customwidget>
45844604
<class>QgsCollapsibleGroupBox</class>
45854605
<extends>QGroupBox</extends>
45864606
<header>qgscollapsiblegroupbox.h</header>
45874607
<container>1</container>
45884608
</customwidget>
4589-
<customwidget>
4590-
<class>QgsColorButton</class>
4591-
<extends>QPushButton</extends>
4592-
<header>qgscolorbutton.h</header>
4593-
</customwidget>
45944609
<customwidget>
45954610
<class>QgsScaleComboBox</class>
45964611
<extends>QWidget</extends>

0 commit comments

Comments
 (0)
Please sign in to comment.