From: nds Date: Mon, 30 Dec 2013 12:04:51 +0000 (+0000) Subject: It removes unnecessary margin. X-Git-Tag: BR_hydro_v_0_7~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d836d4c890d2e1164df33680b511f06da2108680;p=modules%2Fhydro.git It removes unnecessary margin. --- diff --git a/src/HYDROCurveCreator/CurveCreator_NewSectionDlg.cxx b/src/HYDROCurveCreator/CurveCreator_NewSectionDlg.cxx index 51d7b26b..526dfb71 100644 --- a/src/HYDROCurveCreator/CurveCreator_NewSectionDlg.cxx +++ b/src/HYDROCurveCreator/CurveCreator_NewSectionDlg.cxx @@ -34,7 +34,12 @@ CurveCreator_NewSectionDlg::CurveCreator_NewSectionDlg( QWidget *parent, bool enableClosed ) : QWidget(parent), myIsEnableClosed( enableClosed ) { + QVBoxLayout* aMainLayout = new QVBoxLayout( this ); + aMainLayout->setMargin( 0 ); + QFrame* aFrame = new QFrame( this ); + aMainLayout->addWidget( aFrame ); + QVBoxLayout* aLayout = new QVBoxLayout( aFrame ); aLayout->setMargin( 0 ); diff --git a/src/HYDROGUI/HYDROGUI_PolylineDlg.cxx b/src/HYDROGUI/HYDROGUI_PolylineDlg.cxx index abbd6ae4..97912be9 100755 --- a/src/HYDROGUI/HYDROGUI_PolylineDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_PolylineDlg.cxx @@ -32,23 +32,35 @@ #include #include #include +#include HYDROGUI_PolylineDlg::HYDROGUI_PolylineDlg( HYDROGUI_Module* theModule, const QString& theTitle ) : HYDROGUI_InputPanel( theModule, theTitle ), myName(NULL) { + QScrollArea* aScrollView = new QScrollArea( this ); + aScrollView->setFrameStyle( QFrame::NoFrame ); + addWidget( aScrollView ); + + QWidget* aContent = new QWidget( aScrollView ); + QVBoxLayout* aCLayout = new QVBoxLayout( aContent ); + aCLayout->setMargin( 0 ); + + aScrollView->setWidget( aContent ); + aScrollView->setWidgetResizable( true ); + QHBoxLayout* aNameLayout = new QHBoxLayout(); - QLabel* aNameLabel = new QLabel(tr("POLYLINE_NAME_TLT"), this); + QLabel* aNameLabel = new QLabel(tr("POLYLINE_NAME_TLT"), aContent); aNameLayout->addWidget(aNameLabel); - myName = new QLineEdit(this); + myName = new QLineEdit(aContent); aNameLayout->addWidget(myName); - addLayout(aNameLayout); + aCLayout->addLayout(aNameLayout); - myEditorWidget = new CurveCreator_Widget( this, NULL ); - addWidget( myEditorWidget, 3 ); + myEditorWidget = new CurveCreator_Widget( aContent, NULL ); + aCLayout->addWidget( myEditorWidget, 3 ); - myAddElementBox = new QGroupBox( tr( "ADD_ELEMENT" ), this ); - addWidget( myAddElementBox, 2 ); + myAddElementBox = new QGroupBox( tr( "ADD_ELEMENT" ), aContent ); + aCLayout->addWidget( myAddElementBox, 2 ); QBoxLayout* anAddElementLayout = new QVBoxLayout( myAddElementBox ); anAddElementLayout->setMargin( 0 );