Skip to content

Commit 5dbd41d

Browse files
committed
Fixed flexible layout scale problem
1 parent f3c629e commit 5dbd41d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

addons/flexible_layout/flexible_layout.gd

+3-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,9 @@ class FlexLayout:
472472
if rect.size.x == 0 or rect.size.y == 0:
473473
return
474474
if top:
475-
top.layout(control.get_rect())
475+
var scale : float = control.get_window().content_scale_factor
476+
rect.size = Vector2i(Vector2(rect.size)/scale)
477+
top.layout(rect)
476478
main_control.layout_changed.emit()
477479

478480
func move_panel(panel, reference_panel : FlexNode, destination : int, test_only : bool = false) -> bool:

0 commit comments

Comments
 (0)