-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allows for listening to changes to darkMode and things
- Loading branch information
1 parent
0a888d7
commit b378fc2
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/feathers/themes/steel/components/SteelAssetLoaderStyles.hx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Feathers UI | ||
Copyright 2024 Bowler Hat LLC. All Rights Reserved. | ||
This program is free software. You can redistribute and/or modify it in | ||
accordance with the terms of the accompanying license agreement. | ||
*/ | ||
|
||
package feathers.themes.steel.components; | ||
|
||
import feathers.controls.AssetLoader; | ||
import feathers.style.Theme; | ||
import feathers.themes.steel.BaseSteelTheme; | ||
|
||
/** | ||
Initialize "steel" styles for the `AssetLoader` component. | ||
@since 1.0.0 | ||
**/ | ||
@:dox(hide) | ||
@:access(feathers.themes.steel.BaseSteelTheme) | ||
class SteelAssetLoaderStyles { | ||
public static function initialize(?theme:BaseSteelTheme):Void { | ||
if (theme == null) { | ||
theme = Std.downcast(Theme.fallbackTheme, BaseSteelTheme); | ||
} | ||
if (theme == null) { | ||
return; | ||
} | ||
|
||
var styleProvider = theme.styleProvider; | ||
if (styleProvider.getStyleFunction(AssetLoader, null) == null) { | ||
styleProvider.setStyleFunction(AssetLoader, null, function(loader:AssetLoader):Void {}); | ||
} | ||
} | ||
} |