We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 600db38 commit 58948dfCopy full SHA for 58948df
haxe/ui/backend/ScreenBase.hx
@@ -41,12 +41,28 @@ class ScreenBase {
41
42
public var width(get, null):Float;
43
private function get_width():Float {
44
- return container.offsetWidth;
+ var cx:Float = container.offsetWidth;
45
+ if (cx <= 0) {
46
+ for (c in __topLevelComponents) {
47
+ if (c.width > cx) {
48
+ cx = c.width;
49
+ }
50
51
52
+ return cx;
53
}
54
55
public var height(get, null):Float;
56
private function get_height():Float {
- return container.offsetHeight;
57
+ var cy:Float = container.offsetHeight;
58
+ if (cy <= 0) {
59
60
+ if (c.height > cy) {
61
+ cy = c.height;
62
63
64
65
+ return cy;
66
67
68
public var dpi(get, null):Float;
0 commit comments