Skip to content

Commit 602f09d

Browse files
committedApr 13, 2013
Fix margin addition in QgsOptionsDialogBase
1 parent d87eb2a commit 602f09d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/gui/qgsoptionsdialogbase.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include <QDialog>
2020
#include <QDialogButtonBox>
21+
#include <QLayout>
2122
#include <QListWidget>
2223
#include <QMessageBox>
2324
#include <QScrollBar>
@@ -45,6 +46,11 @@ QgsOptionsDialogBase::~QgsOptionsDialogBase()
4546

4647
void QgsOptionsDialogBase::initOptionsBase( bool restoreUi )
4748
{
49+
// don't add to dialog margins
50+
// redefine now, or those in inherited .ui file will be added
51+
if ( layout() )
52+
layout()->setContentsMargins( 12, 12, 12, 12 ); // Qt default spacing
53+
4854
// start with copy of qgsoptionsdialog_template.ui to ensure existence of these objects
4955
mOptListWidget = findChild<QListWidget*>( "mOptionsListWidget" );
5056
mOptStackedWidget = findChild<QStackedWidget*>( "mOptionsStackedWidget" );

0 commit comments

Comments
 (0)
Please sign in to comment.