[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
master
Nate Graham 6 years ago
parent abceccbb66
commit 9a59e3fb6c

@ -51,7 +51,7 @@ windows.</para>
<para>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
<guibutton>Get New Decorations</guibutton> button.</para>
<guibutton>Get New Window Decorations</guibutton> button.</para>
<para>The default window decoration is called <quote>Breeze</quote>.</para>

@ -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

@ -33,16 +33,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="knsButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Get New Decorations...</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -76,19 +66,6 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="borderSizesSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="borderSizesLabel">
<property name="text">
@ -151,6 +128,29 @@
</item>
</widget>
</item>
<item>
<spacer name="borderSizesSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="knsButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Get New Window Decorations...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>

@ -13,59 +13,60 @@
<property name="windowTitle">
<string>KWin script configuration</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="KMessageWidget" name="messageWidget" native="true"/>
</item>
<item>
<widget class="KPluginSelector" name="scriptSelector" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout2">
<item>
<widget class="KPluginSelector" name="scriptSelector" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
</widget>
</item>
</layout>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>80</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="importScriptButton">
<property name="text">
<string>Install from File...</string>
</property>
<property name="icon">
<iconset theme="document-import">
<normaloff/>
</iconset>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="importScriptButton">
<property name="text">
<string>Import KWin script...</string>
</property>
</widget>
</item>
<item>
<widget class="KNS3::Button" name="ghnsButton">
<property name="text">
<string>Get New Scripts...</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
<widget class="KNS3::Button" name="ghnsButton">
<property name="text">
<string>Get New Scripts...</string>
</property>
</widget>
</item>
</layout>
</item>

@ -24,8 +24,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Qt
#include <QtDBus>
#include <QDesktopWidget>
#include <QVBoxLayout>
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QPushButton>
#include <QVBoxLayout>
#include <QSpacerItem>
#include <QStandardPaths>
#include <QPointer>
@ -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

@ -553,26 +553,6 @@
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="ghns">
<property name="toolTip">
<string>Get New Window Switcher Layout</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

Loading…
Cancel
Save