Commit 969bdeb4 authored by Moritz Molch's avatar Moritz Molch

Give the layouts in the toolbar a uniform spacing

REVIEW:123240
parent fedecae9
......@@ -411,6 +411,7 @@ KisMainWindow::KisMainWindow()
plugActionList("toolbarlist", toolbarList);
setToolbarList(toolbarList);
applyToolBarLayout();
d->viewManager->updateGUI();
d->viewManager->updateIcons();
......@@ -1386,6 +1387,7 @@ void KisMainWindow::slotConfigureToolbars()
KEditToolBar edit(factory(), this);
connect(&edit, SIGNAL(newToolBarConfig()), this, SLOT(slotNewToolbarConfig()));
(void) edit.exec();
applyToolBarLayout();
}
void KisMainWindow::slotNewToolbarConfig()
......@@ -1400,6 +1402,7 @@ void KisMainWindow::slotNewToolbarConfig()
return;
plugActionList("toolbarlist", d->toolbarList);
applyToolBarLayout();
}
void KisMainWindow::slotToolbarToggled(bool toggle)
......@@ -2122,6 +2125,13 @@ void KisMainWindow::createActions()
}
}
void KisMainWindow::applyToolBarLayout()
{
Q_FOREACH (KToolBar *toolBar, toolBars()) {
toolBar->layout()->setSpacing(4);
}
}
void KisMainWindow::initializeGeometry()
{
// if the user didn's specify the geometry on the command line (does anyone do that still?),
......
......@@ -433,6 +433,8 @@ private:
void createActions();
void applyToolBarLayout();
private slots:
void initializeGeometry();
......
......@@ -240,11 +240,13 @@ KisPaintopBox::KisPaintopBox(KisViewManager *view, QWidget *parent, const char *
QHBoxLayout* baseLayout = new QHBoxLayout(this);
m_paintopWidget = new QWidget(this);
baseLayout->addWidget(m_paintopWidget);
baseLayout->setSpacing(4);
baseLayout->setContentsMargins(0, 0, 0, 0);
m_layout = new QHBoxLayout(m_paintopWidget);
m_layout->addWidget(m_settingsWidget);
m_layout->addWidget(m_presetWidget);
m_layout->setSpacing(4);
m_layout->setContentsMargins(0, 0, 0, 0);
QWidget* compositeActions = new QWidget(this);
......@@ -253,7 +255,8 @@ KisPaintopBox::KisPaintopBox(KisViewManager *view, QWidget *parent, const char *
compositeLayout->addWidget(m_eraseModeButton);
compositeLayout->addWidget(m_alphaLockButton);
compositeLayout->setContentsMargins(3, 0, 0, 0);
compositeLayout->setSpacing(4);
compositeLayout->setContentsMargins(0, 0, 0, 0);
compositeLayout->addWidget(m_reloadButton);
......@@ -297,6 +300,7 @@ KisPaintopBox::KisPaintopBox(KisViewManager *view, QWidget *parent, const char *
QHBoxLayout* mirrorLayout = new QHBoxLayout(mirrorActions);
mirrorLayout->addWidget(hMirrorButton);
mirrorLayout->addWidget(vMirrorButton);
mirrorLayout->setSpacing(4);
mirrorLayout->setContentsMargins(0, 0, 0, 0);
action = new KAction(i18n("Mirror"), this);
view->actionCollection()->addAction("mirror_actions", action);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment