Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduced margins on controls in dialog. Removed frame from scroll area #35

Merged
merged 1 commit into from
Aug 6, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/app/qgsattributedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
mDialog->resize( 447, 343 );
gridLayout = new QGridLayout( mDialog );
gridLayout->setSpacing( 6 );
gridLayout->setMargin( 11 );
gridLayout->setMargin( 2 );
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of wasted space with 11 pixels on each side.

gridLayout->setObjectName( QString::fromUtf8( "gridLayout" ) );
mFrame = new QFrame( mDialog );
mFrame->setObjectName( QString::fromUtf8( "mFrame" ) );
mFrame->setFrameShape( QFrame::StyledPanel );
mFrame->setFrameShadow( QFrame::Raised );
mFrame->setFrameShape( QFrame::NoFrame );
mFrame->setFrameShadow( QFrame::Plain );

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

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

mFrame->setLayout( mypOuterLayout );
QScrollArea *mypScrollArea = new QScrollArea();
mypScrollArea->setFrameShape( QFrame::NoFrame );
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the frame as I think it makes for a cleaner UI however I'm happy if it's not preferred by others.

mypScrollArea->setFrameShadow( QFrame::Plain );
//transfers scroll area ownership so no need to call delete
mypOuterLayout->addWidget( mypScrollArea );
QFrame *mypInnerFrame = new QFrame();
Expand Down Expand Up @@ -169,6 +171,7 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
mpWidgets << myWidget;
++index;
}

// Set focus to first widget in list, to help entering data without moving the mouse.
if ( mpWidgets.size() > 0 )
{
Expand Down