On platforms that don't support icon themes, it does not make sense
to show related options in appearance settings.
Hide the override option in that case, and change wording from
"Fallback icon theme" to just "Icon theme".
+QString QtUi::systemIconTheme() const
+{
+ return _systemIconTheme;
+}
+
+
void QtUi::setupIconTheme()
{
// Add paths to our own icon sets to the theme search paths
void QtUi::setupIconTheme()
{
// Add paths to our own icon sets to the theme search paths
*/
std::vector<std::pair<QString, QString>> availableIconThemes() const;
*/
std::vector<std::pair<QString, QString>> availableIconThemes() const;
+ /**
+ * Determine the system icon theme set when Quassel was started.
+ *
+ * This property stores the icon theme initially configured in Qt when starting up (may be empty on platforms
+ * not supporting system icon themes). If the --icontheme option is given, uses that.
+ *
+ * Since Qt does not support notifications on theme changes, this property will not be updated when the theme
+ * changes at runtime.
+ *
+ * @returns The system icon theme at startup time
+ */
+ QString systemIconTheme() const;
+
public slots:
void init() override;
public slots:
void init() override;
ui.overrideSystemIconTheme->hide();
#endif
ui.overrideSystemIconTheme->hide();
#endif
+ // If no system icon theme is given, showing the override option makes no sense.
+ // Also don't mention a "fallback".
+ if (QtUi::instance()->systemIconTheme().isEmpty()) {
+ ui.iconThemeLabel->setText(tr("Icon theme:"));
+ ui.overrideSystemIconTheme->hide();
+ }
+
initAutoWidgets();
initStyleComboBox();
initLanguageComboBox();
initAutoWidgets();
initStyleComboBox();
initLanguageComboBox();
</widget>
</item>
<item row="2" column="0">
</widget>
</item>
<item row="2" column="0">
- <widget class="QLabel" name="iconthemeLabel">
+ <widget class="QLabel" name="iconThemeLabel">
<property name="text">
<string>Fallback icon theme:</string>
</property>
<property name="text">
<string>Fallback icon theme:</string>
</property>