From 64208f209f69ef662d0d3ecdf6627fc3d13fd92f Mon Sep 17 00:00:00 2001 From: Anish Mishra Date: Mon, 21 Jul 2025 22:51:00 +0530 Subject: [PATCH] Overhaul App theme and visual style --- assets/icons/Grid.svg | 1 + assets/icons/Grid.svg.import | 43 + godot_only/temp_theme.tres | 1301 ----------------- src/autoload/Configs.gd | 2 +- src/config_classes/SaveData.gd | 8 +- src/ui_parts/code_editor.gd | 1 - src/ui_parts/code_editor.tscn | 1 - src/ui_parts/current_file_button.gd | 13 - src/ui_parts/display.gd | 24 - src/ui_parts/display.tscn | 46 +- src/ui_parts/editor_scene.gd | 39 +- src/ui_parts/editor_scene.tscn | 9 +- src/ui_parts/inspector.gd | 1 - src/ui_parts/shortcut_panel.gd | 8 - .../{global_actions.gd => top_app_bar.gd} | 4 +- ...obal_actions.gd.uid => top_app_bar.gd.uid} | 0 .../{global_actions.tscn => top_app_bar.tscn} | 92 +- src/ui_widgets/BetterButton.gd | 31 +- src/ui_widgets/ContextPopup.gd | 2 +- src/ui_widgets/pathdata_field.gd | 2 +- src/ui_widgets/zoom_menu.tscn | 2 - src/utils/ThemeUtils.gd | 511 ++++--- 22 files changed, 449 insertions(+), 1692 deletions(-) create mode 100644 assets/icons/Grid.svg create mode 100644 assets/icons/Grid.svg.import delete mode 100644 godot_only/temp_theme.tres rename src/ui_parts/{global_actions.gd => top_app_bar.gd} (97%) rename src/ui_parts/{global_actions.gd.uid => top_app_bar.gd.uid} (100%) rename src/ui_parts/{global_actions.tscn => top_app_bar.tscn} (53%) diff --git a/assets/icons/Grid.svg b/assets/icons/Grid.svg new file mode 100644 index 0000000..737cace --- /dev/null +++ b/assets/icons/Grid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/Grid.svg.import b/assets/icons/Grid.svg.import new file mode 100644 index 0000000..0d74a00 --- /dev/null +++ b/assets/icons/Grid.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dgoy38n5me7r0" +path="res://.godot/imported/Grid.svg-020aafe65438e8d26dcb25f150671625.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/icons/Grid.svg" +dest_files=["res://.godot/imported/Grid.svg-020aafe65438e8d26dcb25f150671625.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/godot_only/temp_theme.tres b/godot_only/temp_theme.tres deleted file mode 100644 index 80ccb9b..0000000 --- a/godot_only/temp_theme.tres +++ /dev/null @@ -1,1301 +0,0 @@ -[gd_resource type="Theme" load_steps=105 format=3 uid="uid://dreumigwm5s8q"] - -[ext_resource type="Texture2D" uid="uid://wdrpwa7gwmg" path="res://assets/icons/theme/GuiBoxChecked.svg" id="1_ytocx"] -[ext_resource type="Texture2D" uid="uid://d07xfjdtgtvop" path="res://assets/icons/theme/GuiBoxCheckedDisabled.svg" id="2_k1r51"] -[ext_resource type="Texture2D" uid="uid://d3a3xgsb8klyk" path="res://assets/icons/theme/GuiBoxUnchecked.svg" id="3_ai1kp"] -[ext_resource type="Texture2D" uid="uid://xbycstdv7g3m" path="res://assets/icons/theme/GuiBoxUncheckedDisabled.svg" id="4_q26bq"] -[ext_resource type="Texture2D" uid="uid://dwlr4bgptgwho" path="res://assets/icons/theme/GuiToggleChecked.svg" id="5_n0t0v"] -[ext_resource type="Texture2D" uid="uid://c12tg3dnydily" path="res://assets/icons/theme/GuiToggleUnchecked.svg" id="6_hbb3x"] -[ext_resource type="FontFile" uid="uid://depydd16jq777" path="res://assets/fonts/FontMono.ttf" id="7_qhyxn"] -[ext_resource type="FontFile" uid="uid://dc0w4sx0h0fui" path="res://assets/fonts/FontBold.ttf" id="8_440hh"] -[ext_resource type="FontFile" uid="uid://clpf84p1lfwlp" path="res://assets/fonts/Font.ttf" id="9_bb1pf"] - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_icrmg"] -content_margin_left = 10.0 -content_margin_top = 4.0 -content_margin_right = 10.0 -content_margin_bottom = 8.0 -bg_color = Color(0.09803922, 0.09803922, 0.14901961, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.25490198, 0.25490198, 0.34901962, 1) -corner_radius_top_left = 4 -corner_radius_top_right = 4 -corner_radius_bottom_right = 4 -corner_radius_bottom_left = 4 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g30mb"] -content_margin_left = 6.0 -content_margin_top = 3.0 -content_margin_right = 6.0 -content_margin_bottom = 3.0 -bg_color = Color(0.05490196, 0.05490196, 0.07058824, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.11764706, 0.12156863, 0.14117648, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4fdpe"] -content_margin_left = 6.0 -content_margin_top = 3.0 -content_margin_right = 6.0 -content_margin_bottom = 3.0 -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.4, 0.8, 1, 0.8) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5jen0"] -content_margin_left = 6.0 -content_margin_top = 3.0 -content_margin_right = 6.0 -content_margin_bottom = 3.0 -bg_color = Color(0.13725491, 0.15686275, 0.2509804, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.2627451, 0.3372549, 0.47843137, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_21e6d"] -content_margin_left = 6.0 -content_margin_top = 3.0 -content_margin_right = 6.0 -content_margin_bottom = 3.0 -bg_color = Color(0.10980392, 0.11764706, 0.21960784, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.19215687, 0.21960784, 0.34901962, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ipi5f"] -content_margin_left = 6.0 -content_margin_top = 3.0 -content_margin_right = 6.0 -content_margin_bottom = 3.0 -bg_color = Color(0.23921569, 0.32941177, 0.6, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.3764706, 0.56078434, 0.7490196, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qrgrk"] -content_margin_left = 3.0 -content_margin_top = 2.0 -content_margin_right = 3.0 -content_margin_bottom = 2.0 -bg_color = Color(0.019607844, 0.023529412, 0.02745098, 0.26666668) -corner_radius_top_left = 4 -corner_radius_top_right = 4 -corner_radius_bottom_right = 4 -corner_radius_bottom_left = 4 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_oyf7c"] -content_margin_left = 3.0 -content_margin_top = 2.0 -content_margin_right = 3.0 -content_margin_bottom = 2.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.06666667) -corner_radius_top_left = 4 -corner_radius_top_right = 4 -corner_radius_bottom_right = 4 -corner_radius_bottom_left = 4 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_nj7w5"] -content_margin_left = 3.0 -content_margin_top = 2.0 -content_margin_right = 3.0 -content_margin_bottom = 2.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_26th1"] -content_margin_left = 3.0 -content_margin_top = 2.0 -content_margin_right = 4.0 -content_margin_bottom = 2.0 -bg_color = Color(0.019607844, 0.023529412, 0.02745098, 0.26666668) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_r83it"] -content_margin_left = 3.0 -content_margin_top = 2.0 -content_margin_right = 4.0 -content_margin_bottom = 2.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.06666667) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_c8l7c"] -content_margin_left = 3.0 -content_margin_top = 2.0 -content_margin_right = 4.0 -content_margin_bottom = 2.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mrs8u"] -content_margin_left = 3.0 -content_margin_top = 2.0 -content_margin_right = 4.0 -content_margin_bottom = 2.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.2) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_t7a8b"] -content_margin_left = 4.0 -content_margin_top = 2.0 -content_margin_right = 4.0 -content_margin_bottom = 2.0 -bg_color = Color(0.06666667, 0.06666667, 0.101960786, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8x2wk"] -content_margin_left = 2.0 -content_margin_top = 2.0 -content_margin_right = 2.0 -content_margin_bottom = 2.0 -bg_color = Color(0.019607844, 0.023529412, 0.02745098, 0.26666668) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fxy0k"] -content_margin_left = 2.0 -content_margin_top = 2.0 -content_margin_right = 2.0 -content_margin_bottom = 2.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.06666667) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_sktrp"] -content_margin_left = 2.0 -content_margin_top = 2.0 -content_margin_right = 2.0 -content_margin_bottom = 2.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_k1rqg"] -content_margin_left = 2.0 -content_margin_top = 2.0 -content_margin_right = 2.0 -content_margin_bottom = 2.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.2) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_4giju"] - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_861tr"] -bg_color = Color(0.0627451, 0.0627451, 0.101960786, 1) -corner_radius_top_left = 2 -corner_radius_top_right = 2 -corner_radius_bottom_right = 2 -corner_radius_bottom_left = 2 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_45rnm"] -content_margin_left = 2.0 -content_margin_right = 2.0 -bg_color = Color(0.20392157, 0.25490198, 0.4, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6p3y2"] -content_margin_left = 2.0 -content_margin_right = 2.0 -bg_color = Color(0.27450982, 0.33333334, 0.5019608, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2makh"] -content_margin_left = 2.0 -content_margin_right = 2.0 -bg_color = Color(0.3764706, 0.56078434, 0.7490196, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_no827"] -content_margin_top = 8.0 -content_margin_bottom = 8.0 -bg_color = Color(0.05882353, 0.05882353, 0.101960786, 0.6) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxLine" id="StyleBoxLine_7nc8c"] -color = Color(0.25490198, 0.25490198, 0.34901962, 1) -thickness = 2 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6bkdf"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.05490196, 0.05490196, 0.07058824, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.11764706, 0.12156863, 0.14117648, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ayjhd"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.13725491, 0.15686275, 0.2509804, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.2627451, 0.3372549, 0.47843137, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0igyf"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.10980392, 0.11764706, 0.21960784, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.19215687, 0.21960784, 0.34901962, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ytmge"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.23921569, 0.32941177, 0.6, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.3764706, 0.56078434, 0.7490196, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_4dmdu"] -content_margin_left = 1.0 -content_margin_top = 1.0 -content_margin_right = 1.0 -content_margin_bottom = 1.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3vmf3"] -content_margin_left = 2.0 -content_margin_top = 2.0 -content_margin_right = 2.0 -content_margin_bottom = 2.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.06666667) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_d26s8"] -content_margin_left = 2.0 -content_margin_top = 2.0 -content_margin_right = 2.0 -content_margin_bottom = 2.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.25490198) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_my2q2"] -content_margin_left = 2.0 -content_margin_top = 2.0 -content_margin_right = 2.0 -content_margin_bottom = 2.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.2) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_x81ar"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 5.0 -content_margin_bottom = 4.0 -bg_color = Color(0.0627451, 0.0627451, 0.101960786, 1) -border_width_left = 1 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.15294118, 0.15294118, 0.2, 1) -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sfydh"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 5.0 -content_margin_bottom = 4.0 -bg_color = Color(0.09411765, 0.09411765, 0.14901961, 1) -border_width_left = 1 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.22745098, 0.22745098, 0.3019608, 1) -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_x2q0w"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 5.0 -content_margin_bottom = 4.0 -bg_color = Color(0.19215687, 0.20784314, 0.34901962, 1) -border_width_left = 1 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.32941177, 0.40392157, 0.54901963, 1) -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dpdoc"] -draw_center = false -border_width_left = 1 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.22745098, 0.22745098, 0.3019608, 1) -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mtj4k"] -draw_center = false -border_width_left = 1 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.15294118, 0.15294118, 0.2, 1) -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w5onv"] -draw_center = false -border_width_left = 1 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.32941177, 0.40392157, 0.54901963, 1) -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ea5xj"] -content_margin_left = 5.0 -content_margin_top = 0.0 -content_margin_right = 5.0 -content_margin_bottom = 0.0 -draw_center = false -border_width_left = 1 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.23921569, 0.41960785, 0.6, 1) -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_78mec"] -content_margin_left = 5.0 -content_margin_top = 0.0 -content_margin_right = 5.0 -content_margin_bottom = 0.0 -draw_center = false -border_width_left = 1 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.8666667, 0.93333334, 1, 0.105882354) -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_svwg2"] -content_margin_left = 5.0 -content_margin_top = 0.0 -content_margin_right = 5.0 -content_margin_bottom = 0.0 -bg_color = Color(0.0627451, 0.0627451, 0.101960786, 1) -border_width_left = 1 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.15294118, 0.15294118, 0.2, 1) -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xdbsx"] -content_margin_left = 5.0 -content_margin_top = 0.0 -content_margin_right = 5.0 -content_margin_bottom = 0.0 -bg_color = Color(0.05490196, 0.05490196, 0.07058824, 1) -border_width_left = 1 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.11764706, 0.12156863, 0.14117648, 1) -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4lv8m"] -content_margin_left = 4.0 -content_margin_top = 2.0 -content_margin_right = 4.0 -content_margin_bottom = 2.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.047058824) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6hg4o"] -content_margin_left = 5.0 -content_margin_right = 5.0 -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.23921569, 0.41960785, 0.6, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_00m15"] -content_margin_left = 5.0 -content_margin_right = 5.0 -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.8666667, 0.93333334, 1, 0.105882354) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_na4f1"] -content_margin_left = 5.0 -content_margin_right = 5.0 -bg_color = Color(0.0627451, 0.0627451, 0.101960786, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.15294118, 0.15294118, 0.2, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_asv8i"] -content_margin_left = 5.0 -content_margin_right = 5.0 -bg_color = Color(0.05490196, 0.05490196, 0.07058824, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.11764706, 0.12156863, 0.14117648, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_peyfs"] -content_margin_left = 3.0 -content_margin_right = 3.0 -content_margin_bottom = 0.0 -draw_center = false -border_width_bottom = 2 -border_color = Color(0.23921569, 0.41960785, 0.6, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ou4sd"] -content_margin_left = 3.0 -content_margin_right = 3.0 -content_margin_bottom = 0.0 -draw_center = false -border_width_bottom = 2 -border_color = Color(0.8666667, 0.93333334, 1, 0.15882353) -corner_radius_top_left = 3 -corner_radius_top_right = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rdma8"] -content_margin_left = 3.0 -content_margin_right = 3.0 -content_margin_bottom = 0.0 -bg_color = Color(0.0627451, 0.0627451, 0.101960786, 1) -border_width_bottom = 2 -border_color = Color(0.3019608, 0.30588236, 0.4, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_sisgv"] -content_margin_left = 8.0 -content_margin_top = 6.0 -content_margin_right = 10.0 -content_margin_bottom = 10.0 -bg_color = Color(0.023529412, 0.023529412, 0.078431375, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.20392157, 0.25490198, 0.4, 1) -corner_radius_top_left = 2 -corner_radius_top_right = 2 -corner_radius_bottom_right = 2 -corner_radius_bottom_left = 2 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_daqi4"] -content_margin_left = 2.0 -content_margin_right = 2.0 -bg_color = Color(0.09803922, 0.09803922, 0.14901961, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.25490198, 0.25490198, 0.34901962, 1) -corner_radius_top_left = 4 -corner_radius_top_right = 4 -corner_radius_bottom_right = 4 -corner_radius_bottom_left = 4 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_m0xk7"] -content_margin_left = 5.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.0627451, 0.0627451, 0.101960786, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 1 -border_width_bottom = 2 -border_color = Color(0.15294118, 0.15294118, 0.2, 1) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_b66yd"] -content_margin_left = 5.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.09411765, 0.09411765, 0.14901961, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 1 -border_width_bottom = 2 -border_color = Color(0.22745098, 0.22745098, 0.3019608, 1) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dtk2x"] -content_margin_left = 5.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.19215687, 0.20784314, 0.34901962, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 1 -border_width_bottom = 2 -border_color = Color(0.32941177, 0.40392157, 0.54901963, 1) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2o6sy"] -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 1 -border_width_bottom = 2 -border_color = Color(0.22745098, 0.22745098, 0.3019608, 1) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ccirr"] -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 1 -border_width_bottom = 2 -border_color = Color(0.15294118, 0.15294118, 0.2, 1) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_s5j87"] -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 1 -border_width_bottom = 2 -border_color = Color(0.32941177, 0.40392157, 0.54901963, 1) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hiod6"] -content_margin_left = 5.0 -content_margin_top = 0.0 -content_margin_right = 5.0 -content_margin_bottom = 0.0 -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 1 -border_width_bottom = 2 -border_color = Color(0.23921569, 0.41960785, 0.6, 1) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0yfov"] -content_margin_left = 5.0 -content_margin_top = 0.0 -content_margin_right = 5.0 -content_margin_bottom = 0.0 -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 1 -border_width_bottom = 2 -border_color = Color(0.8666667, 0.93333334, 1, 0.105882354) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gnvxl"] -content_margin_left = 5.0 -content_margin_top = 0.0 -content_margin_right = 5.0 -content_margin_bottom = 0.0 -bg_color = Color(0.0627451, 0.0627451, 0.101960786, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 1 -border_width_bottom = 2 -border_color = Color(0.15294118, 0.15294118, 0.2, 1) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_726lq"] -content_margin_left = 5.0 -content_margin_top = 0.0 -content_margin_right = 5.0 -content_margin_bottom = 0.0 -bg_color = Color(0.05490196, 0.05490196, 0.07058824, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 1 -border_width_bottom = 2 -border_color = Color(0.11764706, 0.12156863, 0.14117648, 1) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g1xir"] -content_margin_left = 14.0 -content_margin_top = 2.0 -content_margin_right = 2.0 -content_margin_bottom = 2.0 -bg_color = Color(0.09019608, 0.09019608, 0.14901961, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.16470589, 0.18039216, 0.3019608, 1) -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4rwlm"] -content_margin_left = 6.0 -content_margin_top = 3.0 -content_margin_right = 6.0 -content_margin_bottom = 3.0 -bg_color = Color(0.12156863, 0.12941177, 0.21960784, 1) -corner_radius_top_left = 4 -corner_radius_bottom_left = 4 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nv0en"] -content_margin_left = 6.0 -content_margin_top = 3.0 -content_margin_right = 6.0 -content_margin_bottom = 3.0 -bg_color = Color(0.09019608, 0.09803922, 0.18039216, 1) -corner_radius_top_left = 4 -corner_radius_bottom_left = 4 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_teihn"] -content_margin_left = 10.0 -content_margin_top = 3.0 -content_margin_right = 6.0 -content_margin_bottom = 3.0 -bg_color = Color(0.16078432, 0.1882353, 0.32156864, 1) -border_width_left = 2 -border_color = Color(0.3764706, 0.56078434, 0.7490196, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jfic3"] -content_margin_left = 0.0 -content_margin_top = 0.0 -content_margin_right = 0.0 -content_margin_bottom = 0.0 -bg_color = Color(0.07450981, 0.07450981, 0.12156863, 0.5019608) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxLine" id="StyleBoxLine_fwd32"] -color = Color(0.25490198, 0.25490198, 0.34901962, 0.5) -grow_begin = -3.0 -grow_end = -3.0 -thickness = 2 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_613dt"] -bg_color = Color(0.3764706, 0.56078434, 0.7490196, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tkq70"] -bg_color = Color(0.2627451, 0.3372549, 0.47843137, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rs5j0"] -bg_color = Color(0.19215687, 0.21960784, 0.34901962, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hg85g"] -content_margin_left = 8.0 -content_margin_top = 0.0 -content_margin_right = 2.0 -content_margin_bottom = 2.0 -bg_color = Color(0.09019608, 0.09019608, 0.14901961, 1) -border_width_left = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.16470589, 0.18039216, 0.3019608, 1) -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_7r02y"] -content_margin_left = 12.0 -content_margin_top = 3.0 -content_margin_right = 12.0 -content_margin_bottom = 3.0 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_v3qse"] - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pllwh"] -content_margin_left = 12.0 -content_margin_top = 3.0 -content_margin_right = 12.0 -content_margin_bottom = 3.0 -bg_color = Color(0.12156863, 0.12941177, 0.21960784, 1) -corner_radius_top_left = 4 -corner_radius_top_right = 4 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wcexl"] -content_margin_left = 12.0 -content_margin_top = 3.0 -content_margin_right = 12.0 -content_margin_bottom = 3.0 -bg_color = Color(0.16078432, 0.1882353, 0.32156864, 1) -border_width_top = 2 -border_color = Color(0.3764706, 0.56078434, 0.7490196, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vbqfd"] -content_margin_left = 12.0 -content_margin_top = 3.0 -content_margin_right = 12.0 -content_margin_bottom = 3.0 -bg_color = Color(0.09019608, 0.09803922, 0.18039216, 1) -corner_radius_top_left = 4 -corner_radius_top_right = 4 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gx7ct"] -content_margin_left = 0.0 -content_margin_top = 0.0 -content_margin_right = 0.0 -content_margin_bottom = 0.0 -bg_color = Color(0.07450981, 0.07450981, 0.12156863, 0.5019608) -corner_radius_top_left = 5 -corner_radius_top_right = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_b5gt4"] -content_margin_left = 10.0 -content_margin_top = 8.0 -content_margin_right = 10.0 -content_margin_bottom = 8.0 -bg_color = Color(0.09411765, 0.11372549, 0.18431373, 1) -corner_radius_top_left = 12 -corner_radius_top_right = 12 -corner_radius_bottom_right = 12 -corner_radius_bottom_left = 12 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ayhe7"] -content_margin_left = 10.0 -content_margin_top = 8.0 -content_margin_right = 10.0 -content_margin_bottom = 8.0 -bg_color = Color(0.14117648, 0.16862746, 0.27058825, 1) -border_width_left = 4 -border_width_top = 4 -border_width_right = 4 -border_width_bottom = 4 -border_color = Color(0.18039216, 0.4117647, 0.7490196, 1) -corner_radius_top_left = 12 -corner_radius_top_right = 12 -corner_radius_bottom_right = 12 -corner_radius_bottom_left = 12 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pw2is"] -content_margin_left = 6.0 -content_margin_top = 2.0 -content_margin_right = 6.0 -content_margin_bottom = 4.0 -bg_color = Color(0.01882353, 0.01882353, 0.0627451, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.20392157, 0.25490198, 0.4, 0.6) -corner_radius_top_left = 2 -corner_radius_top_right = 2 -corner_radius_bottom_right = 2 -corner_radius_bottom_left = 2 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_i6xle"] -content_margin_left = 2.0 -content_margin_right = 2.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_15i11"] -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.23921569, 0.41960785, 0.6, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_10n01"] -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.8666667, 0.93333334, 1, 0.105882354) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rml4s"] -content_margin_left = 5.0 -bg_color = Color(0.0627451, 0.0627451, 0.101960786, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.15294118, 0.15294118, 0.2, 1) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_spvik"] -content_margin_left = 6.0 -content_margin_top = 1.0 -content_margin_right = 6.0 -content_margin_bottom = 3.0 -bg_color = Color(0.09803922, 0.09803922, 0.14901961, 1) -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.25490198, 0.25490198, 0.34901962, 1) -corner_radius_top_left = 2 -corner_radius_top_right = 2 -corner_radius_bottom_right = 2 -corner_radius_bottom_left = 2 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_008le"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.019607844, 0.023529412, 0.02745098, 0.33333334) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_prvrx"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.13333334) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pemd2"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.06666667) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q0bjc"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.8666667, 0.93333334, 1, 0.26666668) -corner_radius_top_left = 5 -corner_radius_top_right = 5 -corner_radius_bottom_right = 5 -corner_radius_bottom_left = 5 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_f7uns"] -content_margin_top = 2.0 -content_margin_bottom = 2.0 -bg_color = Color(0.20392157, 0.25490198, 0.4, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q0y62"] -content_margin_top = 2.0 -content_margin_bottom = 2.0 -bg_color = Color(0.27450982, 0.33333334, 0.5019608, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7hwcg"] -content_margin_top = 2.0 -content_margin_bottom = 2.0 -bg_color = Color(0.3764706, 0.56078434, 0.7490196, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_t6bh3"] -content_margin_left = 8.0 -content_margin_right = 8.0 -bg_color = Color(0.05882353, 0.05882353, 0.101960786, 0.6) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[resource] -default_font = ExtResource("9_bb1pf") -default_font_size = 13 -AcceptDialog/styles/panel = SubResource("StyleBoxFlat_icrmg") -Button/colors/font_color = Color(1, 1, 1, 0.8666667) -Button/colors/font_disabled_color = Color(1, 1, 1, 0.33333334) -Button/colors/font_focus_color = Color(1, 1, 1, 1) -Button/colors/font_hover_color = Color(1, 1, 1, 1) -Button/colors/font_hover_pressed_color = Color(1, 1, 1, 1) -Button/colors/font_pressed_color = Color(1, 1, 1, 1) -Button/constants/h_separation = 5 -Button/styles/disabled = SubResource("StyleBoxFlat_g30mb") -Button/styles/focus = SubResource("StyleBoxFlat_4fdpe") -Button/styles/hover = SubResource("StyleBoxFlat_5jen0") -Button/styles/normal = SubResource("StyleBoxFlat_21e6d") -Button/styles/pressed = SubResource("StyleBoxFlat_ipi5f") -CheckBox/colors/font_color = Color(1, 1, 1, 0.8666667) -CheckBox/colors/font_disabled_color = Color(1, 1, 1, 0.33333334) -CheckBox/colors/font_focus_color = Color(1, 1, 1, 1) -CheckBox/colors/font_hover_color = Color(1, 1, 1, 1) -CheckBox/colors/font_hover_pressed_color = Color(1, 1, 1, 1) -CheckBox/colors/font_pressed_color = Color(1, 1, 1, 1) -CheckBox/constants/h_separation = 5 -CheckBox/icons/checked = ExtResource("1_ytocx") -CheckBox/icons/checked_disabled = ExtResource("2_k1r51") -CheckBox/icons/unchecked = ExtResource("3_ai1kp") -CheckBox/icons/unchecked_disabled = ExtResource("4_q26bq") -CheckBox/styles/disabled = SubResource("StyleBoxFlat_qrgrk") -CheckBox/styles/hover = SubResource("StyleBoxFlat_oyf7c") -CheckBox/styles/hover_pressed = SubResource("StyleBoxFlat_oyf7c") -CheckBox/styles/normal = SubResource("StyleBoxEmpty_nj7w5") -CheckBox/styles/pressed = SubResource("StyleBoxEmpty_nj7w5") -CheckButton/colors/font_color = Color(1, 1, 1, 0.8666667) -CheckButton/colors/font_disabled_color = Color(1, 1, 1, 0.33333334) -CheckButton/colors/font_focus_color = Color(1, 1, 1, 1) -CheckButton/colors/font_hover_color = Color(1, 1, 1, 1) -CheckButton/colors/font_hover_pressed_color = Color(1, 1, 1, 1) -CheckButton/colors/font_pressed_color = Color(1, 1, 1, 1) -CheckButton/icons/checked = ExtResource("5_n0t0v") -CheckButton/icons/unchecked = ExtResource("6_hbb3x") -ContextButton/base_type = &"Button" -ContextButton/colors/icon_hover_color = Color(1, 1, 1, 1) -ContextButton/colors/icon_normal_color = Color(0.8509804, 0.8509804, 0.8509804, 1) -ContextButton/colors/icon_pressed_color = Color(1, 1, 1, 1) -ContextButton/styles/disabled = SubResource("StyleBoxFlat_26th1") -ContextButton/styles/hover = SubResource("StyleBoxFlat_r83it") -ContextButton/styles/normal = SubResource("StyleBoxEmpty_c8l7c") -ContextButton/styles/pressed = SubResource("StyleBoxFlat_mrs8u") -DarkPanel/base_type = &"PanelContainer" -DarkPanel/styles/panel = SubResource("StyleBoxFlat_t7a8b") -FlatButton/base_type = &"Button" -FlatButton/colors/icon_hover_color = Color(1, 1, 1, 1) -FlatButton/colors/icon_hover_pressed_color = Color(0.7490196, 0.8745098, 1, 1) -FlatButton/colors/icon_normal_color = Color(0.7490196, 0.7490196, 0.7490196, 1) -FlatButton/colors/icon_pressed_color = Color(0.7490196, 0.8745098, 1, 1) -FlatButton/styles/disabled = SubResource("StyleBoxFlat_8x2wk") -FlatButton/styles/hover = SubResource("StyleBoxFlat_fxy0k") -FlatButton/styles/normal = SubResource("StyleBoxEmpty_sktrp") -FlatButton/styles/pressed = SubResource("StyleBoxFlat_k1rqg") -GoodColorPickerLineEdit/base_type = &"LineEdit" -GoodColorPickerLineEdit/font_sizes/font_size = 11 -GoodColorPickerLineEdit/fonts/font = ExtResource("7_qhyxn") -GoodColorPickerLineEdit/styles/focus = SubResource("StyleBoxEmpty_4giju") -GoodColorPickerLineEdit/styles/hover = SubResource("StyleBoxEmpty_4giju") -GoodColorPickerLineEdit/styles/normal = SubResource("StyleBoxFlat_861tr") -GoodColorPickerLineEdit/styles/read_only = SubResource("StyleBoxEmpty_4giju") -HScrollBar/styles/grabber = SubResource("StyleBoxFlat_45rnm") -HScrollBar/styles/grabber_highlight = SubResource("StyleBoxFlat_6p3y2") -HScrollBar/styles/grabber_pressed = SubResource("StyleBoxFlat_2makh") -HScrollBar/styles/scroll = SubResource("StyleBoxFlat_no827") -HSeparator/styles/separator = SubResource("StyleBoxLine_7nc8c") -IconButton/base_type = &"Button" -IconButton/styles/disabled = SubResource("StyleBoxFlat_6bkdf") -IconButton/styles/hover = SubResource("StyleBoxFlat_ayjhd") -IconButton/styles/normal = SubResource("StyleBoxFlat_0igyf") -IconButton/styles/pressed = SubResource("StyleBoxFlat_ytmge") -ItemList/colors/font_color = Color(0.9, 0.9, 0.9, 1) -ItemList/colors/font_hovered = Color(1, 1, 1, 1) -ItemList/colors/font_selected = Color(1, 1, 1, 1) -ItemList/colors/guide_color = Color(1, 1, 1, 0) -ItemList/constants/icon_margin = 4 -ItemList/styles/cursor = SubResource("StyleBoxEmpty_4dmdu") -ItemList/styles/cursor_unfocused = SubResource("StyleBoxEmpty_4dmdu") -ItemList/styles/focus = SubResource("StyleBoxEmpty_4dmdu") -ItemList/styles/hovered = SubResource("StyleBoxFlat_3vmf3") -ItemList/styles/hovered_selected = SubResource("StyleBoxFlat_d26s8") -ItemList/styles/hovered_selected_focus = SubResource("StyleBoxFlat_d26s8") -ItemList/styles/panel = SubResource("StyleBoxEmpty_4dmdu") -ItemList/styles/selected = SubResource("StyleBoxFlat_my2q2") -ItemList/styles/selected_focus = SubResource("StyleBoxFlat_my2q2") -LeftConnectedButton/base_type = &"Button" -LeftConnectedButton/colors/icon_hover_color = Color(1, 1, 1, 1) -LeftConnectedButton/colors/icon_normal_color = Color(0.7490196, 0.7490196, 0.7490196, 1) -LeftConnectedButton/colors/icon_pressed_color = Color(0.7490196, 0.8745098, 1, 1) -LeftConnectedButton/styles/disabled = SubResource("StyleBoxFlat_x81ar") -LeftConnectedButton/styles/hover = SubResource("StyleBoxFlat_sfydh") -LeftConnectedButton/styles/normal = SubResource("StyleBoxFlat_x81ar") -LeftConnectedButton/styles/pressed = SubResource("StyleBoxFlat_x2q0w") -LeftConnectedButtonTransparent/base_type = &"Button" -LeftConnectedButtonTransparent/colors/icon_hover_color = Color(1, 1, 1, 1) -LeftConnectedButtonTransparent/colors/icon_normal_color = Color(0.7490196, 0.7490196, 0.7490196, 1) -LeftConnectedButtonTransparent/colors/icon_pressed_color = Color(0.7490196, 0.8745098, 1, 1) -LeftConnectedButtonTransparent/styles/hover = SubResource("StyleBoxFlat_dpdoc") -LeftConnectedButtonTransparent/styles/normal = SubResource("StyleBoxFlat_mtj4k") -LeftConnectedButtonTransparent/styles/pressed = SubResource("StyleBoxFlat_w5onv") -LeftConnectedLineEdit/base_type = &"LineEdit" -LeftConnectedLineEdit/font_sizes/font_size = 12 -LeftConnectedLineEdit/fonts/font = ExtResource("7_qhyxn") -LeftConnectedLineEdit/styles/focus = SubResource("StyleBoxFlat_ea5xj") -LeftConnectedLineEdit/styles/hover = SubResource("StyleBoxFlat_78mec") -LeftConnectedLineEdit/styles/normal = SubResource("StyleBoxFlat_svwg2") -LeftConnectedLineEdit/styles/read_only = SubResource("StyleBoxFlat_xdbsx") -LightPanel/base_type = &"PanelContainer" -LightPanel/styles/panel = SubResource("StyleBoxFlat_4lv8m") -LineEdit/colors/caret_color = Color(0.8666667, 0.93333334, 1, 0.8666667) -LineEdit/colors/disabled_selection_color = Color(0.6666667, 0.6666667, 0.6666667, 0.4) -LineEdit/colors/font_color = Color(0.8666667, 0.93333334, 1, 1) -LineEdit/colors/font_placeholder_color = Color(1, 1, 1, 0.33333334) -LineEdit/colors/selection_color = Color(0.4, 0.54901963, 1, 0.4) -LineEdit/font_sizes/font_size = 12 -LineEdit/fonts/font = ExtResource("7_qhyxn") -LineEdit/styles/focus = SubResource("StyleBoxFlat_6hg4o") -LineEdit/styles/hover = SubResource("StyleBoxFlat_00m15") -LineEdit/styles/normal = SubResource("StyleBoxFlat_na4f1") -LineEdit/styles/read_only = SubResource("StyleBoxFlat_asv8i") -MiniLineEdit/base_type = &"LineEdit" -MiniLineEdit/colors/font_color = Color(0.8666667, 0.93333334, 1, 1) -MiniLineEdit/font_sizes/font_size = 10 -MiniLineEdit/fonts/font = ExtResource("7_qhyxn") -MiniLineEdit/styles/focus = SubResource("StyleBoxFlat_peyfs") -MiniLineEdit/styles/hover = SubResource("StyleBoxFlat_ou4sd") -MiniLineEdit/styles/normal = SubResource("StyleBoxFlat_rdma8") -OverlayPanel/base_type = &"PanelContainer" -OverlayPanel/styles/panel = SubResource("StyleBoxFlat_sisgv") -PanelContainer/styles/panel = SubResource("StyleBoxFlat_daqi4") -RichTextLabel/colors/selection_color = Color(0.4, 0.54901963, 1, 0.4) -RichTextLabel/fonts/bold_font = ExtResource("8_440hh") -RightConnectedButton/base_type = &"Button" -RightConnectedButton/colors/icon_hover_color = Color(1, 1, 1, 1) -RightConnectedButton/colors/icon_normal_color = Color(0.7490196, 0.7490196, 0.7490196, 1) -RightConnectedButton/colors/icon_pressed_color = Color(0.7490196, 0.8745098, 1, 1) -RightConnectedButton/styles/disabled = SubResource("StyleBoxFlat_m0xk7") -RightConnectedButton/styles/hover = SubResource("StyleBoxFlat_b66yd") -RightConnectedButton/styles/normal = SubResource("StyleBoxFlat_m0xk7") -RightConnectedButton/styles/pressed = SubResource("StyleBoxFlat_dtk2x") -RightConnectedButtonTransparent/base_type = &"Button" -RightConnectedButtonTransparent/colors/icon_hover_color = Color(1, 1, 1, 1) -RightConnectedButtonTransparent/colors/icon_normal_color = Color(0.7490196, 0.7490196, 0.7490196, 1) -RightConnectedButtonTransparent/colors/icon_pressed_color = Color(0.7490196, 0.8745098, 1, 1) -RightConnectedButtonTransparent/styles/hover = SubResource("StyleBoxFlat_2o6sy") -RightConnectedButtonTransparent/styles/normal = SubResource("StyleBoxFlat_ccirr") -RightConnectedButtonTransparent/styles/pressed = SubResource("StyleBoxFlat_s5j87") -RightConnectedLineEdit/base_type = &"LineEdit" -RightConnectedLineEdit/font_sizes/font_size = 12 -RightConnectedLineEdit/fonts/font = ExtResource("7_qhyxn") -RightConnectedLineEdit/styles/focus = SubResource("StyleBoxFlat_hiod6") -RightConnectedLineEdit/styles/hover = SubResource("StyleBoxFlat_0yfov") -RightConnectedLineEdit/styles/normal = SubResource("StyleBoxFlat_gnvxl") -RightConnectedLineEdit/styles/read_only = SubResource("StyleBoxFlat_726lq") -SideBarContent/base_type = &"PanelContainer" -SideBarContent/styles/panel = SubResource("StyleBoxFlat_g1xir") -SideTab/base_type = &"Button" -SideTab/colors/font_color = Color(1, 1, 1, 0.73333335) -SideTab/colors/font_hover_color = Color(1, 1, 1, 1) -SideTab/colors/font_hover_pressed_color = Color(1, 1, 1, 1) -SideTab/colors/font_pressed_color = Color(1, 1, 1, 1) -SideTab/styles/hover = SubResource("StyleBoxFlat_4rwlm") -SideTab/styles/normal = SubResource("StyleBoxFlat_nv0en") -SideTab/styles/pressed = SubResource("StyleBoxFlat_teihn") -SideTabBar/base_type = &"PanelContainer" -SideTabBar/styles/panel = SubResource("StyleBoxFlat_jfic3") -SmallHSeparator/base_type = &"HSeparator" -SmallHSeparator/styles/separator = SubResource("StyleBoxLine_fwd32") -SpaciousPanel/base_type = &"PanelContainer" -SpaciousPanel/styles/panel = SubResource("StyleBoxFlat_icrmg") -Swatch/base_type = &"Button" -Swatch/styles/disabled = SubResource("StyleBoxFlat_613dt") -Swatch/styles/hover = SubResource("StyleBoxFlat_tkq70") -Swatch/styles/normal = SubResource("StyleBoxFlat_rs5j0") -Swatch/styles/pressed = SubResource("StyleBoxFlat_613dt") -TabContainer/colors/font_hovered_color = Color(1, 1, 1, 0.8666667) -TabContainer/colors/font_selected_color = Color(1, 1, 1, 1) -TabContainer/colors/font_unselected_color = Color(1, 1, 1, 0.73333335) -TabContainer/constants/side_margin = 0 -TabContainer/font_sizes/font_size = 14 -TabContainer/styles/panel = SubResource("StyleBoxFlat_hg85g") -TabContainer/styles/tab_disabled = SubResource("StyleBoxEmpty_7r02y") -TabContainer/styles/tab_focus = SubResource("StyleBoxEmpty_v3qse") -TabContainer/styles/tab_hovered = SubResource("StyleBoxFlat_pllwh") -TabContainer/styles/tab_selected = SubResource("StyleBoxFlat_wcexl") -TabContainer/styles/tab_unselected = SubResource("StyleBoxFlat_vbqfd") -TabContainer/styles/tabbar_background = SubResource("StyleBoxFlat_gx7ct") -TabItem/base_type = &"PanelContainer" -TabItem/styles/panel = SubResource("StyleBoxFlat_b5gt4") -TabItemActive/base_type = &"PanelContainer" -TabItemActive/styles/panel = SubResource("StyleBoxFlat_ayhe7") -TextBox/base_type = &"PanelContainer" -TextBox/styles/panel = SubResource("StyleBoxFlat_pw2is") -TextButton/base_type = &"Button" -TextButton/colors/font_color = Color(0.5019608, 0.5019608, 0.5019608, 1) -TextButton/colors/font_hover_color = Color(0.5019608, 0.5019608, 0.5019608, 1) -TextButton/colors/font_pressed_color = Color(0.8666667, 0.93333334, 1, 0.8666667) -TextButton/styles/disabled = SubResource("StyleBoxEmpty_i6xle") -TextButton/styles/hover = SubResource("StyleBoxEmpty_i6xle") -TextButton/styles/normal = SubResource("StyleBoxEmpty_i6xle") -TextButton/styles/pressed = SubResource("StyleBoxEmpty_i6xle") -TextEdit/colors/caret_color = Color(1, 1, 1, 0) -TextEdit/colors/selection_color = Color(0.4, 0.54901963, 1, 0.4) -TextEdit/font_sizes/font_size = 12 -TextEdit/fonts/font = ExtResource("7_qhyxn") -TextEdit/styles/focus = SubResource("StyleBoxFlat_15i11") -TextEdit/styles/hover = SubResource("StyleBoxFlat_10n01") -TextEdit/styles/normal = SubResource("StyleBoxFlat_rml4s") -TooltipLabel/colors/font_color = Color(1, 1, 1, 0.8666667) -TooltipLabel/font_sizes/font_size = 14 -TooltipLabel/fonts/font = ExtResource("9_bb1pf") -TooltipPanel/styles/panel = SubResource("StyleBoxFlat_spvik") -TranslucentButton/base_type = &"Button" -TranslucentButton/styles/disabled = SubResource("StyleBoxFlat_008le") -TranslucentButton/styles/hover = SubResource("StyleBoxFlat_prvrx") -TranslucentButton/styles/normal = SubResource("StyleBoxFlat_pemd2") -TranslucentButton/styles/pressed = SubResource("StyleBoxFlat_q0bjc") -VScrollBar/styles/grabber = SubResource("StyleBoxFlat_f7uns") -VScrollBar/styles/grabber_highlight = SubResource("StyleBoxFlat_q0y62") -VScrollBar/styles/grabber_pressed = SubResource("StyleBoxFlat_7hwcg") -VScrollBar/styles/scroll = SubResource("StyleBoxFlat_t6bh3") -Window/styles/embedded_border = SubResource("StyleBoxFlat_daqi4") diff --git a/src/autoload/Configs.gd b/src/autoload/Configs.gd index 48f8d9b..086a2f5 100644 --- a/src/autoload/Configs.gd +++ b/src/autoload/Configs.gd @@ -86,7 +86,7 @@ func reset_settings() -> void: savedata = SaveData.new() savedata.reset_to_default() savedata.language = "en" - savedata.set_shortcut_panel_slots({ 0: "ui_undo", 1: "ui_redo", 2: "duplicate", 3: "save" }) + savedata.set_shortcut_panel_slots({ 0: "ui_undo", 1: "ui_redo", 2: "duplicate", 3: "delete"}) savedata.set_palettes([Palette.new("Pure", Palette.Preset.PURE)]) save() post_load() diff --git a/src/config_classes/SaveData.gd b/src/config_classes/SaveData.gd index f3d3e15..db66f2e 100644 --- a/src/config_classes/SaveData.gd +++ b/src/config_classes/SaveData.gd @@ -14,12 +14,12 @@ func get_setting_default(setting: String) -> Variant: match setting: "base_color": match theme_preset: - ThemePreset.DARK: return Color("10101d") + ThemePreset.DARK: return Color("121212") ThemePreset.LIGHT: return Color("e6e6ff") ThemePreset.BLACK: return Color("000") "accent_color": match theme_preset: - ThemePreset.DARK: return Color("668cff") + ThemePreset.DARK: return Color("3e8cfc") ThemePreset.LIGHT: return Color("0830a6ff") ThemePreset.BLACK: return Color("7c8dbf") "highlighter_preset": @@ -231,14 +231,14 @@ const CURRENT_VERSION = 1 theme_preset = new_value emit_changed() -@export var base_color := Color("10101d"): +@export var base_color := Color("121212"): set(new_value): if base_color != new_value: base_color = new_value emit_changed() external_call(Configs.sync_theme) -@export var accent_color := Color("668cff"): +@export var accent_color := Color("3e8cfc"): set(new_value): if accent_color != new_value: accent_color = new_value diff --git a/src/ui_parts/code_editor.gd b/src/ui_parts/code_editor.gd index de2634d..e5e9ca2 100644 --- a/src/ui_parts/code_editor.gd +++ b/src/ui_parts/code_editor.gd @@ -42,7 +42,6 @@ func update_theme() -> void: var stylebox := get_theme_stylebox(theme_type, "TextEdit").duplicate() stylebox.corner_radius_top_right = 0 stylebox.corner_radius_top_left = 0 - stylebox.border_width_top = 2 stylebox.bg_color = ThemeUtils.line_edit_inner_color.lerp(ThemeUtils.extreme_theme_color, 0.1) if error_bar.visible: stylebox.corner_radius_bottom_right = 0 diff --git a/src/ui_parts/code_editor.tscn b/src/ui_parts/code_editor.tscn index b15cc1f..5b9b351 100644 --- a/src/ui_parts/code_editor.tscn +++ b/src/ui_parts/code_editor.tscn @@ -33,7 +33,6 @@ icon = ExtResource("4_sos04") icon_alignment = 1 [node name="ScriptEditor" type="VBoxContainer" parent="."] -custom_minimum_size = Vector2(0, 150) layout_mode = 2 size_flags_vertical = 3 theme_override_constants/separation = -2 diff --git a/src/ui_parts/current_file_button.gd b/src/ui_parts/current_file_button.gd index 59362ee..b1c97df 100644 --- a/src/ui_parts/current_file_button.gd +++ b/src/ui_parts/current_file_button.gd @@ -6,19 +6,6 @@ func _ready() -> void: pressed.connect(_on_file_button_pressed) update_file_button() -func _make_custom_tooltip(_for_text: String) -> Object: - var file_path := Configs.savedata.get_active_tab().get_presented_svg_file_path() - if file_path.is_empty(): - return null - - var label := Label.new() - label.add_theme_font_override("font", ThemeUtils.mono_font) - label.add_theme_font_size_override("font_size", 12) - label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART - label.text = file_path - Utils.set_max_text_width(label, 192.0, 4.0) - return label - func _on_file_button_pressed() -> void: var btn_array: Array[Button] = [] btn_array.append(ContextPopup.create_shortcut_button("save")) diff --git a/src/ui_parts/display.gd b/src/ui_parts/display.gd index be270e8..74ac961 100644 --- a/src/ui_parts/display.gd +++ b/src/ui_parts/display.gd @@ -5,7 +5,6 @@ const NumberEdit = preload("res://src/ui_widgets/number_edit.gd") @onready var viewport: SubViewport = %Viewport @onready var reference_texture: TextureRect = %Viewport/ReferenceTexture @onready var reference_button: Button = %LeftMenu/Reference -@onready var visuals_button: Button = %LeftMenu/Visuals @onready var snapper: NumberEdit = %LeftMenu/Snapping/SnapNumberEdit @onready var snap_button: BetterButton = %LeftMenu/Snapping/SnapButton @onready var viewport_panel: PanelContainer = $ViewportPanel @@ -39,22 +38,11 @@ func _ready() -> void: get_window().window_input.connect(_update_input_debug) func update_translations() -> void: - %LeftMenu/Visuals.tooltip_text = Translator.translate("Visuals") %LeftMenu/Snapping/SnapNumberEdit.tooltip_text = Translator.translate("Snap size") func update_theme() -> void: - var toolbar_stylebox := StyleBoxFlat.new() - toolbar_stylebox.bg_color = ThemeUtils.soft_base_color - toolbar_stylebox.set_content_margin_all(4) - toolbar.add_theme_stylebox_override("panel", toolbar_stylebox) - var frame := StyleBoxFlat.new() frame.draw_center = false - if Configs.current_orientation == Configs.orientation.PORTRAIT: - frame.border_width_top = 2 - else: - frame.border_width_left = 2 - frame.border_color = ThemeUtils.selected_tab_color.lerp(ThemeUtils.max_contrast_color, 0.16) frame.set_content_margin_all(2.0) viewport_panel.add_theme_stylebox_override("panel", frame) @@ -84,18 +72,6 @@ func _on_reference_pressed() -> void: func paste_reference_image() -> void: FileUtils.load_reference_from_image(DisplayServer.clipboard_get_image()) -func _on_visuals_button_pressed() -> void: - var btn_arr: Array[Button] = [ - ContextPopup.create_shortcut_checkbox("view_show_grid", State.show_grid), - ContextPopup.create_shortcut_checkbox("view_show_handles", State.show_handles), - ContextPopup.create_shortcut_checkbox("view_rasterized_svg", State.view_rasterized) - ] - - var visuals_popup := ContextPopup.new() - visuals_popup.setup(btn_arr, true) - HandlerGUI.popup_under_rect_center(visuals_popup, visuals_button.get_global_rect(), - get_viewport()) - func _on_show_reference_updated() -> void: reference_texture.visible = State.show_reference diff --git a/src/ui_parts/display.tscn b/src/ui_parts/display.tscn index e39ebc5..0cb3ce1 100644 --- a/src/ui_parts/display.tscn +++ b/src/ui_parts/display.tscn @@ -1,35 +1,34 @@ -[gd_scene load_steps=17 format=3 uid="uid://bvrncl7e6yn5b"] +[gd_scene load_steps=18 format=3 uid="uid://bvrncl7e6yn5b"] [ext_resource type="Script" uid="uid://bxmb134e3sqpr" path="res://src/ui_parts/display.gd" id="1_oib5g"] [ext_resource type="Texture2D" uid="uid://iglrqrqyg4kn" path="res://assets/icons/Reference.svg" id="4_2hiq7"] -[ext_resource type="Texture2D" uid="uid://kkxyv1gyrjgj" path="res://assets/icons/Visuals.svg" id="4_n3qjt"] [ext_resource type="Texture2D" uid="uid://buire51l0mifg" path="res://assets/icons/Snap.svg" id="5_1k2cq"] [ext_resource type="Script" uid="uid://ynx3s1jc6bwq" path="res://src/ui_widgets/BetterButton.gd" id="6_3v3ve"] [ext_resource type="PackedScene" uid="uid://dad7fkhmsooc6" path="res://src/ui_widgets/number_edit.tscn" id="7_wrrfr"] +[ext_resource type="Texture2D" uid="uid://dgoy38n5me7r0" path="res://assets/icons/Grid.svg" id="8_rll1m"] [ext_resource type="PackedScene" uid="uid://oltvrf01xrxl" path="res://src/ui_widgets/zoom_menu.tscn" id="8_xtdmn"] [ext_resource type="Script" uid="uid://b6pmlbnl76wmm" path="res://src/ui_parts/viewport.gd" id="9_4xrk7"] +[ext_resource type="Texture2D" uid="uid://b7r171i82g3xl" path="res://assets/icons/Translate.svg" id="10_rll1m"] [ext_resource type="Shader" uid="uid://i2y5pyhcgra2" path="res://src/shaders/zoom_shader.gdshader" id="10_x7ybk"] [ext_resource type="Texture2D" uid="uid://c68og6bsqt0lb" path="res://assets/icons/backgrounds/Checkerboard.svg" id="11_1bm1s"] [ext_resource type="Script" uid="uid://dtplje5mhdmrj" path="res://src/ui_parts/display_texture.gd" id="12_qi23s"] [ext_resource type="Script" uid="uid://csqewpxr21ywy" path="res://src/ui_parts/handles_manager.gd" id="13_lwhwy"] [ext_resource type="Texture2D" uid="uid://8x628rb2bnep" path="res://assets/icons/TabSwitcher.svg" id="14_ryr8t"] [ext_resource type="Script" uid="uid://cm5033meho5vr" path="res://src/ui_widgets/camera.gd" id="15_hevpa"] +[ext_resource type="Texture2D" uid="uid://d04w7h3k83w8u" path="res://assets/icons/element/svg.svg" id="15_kq8gf"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_kqplg"] shader = ExtResource("10_x7ybk") shader_parameter/uv_scale = 1.0 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eujxa"] -bg_color = Color(0.866667, 0.933333, 1, 0.133333) -corner_radius_top_left = 5 -corner_radius_bottom_left = 5 - [node name="Display" type="VBoxContainer"] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 theme_override_constants/separation = 0 script = ExtResource("1_oib5g") @@ -39,7 +38,6 @@ size_flags_vertical = 3 [node name="VBoxContainer" type="VBoxContainer" parent="ViewportPanel"] layout_mode = 2 -theme_override_constants/separation = 0 [node name="ViewportContainer" type="SubViewportContainer" parent="ViewportPanel/VBoxContainer"] layout_mode = 2 @@ -51,7 +49,7 @@ unique_name_in_owner = true disable_3d = true handle_input_locally = false gui_snap_controls_to_pixels = false -size = Vector2i(480, 823) +size = Vector2i(480, 819) size_2d_override_stretch = true render_target_update_mode = 4 script = ExtResource("9_4xrk7") @@ -107,14 +105,30 @@ custom_minimum_size = Vector2(132, 0) layout_mode = 2 theme_override_constants/separation = 5 -[node name="Visuals" type="Button" parent="ViewportPanel/VBoxContainer/Toolbar/ViewportOptions/LeftMenu"] +[node name="show_grid" type="Button" parent="ViewportPanel/VBoxContainer/Toolbar/ViewportOptions/LeftMenu"] layout_mode = 2 -size_flags_horizontal = 2 -focus_mode = 0 -mouse_default_cursor_shape = 2 theme_type_variation = &"IconButton" -icon = ExtResource("4_n3qjt") -icon_alignment = 1 +icon = ExtResource("8_rll1m") +script = ExtResource("6_3v3ve") +action = "view_show_grid" +metadata/_custom_type_script = "uid://ynx3s1jc6bwq" + +[node name="show_handle" type="Button" parent="ViewportPanel/VBoxContainer/Toolbar/ViewportOptions/LeftMenu"] +layout_mode = 2 +theme_type_variation = &"IconButton" +icon = ExtResource("10_rll1m") +script = ExtResource("6_3v3ve") +action = "view_show_handles" +metadata/_custom_type_script = "uid://ynx3s1jc6bwq" + +[node name="rasterized svg" type="Button" parent="ViewportPanel/VBoxContainer/Toolbar/ViewportOptions/LeftMenu"] +visible = false +layout_mode = 2 +theme_type_variation = &"IconButton" +icon = ExtResource("15_kq8gf") +script = ExtResource("6_3v3ve") +action = "view_rasterized_svg" +metadata/_custom_type_script = "uid://ynx3s1jc6bwq" [node name="Reference" type="Button" parent="ViewportPanel/VBoxContainer/Toolbar/ViewportOptions/LeftMenu"] layout_mode = 2 @@ -137,7 +151,6 @@ theme_type_variation = &"RightConnectedButton" toggle_mode = true icon = ExtResource("5_1k2cq") script = ExtResource("6_3v3ve") -hover_pressed_stylebox = SubResource("StyleBoxFlat_eujxa") action = "toggle_snap" [node name="SnapNumberEdit" parent="ViewportPanel/VBoxContainer/Toolbar/ViewportOptions/LeftMenu/Snapping" instance=ExtResource("7_wrrfr")] @@ -204,7 +217,6 @@ theme_override_font_sizes/font_size = 14 horizontal_alignment = 2 [connection signal="size_changed" from="ViewportPanel/VBoxContainer/ViewportContainer/Viewport" to="ViewportPanel/VBoxContainer/ViewportContainer/Viewport" method="_on_size_changed"] -[connection signal="pressed" from="ViewportPanel/VBoxContainer/Toolbar/ViewportOptions/LeftMenu/Visuals" to="." method="_on_visuals_button_pressed"] [connection signal="pressed" from="ViewportPanel/VBoxContainer/Toolbar/ViewportOptions/LeftMenu/Reference" to="." method="_on_reference_pressed"] [connection signal="toggled" from="ViewportPanel/VBoxContainer/Toolbar/ViewportOptions/LeftMenu/Snapping/SnapButton" to="." method="_on_snap_button_toggled"] [connection signal="value_changed" from="ViewportPanel/VBoxContainer/Toolbar/ViewportOptions/LeftMenu/Snapping/SnapNumberEdit" to="." method="_on_snap_number_edit_value_changed"] diff --git a/src/ui_parts/editor_scene.gd b/src/ui_parts/editor_scene.gd index 77c92a0..dcf386c 100644 --- a/src/ui_parts/editor_scene.gd +++ b/src/ui_parts/editor_scene.gd @@ -1,44 +1,50 @@ -extends VBoxContainer +extends PanelContainer -const GlobalActionsScene = preload("res://src/ui_parts/global_actions.tscn") +const TopAppBar = preload("res://src/ui_parts/top_app_bar.tscn") const CodeEditorScene = preload("res://src/ui_parts/code_editor.tscn") const InspectorScene = preload("res://src/ui_parts/inspector.tscn") const ViewportScene = preload("res://src/ui_parts/display.tscn") -@onready var panel_container: PanelContainer = $PanelContainer +var main_container: BoxContainer var main_splitter: SplitContainer func _ready() -> void: - Configs.theme_changed.connect(update_theme) Configs.layout_changed.connect(update_layout) Configs.orientation_changed.connect(update_orientation) update_layout() - update_theme() var version = JavaClassWrapper.wrap("android.os.Build$VERSION") if version: Configs.current_sdk = version.SDK_INT func update_orientation(): if Configs.current_orientation == Configs.orientation.PORTRAIT: + main_container.vertical = true main_splitter.vertical = true else: + main_container.vertical = false main_splitter.vertical = false -func update_theme() -> void: - var stylebox := StyleBoxFlat.new() - stylebox.bg_color = ThemeUtils.overlay_panel_inner_color - stylebox.set_content_margin_all(6) - panel_container.add_theme_stylebox_override("panel", stylebox) - - func update_layout() -> void: - for child in panel_container.get_children(): + for child in get_children(): child.queue_free() var side_panel_top := Configs.savedata.get_layout_parts(SaveData.LayoutLocation.SIDE_PANEL_TOP) var side_panel_bottom := Configs.savedata.get_layout_parts(SaveData.LayoutLocation.SIDE_PANEL_BOTTOM) + var root_container = VBoxContainer.new() + add_child(root_container) + + # Setup the top bar. + root_container.add_child(TopAppBar.instantiate()) + + # Create main container, it would contain side panel, viewport, and shortcut panel. + main_container = BoxContainer.new() + main_container.vertical = true + main_container.size_flags_horizontal = Control.SIZE_EXPAND_FILL + main_container.size_flags_vertical = Control.SIZE_EXPAND_FILL + root_container.add_child(main_container) + # Set up the main splitter. main_splitter = SplitContainer.new() main_splitter.vertical = true @@ -46,7 +52,9 @@ func update_layout() -> void: main_splitter.touch_dragger_enabled = true main_splitter.split_offset = Configs.savedata.main_splitter_offset main_splitter.dragged.connect(_on_main_splitter_dragged) - panel_container.add_child(main_splitter) + main_splitter.size_flags_horizontal = Control.SIZE_EXPAND_FILL + main_splitter.size_flags_vertical = Control.SIZE_EXPAND_FILL + main_container.add_child(main_splitter) var side_panel_margin_container := MarginContainer.new() side_panel_margin_container.begin_bulk_theme_override() @@ -66,9 +74,6 @@ func update_layout() -> void: side_panel_vbox.add_theme_constant_override("separation", 6) side_panel_margin_container.add_child(side_panel_vbox) - var global_actions := GlobalActionsScene.instantiate() - side_panel_vbox.add_child(global_actions) - if not side_panel_top.is_empty() and not side_panel_bottom.is_empty(): # Layout parts both on top and on the bottom. var side_panel_split_container := VSplitContainer.new() diff --git a/src/ui_parts/editor_scene.tscn b/src/ui_parts/editor_scene.tscn index dcfd40a..b9a69b6 100644 --- a/src/ui_parts/editor_scene.tscn +++ b/src/ui_parts/editor_scene.tscn @@ -2,15 +2,12 @@ [ext_resource type="Script" uid="uid://dunoppeuubgd1" path="res://src/ui_parts/editor_scene.gd" id="1_o7lif"] -[node name="MainScene" type="VBoxContainer"] +[node name="EditorScene" type="PanelContainer"] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_constants/separation = 0 -script = ExtResource("1_o7lif") - -[node name="PanelContainer" type="PanelContainer" parent="."] -layout_mode = 2 size_flags_vertical = 3 +theme_type_variation = &"SubtleFlatPanel" +script = ExtResource("1_o7lif") diff --git a/src/ui_parts/inspector.gd b/src/ui_parts/inspector.gd index f856b7f..85e6e54 100644 --- a/src/ui_parts/inspector.gd +++ b/src/ui_parts/inspector.gd @@ -14,7 +14,6 @@ func _ready() -> void: full_rebuild() add_button.pressed.connect(_on_add_button_pressed) - func update_theme() -> void: color = Color.TRANSPARENT border_color = ThemeUtils.subtle_panel_border_color diff --git a/src/ui_parts/shortcut_panel.gd b/src/ui_parts/shortcut_panel.gd index fecd77c..ffb0ef3 100644 --- a/src/ui_parts/shortcut_panel.gd +++ b/src/ui_parts/shortcut_panel.gd @@ -22,12 +22,6 @@ var drag_texture_rect: TextureRect # on the window when it resizes. var position_window_relative: Vector2 -func update_theme() -> void: - var stylebox := get_theme_stylebox("panel", "SubtleFlatPanel").duplicate() - stylebox.set_content_margin_all(0) - add_theme_stylebox_override("panel", stylebox) - drag_texture_rect.modulate = ThemeUtils.tinted_contrast_color - func set_position_absolute(new_position: Vector2) -> void: var usable_area_size := get_usable_area_size() position = new_position.clamp(Vector2.ZERO, usable_area_size) @@ -41,8 +35,6 @@ func set_position_relative(new_position: Vector2) -> void: func _ready() -> void: Configs.shortcut_panel_changed.connect(update_layout) update_layout() - Configs.theme_changed.connect(update_theme) - update_theme() # Positioning callbacks and logic. get_window().size_changed.connect(sync_relative_position) resized.connect(sync_relative_position) diff --git a/src/ui_parts/global_actions.gd b/src/ui_parts/top_app_bar.gd similarity index 97% rename from src/ui_parts/global_actions.gd rename to src/ui_parts/top_app_bar.gd index f4d861c..6f1b732 100644 --- a/src/ui_parts/global_actions.gd +++ b/src/ui_parts/top_app_bar.gd @@ -4,8 +4,8 @@ const LayoutPopup = preload("res://src/ui_parts/layout_popup.gd") const LayoutPopupScene = preload("res://src/ui_parts/layout_popup.tscn") -@onready var more_options: Button = $LeftSide/MoreOptions -@onready var size_button: Button = $RightSide/SizeButton +@onready var more_options: Button = $RightSide/MoreOptions +@onready var size_button: Button = $SizeButton @onready var layout_button: Button = $LeftSide/LayoutButton func update_translation() -> void: diff --git a/src/ui_parts/global_actions.gd.uid b/src/ui_parts/top_app_bar.gd.uid similarity index 100% rename from src/ui_parts/global_actions.gd.uid rename to src/ui_parts/top_app_bar.gd.uid diff --git a/src/ui_parts/global_actions.tscn b/src/ui_parts/top_app_bar.tscn similarity index 53% rename from src/ui_parts/global_actions.tscn rename to src/ui_parts/top_app_bar.tscn index 85e5554..965f620 100644 --- a/src/ui_parts/global_actions.tscn +++ b/src/ui_parts/top_app_bar.tscn @@ -1,31 +1,34 @@ -[gd_scene load_steps=10 format=3 uid="uid://cxmrx6t4jkhyj"] +[gd_scene load_steps=11 format=3 uid="uid://cxmrx6t4jkhyj"] -[ext_resource type="Script" uid="uid://cgbgw4ok5jxk5" path="res://src/ui_parts/global_actions.gd" id="1_x4rqo"] -[ext_resource type="Texture2D" uid="uid://ccbta5q43jobk" path="res://assets/icons/More.svg" id="2_71075"] -[ext_resource type="Texture2D" uid="uid://6ymbl3jqersp" path="res://assets/icons/Import.svg" id="2_giwu1"] -[ext_resource type="Texture2D" uid="uid://d0uvwj0t44n6v" path="res://assets/icons/Export.svg" id="3_4ckhj"] -[ext_resource type="Texture2D" uid="uid://ckkkgof1hcbld" path="res://assets/icons/Gear.svg" id="3_xl5uh"] -[ext_resource type="Script" uid="uid://ynx3s1jc6bwq" path="res://src/ui_widgets/BetterButton.gd" id="4_f81d5"] -[ext_resource type="FontFile" uid="uid://dc0w4sx0h0fui" path="res://assets/fonts/FontBold.ttf" id="4_xl5uh"] -[ext_resource type="Script" uid="uid://41g64ussxcbn" path="res://src/ui_parts/current_file_button.gd" id="5_14xct"] -[ext_resource type="Texture2D" uid="uid://b6mqp088ef65" path="res://assets/icons/Layouts.svg" id="5_tx4gi"] +[ext_resource type="Script" uid="uid://cgbgw4ok5jxk5" path="res://src/ui_parts/top_app_bar.gd" id="1_jmrmv"] +[ext_resource type="Texture2D" uid="uid://ccbta5q43jobk" path="res://assets/icons/More.svg" id="2_tyac5"] +[ext_resource type="Texture2D" uid="uid://ckkkgof1hcbld" path="res://assets/icons/Gear.svg" id="3_mw1j6"] +[ext_resource type="Script" uid="uid://ynx3s1jc6bwq" path="res://src/ui_widgets/BetterButton.gd" id="4_1c622"] +[ext_resource type="Texture2D" uid="uid://b6mqp088ef65" path="res://assets/icons/Layouts.svg" id="5_wucs8"] +[ext_resource type="FontFile" uid="uid://dc0w4sx0h0fui" path="res://assets/fonts/FontBold.ttf" id="6_8jjfh"] +[ext_resource type="Script" uid="uid://41g64ussxcbn" path="res://src/ui_parts/current_file_button.gd" id="7_irbyw"] +[ext_resource type="Texture2D" uid="uid://6ymbl3jqersp" path="res://assets/icons/Import.svg" id="8_qg4on"] +[ext_resource type="Texture2D" uid="uid://rxfu7kcmo7c1" path="res://assets/icons/Save.svg" id="9_mw1j6"] +[ext_resource type="Texture2D" uid="uid://d0uvwj0t44n6v" path="res://assets/icons/Export.svg" id="9_yt30r"] -[node name="GlobalActions" type="HBoxContainer"] -offset_right = 52.0 +[node name="TopAppBar" type="HBoxContainer"] +anchors_preset = 10 +anchor_right = 1.0 offset_bottom = 24.0 -script = ExtResource("1_x4rqo") +grow_horizontal = 2 +script = ExtResource("1_jmrmv") [node name="LeftSide" type="HBoxContainer" parent="."] layout_mode = 2 -size_flags_horizontal = 2 -[node name="MoreOptions" type="Button" parent="LeftSide"] +[node name="LayoutButton" type="Button" parent="LeftSide"] +visible = false layout_mode = 2 size_flags_horizontal = 2 focus_mode = 0 mouse_default_cursor_shape = 2 -theme_type_variation = &"IconButton" -icon = ExtResource("2_71075") +theme_type_variation = &"ContextButton" +icon = ExtResource("5_wucs8") [node name="SettingsButton" type="Button" parent="LeftSide"] layout_mode = 2 @@ -33,45 +36,48 @@ size_flags_horizontal = 2 focus_mode = 0 mouse_default_cursor_shape = 2 theme_type_variation = &"IconButton" -icon = ExtResource("3_xl5uh") -script = ExtResource("4_f81d5") +icon = ExtResource("3_mw1j6") +script = ExtResource("4_1c622") action = "open_settings" metadata/_custom_type_script = "uid://ynx3s1jc6bwq" -[node name="LayoutButton" type="Button" parent="LeftSide"] +[node name="SizeButton" type="Button" parent="."] layout_mode = 2 -size_flags_horizontal = 2 focus_mode = 0 mouse_default_cursor_shape = 2 -theme_type_variation = &"IconButton" -icon = ExtResource("5_tx4gi") +theme_type_variation = &"ContextButton" +theme_override_fonts/font = ExtResource("6_8jjfh") -[node name="RightSide" type="HBoxContainer" parent="."] -layout_mode = 2 - -[node name="SizeButton" type="Button" parent="RightSide"] +[node name="CurrentFileButton" type="Button" parent="."] layout_mode = 2 +size_flags_horizontal = 3 focus_mode = 0 mouse_default_cursor_shape = 2 -theme_type_variation = &"TranslucentButton" -theme_override_fonts/font = ExtResource("4_xl5uh") +theme_type_variation = &"FlatButton" +text_overrun_behavior = 3 +script = ExtResource("7_irbyw") + +[node name="RightSide" type="HBoxContainer" parent="."] +layout_mode = 2 -[node name="CurrentFileButton" type="Button" parent="RightSide"] +[node name="SaveButton" type="Button" parent="RightSide"] layout_mode = 2 size_flags_horizontal = 2 focus_mode = 0 mouse_default_cursor_shape = 2 -theme_type_variation = &"FlatButton" -text_overrun_behavior = 3 -script = ExtResource("5_14xct") +theme_type_variation = &"IconButton" +icon = ExtResource("9_mw1j6") +script = ExtResource("4_1c622") +action = "save" +metadata/_custom_type_script = "uid://ynx3s1jc6bwq" [node name="ImportButton" type="Button" parent="RightSide"] layout_mode = 2 focus_mode = 0 mouse_default_cursor_shape = 2 -theme_type_variation = &"IconButton" -icon = ExtResource("2_giwu1") -script = ExtResource("4_f81d5") +theme_type_variation = &"ContextButton" +icon = ExtResource("8_qg4on") +script = ExtResource("4_1c622") action = "import" metadata/_custom_type_script = "uid://ynx3s1jc6bwq" @@ -79,8 +85,16 @@ metadata/_custom_type_script = "uid://ynx3s1jc6bwq" layout_mode = 2 focus_mode = 0 mouse_default_cursor_shape = 2 -theme_type_variation = &"IconButton" -icon = ExtResource("3_4ckhj") -script = ExtResource("4_f81d5") +theme_type_variation = &"ContextButton" +icon = ExtResource("9_yt30r") +script = ExtResource("4_1c622") action = "export" metadata/_custom_type_script = "uid://ynx3s1jc6bwq" + +[node name="MoreOptions" type="Button" parent="RightSide"] +layout_mode = 2 +size_flags_horizontal = 2 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_type_variation = &"IconButton" +icon = ExtResource("2_tyac5") diff --git a/src/ui_widgets/BetterButton.gd b/src/ui_widgets/BetterButton.gd index 83dd696..d3d6348 100644 --- a/src/ui_widgets/BetterButton.gd +++ b/src/ui_widgets/BetterButton.gd @@ -2,7 +2,7 @@ class_name BetterButton extends Button ## A regular Button with some helpers for hover + press theming situations and shortcuts. -const HIGHLIGHT_TIME = 0.2 +const HIGHLIGHT_TIME = 0.1 var just_pressed := false var timer: SceneTreeTimer @@ -16,35 +16,6 @@ func _ready() -> void: pressed.connect(_on_pressed) -func _make_custom_tooltip(_for_text: String) -> Object: - if action.is_empty(): - return null - - var action_showcase_text := ShortcutUtils.get_action_showcase_text(action) - - var main_label := Label.new() - main_label.add_theme_font_size_override("font_size", - get_theme_font_size("font_size", "TooltipLabel")) - main_label.add_theme_color_override("font_color", - get_theme_color("font_color", "TooltipLabel")) - main_label.text = TranslationUtils.get_action_description(action, true) - - if action_showcase_text.is_empty(): - return main_label - - var shortcut_label := Label.new() - shortcut_label.add_theme_font_size_override("font_size", - get_theme_font_size("font_size", "TooltipLabel")) - shortcut_label.add_theme_color_override("font_color", - ThemeUtils.subtle_text_color) - shortcut_label.text = "(%s)" % action_showcase_text - - var hbox := HBoxContainer.new() - hbox.add_theme_constant_override("separation", 10) - hbox.add_child(main_label) - hbox.add_child(shortcut_label) - return hbox - func _on_pressed() -> void: just_pressed = true set_deferred("just_pressed", false) diff --git a/src/ui_widgets/ContextPopup.gd b/src/ui_widgets/ContextPopup.gd index 57e1e01..4748a1a 100644 --- a/src/ui_widgets/ContextPopup.gd +++ b/src/ui_widgets/ContextPopup.gd @@ -5,6 +5,7 @@ const arrow = preload("res://assets/icons/PopupArrow.svg") func _init() -> void: mouse_filter = Control.MOUSE_FILTER_STOP + theme_type_variation = "OutlinedPanel" static func create_shortcut_button(action: String, disabled := false, @@ -26,7 +27,6 @@ custom_text := "", custom_icon: Texture2D = null) -> Button: shortcut_obj.events = shortcut_events btn.shortcut = shortcut_obj btn.shortcut_feedback = false - return btn static func create_shortcut_button_without_icon(action: String, disabled := false, diff --git a/src/ui_widgets/pathdata_field.gd b/src/ui_widgets/pathdata_field.gd index fdce2b5..0246a39 100644 --- a/src/ui_widgets/pathdata_field.gd +++ b/src/ui_widgets/pathdata_field.gd @@ -253,7 +253,7 @@ func _commands_draw() -> void: var cmd_char := cmd.command_char # Draw the action button. more_icon.draw_rect(ci, Rect2(Vector2(commands_container.size.x - 19, 4 + v_offset), - Vector2(14, 14)), false, ThemeUtils.context_icon_normal_color) + Vector2(14, 14)), false, ThemeUtils.icon_normal_color) # Draw the relative/absolute button. var relative_stylebox := get_theme_stylebox("normal", "PathCommandAbsoluteButton") if\ Utils.is_string_upper(cmd_char) else get_theme_stylebox("normal", "PathCommandRelativeButton") diff --git a/src/ui_widgets/zoom_menu.tscn b/src/ui_widgets/zoom_menu.tscn index 987b8b4..f017a34 100644 --- a/src/ui_widgets/zoom_menu.tscn +++ b/src/ui_widgets/zoom_menu.tscn @@ -14,7 +14,6 @@ script = ExtResource("1_18ab8") layout_mode = 2 focus_mode = 0 mouse_default_cursor_shape = 2 -theme_type_variation = &"IconButton" icon = ExtResource("1_8ggy2") icon_alignment = 1 @@ -29,7 +28,6 @@ text = "100%" layout_mode = 2 focus_mode = 0 mouse_default_cursor_shape = 2 -theme_type_variation = &"IconButton" icon = ExtResource("2_284x5") icon_alignment = 1 diff --git a/src/utils/ThemeUtils.gd b/src/utils/ThemeUtils.gd index 683b8ea..f95e4b9 100644 --- a/src/utils/ThemeUtils.gd +++ b/src/utils/ThemeUtils.gd @@ -8,7 +8,8 @@ static var base_color: Color static var accent_color: Color static var is_theme_dark: bool -static var max_contrast_color: Color # White on dark theme, black on light theme. +static var max_contrast_color: Color +static var min_contrast_color: Color static var extreme_theme_color: Color # Black on dark theme, white on light theme. static var tinted_contrast_color: Color # Base color used to derive icon colors and other UI elements. static var gray_color: Color # Light gray on dark theme, darker gray on light theme. @@ -67,9 +68,9 @@ static var connected_button_border_color_hover: Color static var connected_button_inner_color_pressed: Color static var connected_button_border_color_pressed: Color -static var context_icon_normal_color: Color -static var context_icon_hover_color: Color -static var context_icon_pressed_color: Color +static var icon_normal_color: Color +static var icon_hover_color: Color +static var icon_pressed_color: Color static var translucent_button_color_disabled: Color static var flat_button_color_disabled: Color @@ -96,109 +97,119 @@ static var selected_tab_border_color: Color static func color_difference(color1: Color, color2: Color) -> float: return (absf(color1.r - color2.r) + absf(color1.g - color2.g) + absf(color1.b - color2.b)) / 3.0 + static func recalculate_colors() -> void: base_color = Configs.savedata.base_color accent_color = Configs.savedata.accent_color - is_theme_dark = (base_color.get_luminance() < 0.455) - - max_contrast_color = Color("#fff") if is_theme_dark else Color("000") - extreme_theme_color = Color("#000") if is_theme_dark else Color("fff") - tinted_contrast_color = Color("#def") if is_theme_dark else Color("061728") - gray_color = Color("808080") if is_theme_dark else Color("666") - black_or_white_counter_accent_color = Color("#000") if\ - accent_color.get_luminance() > 0.69 else Color("fff") - - warning_icon_color = Color("fca") if is_theme_dark else Color("96592c") - info_icon_color = Color("acf") if is_theme_dark else Color("3a6ab0") - - intermediate_color = accent_color.lerp(extreme_theme_color, 0.6) + is_theme_dark = base_color.get_luminance() < 0.5 + + extreme_theme_color = Color.BLACK if is_theme_dark else Color.WHITE + max_contrast_color = Color(1, 1, 1, 0.94) if is_theme_dark else Color(0, 0, 0, 0.87) + min_contrast_color = Color(1, 1, 1, 0.24) if is_theme_dark else Color(0, 0, 0, 0.24) + + tinted_contrast_color = accent_color.lerp(max_contrast_color, 0.4) + gray_color = base_color.lerp(max_contrast_color, 0.5) + black_or_white_counter_accent_color = extreme_theme_color if is_theme_dark else max_contrast_color + + # Icons + warning_icon_color = Color("#FFD54F") + info_icon_color = Color("#64B5F6") + var icon_base = accent_color.lerp(max_contrast_color, 0.4) if is_theme_dark: - intermediate_color.s *= 0.8 + icon_normal_color = icon_base.lightened(0.1) + icon_hover_color = icon_base.lightened(0.2) + icon_pressed_color = icon_base.darkened(0.1) else: - intermediate_color.s = lerpf(intermediate_color.s, 1.0, minf(0.2, intermediate_color.s)) - intermediate_color.v **= 0.75 - + icon_normal_color = icon_base.darkened(0.05) + icon_hover_color = icon_base + icon_pressed_color = icon_base.darkened(0.15) + + # Intermediate/neutral variants + intermediate_color = accent_color.lerp(extreme_theme_color, 0.6) desaturated_color = intermediate_color.lerp(gray_color, 0.3).lerp(extreme_theme_color, 0.08) - if not is_theme_dark: - desaturated_color.v *= 0.9 disabled_color = intermediate_color.lerp(gray_color, 0.8) - - soft_base_color = base_color.lerp(max_contrast_color, 0.015 if is_theme_dark else 0.03) - softer_base_color = base_color.lerp(max_contrast_color, 0.04 if is_theme_dark else 0.08) + + # Base/accent soft tones + soft_base_color = base_color.lerp(max_contrast_color, 0.015) + softer_base_color = base_color.lerp(max_contrast_color, 0.04) soft_accent_color = accent_color.lerp(extreme_theme_color, 0.1) - var intense_accent_color = accent_color.lerp(max_contrast_color, 0.1) - hover_overlay_color = Color(tinted_contrast_color, 0.08) + + # Overlay layers + hover_overlay_color = Color(max_contrast_color, 0.08) pressed_overlay_color = Color(tinted_contrast_color.lerp(soft_accent_color, 0.6), 0.24) hover_pressed_overlay_color = hover_overlay_color.blend(pressed_overlay_color) - - soft_hover_overlay_color = Color(tinted_contrast_color, 0.06) + + soft_hover_overlay_color = Color(max_contrast_color, 0.06) soft_pressed_overlay_color = Color(tinted_contrast_color.lerp(soft_accent_color, 0.4), 0.18) soft_hover_pressed_overlay_color = soft_hover_overlay_color.blend(soft_pressed_overlay_color) - - strong_hover_overlay_color = Color(tinted_contrast_color, 0.12) - stronger_hover_overlay_color = Color(tinted_contrast_color, 0.16) - - intermediate_hover_color = intermediate_color.blend( - hover_overlay_color if is_theme_dark else stronger_hover_overlay_color) + + strong_hover_overlay_color = Color(max_contrast_color, 0.12) + stronger_hover_overlay_color = Color(max_contrast_color, 0.16) + + # Intermediate overlays + intermediate_hover_color = intermediate_color.blend(hover_overlay_color) soft_intermediate_color = intermediate_color.lerp(extreme_theme_color, 0.36) - soft_intermediate_hover_color = soft_intermediate_color.blend( - soft_hover_overlay_color if is_theme_dark else hover_overlay_color) - softer_intermediate_color = intermediate_color.lerp(extreme_theme_color, 0.44) - if not is_theme_dark: - softer_intermediate_color.s *= 0.8 - softer_intermediate_hover_color = softer_intermediate_color.blend( - soft_hover_overlay_color if is_theme_dark else hover_overlay_color) - + soft_intermediate_hover_color = soft_intermediate_color.blend(soft_hover_overlay_color) + softer_intermediate_color = intermediate_color.lerp(extreme_theme_color, 0.48) + softer_intermediate_hover_color = softer_intermediate_color.blend(soft_hover_overlay_color) + + # Text text_color = Color(max_contrast_color, 0.875) highlighted_text_color = Color(max_contrast_color) dim_text_color = Color(max_contrast_color, 0.75) dimmer_text_color = Color(max_contrast_color, 0.5) subtle_text_color = Color(max_contrast_color, 0.375) editable_text_color = tinted_contrast_color - - basic_panel_inner_color = base_color.lerp(max_contrast_color, 0.05) + + # Panels + basic_panel_inner_color = base_color.lerp(extreme_theme_color, 0.1).lerp(max_contrast_color, 0.04) basic_panel_border_color = desaturated_color - subtle_panel_border_color = basic_panel_border_color.lerp(basic_panel_inner_color, 0.64) - caret_color = Color(tinted_contrast_color, 0.875) - selection_color = Color(accent_color, 0.375) + subtle_panel_border_color = desaturated_color.lerp(basic_panel_inner_color, 0.64) + + overlay_panel_inner_color = base_color.lerp(extreme_theme_color, 0.15) + overlay_panel_subtler_inner_color = base_color.lerp(extreme_theme_color, 0.08) + + tab_container_panel_inner_color = base_color.lerp(extreme_theme_color, 0.12) + tab_container_panel_border_color = max_contrast_color.lerp(base_color, 0.9) + + subtle_flat_panel_color = base_color + contrast_flat_panel_color = Color(tinted_contrast_color, 0.1) + + # Selection + caret_color = accent_color.lerp(max_contrast_color, 0.3) + selection_color = Color(accent_color, 0.3) disabled_selection_color = Color(gray_color, 0.4) - + + # Buttons common_button_inner_color_pressed = intermediate_color.lerp(accent_color, 0.64).lerp(extreme_theme_color, 0.4) common_button_border_color_pressed = intermediate_color.lerp(accent_color, 0.8) common_button_inner_color_disabled = desaturated_color.lerp(gray_color, 0.4).lerp(extreme_theme_color, 0.72) common_button_border_color_disabled = desaturated_color.lerp(gray_color, 0.4).lerp(extreme_theme_color, 0.56) - - context_icon_normal_color = tinted_contrast_color.lerp(extreme_theme_color, 0.2) - context_icon_hover_color = tinted_contrast_color - context_icon_pressed_color = max_contrast_color - - translucent_button_color_disabled = Color(disabled_color, 0.2) - flat_button_color_disabled = Color(disabled_color, 0.15) - - subtle_flat_panel_color = base_color - contrast_flat_panel_color = Color(tinted_contrast_color, 0.1) - overlay_panel_inner_color = base_color.lerp(extreme_theme_color, 0.1) - overlay_panel_subtler_inner_color = base_color.lerp(extreme_theme_color, 0.075) - - scrollbar_pressed_color = intermediate_color.blend(Color(tinted_contrast_color.lerp(intense_accent_color, 0.2), 0.4)) - + + flat_button_color_disabled = base_color.lerp(max_contrast_color, 0.08) + translucent_button_color_disabled = base_color.lerp(max_contrast_color, 0.1) + + connected_button_inner_color_hover = line_edit_inner_color.blend(hover_overlay_color) + connected_button_border_color_hover = line_edit_normal_border_color.blend(strong_hover_overlay_color) + connected_button_inner_color_pressed = line_edit_inner_color.lerp(common_button_inner_color_pressed, 0.8) + connected_button_border_color_pressed = line_edit_normal_border_color.lerp(common_button_border_color_pressed, 0.6) + + # Scrollbars + scrollbar_pressed_color = accent_color.lerp(max_contrast_color, 0.4) + + # LineEdits line_edit_focus_color = Color(accent_color, 0.4) line_edit_inner_color = desaturated_color.lerp(extreme_theme_color, 0.74) line_edit_normal_border_color = desaturated_color.lerp(extreme_theme_color, 0.42) mini_line_edit_normal_border_color = desaturated_color.lerp(extreme_theme_color, 0.225) line_edit_inner_color_disabled = desaturated_color.lerp(gray_color, 0.4).lerp(extreme_theme_color, 0.88) line_edit_border_color_disabled = desaturated_color.lerp(gray_color, 0.4).lerp(extreme_theme_color, 0.68) - - connected_button_inner_color_hover = line_edit_inner_color.blend(hover_overlay_color) - connected_button_border_color_hover = line_edit_normal_border_color.blend(strong_hover_overlay_color) - connected_button_inner_color_pressed = line_edit_inner_color.lerp(common_button_inner_color_pressed, 0.8) - connected_button_border_color_pressed = line_edit_normal_border_color.lerp(common_button_border_color_pressed, 0.6) - - tab_container_panel_inner_color = base_color.lerp(intermediate_color, 0.15).lerp(extreme_theme_color, 0.02) - tab_container_panel_border_color = desaturated_color.lerp(extreme_theme_color, 0.4) + + # Tabs selected_tab_color = softer_intermediate_hover_color.lerp(accent_color, 0.2) selected_tab_border_color = accent_color + static func generate_theme() -> Theme: recalculate_colors() var theme := Theme.new() @@ -219,6 +230,7 @@ static func generate_theme() -> Theme: _setup_splitcontainer(theme) return theme + static func generate_and_apply_theme() -> void: var default_theme := ThemeDB.get_default_theme() default_theme.default_font = regular_font @@ -230,121 +242,136 @@ static func generate_and_apply_theme() -> void: static func _setup_panelcontainer(theme: Theme) -> void: theme.add_type("PanelContainer") var stylebox := StyleBoxFlat.new() - stylebox.set_corner_radius_all(4) - stylebox.set_border_width_all(2) - stylebox.content_margin_left = 2.0 - stylebox.content_margin_right = 2.0 - stylebox.bg_color = basic_panel_inner_color - stylebox.border_color = basic_panel_border_color + stylebox.set_corner_radius_all(12) + #stylebox.set_border_width_all(1) + stylebox.content_margin_left = 8.0 + stylebox.content_margin_right = 8.0 + stylebox.content_margin_top = 6.0 + stylebox.content_margin_bottom = 6.0 + stylebox.bg_color = basic_panel_inner_color # surfaceContainer + #stylebox.border_color = basic_panel_border_color # outline theme.set_stylebox("panel", "PanelContainer", stylebox) + theme.add_type("OutlinedPanel") + theme.set_type_variation("OutlinedPanel", "PanelContainer") + var outline_stylebox := StyleBoxFlat.new() + outline_stylebox.set_corner_radius_all(12) + outline_stylebox.set_border_width_all(1) + outline_stylebox.content_margin_left = 8.0 + outline_stylebox.content_margin_right = 8.0 + outline_stylebox.content_margin_top = 6.0 + outline_stylebox.content_margin_bottom = 6.0 + outline_stylebox.bg_color = basic_panel_inner_color # surfaceContainer + outline_stylebox.border_color = basic_panel_border_color # outline + theme.set_stylebox("panel", "OutlinedPanel", outline_stylebox) + theme.add_type("SpaciousPanel") theme.set_type_variation("SpaciousPanel", "PanelContainer") var spacious_stylebox := stylebox.duplicate() - spacious_stylebox.content_margin_left = 10.0 - spacious_stylebox.content_margin_right = 10.0 - spacious_stylebox.content_margin_top = 4.0 - spacious_stylebox.content_margin_bottom = 8.0 + spacious_stylebox.content_margin_left = 16.0 + spacious_stylebox.content_margin_right = 16.0 + spacious_stylebox.content_margin_top = 12.0 + spacious_stylebox.content_margin_bottom = 12.0 theme.set_stylebox("panel", "SpaciousPanel", spacious_stylebox) - + theme.add_type("Window") theme.set_stylebox("embedded_border", "Window", stylebox) - + theme.add_type("AcceptDialog") theme.set_stylebox("panel", "AcceptDialog", spacious_stylebox) - + theme.add_type("SubtleFlatPanel") theme.set_type_variation("SubtleFlatPanel", "PanelContainer") var subtle_panel_stylebox := StyleBoxFlat.new() - subtle_panel_stylebox.set_corner_radius_all(3) - subtle_panel_stylebox.content_margin_left = 4.0 - subtle_panel_stylebox.content_margin_right = 4.0 - subtle_panel_stylebox.content_margin_top = 2.0 - subtle_panel_stylebox.content_margin_bottom = 2.0 - subtle_panel_stylebox.bg_color = subtle_flat_panel_color + subtle_panel_stylebox.content_margin_left = 8.0 + subtle_panel_stylebox.content_margin_right = 8.0 + subtle_panel_stylebox.content_margin_top = 6.0 + subtle_panel_stylebox.content_margin_bottom = 6.0 + subtle_panel_stylebox.bg_color = subtle_flat_panel_color # surfaceVariant theme.set_stylebox("panel", "SubtleFlatPanel", subtle_panel_stylebox) - + theme.add_type("ContrastFlatPanel") theme.set_type_variation("ContrastFlatPanel", "PanelContainer") var contrast_panel_stylebox := StyleBoxFlat.new() - contrast_panel_stylebox.set_corner_radius_all(5) - contrast_panel_stylebox.content_margin_left = 4.0 - contrast_panel_stylebox.content_margin_right = 4.0 - contrast_panel_stylebox.content_margin_top = 2.0 - contrast_panel_stylebox.content_margin_bottom = 2.0 - contrast_panel_stylebox.bg_color = contrast_flat_panel_color + contrast_panel_stylebox.set_corner_radius_all(8) + contrast_panel_stylebox.content_margin_left = 8.0 + contrast_panel_stylebox.content_margin_right = 8.0 + contrast_panel_stylebox.content_margin_top = 6.0 + contrast_panel_stylebox.content_margin_bottom = 6.0 + contrast_panel_stylebox.bg_color = contrast_flat_panel_color # elevatedSurface theme.set_stylebox("panel", "ContrastFlatPanel", contrast_panel_stylebox) - + theme.add_type("OverlayPanel") theme.set_type_variation("OverlayPanel", "PanelContainer") var overlay_stylebox := StyleBoxFlat.new() - overlay_stylebox.set_corner_radius_all(2) - overlay_stylebox.set_border_width_all(2) - overlay_stylebox.content_margin_left = 8.0 - overlay_stylebox.content_margin_right = 10.0 - overlay_stylebox.content_margin_top = 6.0 - overlay_stylebox.content_margin_bottom = 10.0 - overlay_stylebox.bg_color = overlay_panel_inner_color + overlay_stylebox.set_corner_radius_all(12) + overlay_stylebox.set_border_width_all(1) + overlay_stylebox.content_margin_left = 12.0 + overlay_stylebox.content_margin_right = 12.0 + overlay_stylebox.content_margin_top = 10.0 + overlay_stylebox.content_margin_bottom = 12.0 + overlay_stylebox.bg_color = overlay_panel_inner_color # surfaceContainerHigh overlay_stylebox.border_color = intermediate_color theme.set_stylebox("panel", "OverlayPanel", overlay_stylebox) - + theme.add_type("TabItem") theme.set_type_variation("TabItem", "PanelContainer") var tab_stylebox := StyleBoxFlat.new() - tab_stylebox.set_corner_radius_all(12) - tab_stylebox.content_margin_left = 10.0 - tab_stylebox.content_margin_right = 10.0 - tab_stylebox.content_margin_top = 8.0 - tab_stylebox.content_margin_bottom = 8.0 - tab_stylebox.bg_color = Color("181d2f") + tab_stylebox.set_corner_radius_all(16) + tab_stylebox.content_margin_left = 12.0 + tab_stylebox.content_margin_right = 12.0 + tab_stylebox.content_margin_top = 10.0 + tab_stylebox.content_margin_bottom = 10.0 + tab_stylebox.bg_color = subtle_flat_panel_color theme.set_stylebox("panel", "TabItem", tab_stylebox) - + theme.add_type("TabItemActive") theme.set_type_variation("TabItemActive", "PanelContainer") var border_tab_stylebox := tab_stylebox.duplicate() - border_tab_stylebox.set_border_width_all(4) - border_tab_stylebox.bg_color = Color("242b45") - border_tab_stylebox.border_color = Color("2e69bf") + border_tab_stylebox.set_border_width_all(2) + border_tab_stylebox.bg_color = contrast_flat_panel_color + border_tab_stylebox.border_color = selected_tab_border_color theme.set_stylebox("panel", "TabItemActive", border_tab_stylebox) - + theme.add_type("TextBox") theme.set_type_variation("TextBox", "PanelContainer") var textbox_stylebox := StyleBoxFlat.new() - textbox_stylebox.set_corner_radius_all(2) - textbox_stylebox.set_border_width_all(2) - textbox_stylebox.content_margin_left = 6.0 - textbox_stylebox.content_margin_right = 6.0 - textbox_stylebox.content_margin_top = 2.0 - textbox_stylebox.content_margin_bottom = 4.0 + textbox_stylebox.set_corner_radius_all(8) + textbox_stylebox.set_border_width_all(1) + textbox_stylebox.content_margin_left = 10.0 + textbox_stylebox.content_margin_right = 10.0 + textbox_stylebox.content_margin_top = 8.0 + textbox_stylebox.content_margin_bottom = 8.0 textbox_stylebox.bg_color = overlay_panel_inner_color.lerp(extreme_theme_color, 0.2) textbox_stylebox.border_color = subtle_panel_border_color theme.set_stylebox("panel", "TextBox", textbox_stylebox) - + theme.add_type("SideTabBar") theme.set_type_variation("SideTabBar", "PanelContainer") var side_tabbar_stylebox := StyleBoxFlat.new() side_tabbar_stylebox.bg_color = soft_base_color side_tabbar_stylebox.set_content_margin_all(0) - side_tabbar_stylebox.corner_radius_top_left = 5 - side_tabbar_stylebox.corner_radius_bottom_left = 5 + side_tabbar_stylebox.corner_radius_top_left = 8 + side_tabbar_stylebox.corner_radius_bottom_left = 8 theme.set_stylebox("panel", "SideTabBar", side_tabbar_stylebox) - + theme.add_type("SideBarContent") theme.set_type_variation("SideBarContent", "PanelContainer") var panel_stylebox := StyleBoxFlat.new() panel_stylebox.bg_color = tab_container_panel_inner_color panel_stylebox.border_color = tab_container_panel_border_color - panel_stylebox.set_border_width_all(2) - panel_stylebox.corner_radius_top_right = 5 - panel_stylebox.corner_radius_bottom_right = 5 - panel_stylebox.content_margin_left = 14 - panel_stylebox.content_margin_right = 2 - panel_stylebox.content_margin_bottom = 2 - panel_stylebox.content_margin_top = 2 + panel_stylebox.set_border_width_all(1) + panel_stylebox.corner_radius_top_right = 8 + panel_stylebox.corner_radius_bottom_right = 8 + panel_stylebox.content_margin_left = 16 + panel_stylebox.content_margin_right = 8 + panel_stylebox.content_margin_top = 8 + panel_stylebox.content_margin_bottom = 8 theme.set_stylebox("panel", "SideBarContent", panel_stylebox) + static func _setup_button(theme: Theme) -> void: - theme.add_type("Button") + theme.add_type("Button") # FilledButton theme.set_constant("h_separation", "Button", 5) theme.set_color("font_color", "Button", text_color) theme.set_color("font_disabled_color", "Button", subtle_text_color) @@ -358,13 +385,10 @@ static func _setup_button(theme: Theme) -> void: theme.set_color("icon_hover_pressed_color", "Button", max_contrast_color) theme.set_color("icon_focus_color", "Button", max_contrast_color) theme.set_color("icon_disabled_color", "Button", gray_color) + var button_stylebox := StyleBoxFlat.new() - button_stylebox.set_corner_radius_all(5) - button_stylebox.set_border_width_all(2) - button_stylebox.content_margin_bottom = 3.0 - button_stylebox.content_margin_top = 3.0 - button_stylebox.content_margin_left = 6.0 - button_stylebox.content_margin_right = 6.0 + button_stylebox.set_corner_radius_all(20) + button_stylebox.set_content_margin_all(10) var normal_button_stylebox := button_stylebox.duplicate() normal_button_stylebox.bg_color = soft_intermediate_color @@ -393,36 +417,76 @@ static func _setup_button(theme: Theme) -> void: var focus_button_stylebox := button_stylebox.duplicate() focus_button_stylebox.draw_center = false - focus_button_stylebox.border_color = Configs.savedata.accent_color + focus_button_stylebox.border_color = accent_color theme.set_stylebox("focus", "Button", focus_button_stylebox) + theme.add_type("TonalButton") + theme.set_type_variation("TonalButton", "Button") + + var tonal_color := accent_color.lerp(soft_base_color, 0.4) + var tonal_style := StyleBoxFlat.new() + tonal_style.set_corner_radius_all(20) + tonal_style.set_content_margin_all(10) + tonal_style.bg_color = tonal_color + theme.set_stylebox("normal", "TonalButton", tonal_style) + + var hover_tonal := tonal_style.duplicate() + hover_tonal.bg_color = tonal_color.lerp(Color.WHITE, 0.1) + theme.set_stylebox("hover", "TonalButton", hover_tonal) + + var pressed_tonal := tonal_style.duplicate() + pressed_tonal.bg_color = tonal_color.lerp(Color.BLACK, 0.2) + theme.set_stylebox("pressed", "TonalButton", pressed_tonal) + + theme.set_stylebox("disabled", "TonalButton", tonal_style) + + theme.add_type("OutlinedButton") + theme.set_type_variation("OutlinedButton", "Button") + + var outlined_style := StyleBoxFlat.new() + outlined_style.set_corner_radius_all(20) + outlined_style.set_border_width_all(2) + outlined_style.border_color = accent_color + outlined_style.bg_color = Color(0, 0, 0, 0) + outlined_style.set_content_margin_all(10) + theme.set_stylebox("normal", "OutlinedButton", outlined_style) + + var hover_outlined := outlined_style.duplicate() + hover_outlined.bg_color = Color(accent_color, 0.06) + theme.set_stylebox("hover", "OutlinedButton", hover_outlined) + + var pressed_outlined := outlined_style.duplicate() + pressed_outlined.bg_color = Color(accent_color, 0.12) + theme.set_stylebox("pressed", "OutlinedButton", pressed_outlined) + + theme.set_stylebox("disabled", "OutlinedButton", outlined_style) + + theme.add_type("IconButton") theme.set_type_variation("IconButton", "Button") + theme.set_color("icon_normal_color", "IconButton", icon_normal_color) + theme.set_color("icon_hover_color", "IconButton", icon_hover_color) + theme.set_color("icon_pressed_color", "IconButton", icon_pressed_color) + theme.set_color("icon_disabled_color", "IconButton", gray_color) + var icon_button_stylebox := normal_button_stylebox.duplicate() + icon_button_stylebox.draw_center = false - var normal_icon_button_stylebox := normal_button_stylebox.duplicate() - normal_icon_button_stylebox.set_content_margin_all(4) - theme.set_stylebox("normal", "IconButton", normal_icon_button_stylebox) - - var hover_icon_button_stylebox := hover_button_stylebox.duplicate() - hover_icon_button_stylebox.set_content_margin_all(4) - theme.set_stylebox("hover", "IconButton", hover_icon_button_stylebox) + theme.set_stylebox("normal", "IconButton", icon_button_stylebox) - var pressed_icon_button_stylebox := pressed_button_stylebox.duplicate() - pressed_icon_button_stylebox.set_content_margin_all(4) - theme.set_stylebox("pressed", "IconButton", pressed_icon_button_stylebox) + theme.set_stylebox("hover", "IconButton", icon_button_stylebox) - var hover_pressed_icon_button_stylebox := hover_pressed_button_stylebox.duplicate() - hover_pressed_icon_button_stylebox.set_content_margin_all(4) - theme.set_stylebox("hover_pressed", "IconButton", hover_pressed_icon_button_stylebox) + theme.set_stylebox("pressed", "IconButton", pressed_button_stylebox) - var disabled_icon_button_stylebox := disabled_button_stylebox.duplicate() - disabled_icon_button_stylebox.set_content_margin_all(4) + var disabled_icon_button_stylebox := icon_button_stylebox.duplicate() + # Ensure enough contrast. + disabled_icon_button_stylebox.bg_color = Color(Color.BLACK, maxf(0.16, + 0.48 - color_difference(Color.BLACK, basic_panel_inner_color) * 2)) theme.set_stylebox("disabled", "IconButton", disabled_icon_button_stylebox) theme.add_type("LeftConnectedButton") theme.set_type_variation("LeftConnectedButton", "Button") - theme.set_color("icon_normal_color", "LeftConnectedButton", context_icon_normal_color) - theme.set_color("icon_hover_color", "LeftConnectedButton", context_icon_hover_color) + theme.set_color("icon_normal_color", "LeftConnectedButton", icon_normal_color) + theme.set_color("icon_hover_color", "LeftConnectedButton", icon_hover_color) var left_connected_button_stylebox := StyleBoxFlat.new() left_connected_button_stylebox.corner_radius_bottom_left = 0 left_connected_button_stylebox.corner_radius_top_left = 0 @@ -493,8 +557,8 @@ static func _setup_button(theme: Theme) -> void: theme.add_type("RightConnectedButton") theme.set_type_variation("RightConnectedButton", "Button") - theme.set_color("icon_normal_color", "RightConnectedButton", context_icon_normal_color) - theme.set_color("icon_hover_color", "RightConnectedButton", context_icon_hover_color) + theme.set_color("icon_normal_color", "RightConnectedButton", icon_normal_color) + theme.set_color("icon_hover_color", "RightConnectedButton", icon_hover_color) var right_connected_button_stylebox := StyleBoxFlat.new() right_connected_button_stylebox.corner_radius_bottom_left = 5 right_connected_button_stylebox.corner_radius_top_left = 5 @@ -565,9 +629,9 @@ static func _setup_button(theme: Theme) -> void: theme.add_type("TranslucentButton") theme.set_type_variation("TranslucentButton", "Button") - theme.set_color("icon_normal_color", "TranslucentButton", context_icon_normal_color) - theme.set_color("icon_hover_color", "TranslucentButton", context_icon_normal_color) - theme.set_color("icon_pressed_color", "TranslucentButton", context_icon_normal_color) + theme.set_color("icon_normal_color", "TranslucentButton", icon_normal_color) + theme.set_color("icon_hover_color", "TranslucentButton", icon_normal_color) + theme.set_color("icon_pressed_color", "TranslucentButton", icon_normal_color) var normal_translucent_button_stylebox := StyleBoxFlat.new() normal_translucent_button_stylebox.set_corner_radius_all(5) @@ -589,35 +653,27 @@ static func _setup_button(theme: Theme) -> void: theme.add_type("FlatButton") theme.set_type_variation("FlatButton", "Button") - theme.set_color("icon_normal_color", "FlatButton", context_icon_normal_color) - theme.set_color("icon_hover_color", "FlatButton", context_icon_hover_color) - theme.set_color("icon_pressed_color", "FlatButton", context_icon_pressed_color) - theme.set_color("icon_hover_pressed_color", "FlatButton", context_icon_pressed_color) - var flat_button_stylebox := StyleBoxFlat.new() - flat_button_stylebox.set_corner_radius_all(3) - flat_button_stylebox.set_content_margin_all(2) - - var normal_flat_button_stylebox := StyleBoxEmpty.new() - normal_flat_button_stylebox.set_content_margin_all(2) - theme.set_stylebox("normal", "FlatButton", normal_flat_button_stylebox) - - var hover_flat_button_stylebox := flat_button_stylebox.duplicate() - hover_flat_button_stylebox.bg_color = hover_overlay_color - theme.set_stylebox("hover", "FlatButton", hover_flat_button_stylebox) - - var pressed_flat_button_stylebox := flat_button_stylebox.duplicate() - pressed_flat_button_stylebox.bg_color = pressed_overlay_color - theme.set_stylebox("pressed", "FlatButton", pressed_flat_button_stylebox) - - var disabled_flat_button_stylebox := flat_button_stylebox.duplicate() + theme.set_color("icon_normal_color", "FlatButton", icon_normal_color) + theme.set_color("icon_hover_color", "FlatButton", icon_hover_color) + theme.set_color("icon_pressed_color", "FlatButton", icon_pressed_color) + theme.set_color("icon_hover_pressed_color", "FlatButton", icon_pressed_color) + + theme.set_stylebox("normal", "FlatButton", icon_button_stylebox) + + theme.set_stylebox("hover", "FlatButton", icon_button_stylebox) + + theme.set_stylebox("pressed", "FlatButton", pressed_button_stylebox) + + var disabled_flat_button_stylebox := icon_button_stylebox.duplicate() disabled_flat_button_stylebox.bg_color = flat_button_color_disabled + disabled_flat_button_stylebox.draw_center = true theme.set_stylebox("disabled", "FlatButton", disabled_flat_button_stylebox) theme.add_type("ContextButton") theme.set_type_variation("ContextButton", "Button") - theme.set_color("icon_normal_color", "ContextButton", context_icon_normal_color) - theme.set_color("icon_hover_color", "ContextButton", context_icon_hover_color) - theme.set_color("icon_pressed_color", "ContextButton", context_icon_pressed_color) + theme.set_color("icon_normal_color", "ContextButton", icon_normal_color) + theme.set_color("icon_hover_color", "ContextButton", icon_hover_color) + theme.set_color("icon_pressed_color", "ContextButton", icon_pressed_color) theme.set_color("icon_disabled_color", "ContextButton", gray_color) var context_button_stylebox := StyleBoxFlat.new() context_button_stylebox.set_corner_radius_all(3) @@ -644,7 +700,7 @@ static func _setup_button(theme: Theme) -> void: var disabled_context_button_stylebox := context_button_stylebox.duplicate() # Ensure enough contrast. disabled_context_button_stylebox.bg_color = Color(Color.BLACK, maxf(0.16, - 0.48 - color_difference(Color.BLACK, basic_panel_inner_color) * 2)) + 0.48 - color_difference(Color.BLACK, basic_panel_inner_color) * 2)) theme.set_stylebox("disabled", "ContextButton", disabled_context_button_stylebox) theme.add_type("PathCommandAbsoluteButton") @@ -657,62 +713,62 @@ static func _setup_button(theme: Theme) -> void: path_command_absolute_button_stylebox_normal.content_margin_top = 0.0 path_command_absolute_button_stylebox_normal.content_margin_bottom = 0.0 path_command_absolute_button_stylebox_normal.bg_color = Color("cc7a29") if\ - ThemeUtils.is_theme_dark else Color("f2cb91") + ThemeUtils.is_theme_dark else Color("f2cb91") path_command_absolute_button_stylebox_normal.border_color = Color("e6ae5c") if\ - ThemeUtils.is_theme_dark else Color("ffaa33") + ThemeUtils.is_theme_dark else Color("ffaa33") theme.set_stylebox("normal", "PathCommandAbsoluteButton", - path_command_absolute_button_stylebox_normal) + path_command_absolute_button_stylebox_normal) theme.set_stylebox("disabled", "PathCommandAbsoluteButton", - path_command_absolute_button_stylebox_normal) + path_command_absolute_button_stylebox_normal) var path_command_absolute_button_stylebox_hover :=\ - path_command_absolute_button_stylebox_normal.duplicate() + path_command_absolute_button_stylebox_normal.duplicate() path_command_absolute_button_stylebox_hover.bg_color = Color("d9822b") if\ - ThemeUtils.is_theme_dark else Color("f2c279") + ThemeUtils.is_theme_dark else Color("f2c279") path_command_absolute_button_stylebox_hover.border_color = Color("f2cb91") if\ - ThemeUtils.is_theme_dark else Color("f29718") + ThemeUtils.is_theme_dark else Color("f29718") theme.set_stylebox("hover", "PathCommandAbsoluteButton", - path_command_absolute_button_stylebox_hover) + path_command_absolute_button_stylebox_hover) var path_command_absolute_button_stylebox_pressed :=\ - path_command_absolute_button_stylebox_normal.duplicate() + path_command_absolute_button_stylebox_normal.duplicate() path_command_absolute_button_stylebox_pressed.bg_color = Color("ffbf40") if\ - ThemeUtils.is_theme_dark else Color("f2ae49") + ThemeUtils.is_theme_dark else Color("f2ae49") path_command_absolute_button_stylebox_pressed.border_color = Color("ffecb3") if\ - ThemeUtils.is_theme_dark else Color("e68600") + ThemeUtils.is_theme_dark else Color("e68600") theme.set_stylebox("pressed", "PathCommandAbsoluteButton", - path_command_absolute_button_stylebox_pressed) + path_command_absolute_button_stylebox_pressed) theme.add_type("PathCommandRelativeButton") theme.set_type_variation("PathCommandRelativeButton", "Button") var path_command_relative_button_stylebox_normal :=\ - path_command_absolute_button_stylebox_normal.duplicate() + path_command_absolute_button_stylebox_normal.duplicate() path_command_relative_button_stylebox_normal.bg_color = Color("a329cc") if\ - ThemeUtils.is_theme_dark else Color("d291f2") + ThemeUtils.is_theme_dark else Color("d291f2") path_command_relative_button_stylebox_normal.border_color = Color("bd73e6") if\ - ThemeUtils.is_theme_dark else Color("bb33ff") + ThemeUtils.is_theme_dark else Color("bb33ff") theme.set_stylebox("normal", "PathCommandRelativeButton", - path_command_relative_button_stylebox_normal) + path_command_relative_button_stylebox_normal) theme.set_stylebox("disabled", "PathCommandRelativeButton", - path_command_relative_button_stylebox_normal) + path_command_relative_button_stylebox_normal) var path_command_relative_button_stylebox_hover :=\ - path_command_absolute_button_stylebox_normal.duplicate() + path_command_absolute_button_stylebox_normal.duplicate() path_command_relative_button_stylebox_hover.bg_color = Color("ad2bd9") if\ - ThemeUtils.is_theme_dark else Color("ca79f2") + ThemeUtils.is_theme_dark else Color("ca79f2") path_command_relative_button_stylebox_hover.border_color = Color("d291f2") if\ - ThemeUtils.is_theme_dark else Color("aa18f2") + ThemeUtils.is_theme_dark else Color("aa18f2") theme.set_stylebox("hover", "PathCommandRelativeButton", - path_command_relative_button_stylebox_hover) + path_command_relative_button_stylebox_hover) var path_command_relative_button_stylebox_pressed :=\ - path_command_absolute_button_stylebox_normal.duplicate() + path_command_absolute_button_stylebox_normal.duplicate() path_command_relative_button_stylebox_pressed.bg_color = Color("bf40ff") if\ - ThemeUtils.is_theme_dark else Color("ba49f2") + ThemeUtils.is_theme_dark else Color("ba49f2") path_command_relative_button_stylebox_pressed.border_color = Color("dfb3ff") if\ - ThemeUtils.is_theme_dark else Color("9900e6") + ThemeUtils.is_theme_dark else Color("9900e6") theme.set_stylebox("pressed", "PathCommandRelativeButton", - path_command_relative_button_stylebox_pressed) + path_command_relative_button_stylebox_pressed) theme.add_type("TextButton") theme.set_type_variation("TextButton", "Button") @@ -775,6 +831,7 @@ static func _setup_button(theme: Theme) -> void: theme.set_stylebox("pressed", "Swatch", pressed_swatch_stylebox) theme.set_stylebox("disabled", "Swatch", pressed_swatch_stylebox) + static func _setup_checkbox(theme: Theme) -> void: theme.add_type("CheckBox") theme.set_constant("h_separation", "CheckBox", 5) @@ -838,6 +895,7 @@ static func _setup_checkbox(theme: Theme) -> void: disabled_checkbox_stylebox.bg_color = flat_button_color_disabled theme.set_stylebox("disabled", "CheckBox", disabled_checkbox_stylebox) + static func _setup_checkbutton(theme: Theme) -> void: theme.add_type("CheckButton") theme.set_color("font_color", "CheckButton", text_color) @@ -863,6 +921,7 @@ static func _setup_checkbutton(theme: Theme) -> void: [gray_color.to_html(false), black_or_white_counter_accent_color.to_html(false)]) ) + static func _setup_itemlist(theme: Theme) -> void: theme.add_type("ItemList") theme.set_color("font_color", "ItemList", text_color) @@ -897,6 +956,7 @@ static func _setup_itemlist(theme: Theme) -> void: theme.set_stylebox("hovered_selected", "ItemList", hovered_selected_item_stylebox) theme.set_stylebox("hovered_selected_focus", "ItemList", hovered_selected_item_stylebox) + static func _setup_lineedit(theme: Theme) -> void: theme.add_type("LineEdit") theme.set_color("caret_color", "LineEdit", caret_color) @@ -927,7 +987,7 @@ static func _setup_lineedit(theme: Theme) -> void: var hover_stylebox := stylebox.duplicate() hover_stylebox.draw_center = false hover_stylebox.border_color = strong_hover_overlay_color if is_theme_dark else\ - stronger_hover_overlay_color + stronger_hover_overlay_color theme.set_stylebox("hover", "LineEdit", hover_stylebox) var focus_stylebox := stylebox.duplicate() @@ -966,7 +1026,7 @@ static func _setup_lineedit(theme: Theme) -> void: var left_connected_hover_stylebox := left_connected_stylebox.duplicate() left_connected_hover_stylebox.draw_center = false left_connected_hover_stylebox.border_color = strong_hover_overlay_color if is_theme_dark else\ - stronger_hover_overlay_color + stronger_hover_overlay_color theme.set_stylebox("hover", "LeftConnectedLineEdit", left_connected_hover_stylebox) var left_connected_focus_stylebox := left_connected_stylebox.duplicate() @@ -1005,7 +1065,7 @@ static func _setup_lineedit(theme: Theme) -> void: var right_connected_hover_stylebox := right_connected_stylebox.duplicate() right_connected_hover_stylebox.draw_center = false right_connected_hover_stylebox.border_color = strong_hover_overlay_color if is_theme_dark else\ - stronger_hover_overlay_color + stronger_hover_overlay_color theme.set_stylebox("hover", "RightConnectedLineEdit", right_connected_hover_stylebox) var right_connected_focus_stylebox := right_connected_stylebox.duplicate() @@ -1039,7 +1099,7 @@ static func _setup_lineedit(theme: Theme) -> void: var mini_stylebox_hover := mini_stylebox.duplicate() mini_stylebox_hover.draw_center = false mini_stylebox_hover.border_color = strong_hover_overlay_color if is_theme_dark else\ - stronger_hover_overlay_color + stronger_hover_overlay_color theme.set_stylebox("hover", "MiniLineEdit", mini_stylebox_hover) var mini_stylebox_pressed := mini_stylebox.duplicate() @@ -1060,6 +1120,7 @@ static func _setup_lineedit(theme: Theme) -> void: theme.set_stylebox("focus", "GoodColorPickerLineEdit", empty_stylebox) theme.set_stylebox("read_only", "GoodColorPickerLineEdit", empty_stylebox) + static func _setup_scrollbar(theme: Theme) -> void: theme.add_type("HScrollBar") var h_stylebox := StyleBoxFlat.new() @@ -1112,6 +1173,7 @@ static func _setup_scrollbar(theme: Theme) -> void: v_scroll_stylebox.bg_color = softer_base_color theme.set_stylebox("scroll", "VScrollBar", v_scroll_stylebox) + static func _setup_separator(theme: Theme) -> void: theme.add_type("HSeparator") var stylebox := StyleBoxLine.new() @@ -1127,6 +1189,7 @@ static func _setup_separator(theme: Theme) -> void: small_stylebox.grow_end = -3 theme.set_stylebox("separator", "SmallHSeparator", small_stylebox) + static func _setup_label(theme: Theme) -> void: theme.add_type("Label") theme.set_color("font_color", "Label", text_color) @@ -1147,6 +1210,7 @@ static func _setup_label(theme: Theme) -> void: theme.set_color("selection_color", "RichTextLabel", selection_color) theme.set_font("bold_font", "RichTextLabel", bold_font) + static func _setup_tabcontainer(theme: Theme) -> void: theme.add_type("TabContainer") theme.set_color("font_unselected_color", "TabContainer", dim_text_color) @@ -1214,6 +1278,7 @@ static func _setup_tabcontainer(theme: Theme) -> void: tabbar_background_stylebox.corner_radius_top_right = 5 theme.set_stylebox("tabbar_background", "TabContainer", tabbar_background_stylebox) + static func _setup_textedit(theme: Theme) -> void: theme.add_type("TextEdit") theme.set_color("caret_color", "TextEdit", Color.TRANSPARENT) @@ -1223,8 +1288,6 @@ static func _setup_textedit(theme: Theme) -> void: var normal_stylebox := StyleBoxFlat.new() normal_stylebox.bg_color = line_edit_inner_color - normal_stylebox.border_color = line_edit_normal_border_color - normal_stylebox.set_border_width_all(2) normal_stylebox.set_corner_radius_all(5) normal_stylebox.content_margin_left = 5.0 theme.set_stylebox("normal", "TextEdit", normal_stylebox) @@ -1239,11 +1302,12 @@ static func _setup_textedit(theme: Theme) -> void: var hover_stylebox := StyleBoxFlat.new() hover_stylebox.draw_center = false hover_stylebox.border_color = strong_hover_overlay_color if is_theme_dark else\ - stronger_hover_overlay_color + stronger_hover_overlay_color hover_stylebox.set_border_width_all(2) hover_stylebox.set_corner_radius_all(5) theme.set_stylebox("hover", "TextEdit", hover_stylebox) + static func _setup_tooltip(theme: Theme) -> void: theme.add_type("TooltipPanel") var stylebox := StyleBoxFlat.new() @@ -1262,6 +1326,7 @@ static func _setup_tooltip(theme: Theme) -> void: theme.set_font_size("font_size", "TooltipLabel", 14) theme.set_font("font", "TooltipLabel", regular_font) + static func _setup_splitcontainer(theme: Theme) -> void: theme.add_type("SplitContainer") theme.set_icon("grabber", "VSplitContainer",