Skip to content
Permalink
Browse files
Vertically align place holder widgets
  • Loading branch information
DelazJ authored and nyalldawson committed Nov 1, 2021
1 parent be96542 commit 8cd9c3b0dba8c5b3cb26b671c01750b4ff87c5f1
Showing with 26 additions and 14 deletions.
  1. +4 −2 src/gui/vector/qgsvectorlayerlegendwidget.cpp
  2. +22 −12 src/ui/qgsrasterlayerpropertiesbase.ui
@@ -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 );

@@ -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">
@@ -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">

0 comments on commit 8cd9c3b

Please sign in to comment.