Skip to content
Permalink
Browse files

Align 3D View properties tab rendering with common properties tabs

* using groupbox for items instead of line separator
* reducing the oversized margins
  • Loading branch information
DelazJ authored and nyalldawson committed Feb 27, 2020
1 parent 7ca97f3 commit 958b98237d16f19a4b3946ea8835fd4e1172db3c
@@ -33,7 +33,7 @@ QgsPhongMaterialWidget::QgsPhongMaterialWidget( QWidget *parent )

void QgsPhongMaterialWidget::setDiffuseVisible( bool visible )
{
label->setVisible( visible );
lblDiffuse->setVisible( visible );
btnDiffuse->setVisible( visible );
}

@@ -257,7 +257,7 @@ void QgsPoint3DSymbolWidget::onShapeChanged()
<< labelBillboardHeight << spinBillboardHeight << labelBillboardSymbol << btnChangeSymbol;

widgetMaterial->setEnabled( true );
widgetMaterial->show();
materialsGroupBox->show();
transformationWidget->show();
QList<QWidget *> activeWidgets;
switch ( cboShape->currentIndex() )
@@ -287,7 +287,7 @@ void QgsPoint3DSymbolWidget::onShapeChanged()
case 7: // billboard
activeWidgets << labelBillboardHeight << spinBillboardHeight << labelBillboardSymbol << btnChangeSymbol;
// Always hide material and transformationwidget for billboard
widgetMaterial->hide();
materialsGroupBox->hide();
transformationWidget->hide();
break;
}
@@ -42,6 +42,7 @@ QgsSymbol3DWidget::QgsSymbol3DWidget( QWidget *parent ) : QWidget( parent )
widgetStack->addWidget( widgetPolygon );

QVBoxLayout *layout = new QVBoxLayout( this );
layout->setContentsMargins( 0, 0, 0, 0 );
layout->addWidget( widgetStack );

connect( widgetLine, &QgsLine3DSymbolWidget::changed, this, &QgsSymbol3DWidget::widgetChanged );
@@ -38,6 +38,7 @@ QgsSingleSymbol3DRendererWidget::QgsSingleSymbol3DRendererWidget( QWidget *paren
widgetSymbol = new QgsSymbol3DWidget( this );

QVBoxLayout *layout = new QVBoxLayout( this );
layout->setContentsMargins( 0, 0, 0, 0 );
layout->addWidget( widgetSymbol );

connect( widgetSymbol, &QgsSymbol3DWidget::widgetChanged, this, &QgsSingleSymbol3DRendererWidget::widgetChanged );
@@ -6,18 +6,21 @@
<rect>
<x>0</x>
<y>0</y>
<width>538</width>
<height>547</height>
<width>382</width>
<height>264</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<layout class="QFormLayout" name="formLayout">
<item row="1" column="0">
<widget class="QLabel" name="label">
<widget class="QLabel" name="labelHeight">
<property name="text">
<string>Height</string>
</property>
@@ -34,7 +37,7 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="labelExtrusion">
<property name="text">
<string>Extrusion</string>
</property>
@@ -48,7 +51,7 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="labelClamping">
<property name="text">
<string>Altitude clamping</string>
</property>
@@ -74,7 +77,7 @@
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="labelBinding">
<property name="text">
<string>Altitude binding</string>
</property>
@@ -95,7 +98,7 @@
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="labelWidth">
<property name="text">
<string>Width</string>
</property>
@@ -118,14 +121,39 @@
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<widget class="QgsCollapsibleGroupBox" name="groupShading">
<property name="title">
<string>Shading</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="3" column="0" colspan="2">
<widget class="QgsPhongMaterialWidget" name="widgetMaterial" native="true">
<property name="minimumSize">
<size>
<width>10</width>
<height>10</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QgsPhongMaterialWidget" name="widgetMaterial" native="true"/>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
@@ -141,6 +169,12 @@
<extends>QDoubleSpinBox</extends>
<header>qgsdoublespinbox.h</header>
</customwidget>
<customwidget>
<class>QgsCollapsibleGroupBox</class>
<extends>QGroupBox</extends>
<header>qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>spinWidth</tabstop>
@@ -36,8 +36,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>521</width>
<height>685</height>
<width>539</width>
<height>693</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_4">
@@ -160,6 +160,9 @@
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QgsPhongMaterialWidget" name="widgetTerrainMaterial" native="true"/>
</item>
@@ -198,6 +201,9 @@
<string>Lights</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QgsLightsWidget" name="widgetLights" native="true"/>
</item>
@@ -6,16 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>334</width>
<height>252</height>
<width>338</width>
<height>138</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<widget class="QLabel" name="lblDiffuse">
<property name="text">
<string>Diffuse</string>
</property>
@@ -38,7 +38,7 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="lblAmbient">
<property name="text">
<string>Ambient</string>
</property>
@@ -61,7 +61,7 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="lblSpecular">
<property name="text">
<string>Specular</string>
</property>
@@ -84,7 +84,7 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="lblShininess">
<property name="text">
<string>Shininess</string>
</property>

0 comments on commit 958b982

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