From 88688d3eb0ed47c19b469982b466e01c29dd69ba Mon Sep 17 00:00:00 2001 From: hz Date: Thu, 23 Jul 2026 14:06:09 -0500 Subject: [PATCH] Add Steam and Google brand icons to login OAuth buttons Steam uses a theme-aware monochrome glyph (light/dark variants) since the button background flips between navy and white; Google keeps its official 4-color mark, which reads fine on either background. --- assets/icons/brands/google.svg | 6 +++ assets/icons/brands/google.svg.import | 43 ++++++++++++++++++++++ assets/icons/brands/steam-dark.svg | 3 ++ assets/icons/brands/steam-dark.svg.import | 43 ++++++++++++++++++++++ assets/icons/brands/steam-light.svg | 3 ++ assets/icons/brands/steam-light.svg.import | 43 ++++++++++++++++++++++ scripts/ui/login_screen.gd | 7 ++++ 7 files changed, 148 insertions(+) create mode 100644 assets/icons/brands/google.svg create mode 100644 assets/icons/brands/google.svg.import create mode 100644 assets/icons/brands/steam-dark.svg create mode 100644 assets/icons/brands/steam-dark.svg.import create mode 100644 assets/icons/brands/steam-light.svg create mode 100644 assets/icons/brands/steam-light.svg.import diff --git a/assets/icons/brands/google.svg b/assets/icons/brands/google.svg new file mode 100644 index 0000000..64b3094 --- /dev/null +++ b/assets/icons/brands/google.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/brands/google.svg.import b/assets/icons/brands/google.svg.import new file mode 100644 index 0000000..678b412 --- /dev/null +++ b/assets/icons/brands/google.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bc3ttuqtwb8e8" +path="res://.godot/imported/google.svg-96c1802a2f0dcbabfd95c7970a307f34.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/icons/brands/google.svg" +dest_files=["res://.godot/imported/google.svg-96c1802a2f0dcbabfd95c7970a307f34.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/assets/icons/brands/steam-dark.svg b/assets/icons/brands/steam-dark.svg new file mode 100644 index 0000000..675408f --- /dev/null +++ b/assets/icons/brands/steam-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/brands/steam-dark.svg.import b/assets/icons/brands/steam-dark.svg.import new file mode 100644 index 0000000..5b89b35 --- /dev/null +++ b/assets/icons/brands/steam-dark.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b5f60sr0rt5tw" +path="res://.godot/imported/steam-dark.svg-0b8589df363e0bd197044b86e8158d1c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/icons/brands/steam-dark.svg" +dest_files=["res://.godot/imported/steam-dark.svg-0b8589df363e0bd197044b86e8158d1c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/assets/icons/brands/steam-light.svg b/assets/icons/brands/steam-light.svg new file mode 100644 index 0000000..0929818 --- /dev/null +++ b/assets/icons/brands/steam-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/brands/steam-light.svg.import b/assets/icons/brands/steam-light.svg.import new file mode 100644 index 0000000..50ec463 --- /dev/null +++ b/assets/icons/brands/steam-light.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8sp3ihkkfidy" +path="res://.godot/imported/steam-light.svg-43e1d1f7b2cea83339ab43c99a461f9e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/icons/brands/steam-light.svg" +dest_files=["res://.godot/imported/steam-light.svg-43e1d1f7b2cea83339ab43c99a461f9e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/scripts/ui/login_screen.gd b/scripts/ui/login_screen.gd index d72a3d9..432f99f 100644 --- a/scripts/ui/login_screen.gd +++ b/scripts/ui/login_screen.gd @@ -4,6 +4,9 @@ const Brand := preload("res://scripts/ui/medmind_style.gd") const EndpointConfig := preload("res://scripts/autoload/api_endpoint_config.gd") const AUTH_BASE := "https://us3q.ranaze.com/api/Auth" const EXTERNAL_AUTH_STORAGE_PREFIX := "ranaze_external_auth_url_" +const STEAM_DARK_ICON := preload("res://assets/icons/brands/steam-dark.svg") +const STEAM_LIGHT_ICON := preload("res://assets/icons/brands/steam-light.svg") +const GOOGLE_ICON := preload("res://assets/icons/brands/google.svg") var main: Control var auth_base_url := AUTH_BASE @@ -258,6 +261,8 @@ func _build_login_view() -> VBoxContainer: for provider in [["steam", "Steam"], ["google", "Google"]]: var external := Button.new() external.text = "Sign in with %s" % provider[1] + external.icon = GOOGLE_ICON if provider[0] == "google" else STEAM_LIGHT_ICON + external.add_theme_constant_override("icon_max_width", 20) external.custom_minimum_size = Vector2(0, 68) external.visible = false external.pressed.connect(_start_external.bind(str(provider[0]), str(provider[1]))) @@ -550,6 +555,8 @@ func _apply_theme() -> void: if not button.text.begins_with("Sign in with "): button.add_theme_stylebox_override("normal", Brand.gradient_button_box()) button.add_theme_color_override("font_color", Color.WHITE) + if external_buttons.has("steam"): + (external_buttons["steam"] as Button).icon = STEAM_DARK_ICON if dark else STEAM_LIGHT_ICON var theme_normal := StyleBoxFlat.new() theme_normal.bg_color = Color("111b30") if dark else Brand.LIGHT_SURFACE theme_normal.border_color = Color("33415d") if dark else Brand.LIGHT_BORDER