Skip to content

Commit 766f078

Browse files
committedAug 12, 2014
Flip all symbology color buttons to QgsColorButtonV2
1 parent dd1fe45 commit 766f078

13 files changed

+165
-116
lines changed
 

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@
2222
QgsEllipseSymbolLayerV2Widget::QgsEllipseSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* parent ): QgsSymbolLayerV2Widget( parent, vl )
2323
{
2424
setupUi( this );
25+
26+
btnChangeColorFill->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
27+
btnChangeColorFill->setColorDialogTitle( tr( "Select fill color" ) );
28+
btnChangeColorFill->setContext( "symbology" );
29+
btnChangeColorFill->setShowNoColor( true );
30+
btnChangeColorFill->setNoColorString( tr( "Transparent fill" ) );
31+
btnChangeColorBorder->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
32+
btnChangeColorBorder->setColorDialogTitle( tr( "Select border color" ) );
33+
btnChangeColorBorder->setContext( "symbology" );
34+
btnChangeColorBorder->setShowNoColor( true );
35+
btnChangeColorBorder->setNoColorString( tr( "Transparent border" ) );
36+
2537
QStringList names;
2638
names << "circle" << "rectangle" << "cross" << "triangle";
2739
QSize iconSize = mShapeListWidget->iconSize();
@@ -59,11 +71,8 @@ void QgsEllipseSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
5971
mRotationSpinBox->setValue( mLayer->angle() );
6072
mOutlineStyleComboBox->setPenStyle( mLayer->outlineStyle() );
6173
mOutlineWidthSpinBox->setValue( mLayer->outlineWidth() );
62-
6374
btnChangeColorBorder->setColor( mLayer->outlineColor() );
64-
btnChangeColorBorder->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
6575
btnChangeColorFill->setColor( mLayer->fillColor() );
66-
btnChangeColorFill->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
6776

6877
QList<QListWidgetItem *> symbolItemList = mShapeListWidget->findItems( mLayer->symbolName(), Qt::MatchExactly );
6978
if ( symbolItemList.size() > 0 )

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

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ QgsSimpleLineSymbolLayerV2Widget::QgsSimpleLineSymbolLayerV2Widget( const QgsVec
7676
mOffsetUnitWidget->setUnits( QStringList() << tr( "Millimeter" ) << tr( "Map unit" ), 1 );
7777
mDashPatternUnitWidget->setUnits( QStringList() << tr( "Millimeter" ) << tr( "Map unit" ), 1 );
7878

79+
btnChangeColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
80+
btnChangeColor->setColorDialogTitle( tr( "Select line color" ) );
81+
btnChangeColor->setContext( "symbology" );
82+
7983
if ( vl && vl->geometryType() != QGis::Polygon )
8084
{
8185
//draw inside polygon checkbox only makes sense for polygon layers
@@ -121,7 +125,6 @@ void QgsSimpleLineSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
121125
spinWidth->blockSignals( false );
122126
btnChangeColor->blockSignals( true );
123127
btnChangeColor->setColor( mLayer->color() );
124-
btnChangeColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
125128
btnChangeColor->blockSignals( false );
126129
spinOffset->blockSignals( true );
127130
spinOffset->setValue( mLayer->offset() );
@@ -318,6 +321,17 @@ QgsSimpleMarkerSymbolLayerV2Widget::QgsSimpleMarkerSymbolLayerV2Widget( const Qg
318321
mOffsetUnitWidget->setUnits( QStringList() << tr( "Millimeter" ) << tr( "Map unit" ), 1 );
319322
mOutlineWidthUnitWidget->setUnits( QStringList() << tr( "Millimeter" ) << tr( "Map unit" ), 1 );
320323

324+
btnChangeColorFill->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
325+
btnChangeColorFill->setColorDialogTitle( tr( "Select fill color" ) );
326+
btnChangeColorFill->setContext( "symbology" );
327+
btnChangeColorFill->setShowNoColor( true );
328+
btnChangeColorFill->setNoColorString( tr( "Transparent fill" ) );
329+
btnChangeColorBorder->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
330+
btnChangeColorBorder->setColorDialogTitle( tr( "Select border color" ) );
331+
btnChangeColorBorder->setContext( "symbology" );
332+
btnChangeColorBorder->setShowNoColor( true );
333+
btnChangeColorBorder->setNoColorString( tr( "Transparent border" ) );
334+
321335
QSize size = lstNames->iconSize();
322336
QStringList names;
323337
names << "circle" << "rectangle" << "diamond" << "pentagon" << "cross" << "cross2" << "triangle"
@@ -361,11 +375,9 @@ void QgsSimpleMarkerSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer
361375
}
362376
btnChangeColorBorder->blockSignals( true );
363377
btnChangeColorBorder->setColor( mLayer->borderColor() );
364-
btnChangeColorBorder->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
365378
btnChangeColorBorder->blockSignals( false );
366379
btnChangeColorFill->blockSignals( true );
367380
btnChangeColorFill->setColor( mLayer->color() );
368-
btnChangeColorFill->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
369381
btnChangeColorFill->blockSignals( false );
370382
spinSize->blockSignals( true );
371383
spinSize->setValue( mLayer->size() );
@@ -579,9 +591,13 @@ QgsSimpleFillSymbolLayerV2Widget::QgsSimpleFillSymbolLayerV2Widget( const QgsVec
579591
mBorderWidthUnitWidget->setUnits( QStringList() << tr( "Millimeter" ) << tr( "Map unit" ), 1 );
580592
mOffsetUnitWidget->setUnits( QStringList() << tr( "Millimeter" ) << tr( "Map unit" ), 1 );
581593

594+
btnChangeColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
595+
btnChangeColor->setColorDialogTitle( tr( "Select fill color" ) );
582596
btnChangeColor->setContext( "symbology" );
583597
btnChangeColor->setShowNoColor( true );
584598
btnChangeColor->setNoColorString( tr( "Transparent fill" ) );
599+
btnChangeBorderColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
600+
btnChangeBorderColor->setColorDialogTitle( tr( "Select border color" ) );
585601
btnChangeBorderColor->setContext( "symbology" );
586602
btnChangeBorderColor->setShowNoColor( true );
587603
btnChangeBorderColor->setNoColorString( tr( "Transparent border" ) );
@@ -607,14 +623,12 @@ void QgsSimpleFillSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
607623
// set values
608624
btnChangeColor->blockSignals( true );
609625
btnChangeColor->setColor( mLayer->color() );
610-
btnChangeColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
611626
btnChangeColor->blockSignals( false );
612627
cboFillStyle->blockSignals( true );
613628
cboFillStyle->setBrushStyle( mLayer->brushStyle() );
614629
cboFillStyle->blockSignals( false );
615630
btnChangeBorderColor->blockSignals( true );
616631
btnChangeBorderColor->setColor( mLayer->borderColor() );
617-
btnChangeBorderColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
618632
btnChangeBorderColor->blockSignals( false );
619633
cboBorderStyle->blockSignals( true );
620634
cboBorderStyle->setPenStyle( mLayer->borderStyle() );
@@ -751,6 +765,17 @@ QgsGradientFillSymbolLayerV2Widget::QgsGradientFillSymbolLayerV2Widget( const Qg
751765
cboGradientColorRamp->setShowGradientOnly( true );
752766
cboGradientColorRamp->populate( QgsStyleV2::defaultStyle() );
753767

768+
btnChangeColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
769+
btnChangeColor->setColorDialogTitle( tr( "Select gradient color" ) );
770+
btnChangeColor->setContext( "symbology" );
771+
btnChangeColor->setShowNoColor( true );
772+
btnChangeColor->setNoColorString( tr( "Transparent" ) );
773+
btnChangeColor2->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
774+
btnChangeColor2->setColorDialogTitle( tr( "Select gradient color" ) );
775+
btnChangeColor2->setContext( "symbology" );
776+
btnChangeColor2->setShowNoColor( true );
777+
btnChangeColor2->setNoColorString( tr( "Transparent" ) );
778+
754779
connect( btnChangeColor, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor( const QColor& ) ) );
755780
connect( btnChangeColor2, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor2( const QColor& ) ) );
756781
connect( cboGradientColorRamp, SIGNAL( currentIndexChanged( int ) ) , this, SLOT( applyColorRamp() ) );
@@ -779,11 +804,9 @@ void QgsGradientFillSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer
779804
// set values
780805
btnChangeColor->blockSignals( true );
781806
btnChangeColor->setColor( mLayer->color() );
782-
btnChangeColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
783807
btnChangeColor->blockSignals( false );
784808
btnChangeColor2->blockSignals( true );
785809
btnChangeColor2->setColor( mLayer->color2() );
786-
btnChangeColor2->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
787810
btnChangeColor2->blockSignals( false );
788811

789812
if ( mLayer->gradientColorType() == QgsGradientFillSymbolLayerV2::SimpleTwoColor )
@@ -1102,6 +1125,17 @@ QgsShapeburstFillSymbolLayerV2Widget::QgsShapeburstFillSymbolLayerV2Widget( cons
11021125
mDistanceUnitWidget->setUnits( QStringList() << tr( "Millimeter" ) << tr( "Map unit" ), 1 );
11031126
mOffsetUnitWidget->setUnits( QStringList() << tr( "Millimeter" ) << tr( "Map unit" ), 1 );
11041127

1128+
btnChangeColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
1129+
btnChangeColor->setColorDialogTitle( tr( "Select gradient color" ) );
1130+
btnChangeColor->setContext( "symbology" );
1131+
btnChangeColor->setShowNoColor( true );
1132+
btnChangeColor->setNoColorString( tr( "Transparent" ) );
1133+
btnChangeColor2->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
1134+
btnChangeColor2->setColorDialogTitle( tr( "Select gradient color" ) );
1135+
btnChangeColor2->setContext( "symbology" );
1136+
btnChangeColor2->setShowNoColor( true );
1137+
btnChangeColor2->setNoColorString( tr( "Transparent" ) );
1138+
11051139
cboGradientColorRamp->setShowGradientOnly( true );
11061140
cboGradientColorRamp->populate( QgsStyleV2::defaultStyle() );
11071141

@@ -1127,11 +1161,9 @@ void QgsShapeburstFillSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* lay
11271161
// set values
11281162
btnChangeColor->blockSignals( true );
11291163
btnChangeColor->setColor( mLayer->color() );
1130-
btnChangeColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
11311164
btnChangeColor->blockSignals( false );
11321165
btnChangeColor2->blockSignals( true );
11331166
btnChangeColor2->setColor( mLayer->color2() );
1134-
btnChangeColor2->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
11351167
btnChangeColor2->blockSignals( false );
11361168

11371169
if ( mLayer->colorType() == QgsShapeburstFillSymbolLayerV2::SimpleTwoColor )
@@ -1557,6 +1589,11 @@ QgsSvgMarkerSymbolLayerV2Widget::QgsSvgMarkerSymbolLayerV2Widget( const QgsVecto
15571589
mOffsetUnitWidget->setUnits( QStringList() << tr( "Millimeter" ) << tr( "Map unit" ), 1 );
15581590
viewGroups->setHeaderHidden( true );
15591591

1592+
mChangeColorButton->setColorDialogTitle( tr( "Select fill color" ) );
1593+
mChangeColorButton->setContext( "symbology" );
1594+
mChangeBorderColorButton->setColorDialogTitle( tr( "Select border color" ) );
1595+
mChangeColorButton->setContext( "symbology" );
1596+
15601597
populateList();
15611598

15621599
connect( viewImages->selectionModel(), SIGNAL( currentChanged( const QModelIndex&, const QModelIndex& ) ), this, SLOT( setName( const QModelIndex& ) ) );
@@ -2045,6 +2082,11 @@ QgsSVGFillSymbolLayerWidget::QgsSVGFillSymbolLayerWidget( const QgsVectorLayer*
20452082
mSvgTreeView->setHeaderHidden( true );
20462083
insertIcons();
20472084

2085+
mChangeColorButton->setColorDialogTitle( tr( "Select fill color" ) );
2086+
mChangeColorButton->setContext( "symbology" );
2087+
mChangeBorderColorButton->setColorDialogTitle( tr( "Select border color" ) );
2088+
mChangeBorderColorButton->setContext( "symbology" );
2089+
20482090
connect( mSvgListView->selectionModel(), SIGNAL( currentChanged( const QModelIndex&, const QModelIndex& ) ), this, SLOT( setFile( const QModelIndex& ) ) );
20492091
connect( mSvgTreeView->selectionModel(), SIGNAL( currentChanged( const QModelIndex&, const QModelIndex& ) ), this, SLOT( populateIcons( const QModelIndex& ) ) );
20502092
}
@@ -2639,6 +2681,10 @@ QgsFontMarkerSymbolLayerV2Widget::QgsFontMarkerSymbolLayerV2Widget( const QgsVec
26392681
widgetChar = new CharacterWidget;
26402682
scrollArea->setWidget( widgetChar );
26412683

2684+
btnColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
2685+
btnColor->setColorDialogTitle( tr( "Select symbol color" ) );
2686+
btnColor->setContext( "symbology" );
2687+
26422688
connect( cboFont, SIGNAL( currentFontChanged( const QFont & ) ), this, SLOT( setFontFamily( const QFont& ) ) );
26432689
connect( spinSize, SIGNAL( valueChanged( double ) ), this, SLOT( setSize( double ) ) );
26442690
connect( btnColor, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( setColor( const QColor& ) ) );
@@ -2666,7 +2712,6 @@ void QgsFontMarkerSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
26662712
spinSize->blockSignals( false );
26672713
btnColor->blockSignals( true );
26682714
btnColor->setColor( mLayer->color() );
2669-
btnColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
26702715
btnColor->blockSignals( false );
26712716
spinAngle->blockSignals( true );
26722717
spinAngle->setValue( mLayer->angle() );

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ QgsSymbolsListWidget::QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* sty
8686
// Live color updates are not undoable to child symbol layers
8787
btnColor->setAcceptLiveUpdates( false );
8888
btnColor->setColorDialogOptions( QColorDialog::ShowAlphaChannel );
89+
btnColor->setColorDialogTitle( tr( "Select color" ) );
90+
btnColor->setContext( "symbology" );
8991
}
9092

9193
void QgsSymbolsListWidget::populateGroups( QString parent, QString prepend )

‎src/ui/symbollayer/widget_ellipse.ui

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
</widget>
6767
</item>
6868
<item>
69-
<widget class="QgsColorButton" name="btnChangeColorFill">
69+
<widget class="QgsColorButtonV2" name="btnChangeColorFill">
7070
<property name="minimumSize">
7171
<size>
7272
<width>100</width>
@@ -98,7 +98,7 @@
9898
</widget>
9999
</item>
100100
<item>
101-
<widget class="QgsColorButton" name="btnChangeColorBorder">
101+
<widget class="QgsColorButtonV2" name="btnChangeColorBorder">
102102
<property name="minimumSize">
103103
<size>
104104
<width>100</width>
@@ -399,9 +399,9 @@
399399
</widget>
400400
<customwidgets>
401401
<customwidget>
402-
<class>QgsColorButton</class>
403-
<extends>QPushButton</extends>
404-
<header>qgscolorbutton.h</header>
402+
<class>QgsColorButtonV2</class>
403+
<extends>QToolButton</extends>
404+
<header>qgscolorbuttonv2.h</header>
405405
</customwidget>
406406
<customwidget>
407407
<class>QgsUnitSelectionWidget</class>

‎src/ui/symbollayer/widget_fontmarker.ui

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@
3434
</widget>
3535
</item>
3636
<item row="1" column="1">
37-
<widget class="QgsColorButton" name="btnColor">
37+
<widget class="QgsColorButtonV2" name="btnColor">
3838
<property name="minimumSize">
3939
<size>
40-
<width>100</width>
40+
<width>120</width>
4141
<height>0</height>
4242
</size>
4343
</property>
4444
<property name="maximumSize">
4545
<size>
46-
<width>100</width>
46+
<width>120</width>
4747
<height>16777215</height>
4848
</size>
4949
</property>
@@ -238,9 +238,9 @@
238238
</widget>
239239
<customwidgets>
240240
<customwidget>
241-
<class>QgsColorButton</class>
242-
<extends>QPushButton</extends>
243-
<header>qgscolorbutton.h</header>
241+
<class>QgsColorButtonV2</class>
242+
<extends>QToolButton</extends>
243+
<header>qgscolorbuttonv2.h</header>
244244
</customwidget>
245245
<customwidget>
246246
<class>QgsUnitSelectionWidget</class>

‎src/ui/symbollayer/widget_gradientfill.ui

Lines changed: 16 additions & 19 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>474</width>
9+
<width>494</width>
1010
<height>358</height>
1111
</rect>
1212
</property>
@@ -23,16 +23,7 @@
2323
<property name="horizontalSpacing">
2424
<number>28</number>
2525
</property>
26-
<property name="leftMargin">
27-
<number>1</number>
28-
</property>
29-
<property name="topMargin">
30-
<number>1</number>
31-
</property>
32-
<property name="rightMargin">
33-
<number>1</number>
34-
</property>
35-
<property name="bottomMargin">
26+
<property name="margin">
3627
<number>1</number>
3728
</property>
3829
<item row="0" column="0">
@@ -48,16 +39,16 @@
4839
<number>12</number>
4940
</property>
5041
<item>
51-
<widget class="QgsColorButton" name="btnChangeColor">
42+
<widget class="QgsColorButtonV2" name="btnChangeColor">
5243
<property name="minimumSize">
5344
<size>
54-
<width>100</width>
45+
<width>120</width>
5546
<height>0</height>
5647
</size>
5748
</property>
5849
<property name="maximumSize">
5950
<size>
60-
<width>100</width>
51+
<width>120</width>
6152
<height>16777215</height>
6253
</size>
6354
</property>
@@ -67,13 +58,19 @@
6758
</widget>
6859
</item>
6960
<item>
70-
<widget class="QgsColorButton" name="btnChangeColor2">
61+
<widget class="QgsColorButtonV2" name="btnChangeColor2">
7162
<property name="minimumSize">
7263
<size>
73-
<width>100</width>
64+
<width>120</width>
7465
<height>0</height>
7566
</size>
7667
</property>
68+
<property name="maximumSize">
69+
<size>
70+
<width>120</width>
71+
<height>16777215</height>
72+
</size>
73+
</property>
7774
<property name="text">
7875
<string/>
7976
</property>
@@ -429,9 +426,9 @@
429426
</widget>
430427
<customwidgets>
431428
<customwidget>
432-
<class>QgsColorButton</class>
433-
<extends>QPushButton</extends>
434-
<header>qgscolorbutton.h</header>
429+
<class>QgsColorButtonV2</class>
430+
<extends>QToolButton</extends>
431+
<header>qgscolorbuttonv2.h</header>
435432
</customwidget>
436433
<customwidget>
437434
<class>QgsUnitSelectionWidget</class>

‎src/ui/symbollayer/widget_shapeburstfill.ui

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@
3333
<item row="0" column="1">
3434
<layout class="QHBoxLayout" name="horizontalLayout_2">
3535
<item>
36-
<widget class="QgsColorButton" name="btnChangeColor">
36+
<widget class="QgsColorButtonV2" name="btnChangeColor">
3737
<property name="minimumSize">
3838
<size>
39-
<width>100</width>
39+
<width>120</width>
4040
<height>0</height>
4141
</size>
4242
</property>
4343
<property name="maximumSize">
4444
<size>
45-
<width>100</width>
45+
<width>120</width>
4646
<height>16777215</height>
4747
</size>
4848
</property>
@@ -52,13 +52,19 @@
5252
</widget>
5353
</item>
5454
<item>
55-
<widget class="QgsColorButton" name="btnChangeColor2">
55+
<widget class="QgsColorButtonV2" name="btnChangeColor2">
5656
<property name="minimumSize">
5757
<size>
58-
<width>100</width>
58+
<width>120</width>
5959
<height>0</height>
6060
</size>
6161
</property>
62+
<property name="maximumSize">
63+
<size>
64+
<width>120</width>
65+
<height>16777215</height>
66+
</size>
67+
</property>
6268
<property name="text">
6369
<string/>
6470
</property>
@@ -266,9 +272,9 @@
266272
</widget>
267273
<customwidgets>
268274
<customwidget>
269-
<class>QgsColorButton</class>
270-
<extends>QPushButton</extends>
271-
<header>qgscolorbutton.h</header>
275+
<class>QgsColorButtonV2</class>
276+
<extends>QToolButton</extends>
277+
<header>qgscolorbuttonv2.h</header>
272278
</customwidget>
273279
<customwidget>
274280
<class>QgsUnitSelectionWidget</class>
@@ -350,4 +356,3 @@
350356
</connection>
351357
</connections>
352358
</ui>
353-

‎src/ui/symbollayer/widget_simplefill.ui

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
<widget class="QgsColorButtonV2" name="btnChangeColor">
4141
<property name="minimumSize">
4242
<size>
43-
<width>100</width>
43+
<width>120</width>
4444
<height>0</height>
4545
</size>
4646
</property>
4747
<property name="maximumSize">
4848
<size>
49-
<width>100</width>
49+
<width>120</width>
5050
<height>16777215</height>
5151
</size>
5252
</property>
@@ -72,13 +72,13 @@
7272
<widget class="QgsColorButtonV2" name="btnChangeBorderColor">
7373
<property name="minimumSize">
7474
<size>
75-
<width>100</width>
75+
<width>120</width>
7676
<height>0</height>
7777
</size>
7878
</property>
7979
<property name="maximumSize">
8080
<size>
81-
<width>100</width>
81+
<width>120</width>
8282
<height>16777215</height>
8383
</size>
8484
</property>
@@ -239,16 +239,16 @@
239239
</layout>
240240
</widget>
241241
<customwidgets>
242-
<customwidget>
243-
<class>QgsPenJoinStyleComboBox</class>
244-
<extends>QComboBox</extends>
245-
<header>qgspenstylecombobox.h</header>
246-
</customwidget>
247242
<customwidget>
248243
<class>QgsColorButtonV2</class>
249244
<extends>QToolButton</extends>
250245
<header>qgscolorbuttonv2.h</header>
251246
</customwidget>
247+
<customwidget>
248+
<class>QgsPenJoinStyleComboBox</class>
249+
<extends>QComboBox</extends>
250+
<header>qgspenstylecombobox.h</header>
251+
</customwidget>
252252
<customwidget>
253253
<class>QgsUnitSelectionWidget</class>
254254
<extends>QWidget</extends>

‎src/ui/symbollayer/widget_simpleline.ui

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,7 @@
2323
<property name="horizontalSpacing">
2424
<number>28</number>
2525
</property>
26-
<property name="leftMargin">
27-
<number>1</number>
28-
</property>
29-
<property name="topMargin">
30-
<number>1</number>
31-
</property>
32-
<property name="rightMargin">
33-
<number>1</number>
34-
</property>
35-
<property name="bottomMargin">
26+
<property name="margin">
3627
<number>1</number>
3728
</property>
3829
<item row="0" column="0">
@@ -43,7 +34,7 @@
4334
</widget>
4435
</item>
4536
<item row="0" column="1">
46-
<widget class="QgsColorButton" name="btnChangeColor">
37+
<widget class="QgsColorButtonV2" name="btnChangeColor">
4738
<property name="sizePolicy">
4839
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
4940
<horstretch>0</horstretch>
@@ -52,13 +43,13 @@
5243
</property>
5344
<property name="minimumSize">
5445
<size>
55-
<width>100</width>
46+
<width>120</width>
5647
<height>0</height>
5748
</size>
5849
</property>
5950
<property name="maximumSize">
6051
<size>
61-
<width>100</width>
52+
<width>120</width>
6253
<height>16777215</height>
6354
</size>
6455
</property>
@@ -233,30 +224,30 @@
233224
</layout>
234225
</widget>
235226
<customwidgets>
227+
<customwidget>
228+
<class>QgsColorButtonV2</class>
229+
<extends>QToolButton</extends>
230+
<header>qgscolorbuttonv2.h</header>
231+
</customwidget>
236232
<customwidget>
237233
<class>QgsPenJoinStyleComboBox</class>
238234
<extends>QComboBox</extends>
239235
<header>qgspenstylecombobox.h</header>
240236
</customwidget>
241-
<customwidget>
242-
<class>QgsColorButton</class>
243-
<extends>QPushButton</extends>
244-
<header>qgscolorbutton.h</header>
245-
</customwidget>
246237
<customwidget>
247238
<class>QgsUnitSelectionWidget</class>
248239
<extends>QWidget</extends>
249240
<header>qgsunitselectionwidget.h</header>
250241
<container>1</container>
251242
</customwidget>
252243
<customwidget>
253-
<class>QgsPenStyleComboBox</class>
254-
<extends>QWidget</extends>
244+
<class>QgsPenCapStyleComboBox</class>
245+
<extends>QComboBox</extends>
255246
<header>qgspenstylecombobox.h</header>
256247
</customwidget>
257248
<customwidget>
258-
<class>QgsPenCapStyleComboBox</class>
259-
<extends>QComboBox</extends>
249+
<class>QgsPenStyleComboBox</class>
250+
<extends>QWidget</extends>
260251
<header>qgspenstylecombobox.h</header>
261252
</customwidget>
262253
</customwidgets>

‎src/ui/symbollayer/widget_simplemarker.ui

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@
3131
</widget>
3232
</item>
3333
<item>
34-
<widget class="QgsColorButton" name="btnChangeColorFill">
34+
<widget class="QgsColorButtonV2" name="btnChangeColorFill">
3535
<property name="minimumSize">
3636
<size>
37-
<width>100</width>
37+
<width>120</width>
3838
<height>0</height>
3939
</size>
4040
</property>
4141
<property name="maximumSize">
4242
<size>
43-
<width>100</width>
43+
<width>120</width>
4444
<height>16777215</height>
4545
</size>
4646
</property>
@@ -63,16 +63,16 @@
6363
</widget>
6464
</item>
6565
<item>
66-
<widget class="QgsColorButton" name="btnChangeColorBorder">
66+
<widget class="QgsColorButtonV2" name="btnChangeColorBorder">
6767
<property name="minimumSize">
6868
<size>
69-
<width>100</width>
69+
<width>120</width>
7070
<height>0</height>
7171
</size>
7272
</property>
7373
<property name="maximumSize">
7474
<size>
75-
<width>100</width>
75+
<width>120</width>
7676
<height>16777215</height>
7777
</size>
7878
</property>
@@ -353,9 +353,9 @@
353353
</widget>
354354
<customwidgets>
355355
<customwidget>
356-
<class>QgsColorButton</class>
357-
<extends>QPushButton</extends>
358-
<header>qgscolorbutton.h</header>
356+
<class>QgsColorButtonV2</class>
357+
<extends>QToolButton</extends>
358+
<header>qgscolorbuttonv2.h</header>
359359
</customwidget>
360360
<customwidget>
361361
<class>QgsUnitSelectionWidget</class>

‎src/ui/symbollayer/widget_svgfill.ui

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,16 @@
174174
</widget>
175175
</item>
176176
<item>
177-
<widget class="QgsColorButton" name="mChangeColorButton">
177+
<widget class="QgsColorButtonV2" name="mChangeColorButton">
178178
<property name="minimumSize">
179179
<size>
180-
<width>100</width>
180+
<width>120</width>
181181
<height>0</height>
182182
</size>
183183
</property>
184184
<property name="maximumSize">
185185
<size>
186-
<width>100</width>
186+
<width>120</width>
187187
<height>16777215</height>
188188
</size>
189189
</property>
@@ -206,16 +206,16 @@
206206
</widget>
207207
</item>
208208
<item>
209-
<widget class="QgsColorButton" name="mChangeBorderColorButton">
209+
<widget class="QgsColorButtonV2" name="mChangeBorderColorButton">
210210
<property name="minimumSize">
211211
<size>
212-
<width>100</width>
212+
<width>120</width>
213213
<height>0</height>
214214
</size>
215215
</property>
216216
<property name="maximumSize">
217217
<size>
218-
<width>100</width>
218+
<width>120</width>
219219
<height>16777215</height>
220220
</size>
221221
</property>
@@ -288,9 +288,9 @@
288288
</widget>
289289
<customwidgets>
290290
<customwidget>
291-
<class>QgsColorButton</class>
292-
<extends>QPushButton</extends>
293-
<header>qgscolorbutton.h</header>
291+
<class>QgsColorButtonV2</class>
292+
<extends>QToolButton</extends>
293+
<header>qgscolorbuttonv2.h</header>
294294
</customwidget>
295295
<customwidget>
296296
<class>QgsUnitSelectionWidget</class>

‎src/ui/symbollayer/widget_svgmarker.ui

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,16 @@
101101
</widget>
102102
</item>
103103
<item>
104-
<widget class="QgsColorButton" name="mChangeColorButton">
104+
<widget class="QgsColorButtonV2" name="mChangeColorButton">
105105
<property name="minimumSize">
106106
<size>
107-
<width>100</width>
107+
<width>120</width>
108108
<height>0</height>
109109
</size>
110110
</property>
111111
<property name="maximumSize">
112112
<size>
113-
<width>100</width>
113+
<width>120</width>
114114
<height>16777215</height>
115115
</size>
116116
</property>
@@ -133,16 +133,16 @@
133133
</widget>
134134
</item>
135135
<item>
136-
<widget class="QgsColorButton" name="mChangeBorderColorButton">
136+
<widget class="QgsColorButtonV2" name="mChangeBorderColorButton">
137137
<property name="minimumSize">
138138
<size>
139-
<width>100</width>
139+
<width>120</width>
140140
<height>0</height>
141141
</size>
142142
</property>
143143
<property name="maximumSize">
144144
<size>
145-
<width>100</width>
145+
<width>120</width>
146146
<height>16777215</height>
147147
</size>
148148
</property>
@@ -406,9 +406,9 @@
406406
</widget>
407407
<customwidgets>
408408
<customwidget>
409-
<class>QgsColorButton</class>
410-
<extends>QPushButton</extends>
411-
<header>qgscolorbutton.h</header>
409+
<class>QgsColorButtonV2</class>
410+
<extends>QToolButton</extends>
411+
<header>qgscolorbuttonv2.h</header>
412412
</customwidget>
413413
<customwidget>
414414
<class>QgsUnitSelectionWidget</class>

‎src/ui/symbollayer/widget_symbolslist.ui

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@
7777
</widget>
7878
</item>
7979
<item row="2" column="1">
80-
<widget class="QgsColorButton" name="btnColor">
80+
<widget class="QgsColorButtonV2" name="btnColor">
8181
<property name="minimumSize">
8282
<size>
83-
<width>100</width>
83+
<width>120</width>
8484
<height>0</height>
8585
</size>
8686
</property>
8787
<property name="maximumSize">
8888
<size>
89-
<width>100</width>
89+
<width>120</width>
9090
<height>16777215</height>
9191
</size>
9292
</property>
@@ -330,9 +330,9 @@
330330
</widget>
331331
<customwidgets>
332332
<customwidget>
333-
<class>QgsColorButton</class>
334-
<extends>QPushButton</extends>
335-
<header>qgscolorbutton.h</header>
333+
<class>QgsColorButtonV2</class>
334+
<extends>QToolButton</extends>
335+
<header>qgscolorbuttonv2.h</header>
336336
</customwidget>
337337
<customwidget>
338338
<class>QgsUnitSelectionWidget</class>

0 commit comments

Comments
 (0)
Please sign in to comment.