fix Акт 2: позиционирование Body адаптивное (compact vs scrollable)
Some checks failed
Godot CI / Import + smoke test (push) Failing after 14s
Some checks failed
Godot CI / Import + smoke test (push) Failing after 14s
Проблема: Body RichTextLabel был с custom_minimum_size (540, 220)
ВСЕГДА. На шагах с коротким текстом (диск/имя/пароль/часовой пояс)
лейбл занимал 220px пустого пространства между заголовком и
полями ввода, выдавливая чекбокс/кнопки за пределы экрана.
Решение:
- В .tscn Body custom_minimum_size = (540, 0), fit_content=true
(адаптируется под контент).
- Window custom_minimum_size = (580, 220) — раньше 348, теперь
окно само растёт под content.
- В скрипте 2 хелпера:
* _set_body_compact() — fit_content=true, min_size (540, 0).
Используется для всех коротких шагов.
* _set_body_scrollable(h) — fit_content=false, min_size (540, h),
scroll_to_line(0). Используется только для LICENSE_FULL.
- Все шаги (_to_disk, _to_username, _to_password, _to_timezone,
_to_installing) вызывают _set_body_compact() в начале.
- LICENSE_FULL вызывает _set_body_scrollable(220) для скроллябельной
лицензии + в title подсказка «прокрути колесом мыши».
Теперь окно установки правильно ужимается под короткий контент и
все поля видны на экране.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
48a992e07a
commit
6db9c4947b
2 changed files with 22 additions and 4 deletions
|
|
@ -119,7 +119,7 @@ anchor_right = 1.0
|
|||
anchor_bottom = 1.0
|
||||
|
||||
[node name="Window" type="PanelContainer" parent="Center"]
|
||||
custom_minimum_size = Vector2(580, 348)
|
||||
custom_minimum_size = Vector2(580, 220)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("style_window")
|
||||
|
||||
|
|
@ -137,10 +137,10 @@ horizontal_alignment = 1
|
|||
modulate = Color(0.94, 0.71, 0.1, 1)
|
||||
|
||||
[node name="Body" type="RichTextLabel" parent="Center/Window/V"]
|
||||
custom_minimum_size = Vector2(540, 220)
|
||||
custom_minimum_size = Vector2(540, 0)
|
||||
layout_mode = 2
|
||||
bbcode_enabled = true
|
||||
fit_content = false
|
||||
fit_content = true
|
||||
scroll_active = true
|
||||
scroll_following = false
|
||||
mouse_filter = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue