Mercurial > octave
diff libgui/src/resource-manager.cc @ 26140:8fb8cb4a03f8
preference for (not) using system icon theme
* gui-preferences.h: constants for key and default of new preference
* resource-manager.cc (do_icon): use icon files provided by octave gui
instead ofsystem icon theme if desired from preferences
* settings-dialog.cc (settings_dialog): initialize new checkbox with
related entry from preferences file;
(write_changed_settings): store value of new checkbox
* settings-dialog.ui: new checkbox for using the system icon theme in
author | Torsten <mttl@mailbox.org> |
---|---|
date | Mon, 26 Nov 2018 20:59:05 +0100 |
parents | 38a881b8fbec |
children | a7be718a9dd3 |
line wrap: on
line diff
--- a/libgui/src/resource-manager.cc Mon Nov 26 20:53:24 2018 +0100 +++ b/libgui/src/resource-manager.cc Mon Nov 26 20:59:05 2018 +0100 @@ -363,6 +363,12 @@ QIcon resource_manager::do_icon (const QString& icon_name, bool fallback) { + // If system icon theme is not desired, take own icon files + if (! m_settings->value (global_icon_theme.key, global_icon_theme.def).toBool ()) + return QIcon (":/actions/icons/" + icon_name + ".png"); + + // Use system icon theme with own files as fallback except the fallback is + // explicitly disabled (fallback=false) if (fallback) return QIcon::fromTheme (icon_name, QIcon (":/actions/icons/" + icon_name + ".png"));