Skip to content

Commit

Permalink
Tighten margins and spacing on various docks
Browse files Browse the repository at this point in the history
Fixes a rendering artefact on OSX toolbars and leaves more
space for content.

Let me know if this looks bad on Windows and I'll ifdef it out
  • Loading branch information
nyalldawson committed Jun 20, 2016
1 parent 85128c5 commit 0ba1286
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -3040,6 +3040,8 @@ void QgisApp::initLayerTreeView()

QVBoxLayout* vboxLayout = new QVBoxLayout;
vboxLayout->setMargin( 0 );
vboxLayout->setContentsMargins( 0, 0, 0, 0 );
vboxLayout->setSpacing( 0 );
vboxLayout->addWidget( toolbar );
vboxLayout->addWidget( mLayerTreeView );

Expand Down
4 changes: 4 additions & 0 deletions src/app/qgsattributetabledialog.cpp
Expand Up @@ -98,6 +98,10 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid

setAttribute( Qt::WA_DeleteOnClose );

layout()->setMargin( 0 );
layout()->setContentsMargins( 0, 0, 0, 0 );
static_cast< QGridLayout* >( layout() )->setVerticalSpacing( 0 );

QSettings settings;

int size = settings.value( "/IconSize", 16 ).toInt();
Expand Down
4 changes: 4 additions & 0 deletions src/app/qgsbookmarks.cpp
Expand Up @@ -41,6 +41,10 @@ QgsBookmarks::QgsBookmarks( QWidget *parent )
setupUi( this );
restorePosition();

bookmarksDockContents->layout()->setMargin( 0 );
bookmarksDockContents->layout()->setContentsMargins( 0, 0, 0, 0 );
static_cast< QGridLayout* >( bookmarksDockContents->layout() )->setVerticalSpacing( 0 );

QToolButton* btnImpExp = new QToolButton;
btnImpExp->setAutoRaise( true );
btnImpExp->setToolTip( tr( "Import/Export Bookmarks" ) );
Expand Down
4 changes: 4 additions & 0 deletions src/app/qgsbrowserdockwidget.cpp
Expand Up @@ -270,6 +270,10 @@ QgsBrowserDockWidget::QgsBrowserDockWidget( const QString& name, QWidget * paren
{
setupUi( this );

mContents->layout()->setContentsMargins( 0, 0, 0, 0 );
mContents->layout()->setMargin( 0 );
static_cast< QVBoxLayout* >( mContents->layout() )->setSpacing( 0 );

setWindowTitle( name );

mBrowserView = new QgsDockBrowserTreeView( this );
Expand Down

2 comments on commit 0ba1286

@NathanW2
Copy link
Member

Choose a reason for hiding this comment

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

Testing now

@NathanW2
Copy link
Member

Choose a reason for hiding this comment

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

image

image

I looks OK to me.

Please sign in to comment.