AppStream.Branding¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class AppStream.Branding(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
- Return type:
Creates a new
AppStream.Branding
.New in version 0.10.
- get_color(kind, scheme_kind)¶
- Parameters:
kind (
AppStream.ColorKind
) – theAppStream.ColorKind
, e.g.AppStream.ColorKind.PRIMARY
.scheme_kind (
AppStream.ColorSchemeKind
) – Color scheme preference for the color, e.g.AppStream.ColorSchemeKind.LIGHT
- Returns:
The HTML color code of the found color, or
None
if no color was found.- Return type:
Retrieve a color of the given kind that matches scheme_kind. If a color has no scheme preference defined, it will be returned for either scheme type, unless a more suitable color was found.
New in version 0.15.2.
- remove_color(kind, scheme_preference)¶
- Parameters:
kind (
AppStream.ColorKind
) – theAppStream.ColorKind
, e.g.AppStream.ColorKind.PRIMARY
.scheme_preference (
AppStream.ColorSchemeKind
) – Type of color scheme preferred for this color, e.g.AppStream.ColorSchemeKind.LIGHT
Deletes a color that matches the given type and scheme preference.
New in version 0.15.2.
- set_color(kind, scheme_preference, colorcode)¶
- Parameters:
kind (
AppStream.ColorKind
) – theAppStream.ColorKind
, e.g.AppStream.ColorKind.PRIMARY
.scheme_preference (
AppStream.ColorSchemeKind
) – Type of color scheme preferred for this color, e.g.AppStream.ColorSchemeKind.LIGHT
colorcode (
str
) – a HTML color code.
Sets a new accent color. If a color of the given kind with the given scheme preference already exists, it will be overriden with the new color code.
New in version 0.15.2.