mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
Use correct margins from style in NavigationBar and BookmarksToolbar
This commit is contained in:
parent
09d2a2017d
commit
8cbaa19dd1
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* Falkon - Qt web browser
|
* 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
|
* 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
|
* 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);
|
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
|
||||||
m_layout = new QHBoxLayout(this);
|
m_layout = new QHBoxLayout(this);
|
||||||
m_layout->setMargin(1);
|
m_layout->setMargin(style()->pixelMetric(QStyle::PM_ToolBarItemMargin, 0, this)
|
||||||
#ifndef Q_OS_MACOS
|
+ style()->pixelMetric(QStyle::PM_ToolBarFrameWidth, 0, this));
|
||||||
m_layout->setSpacing(0);
|
m_layout->setSpacing(style()->pixelMetric(QStyle::PM_ToolBarItemSpacing, 0, this));
|
||||||
#endif
|
|
||||||
setLayout(m_layout);
|
setLayout(m_layout);
|
||||||
|
|
||||||
// Set some sane value, will be updated to correct value on first added button
|
// Set some sane value, will be updated to correct value on first added button
|
||||||
|
@ -65,7 +65,8 @@ NavigationBar::NavigationBar(BrowserWindow* window)
|
|||||||
setObjectName(QSL("navigationbar"));
|
setObjectName(QSL("navigationbar"));
|
||||||
|
|
||||||
m_layout = new QHBoxLayout(this);
|
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));
|
m_layout->setSpacing(style()->pixelMetric(QStyle::PM_ToolBarItemSpacing, 0, this));
|
||||||
setLayout(m_layout);
|
setLayout(m_layout);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user