Commit a946944e authored by Björn Feber's avatar Björn Feber

Improve the look of the Application Style KCM UI

Summary:
Apply the KDE HIG, merge the two tabs into one page and make the KCM look better.
{F6688637}

Test Plan: Open the Application Style KCM.

Reviewers: #plasma, #vdg, rooty, ngraham

Reviewed By: #vdg, rooty, ngraham

Subscribers: ngraham, broulik, rooty, abetts, ndavis, #vdg, plasma-devel, #plasma

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19651
parent 0f5c7ede
......@@ -8,7 +8,7 @@ set(klauncher_xml ${KINIT_DBUS_INTERFACES_DIR}/kf5_org.kde.KLauncher.xml)
qt5_add_dbus_interface(kcm_style_PART_SRCS ${klauncher_xml} klauncher_iface)
ki18n_wrap_ui(kcm_style_PART_SRCS stylepreview.ui finetuning.ui)
ki18n_wrap_ui(kcm_style_PART_SRCS stylepreview.ui styleconfig.ui)
add_library(kcm_style MODULE ${kcm_style_PART_SRCS})
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FineTuning</class>
<widget class="QWidget" name="FineTuning">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>422</width>
<height>358</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1">
<widget class="QCheckBox" name="cbIconsOnButtons">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="cbIconsInMenus">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<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>
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Show icons in b&amp;uttons:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>cbIconsOnButtons</cstring>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Toolbars</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Main &amp;toolbar text location:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>comboToolbarIcons</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KComboBox" name="comboToolbarIcons">
<item>
<property name="text">
<string>No Text</string>
</property>
</item>
<item>
<property name="text">
<string>Text Only</string>
</property>
</item>
<item>
<property name="text">
<string>Text Beside Icons</string>
</property>
</item>
<item>
<property name="text">
<string>Text Below Icons</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Secondary toolbar text &amp;location:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>comboSecondaryToolbarIcons</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="KComboBox" name="comboSecondaryToolbarIcons">
<item>
<property name="text">
<string>No Text</string>
</property>
</item>
<item>
<property name="text">
<string>Text Only</string>
</property>
</item>
<item>
<property name="text">
<string>Text Beside Icons</string>
</property>
</item>
<item>
<property name="text">
<string>Text Below Icons</string>
</property>
</item>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Show icons in menus:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>cbIconsInMenus</cstring>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
This diff is collapsed.
......@@ -35,16 +35,9 @@
#include <kcmodule.h>
#include <kvbox.h>
#include "ui_finetuning.h"
class KComboBox;
class KConfig;
class QCheckBox;
class QComboBox;
class QLabel;
class QPushButton;
class StylePreview;
class QTabWidget;
class StyleConfig;
struct StyleEntry {
QString name;
......@@ -99,22 +92,12 @@ private:
QMap <QString,QString> nameToStyleKey;
QVBoxLayout* mainLayout;
QTabWidget* tabWidget;
QWidget *page0, *page1, *page2;
QVBoxLayout* page1Layout;
// Page1 widgets
QVBoxLayout* gbWidgetStyleLayout;
QHBoxLayout* hbLayout;
KComboBox* cbStyle;
QPushButton* pbConfigStyle;
QLabel* lblStyleDesc;
// Widgets
StylePreview* stylePreview;
StyleConfig* styleConfig;
QStyle* appliedStyle;
QPalette palette;
// Page2 widgets
Ui::FineTuning fineTuningUi;
};
#endif // __KCMSTYLE_H
......
......@@ -13,7 +13,7 @@ X-KDE-ParentApp=kcontrol
X-KDE-System-Settings-Parent-Category=applicationstyle
X-KDE-Weight=0
Name=Widget Style
Name=Application Style
Name[ar]=نمط الودجات
Name[bs]=Stil grafičke kontrole
Name[ca]=Estil dels estris
......@@ -58,7 +58,7 @@ Name[uk]=Стиль віджетів
Name[x-test]=xxWidget Stylexx
Name[zh_CN]=部件风格
Name[zh_TW]=元件樣式
Comment=Configure widget style and behavior
Comment=Configure application style and behavior
Comment[ca]=Configura l'estil i el comportament dels estris
Comment[ca@valencia]=Configura l'estil i el comportament dels estris
Comment[es]=Configurar el estilo y el comportamiento de los elementos gráficos
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>StyleConfig</class>
<widget class="QWidget" name="StyleConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>378</width>
<height>204</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="formAlignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<item row="0" column="0">
<widget class="QLabel" name="labelApplicationStyle">
<property name="text">
<string>Application style:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_1">
<item>
<widget class="QComboBox" name="comboStyle">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbConfigStyle">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Configure Application Style...</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="configure">
<normaloff>.</normaloff>.</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelShowIcons">
<property name="text">
<string>Show icons:</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="labelToolbarIcons">
<property name="text">
<string>Main toolbar label:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="comboToolbarIcons">
<property name="currentIndex">
<number>2</number>
</property>
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Text only</string>
</property>
</item>
<item>
<property name="text">
<string>Beside icons</string>
</property>
</item>
<item>
<property name="text">
<string>Below icons</string>
</property>
</item>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="labelSecondaryToolbarIcons">
<property name="text">
<string>Secondary toolbar label:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QComboBox" name="comboSecondaryToolbarIcons">
<property name="currentIndex">
<number>2</number>
</property>
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Text only</string>
</property>
</item>
<item>
<property name="text">
<string>Beside icons</string>
</property>
</item>
<item>
<property name="text">
<string>Below icons</string>
</property>
</item>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="cbIconsOnButtons">
<property name="text">
<string>On buttons</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="cbIconsInMenus">
<property name="text">
<string>In menus</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
......@@ -2,155 +2,133 @@
<ui version="4.0">
<class>StylePreview</class>
<widget class="QWidget" name="StylePreview">
<layout class="QVBoxLayout">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>360</width>
<height>172</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QTabWidget" name="TabWidget2">
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>1</horstretch>
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<widget class="QWidget" name="tab_1">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<layout class="QVBoxLayout">
<item>
<layout class="QHBoxLayout">
<layout class="QGridLayout">
<item row="7" column="2">
<widget class="QSpinBox" name="spinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QSlider" name="horizontalSlider">
<property name="value">
<number>30</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QPushButton" name="pushButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Push Button</string>
</property>
</widget>
</item>
<item row="6" column="3" rowspan="4">
<widget class="QScrollBar" name="verticalScrollBar">
<property name="maximum">
<number>10</number>
</property>
</widget>
</item>
<item row="6" column="1" colspan="2">
<widget class="QComboBox" name="comboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="GroupBox1">
<property name="title">
<string>Group Box</string>
</property>
<layout class="QVBoxLayout" name="_2">
<item>
<widget class="QRadioButton" name="RadioButton1">
<property name="text">
<string>Radio button</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="RadioButton2">
<property name="text">
<string>Radio button</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="Line1">
<property name="frameShape">
<enum>QFrame::HLine</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="CheckBox1">
<property name="text">
<string>Checkbox</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
</layout>
<property name="text">
<string>Combo box</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout_1">
<item>
<layout class="QVBoxLayout">
<item>
<widget class="QProgressBar" name="ProgressBar1">
<property name="value">
<number>70</number>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="Slider1">
<property name="value">
<number>30</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QSpinBox" name="SpinBox1">
<property name="maximum">
<number>999999</number>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="PushButton1">
<property name="text">
<string>Button</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QComboBox" name="ComboBox1">
<item>
<property name="text">
<string>Combobox</string>
</property>
</item>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
</layout>
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>Checkbox</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QScrollBar" name="ScrollBar1">
<property name="maximum">
<number>19</number>
<widget class="QRadioButton" name="radioButton_2">
<property name="text">
<string>Radio button</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_1">
<property name="text">
<string>Radio button</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="1" colspan="2">
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>70</number>
</property>
</widget>