Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add vertical alignment options to QgsAlignmentComboBox
  • Loading branch information
nyalldawson committed Jul 12, 2020
1 parent 18a36e4 commit 1135e40
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions images/images.qrc
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions images/themes/default/mIconAlignBottom.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/mIconAlignTop.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/themes/default/mIconAlignVCenter.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/gui/qgsalignmentcombobox.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 1135e40

Please sign in to comment.