Changeset View
Changeset View
Standalone View
Standalone View
src/appearancegtk3.cpp
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 75 | { | |||
---|---|---|---|---|---|
76 | KConfigGroup group(file, "Settings"); | 76 | KConfigGroup group(file, "Settings"); | ||
77 | 77 | | |||
78 | if (!file || !group.isValid()) { | 78 | if (!file || !group.isValid()) { | ||
79 | qWarning() << "Cannot open the GTK3 config file" << file; | 79 | qWarning() << "Cannot open the GTK3 config file" << file; | ||
80 | return false; | 80 | return false; | ||
81 | } | 81 | } | ||
82 | 82 | | |||
83 | m_settings = QMap<QString, QString> { | 83 | m_settings = QMap<QString, QString> { | ||
84 | {"primary_button_warps_slider", "false"}, | | |||
85 | {"application_prefer_dark_theme", "false"} | 84 | {"application_prefer_dark_theme", "false"} | ||
86 | }; | 85 | }; | ||
87 | 86 | | |||
88 | m_settings["theme"] = group.readEntry("gtk-theme-name"); | 87 | m_settings["theme"] = group.readEntry("gtk-theme-name"); | ||
89 | m_settings["primary_button_warps_slider"] = group.readEntry("gtk-primary-button-warps-slider"); | | |||
90 | m_settings["application_prefer_dark_theme"] = group.readEntry("gtk-application-prefer-dark-theme"); | 88 | m_settings["application_prefer_dark_theme"] = group.readEntry("gtk-application-prefer-dark-theme"); | ||
91 | for(auto it = m_settings.begin(); it != m_settings.end(); ) { | 89 | for(auto it = m_settings.begin(); it != m_settings.end(); ) { | ||
92 | if (it.value().isEmpty()) | 90 | if (it.value().isEmpty()) | ||
93 | it = m_settings.erase(it); | 91 | it = m_settings.erase(it); | ||
94 | else | 92 | else | ||
95 | ++it; | 93 | ++it; | ||
96 | } | 94 | } | ||
97 | return true; | 95 | return true; | ||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |