Fit the toolbar on a single row
The 11 labeled groups are wider than the old bare-icon buttons, so the toolbar's allotted minimum width (tuned for the old layout) was too narrow and forced a wrap onto two rows. Widened it and raised the compact-mode breakpoint to match.
This commit is contained in:
@@ -782,7 +782,10 @@ func _fit_modal_panels() -> void:
|
|||||||
func _refresh_responsive_layout() -> void:
|
func _refresh_responsive_layout() -> void:
|
||||||
if header_toolbar_host == null or header_row == null or header_stack == null:
|
if header_toolbar_host == null or header_row == null or header_stack == null:
|
||||||
return
|
return
|
||||||
var compact := size.x < 1120.0
|
# The toolbar now has 11 labeled groups (vs. 12 bare 44px icons before), so it
|
||||||
|
# needs real room to lay out on one line - give it enough minimum width to do
|
||||||
|
# that and raise the compact-mode threshold to match.
|
||||||
|
var compact := size.x < 1360.0
|
||||||
var target_parent: Control = header_row
|
var target_parent: Control = header_row
|
||||||
if compact:
|
if compact:
|
||||||
target_parent = header_stack
|
target_parent = header_stack
|
||||||
@@ -790,7 +793,7 @@ func _refresh_responsive_layout() -> void:
|
|||||||
header_toolbar_host.reparent(target_parent)
|
header_toolbar_host.reparent(target_parent)
|
||||||
header_toolbar_host.size_flags_horizontal = Control.SIZE_EXPAND_FILL if compact else Control.SIZE_SHRINK_END
|
header_toolbar_host.size_flags_horizontal = Control.SIZE_EXPAND_FILL if compact else Control.SIZE_SHRINK_END
|
||||||
question_toolbar.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
question_toolbar.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||||
header_toolbar_host.custom_minimum_size.x = 0.0 if compact else 520.0
|
header_toolbar_host.custom_minimum_size.x = 0.0 if compact else 980.0
|
||||||
if size.x < 560.0:
|
if size.x < 560.0:
|
||||||
nav_palette.columns = 5
|
nav_palette.columns = 5
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user