From 9a59e3fb6cf4c2b272d724520bbfd3ed1a0e5c89 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Tue, 30 Oct 2018 22:33:45 -0600 Subject: [PATCH] [KCMs] move GHNS buttons to the normal location Summary: All other KCMs have their {nav Get New [things]...} buttons in the bottom-right corner. This patch adjusts KWin's KCMs to adopt the same convention there too. With this patch, all KCMs will have their GHNS buttons in the same location. Closes T9954 Test Plan: {F6375278} {F6375277} {F6375276} {F6375275} Reviewers: #kwin, #vdg, zzag Reviewed By: #kwin, zzag Subscribers: Codezela, kwin, kde-doc-english Tags: #kwin, #documentation Maniphest Tasks: T9954 Differential Revision: https://phabricator.kde.org/D16537 --- doc/kwindecoration/index.docbook | 2 +- kcmkwin/kwincompositing/qml/EffectView.qml | 20 +++-- kcmkwin/kwindecoration/kcm.ui | 46 +++++------ kcmkwin/kwinscripts/module.ui | 91 +++++++++++----------- kcmkwin/kwintabbox/main.cpp | 17 +++- kcmkwin/kwintabbox/main.ui | 20 ----- 6 files changed, 97 insertions(+), 99 deletions(-) diff --git a/doc/kwindecoration/index.docbook b/doc/kwindecoration/index.docbook index 0f2992be23..1a7dc9b660 100644 --- a/doc/kwindecoration/index.docbook +++ b/doc/kwindecoration/index.docbook @@ -51,7 +51,7 @@ windows. Choose a window decoration style from the preview list, using the search field at the top of the screen or download a new style using the -Get New Decorations button. +Get New Window Decorations button. The default window decoration is called Breeze. diff --git a/kcmkwin/kwincompositing/qml/EffectView.qml b/kcmkwin/kwincompositing/qml/EffectView.qml index fe1f917633..e92a8f3a30 100644 --- a/kcmkwin/kwincompositing/qml/EffectView.qml +++ b/kcmkwin/kwincompositing/qml/EffectView.qml @@ -99,13 +99,6 @@ Rectangle { } } } - - Button { - id: ghnsButton - text: i18n("Get New Effects...") - iconName: "get-hot-new-stuff" - onClicked: effectConfig.openGHNS() - } } EffectFilterModel { @@ -169,6 +162,19 @@ Rectangle { } } + RowLayout { + Layout.fillWidth: true + + Item { + Layout.fillWidth: true + } + Button { + id: ghnsButton + text: i18n("Get New Desktop Effects...") + iconName: "get-hot-new-stuff" + onClicked: effectConfig.openGHNS() + } + } }//End ColumnLayout Connections { target: searchModel diff --git a/kcmkwin/kwindecoration/kcm.ui b/kcmkwin/kwindecoration/kcm.ui index ff29831868..9e8e53234a 100644 --- a/kcmkwin/kwindecoration/kcm.ui +++ b/kcmkwin/kwindecoration/kcm.ui @@ -33,16 +33,6 @@ - - - - false - - - Get New Decorations... - - - @@ -76,19 +66,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -151,6 +128,29 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + Get New Window Decorations... + + + diff --git a/kcmkwin/kwinscripts/module.ui b/kcmkwin/kwinscripts/module.ui index 60ef9a84da..6a4215ba82 100644 --- a/kcmkwin/kwinscripts/module.ui +++ b/kcmkwin/kwinscripts/module.ui @@ -13,59 +13,60 @@ KWin script configuration - + + + + + + 0 + 0 + + + + Qt::WheelFocus + + + - - - - - - 0 - 0 - - - - Qt::WheelFocus - - - - + + + Qt::Horizontal + + + + + + + + 80 + 40 + + + + + + + + Install from File... + + + + + + + - - - - - Import KWin script... - - - - - - - Get New Scripts... - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + + Get New Scripts... + + diff --git a/kcmkwin/kwintabbox/main.cpp b/kcmkwin/kwintabbox/main.cpp index 0017911b36..f1827ee7cf 100644 --- a/kcmkwin/kwintabbox/main.cpp +++ b/kcmkwin/kwintabbox/main.cpp @@ -24,8 +24,11 @@ along with this program. If not, see . // Qt #include #include -#include #include +#include +#include +#include +#include #include #include @@ -72,6 +75,15 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args) m_alternativeTabBoxUi = new KWinTabBoxConfigForm(tabWidget); tabWidget->addTab(m_primaryTabBoxUi, i18n("Main")); tabWidget->addTab(m_alternativeTabBoxUi, i18n("Alternative")); + + QPushButton* ghnsButton = new QPushButton(QIcon::fromTheme(QStringLiteral("get-hot-new-stuff")), i18n("Get New Task Switchers...")); + connect(ghnsButton, SIGNAL(clicked(bool)), SLOT(slotGHNS())); + + QHBoxLayout* buttonBar = new QHBoxLayout(); + QSpacerItem* buttonBarSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + buttonBar->addItem(buttonBarSpacer); + buttonBar->addWidget(ghnsButton); + QVBoxLayout* layout = new QVBoxLayout(this); KTitleWidget* infoLabel = new KTitleWidget(tabWidget); infoLabel->setText(i18n("Focus policy settings limit the functionality of navigating through windows."), @@ -79,6 +91,7 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args) infoLabel->setPixmap(KTitleWidget::InfoMessage, KTitleWidget::ImageLeft); layout->addWidget(infoLabel,0); layout->addWidget(tabWidget,1); + layout->addLayout(buttonBar); setLayout(layout); #define ADD_SHORTCUT(_NAME_, _CUT_, _BTN_) \ @@ -113,7 +126,6 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args) KWinTabBoxConfigForm *ui[2] = { m_primaryTabBoxUi, m_alternativeTabBoxUi }; for (int i = 0; i < 2; ++i) { ui[i]->effectConfigButton->setIcon(QIcon::fromTheme(QStringLiteral("view-preview"))); - ui[i]->ghns->setIcon(QIcon::fromTheme(QStringLiteral("get-hot-new-stuff"))); connect(ui[i]->highlightWindowCheck, SIGNAL(clicked(bool)), SLOT(changed())); connect(ui[i]->showTabBox, SIGNAL(clicked(bool)), SLOT(tabBoxToggled(bool))); @@ -145,7 +157,6 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args) connect(ui[i]->filterMinimization, SIGNAL(clicked(bool)), SLOT(changed())); connect(ui[i]->visibleWindows, SIGNAL(clicked(bool)), SLOT(changed())); connect(ui[i]->hiddenWindows, SIGNAL(clicked(bool)), SLOT(changed())); - connect(ui[i]->ghns, SIGNAL(clicked(bool)), SLOT(slotGHNS())); } // check focus policy - we don't offer configs for unreasonable focus policies diff --git a/kcmkwin/kwintabbox/main.ui b/kcmkwin/kwintabbox/main.ui index 9baa26d80f..e7fa24ccb8 100644 --- a/kcmkwin/kwintabbox/main.ui +++ b/kcmkwin/kwintabbox/main.ui @@ -553,26 +553,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Get New Window Switcher Layout - - -