Skip to content

Commit 3e9ab60

Browse files
committedAug 13, 2014
Flip more colors buttons to QgsColorButtonV2
1 parent b8bdc8f commit 3e9ab60

13 files changed

+298
-226
lines changed
 

‎src/app/qgsdiagramproperties.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,16 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
5252

5353
mDiagramPropertiesTabWidget->setCurrentIndex( tabIdx );
5454

55-
mBackgroundColorButton->setColorDialogTitle( tr( "Background color" ) );
55+
mBackgroundColorButton->setColorDialogTitle( tr( "Select background color" ) );
5656
mBackgroundColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
57-
mDiagramPenColorButton->setColorDialogTitle( tr( "Pen color" ) );
57+
mBackgroundColorButton->setContext( "symbology" );
58+
mBackgroundColorButton->setShowNoColor( true );
59+
mBackgroundColorButton->setNoColorString( tr( "Transparent background" ) );
60+
mDiagramPenColorButton->setColorDialogTitle( tr( "Select pen color" ) );
5861
mDiagramPenColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
62+
mDiagramPenColorButton->setContext( "symbology" );
63+
mDiagramPenColorButton->setShowNoColor( true );
64+
mDiagramPenColorButton->setNoColorString( tr( "Transparent outline" ) );
5965

6066
mValueLineEdit->setValidator( new QDoubleValidator( mValueLineEdit ) );
6167
mMinimumDiagramScaleLineEdit->setValidator( new QDoubleValidator( mMinimumDiagramScaleLineEdit ) );

‎src/app/qgsrasterlayerproperties.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
262262
mMaximumOversamplingSpinBox->setValue( resampleFilter->maxOversampling() );
263263
}
264264

265+
btnColorizeColor->setColorDialogTitle( tr( "Select color" ) );
266+
btnColorizeColor->setContext( "symbology" );
267+
265268
// Hue and saturation color control
266269
const QgsHueSaturationFilter* hueSaturationFilter = mRasterLayer->hueSaturationFilter();
267270
//set hue and saturation controls to current values

‎src/app/qgstextannotationdialog.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ QgsTextAnnotationDialog::QgsTextAnnotationDialog( QgsTextAnnotationItem* item, Q
3535
}
3636
mFontColorButton->setColorDialogTitle( tr( "Select font color" ) );
3737
mFontColorButton->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
38+
mFontColorButton->setContext( "symbology" );
39+
3840
setCurrentFontPropertiesToGui();
3941

4042
QObject::connect( mButtonBox, SIGNAL( accepted() ), this, SLOT( applyTextToItem() ) );

‎src/gui/qgscolorswatchgrid.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,11 @@ void QgsColorSwatchGrid::draw( QPainter &painter )
258258
//draw header background
259259
painter.setBrush( headerBgColor ) ;
260260
painter.setPen( Qt::NoPen );
261-
painter.drawRect( QRect( 0, 0, mWidth, LABEL_SIZE ) );
261+
painter.drawRect( QRect( 0, 0, width(), LABEL_SIZE ) );
262262

263263
//draw header text
264264
painter.setPen( headerTextColor );
265-
painter.drawText( QRect( LABEL_MARGIN, 0, mWidth - 2 * LABEL_MARGIN, LABEL_SIZE ),
265+
painter.drawText( QRect( LABEL_MARGIN, 0, width() - 2 * LABEL_MARGIN, LABEL_SIZE ),
266266
Qt::AlignLeft | Qt::AlignVCenter, mScheme->schemeName() );
267267

268268
//draw color swatches

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ QgsPointDisplacementRendererWidget::QgsPointDisplacementRendererWidget( QgsVecto
9393
}
9494
}
9595

