Skip to content

Commit b582ba7

Browse files
committed
Merge pull request #35 from NathanW2/reduce-attribute-dialog-margins
Reduced margins on controls in dialog. Removed frame from scroll area
2 parents 2034d59 + cbd2756 commit b582ba7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/app/qgsattributedialog.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
9494
mDialog->resize( 447, 343 );
9595
gridLayout = new QGridLayout( mDialog );
9696
gridLayout->setSpacing( 6 );
97-
gridLayout->setMargin( 11 );
97+
gridLayout->setMargin( 2 );
9898
gridLayout->setObjectName( QString::fromUtf8( "gridLayout" ) );
9999
mFrame = new QFrame( mDialog );
100100
mFrame->setObjectName( QString::fromUtf8( "mFrame" ) );
101-
mFrame->setFrameShape( QFrame::StyledPanel );
102-
mFrame->setFrameShadow( QFrame::Raised );
101+
mFrame->setFrameShape( QFrame::NoFrame );
102+
mFrame->setFrameShadow( QFrame::Plain );
103103

104104
gridLayout->addWidget( mFrame, 0, 0, 1, 1 );
105105

@@ -116,6 +116,8 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
116116

117117
mFrame->setLayout( mypOuterLayout );
118118
QScrollArea *mypScrollArea = new QScrollArea();
119+
mypScrollArea->setFrameShape( QFrame::NoFrame );
120+
mypScrollArea->setFrameShadow( QFrame::Plain );
119121
//transfers scroll area ownership so no need to call delete
120122
mypOuterLayout->addWidget( mypScrollArea );
121123
QFrame *mypInnerFrame = new QFrame();
@@ -169,6 +171,7 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
169171
mpWidgets << myWidget;
170172
++index;
171173
}
174+
172175
// Set focus to first widget in list, to help entering data without moving the mouse.
173176
if ( mpWidgets.size() > 0 )
174177
{

0 commit comments

Comments
 (0)