Skip to content
Permalink
Browse files

Reduce margins in vector and mesh layer properties dialog

harmonizing all the tabs and vertically aligning the settings widget with button toolbar at the bottom
  • Loading branch information
DelazJ authored and nyalldawson committed Apr 28, 2020
1 parent e872a3b commit 680403907af43a9396dc60c7bdc62371d511665b
@@ -88,6 +88,7 @@ QgsMeshLayerProperties::QgsMeshLayerProperties( QgsMapLayer *lyr, QgsMapCanvas *

mOptsPage_3DView->setLayout( new QVBoxLayout( mOptsPage_3DView ) );
mOptsPage_3DView->layout()->addWidget( mMesh3DWidget );
mOptsPage_3DView->layout()->setContentsMargins( 0, 0, 0, 0 );
mOptsPage_3DView->setProperty( "helpPage", QStringLiteral( "working_with_mesh/mesh_properties.html#d-view-properties" ) );
#else
delete mOptsPage_3DView; // removes both the "3d view" list item and its page
@@ -473,6 +473,7 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
if ( !mMaskingWidget )
{
mMaskingWidget = new QgsMaskingWidget( mWidgetStack );
mMaskingWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
connect( mMaskingWidget, &QgsMaskingWidget::widgetChanged, this, &QgsLayerStylingWidget::autoApply );
}
mMaskingWidget->setLayer( vlayer );
@@ -185,19 +185,19 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
{
// Create the Labeling dialog tab
layout = new QVBoxLayout( labelingFrame );
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );
labelingDialog = new QgsLabelingWidget( mLayer, mCanvas, labelingFrame );
labelingDialog->layout()->setContentsMargins( -1, 0, -1, 0 );
labelingDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
connect( labelingDialog, &QgsLabelingWidget::auxiliaryFieldCreated, this, [ = ] { updateAuxiliaryStoragePage(); } );
layout->addWidget( labelingDialog );
labelingFrame->setLayout( layout );

// Create the masking dialog tab
layout = new QVBoxLayout( mMaskingFrame );
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );
mMaskingWidget = new QgsMaskingWidget( mMaskingFrame );
mMaskingWidget->setLayer( mLayer );
mMaskingWidget->layout()->setContentsMargins( -1, 0, -1, 0 );
mMaskingWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
layout->addWidget( mMaskingWidget );
mMaskingFrame->setLayout( layout );
}
@@ -212,30 +212,30 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(

// Create the Actions dialog tab
QVBoxLayout *actionLayout = new QVBoxLayout( actionOptionsFrame );
actionLayout->setMargin( 0 );
actionLayout->setContentsMargins( 0, 0, 0, 0 );
mActionDialog = new QgsAttributeActionDialog( *mLayer->actions(), actionOptionsFrame );
mActionDialog->layout()->setMargin( 0 );
mActionDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
actionLayout->addWidget( mActionDialog );

mSourceFieldsPropertiesDialog = new QgsSourceFieldsProperties( mLayer, mSourceFieldsFrame );
mSourceFieldsPropertiesDialog->layout()->setMargin( 0 );
mSourceFieldsPropertiesDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
mSourceFieldsFrame->setLayout( new QVBoxLayout( mSourceFieldsFrame ) );
mSourceFieldsFrame->layout()->setMargin( 0 );
mSourceFieldsFrame->layout()->setContentsMargins( 0, 0, 0, 0 );
mSourceFieldsFrame->layout()->addWidget( mSourceFieldsPropertiesDialog );

connect( mSourceFieldsPropertiesDialog, &QgsSourceFieldsProperties::toggleEditing, this, static_cast<void ( QgsVectorLayerProperties::* )()>( &QgsVectorLayerProperties::toggleEditing ) );

mAttributesFormPropertiesDialog = new QgsAttributesFormProperties( mLayer, mAttributesFormFrame );
mAttributesFormPropertiesDialog->layout()->setMargin( 0 );
mAttributesFormPropertiesDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
mAttributesFormFrame->setLayout( new QVBoxLayout( mAttributesFormFrame ) );
mAttributesFormFrame->layout()->setMargin( 0 );
mAttributesFormFrame->layout()->setContentsMargins( 0, 0, 0, 0 );
mAttributesFormFrame->layout()->addWidget( mAttributesFormPropertiesDialog );

// Metadata tab, before the syncToLayer
QVBoxLayout *metadataLayout = new QVBoxLayout( metadataFrame );
metadataLayout->setMargin( 0 );
metadataLayout->setContentsMargins( 0, 0, 0, 0 );
mMetadataWidget = new QgsMetadataWidget( this, mLayer );
mMetadataWidget->layout()->setContentsMargins( -1, 0, -1, 0 );
mMetadataWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
mMetadataWidget->setMapCanvas( mCanvas );
metadataLayout->addWidget( mMetadataWidget );
metadataFrame->setLayout( metadataLayout );
@@ -294,9 +294,9 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
mOldJoins = mLayer->vectorJoins();

QVBoxLayout *diagLayout = new QVBoxLayout( mDiagramFrame );
diagLayout->setMargin( 0 );
diagLayout->setContentsMargins( 0, 0, 0, 0 );
diagramPropertiesDialog = new QgsDiagramProperties( mLayer, mDiagramFrame, mCanvas );
diagramPropertiesDialog->layout()->setContentsMargins( -1, 0, -1, 0 );
diagramPropertiesDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
connect( diagramPropertiesDialog, &QgsDiagramProperties::auxiliaryFieldCreated, this, [ = ] { updateAuxiliaryStoragePage(); } );
diagLayout->addWidget( diagramPropertiesDialog );
mDiagramFrame->setLayout( diagLayout );
@@ -41,6 +41,18 @@
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="11" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
@@ -146,7 +158,16 @@
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -187,7 +208,16 @@
<string>Lights</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -309,16 +339,16 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
<number>9</number>
</property>
<property name="topMargin">
<number>0</number>
<number>9</number>
</property>
<property name="rightMargin">
<number>0</number>
<number>9</number>
</property>
<property name="bottomMargin">
<number>0</number>
<number>9</number>
</property>
</layout>
</widget>
@@ -6,14 +6,26 @@
<rect>
<x>0</x>
<y>0</y>
<width>673</width>
<height>280</height>
<width>386</width>
<height>122</height>
</rect>
</property>
<property name="windowTitle">
<string notr="true">Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QgsCollapsibleGroupBox" name="groupLayerRendering">
<property name="title">
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>815</width>
<height>777</height>
<height>557</height>
</rect>
</property>
<property name="minimumSize">
@@ -20,6 +20,12 @@
<string>Raster Layer Properties</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<item>
<widget class="QSplitter" name="mOptionsSplitter">
<property name="orientation">
@@ -195,6 +201,18 @@
</property>
<widget class="QWidget" name="mOptsPage_Information">
<layout class="QVBoxLayout" name="verticalLayout_20">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTextBrowser" name="mInformationTextBrowser"/>
</item>
@@ -227,11 +245,23 @@
<rect>
<x>0</x>
<y>0</y>
<width>643</width>
<height>727</height>
<width>661</width>
<height>508</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item>
@@ -337,7 +367,7 @@ border-radius: 2px;</string>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>415</height>
<height>0</height>
</size>
</property>
</spacer>
@@ -375,11 +405,24 @@ border-radius: 2px;</string>
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
<width>661</width>
<height>728</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10"/>
<layout class="QVBoxLayout" name="verticalLayout_10">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</widget>
</item>
@@ -388,6 +431,18 @@ border-radius: 2px;</string>
<widget class="QWidget" name="mOptsPage_3DView"/>
<widget class="QWidget" name="mOptsPage_Rendering">
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QgsCollapsibleGroupBox" name="mSimplifyMeshGroupBox">
<property name="title">
@@ -466,6 +521,18 @@ border-radius: 2px;</string>
</widget>
<widget class="QWidget" name="mOptsPage_Temporal">
<layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="1" column="3">
<widget class="QDateTimeEdit" name="mTemporalDateTimeStart">
<property name="enabled">
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>774</width>
<height>593</height>
<width>453</width>
<height>345</height>
</rect>
</property>
<property name="windowTitle">
@@ -160,6 +160,18 @@
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QgsMeshRendererScalarSettingsWidget" name="mMeshRendererScalarSettingsWidget" native="true"/>
</item>
@@ -36,11 +36,23 @@
<rect>
<x>0</x>
<y>0</y>
<width>398</width>
<height>298</height>
<width>400</width>
<height>300</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_20">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="mGeometryAutoFixesGroupBox">
<property name="title">

0 comments on commit 6804039

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