From 377bb4b6cc6e7ada9a5a173e29efc32461919d46 Mon Sep 17 00:00:00 2001 From: RoosterDragon Date: Fri, 5 Apr 2024 18:44:43 +0100 Subject: [PATCH] Tweak some UI Yaml files - Increase space of some elements to fit their text. - Remove editor text that aren't translation keys. The text will be set in code anyway. - Remove some unused elements. - Provide a translation key for the port separator, to avoid log warnings. --- mods/cnc/chrome/editor.yaml | 22 +++--------------- mods/cnc/chrome/tooltips.yaml | 23 ------------------- mods/common/chrome/editor.yaml | 9 +++----- .../chrome/multiplayer-directconnect.yaml | 2 +- mods/common/languages/chrome/en.ftl | 1 + 5 files changed, 8 insertions(+), 49 deletions(-) diff --git a/mods/cnc/chrome/editor.yaml b/mods/cnc/chrome/editor.yaml index 0b6bba0149..0824c4f9f8 100644 --- a/mods/cnc/chrome/editor.yaml +++ b/mods/cnc/chrome/editor.yaml @@ -526,7 +526,6 @@ Container@EDITOR_WORLD_ROOT: Width: 30 Height: 25 Align: Left - Text: 85 Label@MODE_LABEL: X: 6 Y: 102 @@ -558,7 +557,6 @@ Container@EDITOR_WORLD_ROOT: Width: 30 Height: 25 Align: Left - Text: 2 Visible: false DropDownButton@FLIP_NUM_SIDES_DROPDOWN: X: 129 @@ -585,7 +583,6 @@ Container@EDITOR_WORLD_ROOT: Width: 30 Height: 25 Align: Left - Text: 0 Visible: false Container@HISTORY_WIDGETS: Logic: HistoryLogLogic @@ -651,7 +648,7 @@ Container@EDITOR_WORLD_ROOT: Label@AREA_FILTERS_LABEL: X: 6 Y: 36 - Width: 55 + Width: 150 Height: 25 Font: Bold Align: Left @@ -685,7 +682,7 @@ Container@EDITOR_WORLD_ROOT: Label@DIAGONAL_LABEL: X: 6 Y: 171 - Width: 55 + Width: 120 Height: 20 Font: Bold Align: Left @@ -693,7 +690,7 @@ Container@EDITOR_WORLD_ROOT: Label@RESOURCE_LABEL: X: 6 Y: 193 - Width: 55 + Width: 120 Height: 25 Font: Bold Align: Left @@ -1004,16 +1001,3 @@ ScrollPanel@CATEGORY_FILTER_PANEL: Width: PARENT_RIGHT - 29 Height: 20 Visible: false - -ScrollPanel@OVERLAY_PANEL: - Width: 140 - Height: 80 - ItemSpacing: 5 - TopBottomSpacing: 0 - Children: - Checkbox@CATEGORY_TEMPLATE: - X: 5 - Y: 5 - Width: PARENT_RIGHT - 29 - Height: 20 - Visible: false diff --git a/mods/cnc/chrome/tooltips.yaml b/mods/cnc/chrome/tooltips.yaml index 9f8cb6f5d5..df548b6cde 100644 --- a/mods/cnc/chrome/tooltips.yaml +++ b/mods/cnc/chrome/tooltips.yaml @@ -72,29 +72,6 @@ Background@BUTTON_TOOLTIP_FACTIONSUFFIX: Font: TinyBold VAlign: Top -Background@BUTTON_WITH_DESC_HIGHLIGHT_TOOLTIP: - Logic: ButtonTooltipLogic - Background: panel-black - Height: 26 - Children: - Label@LABEL: - X: 5 - Y: 1 - Height: 23 - Font: Bold - Label@HOTKEY: - Y: 1 - Visible: false - TextColor: FFFF00 - Height: 23 - Font: Bold - LabelWithHighlight@DESC: - X: 5 - Y: 26 - Height: 12 - Font: TinyBold - VAlign: Top - Background@BUTTON_WITH_DESC_HIGHLIGHT_TOOLTIP_FACTIONSUFFIX: Logic: ButtonTooltipLogic, AddFactionSuffixLogic Background: panel-black diff --git a/mods/common/chrome/editor.yaml b/mods/common/chrome/editor.yaml index 8a1226314a..9da3dadf88 100644 --- a/mods/common/chrome/editor.yaml +++ b/mods/common/chrome/editor.yaml @@ -485,7 +485,6 @@ Container@EDITOR_WORLD_ROOT: Width: 30 Height: 25 Align: Left - Text: 85 Label@MODE_LABEL: X: 6 Y: 102 @@ -517,7 +516,6 @@ Container@EDITOR_WORLD_ROOT: Width: 30 Height: 25 Align: Left - Text: 2 Visible: false DropDownButton@FLIP_NUM_SIDES_DROPDOWN: X: 129 @@ -544,7 +542,6 @@ Container@EDITOR_WORLD_ROOT: Width: 30 Height: 25 Align: Left - Text: 0 Visible: false Container@HISTORY_WIDGETS: X: WINDOW_RIGHT - 320 @@ -599,7 +596,7 @@ Container@EDITOR_WORLD_ROOT: Label@AREA_FILTERS_LABEL: X: 15 Y: 45 - Width: 55 + Width: 150 Height: 25 Font: Bold Align: Left @@ -633,7 +630,7 @@ Container@EDITOR_WORLD_ROOT: Label@DIAGONAL_LABEL: X: 15 Y: 171 - Width: 55 + Width: 120 Height: 20 Font: Bold Align: Left @@ -641,7 +638,7 @@ Container@EDITOR_WORLD_ROOT: Label@RESOURCE_LABEL: X: 15 Y: 193 - Width: 55 + Width: 120 Height: 25 Font: Bold Align: Left diff --git a/mods/common/chrome/multiplayer-directconnect.yaml b/mods/common/chrome/multiplayer-directconnect.yaml index d47023edaf..94057dfb90 100644 --- a/mods/common/chrome/multiplayer-directconnect.yaml +++ b/mods/common/chrome/multiplayer-directconnect.yaml @@ -32,7 +32,7 @@ Background@DIRECTCONNECT_PANEL: Width: 10 Height: 25 Align: Center - Text: : + Text: label-directconnect-panel-port TextField@PORT: X: 370 Y: 60 diff --git a/mods/common/languages/chrome/en.ftl b/mods/common/languages/chrome/en.ftl index e2aa0cdfe4..61ed086a73 100644 --- a/mods/common/languages/chrome/en.ftl +++ b/mods/common/languages/chrome/en.ftl @@ -386,6 +386,7 @@ button-multiplayer-createserver-panel-create = Create ## multiplayer-directconnect.yaml label-directconnect-panel-title = Connect to Server label-directconnect-panel-address = Server Address: +label-directconnect-panel-port = : button-directconnect-panel-join = Join ## playerprofile.yaml