Skip to content
Permalink
Browse files

Tighten margins and spacing on various docks

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 0ba128694a1fb4041685a87a48cbcb322373e6b4
Showing with 14 additions and 0 deletions.
  1. +2 −0 src/app/qgisapp.cpp
  2. +4 −0 src/app/qgsattributetabledialog.cpp
  3. +4 −0 src/app/qgsbookmarks.cpp
  4. +4 −0 src/app/qgsbrowserdockwidget.cpp
@@ -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 );

@@ -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();
@@ -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" ) );
@@ -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 );

2 comments on commit 0ba1286

@NathanW2

This comment has been minimized.

Copy link
Member

@NathanW2 NathanW2 replied Jun 20, 2016

Testing now

@NathanW2

This comment has been minimized.

Copy link
Member

@NathanW2 NathanW2 replied Jun 20, 2016

image

image

I looks OK to me.

Please sign in to comment.
You can’t perform that action at this time.