Commit 4da0a6e1 authored by Kåre Särs's avatar Kåre Särs
Browse files

Unify (remove) plugin content margins

parent f57e8144
......@@ -579,6 +579,7 @@ void ConfigView::resizeEvent(QResizeEvent *)
m_checBoxLayout = nullptr;
delete layout();
QGridLayout *layout = new QGridLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(m_clientCombo, 0, 0);
layout->addWidget(m_targetCombo, 1, 0);
......@@ -651,6 +652,7 @@ void ConfigView::resizeEvent(QResizeEvent *)
}
QGridLayout *layout = new QGridLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(m_clientCombo, 0, 0, 1, 6);
layout->addWidget(m_targetCombo, 1, 0, 1, 3);
......
......@@ -7,14 +7,23 @@
<x>0</x>
<y>0</y>
<width>407</width>
<height>178</height>
<height>308</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
......@@ -27,8 +36,20 @@
<string>Output</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="u_outpTopLayout">
<item>
<widget class="QLabel" name="showLabel">
<property name="text">
......
......@@ -28,6 +28,7 @@
#include <cassert>
#include <QApplication>
#include <QCompleter>
#include <QDir>
#include <QFileDialog>
......@@ -174,6 +175,8 @@ KateBuildView::KateBuildView(KTextEditor::Plugin *plugin, KTextEditor::MainWindo
m_buildWidget = new QWidget(m_toolView);
m_buildUi.setupUi(m_buildWidget);
int leftMargin = QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
m_buildUi.u_outpTopLayout->setContentsMargins(leftMargin, 0, 0, 0);
m_targetsUi = new TargetsUi(this, m_buildUi.u_tabWidget);
m_buildUi.u_tabWidget->insertTab(0, m_targetsUi, i18nc("Tab label", "Target Settings"));
m_buildUi.u_tabWidget->setCurrentWidget(m_targetsUi);
......
......@@ -7,7 +7,7 @@
#include "targets.h"
#include <KLocalizedString>
#include <QCoreApplication>
#include <QApplication>
#include <QDebug>
#include <QEvent>
#include <QIcon>
......@@ -76,11 +76,13 @@ TargetsUi::TargetsUi(QObject *view, QWidget *parent)
tLayout->addWidget(newTarget);
tLayout->addWidget(copyTarget);
tLayout->addWidget(deleteTarget);
tLayout->setContentsMargins(0, 0, 0, 0);
int leftMargin = QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
tLayout->setContentsMargins(leftMargin, 0, 0, 0);
QVBoxLayout *layout = new QVBoxLayout(this);
layout->addLayout(tLayout);
layout->addWidget(targetsView);
layout->setContentsMargins(0, 0, 0, 0);
connect(targetCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &TargetsUi::targetSetSelected);
connect(targetsView->selectionModel(), &QItemSelectionModel::currentChanged, this, &TargetsUi::targetActivated);
......
......@@ -70,6 +70,7 @@ KateProjectInfoViewCodeAnalysis::KateProjectInfoViewCodeAnalysis(KateProjectPlug
*/
QVBoxLayout *layout = new QVBoxLayout;
layout->setSpacing(0);
layout->setContentsMargins(0, 0, 0, 0);
// top: selector and buttons...
QHBoxLayout *hlayout = new QHBoxLayout;
layout->addLayout(hlayout);
......
......@@ -47,6 +47,7 @@ KateProjectInfoViewIndex::KateProjectInfoViewIndex(KateProjectPluginView *plugin
*/
QVBoxLayout *layout = new QVBoxLayout;
layout->setSpacing(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(m_lineEdit);
layout->addWidget(m_treeView);
setLayout(layout);
......
......@@ -21,6 +21,7 @@ KateProjectInfoViewNotes::KateProjectInfoViewNotes(KateProjectPluginView *plugin
*/
QVBoxLayout *layout = new QVBoxLayout;
layout->setSpacing(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(m_edit);
setLayout(layout);
m_edit->setDocument(project->notesDocument());
......
Supports Markdown
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