// forward declaration of unit test class. Required for friend relationship. class IconThemeSelectorTest;
namespace vcl { class IconThemeInfo;
/** This class helps to choose an icon theme from a list of installed themes. * *Thefollowingfactorsinfluencetheselection: *-#Whenhighcontrastmodeisenabled,thehighcontrasticonthemeisselected(ifitisinstalled). *-#Whenapreferredthemehasbeenset(e.g.,inthegnomedesktopsettings),thatthemeisselected.
*/ class VCL_DLLPUBLIC IconThemeSelector { public:
IconThemeSelector();
/** Select an icon theme from the list of installed themes. * *Ifhighcontrastmodehasbeenenabled,thehighcontrastthemewillbeselected(ifitisavailable). * *@pre *@pinstalledThemesmustnotbeempty
*/
OUString
SelectIconTheme( const std::vector<IconThemeInfo>& installedThemes, const OUString& theme
) const;
/** Select the standard icon theme for a desktop environment from a list of installed themes. * *Ifapreferredthemehasbeenset,thisonewilltakeprecedence. * *ThesamelogicasinSelectIconTheme()willapply. * *@pre *@pinstalledThemesmustnotbeempty
*/
OUString
SelectIconThemeForDesktopEnvironment( const std::vector<IconThemeInfo>& installedThemes, const OUString& desktopEnvironment) const;
void
SetUseHighContrastTheme(bool);
/** Returns true if the PreferredIconTheme was changed */ bool
SetPreferredIconTheme(const OUString&, bool bDarkIconTheme);
private: /** Return the first element of the themes, or the fallback if the vector is empty */ static OUString
ReturnFallback(const std::vector<IconThemeInfo>& installedThemes);
/** The name of the icon themes which are used as fallbacks */ static constexpr OUString FALLBACK_LIGHT_ICON_THEME_ID = u"colibre"_ustr; static constexpr OUString FALLBACK_DARK_ICON_THEME_ID = u"colibre_dark"_ustr;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.