[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
icc-effect-5.17.5
Nate Graham 2018-10-30 22:33:45 -06:00
parent abceccbb66
commit 9a59e3fb6c
6 changed files with 97 additions and 99 deletions

View File

@ -51,7 +51,7 @@ windows.</para>
<para>Choose a window decoration style from the preview list, using the <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 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> <para>The default window decoration is called <quote>Breeze</quote>.</para>

View File

@ -99,13 +99,6 @@ Rectangle {
} }
} }
} }
Button {
id: ghnsButton
text: i18n("Get New Effects...")
iconName: "get-hot-new-stuff"
onClicked: effectConfig.openGHNS()
}
} }
EffectFilterModel { 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 }//End ColumnLayout
Connections { Connections {
target: searchModel target: searchModel

View File

@ -33,16 +33,6 @@
</property> </property>
</widget> </widget>
</item> </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> </layout>
</item> </item>
<item> <item>
@ -76,19 +66,6 @@
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <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> <item>
<widget class="QLabel" name="borderSizesLabel"> <widget class="QLabel" name="borderSizesLabel">
<property name="text"> <property name="text">
@ -151,6 +128,29 @@
</item> </item>
</widget> </widget>
</item> </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> </layout>
</item> </item>
</layout> </layout>

View File

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

View File

@ -24,8 +24,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Qt // Qt
#include <QtDBus> #include <QtDBus>
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QVBoxLayout>
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QPushButton>
#include <QVBoxLayout>
#include <QSpacerItem>
#include <QStandardPaths> #include <QStandardPaths>
#include <QPointer> #include <QPointer>
@ -72,6 +75,15 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args)
m_alternativeTabBoxUi = new KWinTabBoxConfigForm(tabWidget); m_alternativeTabBoxUi = new KWinTabBoxConfigForm(tabWidget);
tabWidget->addTab(m_primaryTabBoxUi, i18n("Main")); tabWidget->addTab(m_primaryTabBoxUi, i18n("Main"));
tabWidget->addTab(m_alternativeTabBoxUi, i18n("Alternative")); 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); QVBoxLayout* layout = new QVBoxLayout(this);
KTitleWidget* infoLabel = new KTitleWidget(tabWidget); KTitleWidget* infoLabel = new KTitleWidget(tabWidget);
infoLabel->setText(i18n("Focus policy settings limit the functionality of navigating through windows."), 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); infoLabel->setPixmap(KTitleWidget::InfoMessage, KTitleWidget::ImageLeft);
layout->addWidget(infoLabel,0); layout->addWidget(infoLabel,0);
layout->addWidget(tabWidget,1); layout->addWidget(tabWidget,1);
layout->addLayout(buttonBar);
setLayout(layout); setLayout(layout);
#define ADD_SHORTCUT(_NAME_, _CUT_, _BTN_) \ #define ADD_SHORTCUT(_NAME_, _CUT_, _BTN_) \
@ -113,7 +126,6 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args)
KWinTabBoxConfigForm *ui[2] = { m_primaryTabBoxUi, m_alternativeTabBoxUi }; KWinTabBoxConfigForm *ui[2] = { m_primaryTabBoxUi, m_alternativeTabBoxUi };
for (int i = 0; i < 2; ++i) { for (int i = 0; i < 2; ++i) {
ui[i]->effectConfigButton->setIcon(QIcon::fromTheme(QStringLiteral("view-preview"))); 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]->highlightWindowCheck, SIGNAL(clicked(bool)), SLOT(changed()));
connect(ui[i]->showTabBox, SIGNAL(clicked(bool)), SLOT(tabBoxToggled(bool))); 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]->filterMinimization, SIGNAL(clicked(bool)), SLOT(changed()));
connect(ui[i]->visibleWindows, 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]->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 // check focus policy - we don't offer configs for unreasonable focus policies

View File

@ -553,26 +553,6 @@
</property> </property>
</widget> </widget>
</item> </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> </layout>
</widget> </widget>
</item> </item>