1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Use correct margins from style in NavigationBar and BookmarksToolbar

This commit is contained in:
David Rosca 2018-01-05 16:46:45 +01:00
parent 09d2a2017d
commit 8cbaa19dd1
2 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
/* ============================================================
* Falkon - Qt web browser
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -40,10 +40,9 @@ BookmarksToolbar::BookmarksToolbar(BrowserWindow* window, QWidget* parent)
setContextMenuPolicy(Qt::CustomContextMenu);
m_layout = new QHBoxLayout(this);
m_layout->setMargin(1);
#ifndef Q_OS_MACOS
m_layout->setSpacing(0);
#endif
m_layout->setMargin(style()->pixelMetric(QStyle::PM_ToolBarItemMargin, 0, this)
+ style()->pixelMetric(QStyle::PM_ToolBarFrameWidth, 0, this));
m_layout->setSpacing(style()->pixelMetric(QStyle::PM_ToolBarItemSpacing, 0, this));
setLayout(m_layout);
// Set some sane value, will be updated to correct value on first added button

View File

@ -65,7 +65,8 @@ NavigationBar::NavigationBar(BrowserWindow* window)
setObjectName(QSL("navigationbar"));
m_layout = new QHBoxLayout(this);
m_layout->setMargin(style()->pixelMetric(QStyle::PM_ToolBarItemMargin, 0, this));
m_layout->setMargin(style()->pixelMetric(QStyle::PM_ToolBarItemMargin, 0, this)
+ style()->pixelMetric(QStyle::PM_ToolBarFrameWidth, 0, this));
m_layout->setSpacing(style()->pixelMetric(QStyle::PM_ToolBarItemSpacing, 0, this));
setLayout(m_layout);