96+
mCircleColorButton->setColorDialogTitle( tr( "Select color" ) );
97+
mCircleColorButton->setContext( "symbology" );
98+
mLabelColorButton->setContext( "symbology" );
99+
mLabelColorButton->setColorDialogTitle( tr( "Select color" ) );
100+
96101
mCircleWidthSpinBox->setValue( mRenderer->circleWidth() );
97102
mCircleColorButton->setColor( mRenderer->circleColor() );
98103
mLabelColorButton->setColor( mRenderer->labelColor() );

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,15 @@ QgsVectorGradientColorRampV2Dialog::QgsVectorGradientColorRampV2Dialog( QgsVecto
3636
#endif
3737

3838
btnColor1->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
39+
btnColor1->setColorDialogTitle( tr( "Select ramp color" ) );
40+
btnColor1->setContext( "symbology" );
41+
btnColor1->setShowNoColor( true );
42+
btnColor1->setNoColorString( tr( "Transparent" ) );
3943
btnColor2->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
44+
btnColor2->setColorDialogTitle( tr( "Select ramp color" ) );
45+
btnColor2->setContext( "symbology" );
46+
btnColor2->setShowNoColor( true );
47+
btnColor2->setNoColorString( tr( "Transparent" ) );
4048
connect( btnColor1, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor1( const QColor& ) ) );
4149
connect( btnColor2, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor2( const QColor& ) ) );
4250

