Package dtk :: Package ui :: Module skin_config :: Class SkinConfig

Class SkinConfig

source code


SkinConfig.

Instance Methods
 
__init__(self)
Initialize SkinConfig class.
source code
 
set_application_window_size(self, app_window_width, app_window_height)
Set application window with given size.
source code
 
init_skin(self, skin_name, system_skin_dir, user_skin_dir, skin_config_file, app_given_id, app_given_version)
Init skin.
source code
 
load_themes(self, ui_theme, app_theme)
Load theme from given directories.
source code
Method Details

set_application_window_size(self, app_window_width, app_window_height)

source code 

Set application window with given size.

Parameters:
  • app_window_width - Application window width.
  • app_window_height - Application window height.

init_skin(self, skin_name, system_skin_dir, user_skin_dir, skin_config_file, app_given_id, app_given_version)

source code 

Init skin.

Parameters:
  • skin_name - Skin name.
  • system_skin_dir - Default skin directory.
  • user_skin_dir - User's skin directory, generic use ~/.config/project-name/skin
  • skin_config_file - Skin's config filepath, generic use ~/.config/project-name/skin_config.ini
  • app_given_id - Project name.
  • app_given_version - Project version.

load_themes(self, ui_theme, app_theme)

source code 

Load theme from given directories.

Parameters:
  • ui_theme - dtk.ui.theme.ui_theme.
  • app_theme - Theme instance, build it like below:
    >>> app_theme = Theme(
    >>>     os.path.join(get_parent_dir(__file__), "app_theme"),
    >>>     os.path.expanduser("~/.config/project-name/theme")
    >>>     )