diff -Nru kde-gtk-config-5.18.3/cmake/modules/FindXSettingsd.cmake kde-gtk-config-5.18.4.1/cmake/modules/FindXSettingsd.cmake --- kde-gtk-config-5.18.3/cmake/modules/FindXSettingsd.cmake 1970-01-01 00:00:00.000000000 +0000 +++ kde-gtk-config-5.18.4.1/cmake/modules/FindXSettingsd.cmake 2020-03-31 14:08:19.000000000 +0000 @@ -0,0 +1,32 @@ +# - Find XSettingsd +# This module defines the following variables: +# +# XSettingsd_FOUND - true if found +# XSettingsd_PATH - path to the bin (only when found) +# +# Copyright (c) 2020 Mikhail Zolotukhin +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +find_program(XSettingsd_PATH "xsettingsd") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(XSettingsd + FOUND_VAR XSettingsd_FOUND + REQUIRED_VARS XSettingsd_PATH +) +mark_as_advanced(XSettingsd_PATH) + diff -Nru kde-gtk-config-5.18.3/CMakeLists.txt kde-gtk-config-5.18.4.1/CMakeLists.txt --- kde-gtk-config-5.18.3/CMakeLists.txt 2020-03-10 12:58:45.000000000 +0000 +++ kde-gtk-config-5.18.4.1/CMakeLists.txt 2020-03-31 14:08:19.000000000 +0000 @@ -1,5 +1,5 @@ project(kde-gtk-config) -set(PROJECT_VERSION "5.18.3") +set(PROJECT_VERSION "5.18.4") cmake_minimum_required(VERSION 3.10) find_package(ECM REQUIRED NO_MODULE) @@ -12,6 +12,7 @@ find_package(KF5DBusAddons REQUIRED) find_package(GTK3 REQUIRED) find_package(GSettingSchemas REQUIRED) +find_package(XSettingsd) include(ECMSetupVersion) include(ECMInstallIcons) @@ -23,6 +24,12 @@ include(KDECompilerSettings NO_POLICY_SCOPE) include(KDEClangFormat) +set_package_properties(XSettingsd PROPERTIES + DESCRIPTION "XSettingsd daemon" + TYPE RUNTIME + PURPOSE "Allows GTK Config kded module to apply settings to GTK applications on the fly" +) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake kded/config.h) add_subdirectory(gtkproxies) diff -Nru kde-gtk-config-5.18.3/debian/changelog kde-gtk-config-5.18.4.1/debian/changelog --- kde-gtk-config-5.18.3/debian/changelog 2020-03-10 18:07:15.000000000 +0000 +++ kde-gtk-config-5.18.4.1/debian/changelog 2020-04-02 18:45:50.000000000 +0000 @@ -1,3 +1,10 @@ +kde-gtk-config (4:5.18.4.1-0ubuntu1) focal; urgency=medium + + * New upstream release (5.18.4.1) + * Recommends xsettingsd, as specified by upstream runtime recommends. + + -- Rik Mills Thu, 02 Apr 2020 19:45:50 +0100 + kde-gtk-config (4:5.18.3-0ubuntu1) focal; urgency=medium * New upstream release (5.18.3) diff -Nru kde-gtk-config-5.18.3/debian/control kde-gtk-config-5.18.4.1/debian/control --- kde-gtk-config-5.18.3/debian/control 2020-03-10 18:07:15.000000000 +0000 +++ kde-gtk-config-5.18.4.1/debian/control 2020-04-02 18:45:50.000000000 +0000 @@ -29,6 +29,7 @@ Package: kde-config-gtk-style Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} +Recommends: xsettingsd Suggests: kde-config-gtk-style-preview Multi-Arch: same Description: KDE configuration module for GTK+ 2.x and GTK+ 3.x styles selection diff -Nru kde-gtk-config-5.18.3/kded/configvalueprovider.cpp kde-gtk-config-5.18.4.1/kded/configvalueprovider.cpp --- kde-gtk-config-5.18.3/kded/configvalueprovider.cpp 2020-03-10 12:58:45.000000000 +0000 +++ kde-gtk-config-5.18.4.1/kded/configvalueprovider.cpp 2020-03-31 14:08:19.000000000 +0000 @@ -46,9 +46,72 @@ QString fontAsString = configGroup.readEntry(QStringLiteral("font"), defaultFont.toString()); static QFont font; font.fromString(fontAsString); - return font.family() + QStringLiteral(", ") + font.styleName() + ' ' + QString::number(font.pointSize()); + const QString fontStyle = fontStyleHelper(font); + return font.family() + QStringLiteral(", ") + fontStyle + ' ' + QString::number(font.pointSize()); } +QString ConfigValueProvider::fontStyleHelper(const QFont &font) const +{ + // BUG: 333146 + // Since Qt sometimes gives us wrong font style name, + // we ought to use this big helper function to construct + // the style ourselves. Some fonts will not work + auto weight = font.weight(); + QString result; + if (weight > QFont::Normal) { + if (weight >= QFont::Black) { + result = QStringLiteral("Black"); + } else if (weight >= QFont::ExtraBold) { + result = QStringLiteral("Extra Bold"); + } else if (weight >= QFont::Bold) { + result = QStringLiteral("Bold"); + } else if (weight >= QFont::DemiBold) { + result = QStringLiteral("Demi Bold"); + } else if (weight >= QFont::Medium) { + result = QStringLiteral("Medium"); + } + } else { + if (weight <= QFont::Thin) { + result = QStringLiteral("Thin"); + } else if (weight <= QFont::ExtraLight) { + result = QStringLiteral("Extra Light"); + } else if (weight <= QFont::Light) { + result = QStringLiteral("Light"); + } + } + + auto style = font.style(); + if (style == QFont::StyleItalic) { + result += QLatin1Char(' ') + QStringLiteral("Italic"); + } else if (style == QFont::StyleOblique) { + result += QLatin1Char(' ') + QStringLiteral("Oblique"); + } + + auto stretch = font.stretch(); + if (stretch == QFont::UltraCondensed) { + result += QLatin1Char(' ') + QStringLiteral("UltraCondensed"); + } else if (stretch == QFont::ExtraCondensed) { + result += QLatin1Char(' ') + QStringLiteral("ExtraCondensed"); + } else if (stretch == QFont::Condensed) { + result += QLatin1Char(' ') + QStringLiteral("Condensed"); + } else if (stretch == QFont::SemiCondensed) { + result += QLatin1Char(' ') + QStringLiteral("SemiCondensed"); + } else if (stretch == QFont::Unstretched) { + result += QLatin1Char(' ') + QStringLiteral("Unstretched"); + } else if (stretch == QFont::SemiExpanded) { + result += QLatin1Char(' ') + QStringLiteral("SemiExpanded"); + } else if (stretch == QFont::Expanded) { + result += QLatin1Char(' ') + QStringLiteral("Expanded"); + } else if (stretch == QFont::ExtraExpanded) { + result += QLatin1Char(' ') + QStringLiteral("ExtraExpanded"); + } else if (stretch == QFont::UltraExpanded) { + result += QLatin1Char(' ') + QStringLiteral("UltraExpanded"); + } + + return result.simplified(); +} + + QString ConfigValueProvider::iconThemeName() const { KIconTheme *newIconTheme = KIconLoader::global()->theme(); diff -Nru kde-gtk-config-5.18.3/kded/configvalueprovider.h kde-gtk-config-5.18.4.1/kded/configvalueprovider.h --- kde-gtk-config-5.18.3/kded/configvalueprovider.h 2020-03-10 12:58:45.000000000 +0000 +++ kde-gtk-config-5.18.4.1/kded/configvalueprovider.h 2020-03-31 14:08:19.000000000 +0000 @@ -48,6 +48,7 @@ QString enableAnimations() const; private: + QString fontStyleHelper(const QFont &font) const; QString toolbarStyleInDesiredNotation(const QString &kdeConfigValue, ToolbarStyleNotation notation) const; QString windowDecorationButtonsOrderInGtkNotation(const QString &kdeConfigValue) const; diff -Nru kde-gtk-config-5.18.3/kded/gtkconfig.json kde-gtk-config-5.18.4.1/kded/gtkconfig.json --- kde-gtk-config-5.18.3/kded/gtkconfig.json 2020-03-10 12:58:45.000000000 +0000 +++ kde-gtk-config-5.18.4.1/kded/gtkconfig.json 2020-03-31 14:08:19.000000000 +0000 @@ -18,6 +18,7 @@ "Description[ko]": "GTK 설정 관리", "Description[lt]": "GTK konfigūracijos valdymas", "Description[nl]": "GTK-configuratiebeheer", + "Description[nn]": "GTK-oppsetthandsaming", "Description[pt]": "Gestão das configurações do GTK", "Description[pt_BR]": "Gerenciamento das configurações do GTK", "Description[sk]": "GTK správa nastavení", @@ -45,6 +46,7 @@ "Name[ko]": "Plasma GTKd", "Name[lt]": "Plasma GTKd", "Name[nl]": "Plasma GTKd", + "Name[nn]": "Plasma GTKd", "Name[pt]": "GTKd do Plasma", "Name[pt_BR]": "Plasma GTKd", "Name[sk]": "Plasma GTKd",