Skip to content

Commit

Permalink
Fix translated shortcuts (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
MewPurPur authored May 20, 2024
1 parent f996760 commit f774367
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/ui_elements/context_popup.gd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ icon: Texture2D = null, shortcut := "") -> Button:
label_margin.add_theme_constant_override("margin_right",
int(ret_button.get_theme_stylebox("normal").content_margin_right))
var label := Label.new()
label.auto_translate = false
label.text = events[0].as_text_keycode()
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT
label.add_theme_color_override("font_color",
Expand Down
7 changes: 3 additions & 4 deletions src/ui_elements/pathdata_field.gd
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,9 @@ func commands_draw() -> void:
flag_field.get_theme_stylebox("normal" if is_large_arc\
else "pressed").draw(ci, rect)
code_font.draw_string(ci, rect.position + Vector2(5, 14),
String.num_uint64(cmd.large_arc_flag),
HORIZONTAL_ALIGNMENT_LEFT, rect.size.x, 14,
flag_field.get_theme_color("font_color" if is_large_arc\
else "font_pressed_color"))
String.num_uint64(cmd.large_arc_flag), HORIZONTAL_ALIGNMENT_LEFT,
rect.size.x, 14, flag_field.get_theme_color(
"font_color" if is_large_arc else "font_pressed_color"))
rect.position.x = rect.end.x + 4
flag_field.get_theme_stylebox("normal" if is_sweep
else "pressed").draw(ci, rect)
Expand Down
1 change: 1 addition & 0 deletions src/ui_elements/presented_shortcut.gd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func setup(new_action: String) -> void:
# Create new ones.
for i in events.size():
var new_btn := Button.new()
new_btn.auto_translate = false
shortcut_container.add_child.call_deferred(new_btn)
new_btn.custom_minimum_size.x = 144.0
new_btn.size_flags_horizontal = Control.SIZE_FILL
Expand Down
1 change: 1 addition & 0 deletions src/ui_elements/setting_shortcut.gd
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func sync() -> void:
# Create new ones.
for i in 3:
var new_btn := Button.new()
new_btn.auto_translate = false
shortcut_container.add_child.call_deferred(new_btn)
shortcut_buttons.append(new_btn)
new_btn.size_flags_horizontal = Control.SIZE_EXPAND_FILL
Expand Down
1 change: 1 addition & 0 deletions visual/squircle_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

importer="texture"
type="CompressedTexture2D"
uid="uid://buq1qplerloq5"
path="res://.godot/imported/squircled_icon.svg-3c7cf1c70f2c8ac13ca4cbf370a484a7.ctex"
uid="uid://csqs2n4vsbh6t"
path="res://.godot/imported/squircle_icon.svg-9e31901e13a98a03530951e14807bf53.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://visual/squircled_icon.svg"
dest_files=["res://.godot/imported/squircled_icon.svg-3c7cf1c70f2c8ac13ca4cbf370a484a7.ctex"]
source_file="res://visual/squircle_icon.svg"
dest_files=["res://.godot/imported/squircle_icon.svg-9e31901e13a98a03530951e14807bf53.ctex"]

[params]

Expand Down
1 change: 0 additions & 1 deletion visual/squircled_icon.svg

This file was deleted.

0 comments on commit f774367

Please sign in to comment.