[view] fixes

This commit is contained in:
2019-07-19 16:38:29 +03:00
parent ec42687d1b
commit da5616bf47
8 changed files with 69 additions and 43 deletions

View File

@@ -114,13 +114,6 @@ import haxework.view.theme.ITheme;
return y;
}
// ToDo:
/*private function set_skin(value:ISkin<Dynamic>):ISkin<Dynamic> {
this.skin = value;
toRedraw();
return this.skin;
}
*/
private function set_visible(value:Bool):Bool {
if (visible != value) {
visible = value;
@@ -150,11 +143,10 @@ import haxework.view.theme.ITheme;
private function get_rect():Rectangle {
var x = this.x;
var y = this.y;
var parent = this.parent;
while (parent != null) {
x += parent.x;
y += parent.y;
parent = parent.parent;
if (parent != null) {
var rect = parent.rect;
x += rect.x;
y += rect.y;
}
return new Rectangle(x, y, width, height);
}