Commit 9dac09af authored by Björn Feber's avatar Björn Feber

Improve the look of the Fonts KCM UI

Summary:
Makes some improvements to the Fonts KCM UI, like applying the KDE HIG, adding icons and tooltips to buttons and improving the buttons, updating strings and more.
{F6603675}

Test Plan: Open the Fonts KCM.

Reviewers: #plasma, #vdg, ngraham, rooty, davidedmundson

Reviewed By: #plasma, #vdg, ngraham, rooty, davidedmundson

Subscribers: davidedmundson, ndavis, ngraham, rooty, plasma-devel, #vdg, #plasma

Tags: #plasma

Maniphest Tasks: T10273

Differential Revision: https://phabricator.kde.org/D18861
parent 22608a08
......@@ -437,7 +437,7 @@ KFonts::KFonts(QObject *parent, const QVariantList &args)
, m_fontAASettings(new FontAASettings(this))
{
qApp->setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
KAboutData* about = new KAboutData("kcm_fonts", i18n("Configure Fonts"),
KAboutData* about = new KAboutData("kcm_fonts", i18n("Configure the system fonts"),
"0.1", QString(), KAboutLicense::LGPL);
about->addAuthor(i18n("Antonis Tsiapaliokas"), QString(), "antonis.tsiapaliokas@kde.org");
setAboutData(about);
......
......@@ -103,7 +103,7 @@ Name[x-test]=xxFontsxx
Name[zh_CN]=字体
Name[zh_TW]=字型
Comment=Fonts
Comment=Configure the system fonts
Comment[ar]=الخطوط
Comment[bs]=Fontovi
Comment[ca]=Tipus de lletra
......
......@@ -441,7 +441,7 @@ QString KXftConfig::description(SubPixel::Type t)
switch (t) {
default:
case SubPixel::NotSet:
return i18nc("use system subpixel setting", "Vendor Default");
return i18nc("use system subpixel setting", "Vendor default");
case SubPixel::None:
return i18nc("no subpixel rendering", "None");
case SubPixel::Rgb:
......@@ -479,7 +479,7 @@ QString KXftConfig::description(Hint::Style s)
switch (s) {
default:
case Hint::NotSet:
return i18nc("use system hinting settings", "Vendor Default");
return i18nc("use system hinting settings", "Vendor default");
case Hint::Medium:
return i18nc("medium hinting", "Medium");
case Hint::None:
......
......@@ -46,13 +46,13 @@ FocusScope {
QtControls.TextField {
readOnly: true
Kirigami.Theme.inherit: true
text: root.font.family + " " + root.font.pointSize
text: root.font.family + " " + root.font.pointSize + "pt"
font: root.font
Layout.fillHeight: true
}
QtControls.Button {
text: i18n("Choose...")
icon.name: "document-edit"
Layout.fillHeight: true
Kirigami.MnemonicData.enabled: false
focus: true
......@@ -63,6 +63,11 @@ FocusScope {
fontDialog.currentFont = root.font;
fontDialog.open()
}
QtControls.ToolTip {
visible: parent.hovered
text: i18n("Select %1 Font...", label.replace(':', ''))
font.capitalization: Font.Capitalize
}
}
}
}
......
......@@ -27,7 +27,7 @@ import org.kde.kcm 1.1 as KCM
KCM.SimpleKCM {
id: root
KCM.ConfigModule.quickHelp: i18n("Fonts")
KCM.ConfigModule.quickHelp: i18n("This module lets you configure the system fonts.")
Kirigami.FormLayout {
id: formLayout
......@@ -36,6 +36,7 @@ KCM.SimpleKCM {
QtControls.Button {
id: adjustAllFontsButton
Layout.preferredWidth: formLayout.maxImplicitWidth
icon.name: "font-select-symbolic"
text: i18n("&Adjust All Fonts...")
onClicked: kcm.adjustAllFonts();
......@@ -82,7 +83,7 @@ KCM.SimpleKCM {
Layout.preferredWidth: formLayout.maxImplicitWidth
Kirigami.FormData.label: i18nc("Used as a noun, and precedes a combobox full of options", "Anti-aliasing:")
model: [i18n("Enabled"), i18n("Vendor Default"), i18n("Disabled")]
model: [i18n("Enabled"), i18n("Vendor default"), i18n("Disabled")]
currentIndex: kcm.fontAASettings.antiAliasing
onCurrentIndexChanged: kcm.fontAASettings.antiAliasing = antiAliasingComboBox.currentIndex
......@@ -99,8 +100,12 @@ KCM.SimpleKCM {
RowLayout {
id: excludeField
Layout.preferredWidth: formLayout.maxImplicitWidth
enabled: antiAliasingComboBox.currentIndex == 0
Item {
width: units.largeSpacing
}
QtControls.SpinBox {
id: excludeFromSpinBox
stepSize: 1
......@@ -208,7 +213,7 @@ KCM.SimpleKCM {
QtControls.CheckBox {
id: dpiCheckBox
checked: kcm.fontAASettings.dpi !== 0
text: i18n("Force Fonts DPI:")
text: i18n("Force font DPI:")
}
QtControls.SpinBox {
......@@ -230,7 +235,7 @@ KCM.SimpleKCM {
QtDialogs.FontDialog {
id: fontDialog
title: i18n("Choose a font")
title: i18n("Select Font")
modality: Qt.WindowModal
property string currentCategory
property bool adjustAllFonts: false
......
......@@ -91,7 +91,7 @@ Name[x-test]=xxFontsxx
Name[zh_CN]=字体
Name[zh_TW]=字型
Comment=Fonts
Comment=Configure the system fonts
Comment[ar]=الخطوط
Comment[bs]=Fontovi
Comment[ca]=Tipus de lletra
......
Markdown is supported
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