Skip to content
Permalink
Browse files
Allow to resize the vector 3D Map view properties tab
adding a scrollbar to single symbol widget to control its height
  • Loading branch information
DelazJ authored and nyalldawson committed Jul 18, 2021
1 parent bb0f9b2 commit 3924aad79f9bf2e601ea587be4e40284d334157b
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/app/3d/qgsvectorlayer3drendererwidget.cpp
@@ -25,6 +25,7 @@
#include "qgsapplication.h"
#include "qgs3dsymbolregistry.h"
#include "qgsabstractmaterialsettings.h"
#include "qgsvscrollarea.h"

#include <QBoxLayout>
#include <QCheckBox>
@@ -40,9 +41,18 @@ QgsSingleSymbol3DRendererWidget::QgsSingleSymbol3DRendererWidget( QgsVectorLayer
{
widgetSymbol = new QgsSymbol3DWidget( mLayer, this );

QgsVScrollArea *scrollArea = new QgsVScrollArea( this );
scrollArea->setFrameShape( QFrame::NoFrame );
scrollArea->setFrameShadow( QFrame::Plain );
scrollArea->setWidgetResizable( true );
QVBoxLayout *scrollLayout = new QVBoxLayout( this );
scrollLayout->setContentsMargins( 0, 0, 0, 0 );
scrollLayout->addWidget( scrollArea );

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

connect( widgetSymbol, &QgsSymbol3DWidget::widgetChanged, this, &QgsSingleSymbol3DRendererWidget::widgetChanged );
}

0 comments on commit 3924aad

Please sign in to comment.