.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.SystemAppearance: ========================================================================================================================================== |phoenix_title| **wx.SystemAppearance** ========================================================================================================================================== Provides information about the current system appearance. An object of this class can be retrieved using :meth:`wx.SystemSettings.GetAppearance` and can then be queried for some aspects of the current system appearance, notably whether the system is using a dark theme, i.e. a theme with predominantly dark background. This is useful for custom controls that don't use the standard system colours, as they need to adjust the colours used for drawing them to fit in the system look. .. versionadded:: 4.1/wxWidgets-3.1.3 | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class SystemAppearance:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.SystemAppearance.GetName` Return the name if available or empty string otherwise. :meth:`~wx.SystemAppearance.IsDark` Return ``True`` if the current system there is explicitly recognized as being a dark theme or if the default window background is dark. :meth:`~wx.SystemAppearance.IsUsingDarkBackground` Return ``True`` if the default window background is significantly darker than foreground. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.SystemAppearance.Name` See :meth:`~wx.SystemAppearance.GetName` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.SystemAppearance(object) Provides information about the current system appearance. .. method:: GetName(self) Return the name if available or empty string otherwise. This is currently only implemented for macOS and returns a not necessarily user-readable string such as "NSAppearanceNameAqua" there and an empty string under all the other platforms. :rtype: `string` .. method:: IsDark(self) Return ``True`` if the current system there is explicitly recognized as being a dark theme or if the default window background is dark. This method should be used to check whether custom colours more appropriate for the default (light) or dark appearance should be used. :rtype: `bool` .. method:: IsUsingDarkBackground(self) Return ``True`` if the default window background is significantly darker than foreground. This is used by :meth:`IsDark` if there is no platform-specific way to determine whether a dark mode is being used and is generally not very useful to call directly. :rtype: `bool` .. seealso:: :meth:`wx.Colour.GetLuminance` .. attribute:: Name See :meth:`~wx.SystemAppearance.GetName`