Skip to content
Permalink
Browse files

Add vertical alignment options to QgsAlignmentComboBox

  • Loading branch information
nyalldawson committed Jul 12, 2020
1 parent 18a36e4 commit 1135e40e20c116790ce4f5bc10cbf2c1478356e4
@@ -877,6 +877,9 @@
<file>themes/default/georeferencer/mActionDeleteGCPPoint.png</file>
<file>themes/default/georeferencer/mActionMoveGCPPoint.png</file>
<file>themes/default/georeferencer/mActionSaveGCPpointsAs.png</file>
<file>themes/default/mIconAlignBottom.svg</file>
<file>themes/default/mIconAlignTop.svg</file>
<file>themes/default/mIconAlignVCenter.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6.35 6.35" height="24" width="24"><path d="M.529 2.91h5.292v.53H.529zM.529 1.323h5.292v.529H.529z" style="marker:none" color="#555753" fill="#555753" fill-opacity=".58"/><path d="M.529 4.498h5.292v.529H.529z" style="marker:none" color="#555753" fill="#555753"/></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6.35 6.35" height="24" width="24"><path d="M.529 2.91h5.292v.53H.529z" style="marker:none" color="#555753" fill="#555753" fill-opacity=".577"/><path d="M.529 1.323h5.292v.529H.529z" style="marker:none" color="#555753" fill="#555753"/><path d="M.529 4.498h5.292v.529H.529z" style="marker:none" color="#555753" fill="#555753" fill-opacity=".577"/></svg>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6.35 6.35" height="24" width="24"><path d="M.529 2.91h5.292v.53H.529z" style="marker:none" color="#555753" fill="#555753"/><path d="M.529 1.323h5.292v.529H.529z" style="marker:none" color="#555753" fill="#555753" fill-opacity=".58"/><path d="M.529 4.498h5.292v.529H.529z" style="marker:none" color="#555753" fill="#555753" fill-opacity=".577"/></svg>
@@ -76,6 +76,13 @@ void QgsAlignmentComboBox::populate()
if ( mAlignments & Qt::AlignJustify )
addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconAlignJustify.svg" ) ), tr( "Justify" ), Qt::AlignJustify );

if ( mAlignments & Qt::AlignTop )
addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconAlignTop.svg" ) ), tr( "Top" ), Qt::AlignTop );
if ( mAlignments & Qt::AlignVCenter )
addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconAlignVCenter.svg" ) ), tr( "Vertical Center" ), Qt::AlignVCenter );
if ( mAlignments & Qt::AlignBottom )
addItem( QgsApplication::getThemeIcon( QStringLiteral( "/mIconAlignBottom.svg" ) ), tr( "Bottom" ), Qt::AlignBottom );

const int index = findData( QVariant( prevAlign ) );
if ( index >= 0 )
setCurrentIndex( index );

0 comments on commit 1135e40

Please sign in to comment.
You can’t perform that action at this time.