‎src/plugins/grass/qgsgrassregion.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ QgsGrassRegion::QgsGrassRegion( QgsGrassPlugin *plugin, QgisInterface *iface,
270270

271271
// Symbology
272272
QPen pen = mPlugin->regionPen();
273+
mColorButton->setContext( "gui" );
274+
mColorButton->setColorDialogTitle( tr( "Select color" ) );
273275
mColorButton->setColor( pen.color() );
274276
connect( mColorButton, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( changeColor( const QColor& ) ) );
275277

‎src/plugins/grass/qgsgrassregionbase.ui

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,16 @@ or change the following values</string>
199199
</spacer>
200200
</item>
201201
<item row="0" column="1">
202-
<widget class="QgsColorButton" name="mColorButton">
202+
<widget class="QgsColorButtonV2" name="mColorButton">
203203
<property name="minimumSize">
204204
<size>
205-
<width>64</width>
205+
<width>120</width>
206206
<height>0</height>
207207
</size>
208208
</property>
209209
<property name="maximumSize">
210210
<size>
211-
<width>100</width>
211+
<width>120</width>
212212
<height>16777215</height>
213213
</size>
214214
</property>
@@ -234,9 +234,9 @@ or change the following values</string>
234234
</widget>
235235
<customwidgets>
236236
<customwidget>
237-
<class>QgsColorButton</class>
238-
<extends>QPushButton</extends>
239-
<header>qgscolorbutton.h</header>
237+
<class>QgsColorButtonV2</class>
238+
<extends>QToolButton</extends>
239+
<header>qgscolorbuttonv2.h</header>
240240
</customwidget>
241241
</customwidgets>
242242
<resources/>

‎src/ui/qgsdiagrampropertiesbase.ui

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
<rect>
4040
<x>0</x>
4141
<y>0</y>
42-
<width>743</width>
43-
<height>761</height>
42+
<width>756</width>
43+
<height>627</height>
4444
</rect>
4545
</property>
4646
<layout class="QVBoxLayout" name="scrollAreaLayout">
@@ -120,7 +120,7 @@
120120
<item>
121121
<widget class="QTabWidget" name="mDiagramPropertiesTabWidget">
122122
<property name="currentIndex">
123-
<number>1</number>
123+
<number>0</number>
124124
</property>
125125
<widget class="QWidget" name="mDiagramPropertiesTabWidgetPage1">
126126
<attribute name="title">
@@ -130,7 +130,19 @@
130130
<item row="0" column="0" rowspan="2">
131131
<layout class="QGridLayout" name="gridLayout">
132132
<item row="4" column="2">
133-
<widget class="QgsColorButton" name="mDiagramPenColorButton">
133+
<widget class="QgsColorButtonV2" name="mDiagramPenColorButton">
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>
134146
<property name="text">
135147
<string/>
136148
</property>
@@ -227,7 +239,19 @@
227239
</widget>
228240
</item>
229241
<item row="3" column="2">
230-
<widget class="QgsColorButton" name="mBackgroundColorButton">
242+
<widget class="QgsColorButtonV2" name="mBackgroundColorButton">
243+
<property name="minimumSize">
244+
<size>
245+
<width>120</width>
246+
<height>0</height>
247+
</size>
248+
</property>
249+
<property name="maximumSize">
250+
<size>
251+
<width>120</width>
252+
<height>16777215</height>
253+
</size>
254+
</property>
231255
<property name="text">
232256
<string/>
233257
</property>
@@ -992,9 +1016,9 @@ Leave empty to automatically apply the maximum value.</string>
9921016
</widget>
9931017
<customwidgets>
9941018
<customwidget>
995-
<class>QgsColorButton</class>
996-
<extends>QPushButton</extends>
997-
<header>qgscolorbutton.h</header>
1019+
<class>QgsColorButtonV2</class>
1020+
<extends>QToolButton</extends>
1021+
<header>qgscolorbuttonv2.h</header>
9981022
</customwidget>
9991023
</customwidgets>
10001024
<resources>

‎src/ui/qgspointdisplacementrendererwidgetbase.ui

Lines changed: 128 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -56,168 +56,154 @@
5656
</property>
5757
</widget>
5858
</item>
59-
<item row="3" column="0">
60-
<widget class="QGroupBox" name="mDisplacementCirclesGroupBox">
59+
<item row="4" column="0">
60+
<widget class="QGroupBox" name="mLabellingGroupBox">
6161
<property name="title">
62-
<string>Displacement circles</string>
62+
<string>Labels</string>
6363
</property>
64-
<layout class="QGridLayout" name="gridLayout_2">
64+
<layout class="QGridLayout" name="gridLayout">
6565
<item row="0" column="0">
66-
<layout class="QHBoxLayout" name="horizontalLayout_2">
67-
<item>
68-
<widget class="QLabel" name="mCircleWidthLabel">
69-
<property name="text">
70-
<string>Circle pen width:</string>
71-
</property>
72-
</widget>
73-
</item>
74-
<item>
75-
<widget class="QDoubleSpinBox" name="mCircleWidthSpinBox"/>
76-
</item>
77-
</layout>
66+
<widget class="QLabel" name="mLabelAttributeLabel">
67+
<property name="text">
68+
<string>Label attribute:</string>
69+
</property>
70+
</widget>
71+
</item>
72+
<item row="0" column="1">
73+
<widget class="QComboBox" name="mLabelFieldComboBox"/>
7874
</item>
7975
<item row="1" column="0">
80-
<layout class="QHBoxLayout" name="horizontalLayout_3">
81-
<item>
82-
<widget class="QLabel" name="mCircleColorLabel">
83-
<property name="text">
84-
<string>Circle color:</string>
85-
</property>
86-
</widget>
87-
</item>
88-
<item>
89-
<widget class="QgsColorButton" name="mCircleColorButton">
90-
<property name="text">
91-
<string/>
92-
</property>
93-
</widget>
94-
</item>
95-
</layout>
76+
<widget class="QLabel" name="label">
77+
<property name="text">
78+
<string>Label font:</string>
79+
</property>
80+
</widget>
81+
</item>
82+
<item row="1" column="1">
83+
<widget class="QPushButton" name="mLabelFontButton">
84+
<property name="text">
85+
<string>Font...</string>
86+
</property>
87+
</widget>
9688
</item>
9789
<item row="2" column="0">
98-
<layout class="QHBoxLayout" name="horizontalLayout_6">
99-
<item>
100-
<widget class="QLabel" name="mCircleRadiusLabel">
101-
<property name="text">
102-
<string>Circle radius modification:</string>
103-
</property>
104-
</widget>
105-
</item>
106-
<item>
107-
<widget class="QDoubleSpinBox" name="mCircleModificationSpinBox">
108-
<property name="minimum">
109-
<double>-99.000000000000000</double>
110-
</property>
111-
</widget>
112-
</item>
113-
</layout>
90+
<widget class="QLabel" name="mLabelColorLabel">
91+
<property name="text">
92+
<string>Label color:</string>
93+
</property>
94+
</widget>
11495
</item>
115-
<item row="3" column="0">
116-
<layout class="QHBoxLayout" name="horizontalLayout_10">
117-
<item>
118-
<widget class="QLabel" name="mDistanceToleranceLabel">
119-
<property name="text">
120-
<string>Point distance tolerance:</string>
121-
</property>
122-
</widget>
123-
</item>
124-
<item>
125-
<widget class="QDoubleSpinBox" name="mDistanceSpinBox">
126-
<property name="decimals">
127-
<number>7</number>
128-
</property>
129-
<property name="maximum">
130-
<double>999999999.000000000000000</double>
131-
</property>
132-
</widget>
133-
</item>
134-
</layout>
96+
<item row="2" column="1">
97+
<widget class="QgsColorButtonV2" name="mLabelColorButton">
98+
<property name="minimumSize">
99+
<size>
100+
<width>120</width>
101+
<height>0</height>
102+
</size>
103+
</property>
104+
<property name="maximumSize">
105+
<size>
106+
<width>120</width>
107+
<height>16777215</height>
108+
</size>
109+
</property>
110+
<property name="text">
111+
<string/>
112+
</property>
113+
</widget>
114+
</item>
115+
<item row="3" column="0" colspan="2">
116+
<widget class="QCheckBox" name="mScaleDependentLabelsCheckBox">
117+
<property name="text">
118+
<string>Use scale dependent labelling</string>
119+
</property>
120+
</widget>
121+
</item>
122+
<item row="4" column="0">
123+
<widget class="QLabel" name="mMaxScaleLabel">
124+
<property name="text">
125+
<string>Max scale denominator:</string>
126+
</property>
127+
</widget>
128+
</item>
129+
<item row="4" column="1">
130+
<widget class="QLineEdit" name="mMaxScaleDenominatorEdit"/>
135131
</item>
136132
</layout>
137133
</widget>
138134
</item>
139-
<item row="4" column="0">
140-
<widget class="QGroupBox" name="mLabellingGroupBox">
135+
<item row="3" column="0">
136+
<widget class="QGroupBox" name="mDisplacementCirclesGroupBox">
141137
<property name="title">
142-
<string>Labels</string>
138+
<string>Displacement circles</string>
143139
</property>
144-
<layout class="QGridLayout" name="gridLayout">
140+
<layout class="QGridLayout" name="gridLayout_2">
141+
<item row="2" column="1">
142+
<widget class="QgsColorButtonV2" name="mCircleColorButton">
143+
<property name="minimumSize">
144+
<size>
145+
<width>120</width>
146+
<height>0</height>
147+
</size>
148+
</property>
149+
<property name="maximumSize">
150+
<size>
151+
<width>120</width>
152+
<height>16777215</height>
153+
</size>
154+
</property>
155+
<property name="text">
156+
<string/>
157+
</property>
158+
</widget>
159+
</item>
160+
<item row="3" column="0">
161+
<widget class="QLabel" name="mCircleRadiusLabel">
162+
<property name="text">
163+
<string>Circle radius modification:</string>
164+
</property>
165+
</widget>
166+
</item>
145167
<item row="0" column="0">
146-
<layout class="QHBoxLayout" name="horizontalLayout">
147-
<item>
148-
<widget class="QLabel" name="mLabelAttributeLabel">
149-
<property name="text">
150-
<string>Label attribute:</string>
151-
</property>
152-
</widget>
153-
</item>
154-
<item>
155-
<widget class="QComboBox" name="mLabelFieldComboBox"/>
156-
</item>
157-
</layout>
168+
<widget class="QLabel" name="mCircleWidthLabel">
169+
<property name="text">
170+
<string>Circle pen width:</string>
171+
</property>
172+
</widget>
158173
</item>
159-
<item row="1" column="0">
160-
<layout class="QHBoxLayout" name="horizontalLayout_8">
161-
<item>
162-
<widget class="QPushButton" name="mLabelFontButton">
163-
<property name="text">
164-
<string>Label font...</string>
165-
</property>
166-
</widget>
167-
</item>
168-
<item>
169-
<spacer name="horizontalSpacer">
170-
<property name="orientation">
171-
<enum>Qt::Horizontal</enum>
172-
</property>
173-
<property name="sizeHint" stdset="0">
174-
<size>
175-
<width>94</width>
176-
<height>20</height>
177-
</size>
178-
</property>
179-
</spacer>
180-
</item>
181-
</layout>
174+
<item row="0" column="1">
175+
<widget class="QDoubleSpinBox" name="mCircleWidthSpinBox"/>
176+
</item>
177+
<item row="6" column="1">
178+
<widget class="QDoubleSpinBox" name="mDistanceSpinBox">
179+
<property name="decimals">
180+
<number>7</number>
181+
</property>
182+
<property name="maximum">
183+
<double>999999999.000000000000000</double>
184+
</property>
185+
</widget>
182186
</item>
183187
<item row="2" column="0">
184-
<layout class="QHBoxLayout" name="horizontalLayout_5">
185-
<item>
186-
<widget class="QLabel" name="mLabelColorLabel">
187-
<property name="text">
188-
<string>Label color:</string>
189-
</property>
190-
</widget>
191-
</item>
192-
<item>
193-
<widget class="QgsColorButton" name="mLabelColorButton">
194-
<property name="text">
195-
<string/>
196-
</property>
197-
</widget>
198-
</item>
199-
</layout>
188+
<widget class="QLabel" name="mCircleColorLabel">
189+
<property name="text">
190+
<string>Circle color:</string>
191+
</property>
192+
</widget>
200193
</item>
201-
<item row="3" column="0">
202-
<widget class="QCheckBox" name="mScaleDependentLabelsCheckBox">
194+
<item row="6" column="0">
195+
<widget class="QLabel" name="mDistanceToleranceLabel">
203196
<property name="text">
204-
<string>Use scale dependent labelling</string>
197+
<string>Point distance tolerance:</string>
205198
</property>
206199
</widget>
207200
</item>
208-
<item row="4" column="0">
209-
<layout class="QHBoxLayout" name="horizontalLayout_7">
210-
<item>
211-
<widget class="QLabel" name="mMaxScaleLabel">
212-
<property name="text">
213-
<string>max scale denominator:</string>
214-
</property>
215-
</widget>
216-
</item>
217-
<item>
218-
<widget class="QLineEdit" name="mMaxScaleDenominatorEdit"/>
219-
</item>
220-
</layout>
201+
<item row="3" column="1">
202+
<widget class="QDoubleSpinBox" name="mCircleModificationSpinBox">
203+
<property name="minimum">
204+
<double>-99.000000000000000</double>
205+
</property>
206+
</widget>
221207
</item>
222208
</layout>
223209
</widget>
@@ -226,9 +212,9 @@
226212
</widget>
227213
<customwidgets>
228214
<customwidget>
229-
<class>QgsColorButton</class>
230-
<extends>QPushButton</extends>
231-
<header>qgscolorbutton.h</header>
215+
<class>QgsColorButtonV2</class>
216+
<extends>QToolButton</extends>
217+
<header>qgscolorbuttonv2.h</header>
232218
</customwidget>
233219
</customwidgets>
234220
<resources/>

‎src/ui/qgsrasterlayerpropertiesbase.ui

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
<property name="title">
219219
<string>Layer info</string>
220220
</property>
221-
<property name="syncGroup">
221+
<property name="syncGroup" stdset="0">
222222
<string notr="true">rastergeneral</string>
223223
</property>
224224
<layout class="QGridLayout" name="gridLayout_4">
@@ -324,7 +324,7 @@
324324
<property name="title">
325325
<string>Coordinate reference system</string>
326326
</property>
327-
<property name="syncGroup">
327+
<property name="syncGroup" stdset="0">
328328
<string notr="true">rastergeneral</string>
329329
</property>
330330
<layout class="QGridLayout" name="_6">
@@ -365,7 +365,7 @@
365365
<property name="checked">
366366
<bool>false</bool>
367367
</property>
368-
<property name="syncGroup">
368+
<property name="syncGroup" stdset="0">
369369
<string notr="true">rastergeneral</string>
370370
</property>
371371
<layout class="QGridLayout" name="_5">
@@ -376,7 +376,7 @@
376376
<number>6</number>
377377
</property>
378378
<item row="0" column="0" colspan="2">
379-
<widget class="QgsScaleRangeWidget" name="mScaleRangeWidget">
379+
<widget class="QgsScaleRangeWidget" name="mScaleRangeWidget" native="true">
380380
<property name="toolTip">
381381
<string/>
382382
</property>
@@ -570,7 +570,7 @@
570570
<property name="title">
571571
<string>Band rendering</string>
572572
</property>
573-
<property name="syncGroup">
573+
<property name="syncGroup" stdset="0">
574574
<string notr="true">rasterstyle</string>
575575
</property>
576576
<layout class="QVBoxLayout" name="verticalLayout_21">
@@ -658,13 +658,13 @@
658658
<property name="title">
659659
<string>Color rendering</string>
660660
</property>
661-
<property name="collapsed">
661+
<property name="collapsed" stdset="0">
662662
<bool>false</bool>
663663
</property>
664-
<property name="saveCollapsedState">
664+
<property name="saveCollapsedState" stdset="0">
665665
<bool>true</bool>
666666
</property>
667-
<property name="syncGroup">
667+
<property name="syncGroup" stdset="0">
668668
<string notr="true">rasterstyle</string>
669669
</property>
670670
<layout class="QGridLayout" name="gridLayout_2">
@@ -675,30 +675,6 @@
675675
</property>
676676
</widget>
677677
</item>
678-
<item row="2" column="5">
679-
<widget class="QComboBox" name="comboGrayscale">
680-
<item>
681-
<property name="text">
682-
<string>Off</string>
683-
</property>
684-
</item>
685-
<item>
686-
<property name="text">
687-
<string>By lightness</string>
688-
</property>
689-
</item>
690-
<item>
691-
<property name="text">
692-
<string>By luminosity</string>
693-
</property>
694-
</item>
695-
<item>
696-
<property name="text">
697-
<string>By average</string>
698-
</property>
699-
</item>
700-
</widget>
701-
</item>
702678
<item row="3" column="0">
703679
<widget class="QLabel" name="label_3">
704680
<property name="text">
@@ -866,10 +842,10 @@
866842
</widget>
867843
</item>
868844
<item>
869-
<widget class="QgsColorButton" name="btnColorizeColor">
845+
<widget class="QgsColorButtonV2" name="btnColorizeColor">
870846
<property name="minimumSize">
871847
<size>
872-
<width>64</width>
848+
<width>100</width>
873849
<height>0</height>
874850
</size>
875851
</property>
@@ -949,6 +925,30 @@
949925
</property>
950926
</widget>
951927
</item>
928+
<item row="2" column="5" colspan="2">
929+
<widget class="QComboBox" name="comboGrayscale">
930+
<item>
931+
<property name="text">
932+
<string>Off</string>
933+
</property>
934+
</item>
935+
<item>
936+
<property name="text">
937+
<string>By lightness</string>
938+
</property>
939+
</item>
940+
<item>
941+
<property name="text">
942+
<string>By luminosity</string>
943+
</property>
944+
</item>
945+
<item>
946+
<property name="text">
947+
<string>By average</string>
948+
</property>
949+
</item>
950+
</widget>
951+
</item>
952952
</layout>
953953
</widget>
954954
</item>
@@ -960,13 +960,13 @@
960960
<property name="checkable">
961961
<bool>false</bool>
962962
</property>
963-
<property name="collapsed">
963+
<property name="collapsed" stdset="0">
964964
<bool>false</bool>
965965
</property>
966-
<property name="saveCollapsedState">
966+
<property name="saveCollapsedState" stdset="0">
967967
<bool>true</bool>
968968
</property>
969-
<property name="syncGroup">
969+
<property name="syncGroup" stdset="0">
970970
<string notr="true">rasterstyle</string>
971971
</property>
972972
<layout class="QHBoxLayout" name="horizontalLayout">
@@ -1071,7 +1071,7 @@
10711071
<property name="title">
10721072
<string>Global transparency</string>
10731073
</property>
1074-
<property name="syncGroup">
1074+
<property name="syncGroup" stdset="0">
10751075
<string notr="true">rastertransp</string>
10761076
</property>
10771077
<layout class="QGridLayout" name="_3">
@@ -1155,7 +1155,7 @@
11551155
<property name="title">
11561156
<string>No data value</string>
11571157
</property>
1158-
<property name="syncGroup">
1158+
<property name="syncGroup" stdset="0">
11591159
<string notr="true">rastertransp</string>
11601160
</property>
11611161
<layout class="QGridLayout" name="gridLayout_11">
@@ -1229,7 +1229,7 @@
12291229
<property name="title">
12301230
<string>Custom transparency options</string>
12311231
</property>
1232-
<property name="syncGroup">
1232+
<property name="syncGroup" stdset="0">
12331233
<string notr="true">rastertransp</string>
12341234
</property>
12351235
<layout class="QGridLayout" name="gridLayout_3">
@@ -1460,8 +1460,8 @@
14601460
<rect>
14611461
<x>0</x>
14621462
<y>0</y>
1463-
<width>615</width>
1464-
<height>509</height>
1463+
<width>600</width>
1464+
<height>205</height>
14651465
</rect>
14661466
</property>
14671467
<layout class="QVBoxLayout" name="verticalLayout_12">
@@ -1621,8 +1621,8 @@ p, li { white-space: pre-wrap; }
16211621
<rect>
16221622
<x>0</x>
16231623
<y>0</y>
1624-
<width>615</width>
1625-
<height>509</height>
1624+
<width>84</width>
1625+
<height>36</height>
16261626
</rect>
16271627
</property>
16281628
<layout class="QVBoxLayout" name="verticalLayout_16">
@@ -1671,7 +1671,7 @@ p, li { white-space: pre-wrap; }
16711671
<rect>
16721672
<x>0</x>
16731673
<y>0</y>
1674-
<width>599</width>
1674+
<width>393</width>
16751675
<height>608</height>
16761676
</rect>
16771677
</property>
@@ -1681,7 +1681,7 @@ p, li { white-space: pre-wrap; }
16811681
<property name="title">
16821682
<string>Description</string>
16831683
</property>
1684-
<property name="syncGroup">
1684+
<property name="syncGroup" stdset="0">
16851685
<string notr="true">rastermeta</string>
16861686
</property>
16871687
<layout class="QGridLayout" name="gridLayout_5">
@@ -1776,7 +1776,7 @@ p, li { white-space: pre-wrap; }
17761776
<property name="title">
17771777
<string>Attribution</string>
17781778
</property>
1779-
<property name="syncGroup">
1779+
<property name="syncGroup" stdset="0">
17801780
<string notr="true">vectormeta</string>
17811781
</property>
17821782
<layout class="QGridLayout" name="gridLayout_7">
@@ -1808,7 +1808,7 @@ p, li { white-space: pre-wrap; }
18081808
<property name="title">
18091809
<string>MetadataUrl</string>
18101810
</property>
1811-
<property name="syncGroup">
1811+
<property name="syncGroup" stdset="0">
18121812
<string notr="true">vectormeta</string>
18131813
</property>
18141814
<layout class="QGridLayout" name="gridLayout_9">
@@ -1963,7 +1963,7 @@ p, li { white-space: pre-wrap; }
19631963
<property name="title">
19641964
<string>Properties</string>
19651965
</property>
1966-
<property name="syncGroup">
1966+
<property name="syncGroup" stdset="0">
19671967
<string notr="true">rastermeta</string>
19681968
</property>
19691969
<layout class="QVBoxLayout" name="verticalLayout_11">
@@ -2060,6 +2060,11 @@ p, li { white-space: pre-wrap; }
20602060
</layout>
20612061
</widget>
20622062
<customwidgets>
2063+
<customwidget>
2064+
<class>QgsColorButtonV2</class>
2065+
<extends>QToolButton</extends>
2066+
<header>qgscolorbuttonv2.h</header>
2067+
</customwidget>
20632068
<customwidget>
20642069
<class>QgsCollapsibleGroupBox</class>
20652070
<extends>QGroupBox</extends>
@@ -2071,11 +2076,6 @@ p, li { white-space: pre-wrap; }
20712076
<extends>QWidget</extends>
20722077
<header>qgsscalerangewidget.h</header>
20732078
</customwidget>
2074-
<customwidget>
2075-
<class>QgsColorButton</class>
2076-
<extends>QPushButton</extends>
2077-
<header>qgscolorbutton.h</header>
2078-
</customwidget>
20792079
<customwidget>
20802080
<class>QgsBlendModeComboBox</class>
20812081
<extends>QComboBox</extends>

‎src/ui/qgstextannotationdialogbase.ui

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,23 @@
6868
</widget>
6969
</item>
7070
<item>
71-
<widget class="QgsColorButton" name="mFontColorButton">
71+
<widget class="QgsColorButtonV2" name="mFontColorButton">
72+
<property name="minimumSize">
73+
<size>
74+
<width>100</width>
75+
<height>0</height>
76+
</size>
77+
</property>
78+
<property name="maximumSize">
79+
<size>
80+
<width>100</width>
81+
<height>16777215</height>
82+
</size>
83+
</property>
7284
<property name="text">
7385
<string/>
7486
</property>
75-
<property name="autoDefault">
87+
<property name="autoDefault" stdset="0">
7688
<bool>false</bool>
7789
</property>
7890
</widget>
@@ -105,9 +117,9 @@
105117
</widget>
106118
<customwidgets>
107119
<customwidget>
108-
<class>QgsColorButton</class>
109-
<extends>QPushButton</extends>
110-
<header>qgscolorbutton.h</header>
120+
<class>QgsColorButtonV2</class>
121+
<extends>QToolButton</extends>
122+
<header>qgscolorbuttonv2.h</header>
111123
</customwidget>
112124
</customwidgets>
113125
<tabstops>

‎src/ui/qgsvectorgradientcolorrampv2dialogbase.ui

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,21 @@
6969
</widget>
7070
</item>
7171
<item row="1" column="1">
72-
<widget class="QgsColorButton" name="btnColor2">
72+
<widget class="QgsColorButtonV2" name="btnColor2">
73+
<property name="minimumSize">
74+
<size>
75+
<width>120</width>
76+
<height>0</height>
77+
</size>
78+
</property>
79+
<property name="maximumSize">
80+
<size>
81+
<width>120</width>
82+
<height>16777215</height>
83+
</size>
84+
</property>
7385
<property name="text">
74-
<string>Change...</string>
86+
<string/>
7587
</property>
7688
</widget>
7789
</item>
@@ -83,9 +95,21 @@
8395
</widget>
8496
</item>
8597
<item row="0" column="1">
86-
<widget class="QgsColorButton" name="btnColor1">
98+
<widget class="QgsColorButtonV2" name="btnColor1">
99+
<property name="minimumSize">
100+
<size>
101+
<width>120</width>
102+
<height>0</height>
103+
</size>
104+
</property>
105+
<property name="maximumSize">
106+
<size>
107+
<width>120</width>
108+
<height>16777215</height>
109+
</size>
110+
</property>
87111
<property name="text">
88-
<string>Change...</string>
112+
<string/>
89113
</property>
90114
</widget>
91115
</item>
@@ -193,9 +217,9 @@
193217
</widget>
194218
<customwidgets>
195219
<customwidget>
196-
<class>QgsColorButton</class>
197-
<extends>QPushButton</extends>
198-
<header>qgscolorbutton.h</header>
220+
<class>QgsColorButtonV2</class>
221+
<extends>QToolButton</extends>
222+
<header>qgscolorbuttonv2.h</header>
199223
</customwidget>
200224
</customwidgets>
201225
<tabstops>

0 commit comments

Comments
 (0)
Please sign in to comment.