[macro] update StyleMacro

This commit is contained in:
2019-07-16 14:53:31 +03:00
parent d52d8ff4f3
commit 451b107f6b
14 changed files with 129 additions and 146 deletions

View File

@@ -1,8 +1,6 @@
package demo;
import haxework.color.Color;
import haxework.view.skin.Skin;
import haxework.view.theme.SkinStyle;
import haxework.view.theme.Theme;
using haxework.color.ColorUtil;
@@ -15,7 +13,7 @@ class AppTheme extends Theme {
override private function reload():Void {
super.reload();
styles.put("view", text().concat(background(colors.light, true)));
styles.put("test", [new SkinStyle(Skin.color(0x00ffff))]);
data.set("view", create(["skin.background.color" => colors.light], ["text"]));
data.set("test", create(["skin.background.color" => Color.fromInt(0x00ffff)]));
}
}