Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Vertically align place holder widgets
  • Loading branch information
DelazJ authored and github-actions[bot] committed Oct 31, 2021
1 parent 1008b1e commit fdec56d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
6 changes: 4 additions & 2 deletions src/gui/vector/qgsvectorlayerlegendwidget.cpp
Expand Up @@ -78,11 +78,13 @@ QgsVectorLayerLegendWidget::QgsVectorLayerLegendWidget( QWidget *parent )
mImageSourceLineEdit->setSource( mLayer->legendPlaceholderImage() );
}

QHBoxLayout *placeholderLayout = new QHBoxLayout;
placeholderLayout->addWidget( mPlaceholderImageLabel );
placeholderLayout->addWidget( mImageSourceLineEdit );

QVBoxLayout *layout = new QVBoxLayout;
layout->setContentsMargins( 0, 0, 0, 0 );
layout->addWidget( mPlaceholderImageLabel );
layout->addWidget( mImageSourceLineEdit );
layout->addLayout( placeholderLayout );
layout->addWidget( mLabelLegendGroupBox );
layout->addWidget( mTextOnSymbolGroupBox );

Expand Down
34 changes: 22 additions & 12 deletions src/ui/qgsrasterlayerpropertiesbase.ui
Expand Up @@ -1385,8 +1385,28 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
<widget class="QWidget" name="mOptsPage_Legend">
<layout class="QGridLayout" name="gridLayout_15">
<item row="2" column="0">
<layout class="QVBoxLayout" name="verticalLayout_151">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="mLegendPlaceholderLabel">
<property name="text">
<string>Legend placeholder image</string>
</property>
</widget>
</item>
<item>
<widget class="QgsImageSourceLineEdit" name="mLegendPlaceholderWidget" native="true"/>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
Expand All @@ -1404,16 +1424,6 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QgsImageSourceLineEdit" name="mLegendPlaceholderWidget" native="true"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="mLegendPlaceholderLabel">
<property name="text">
<string>Legend placeholder image</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="mOptsPage_Server">
Expand Down

0 comments on commit fdec56d

Please sign in to comment.