Skip to content

Commit

Permalink
Allow to resize the vector 3D Map view properties tab
Browse files Browse the repository at this point in the history
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 3924aad
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/app/3d/qgsvectorlayer3drendererwidget.cpp
Expand Up @@ -25,6 +25,7 @@
#include "qgsapplication.h"
#include "qgs3dsymbolregistry.h"
#include "qgsabstractmaterialsettings.h"
#include "qgsvscrollarea.h"

#include <QBoxLayout>
#include <QCheckBox>
Expand All @@ -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 );
}
Expand Down

0 comments on commit 3924aad

Please sign in to comment.