Skip to content

Commit

Permalink
Fixed flexible layout scale problem
Browse files Browse the repository at this point in the history
  • Loading branch information
RodZill4 committed Nov 2, 2024
1 parent f3c629e commit 5dbd41d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion addons/flexible_layout/flexible_layout.gd
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ class FlexLayout:
if rect.size.x == 0 or rect.size.y == 0:
return
if top:
top.layout(control.get_rect())
var scale : float = control.get_window().content_scale_factor
rect.size = Vector2i(Vector2(rect.size)/scale)
top.layout(rect)
main_control.layout_changed.emit()

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

0 comments on commit 5dbd41d

Please sign in to comment.