Skip to content

Commit f699304

Browse files
DoomTas3rwjt
authored andcommitted
Improve dropdown styling
Changes the text color and style of the dropdowns to have no mouse hover interaction and more contrast. The dropdown popup menu is unaffected (it will still use the editor theme) Fixes #203
1 parent 10851b2 commit f699304

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

addons/block_code/ui/blocks/utilities/parameter_input/parameter_input.tscn

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[gd_scene load_steps=11 format=3 uid="uid://cjvxs6euc6xbm"]
1+
[gd_scene load_steps=12 format=3 uid="uid://cjvxs6euc6xbm"]
22

33
[ext_resource type="Script" path="res://addons/block_code/ui/blocks/utilities/parameter_input/parameter_input.gd" id="1_rgmxn"]
44
[ext_resource type="PackedScene" uid="uid://c7puyxpqcq6xo" path="res://addons/block_code/ui/blocks/utilities/drag_drop_area/drag_drop_area.tscn" id="2_05gck"]
@@ -19,10 +19,17 @@ corner_radius_bottom_left = 40
1919

2020
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5hq7f"]
2121

22-
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_fjquj"]
22+
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7m75r"]
23+
bg_color = Color(1, 1, 1, 0.501961)
24+
corner_radius_top_left = 5
25+
corner_radius_top_right = 5
26+
corner_radius_bottom_right = 5
27+
corner_radius_bottom_left = 5
2328

2429
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_e7f0k"]
2530

31+
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_fjquj"]
32+
2633
[node name="ParameterInput" type="MarginContainer"]
2734
anchors_preset = 15
2835
anchor_right = 1.0
@@ -95,7 +102,15 @@ visible = false
95102
custom_minimum_size = Vector2(40, 0)
96103
layout_mode = 2
97104
tooltip_text = "Parameter"
98-
theme_override_styles/normal = SubResource("StyleBoxEmpty_fjquj")
105+
theme_override_colors/font_hover_pressed_color = Color(0.117647, 0.117647, 0.117647, 1)
106+
theme_override_colors/font_hover_color = Color(0.117647, 0.117647, 0.117647, 1)
107+
theme_override_colors/font_pressed_color = Color(0.117647, 0.117647, 0.117647, 1)
108+
theme_override_colors/font_focus_color = Color(0.117647, 0.117647, 0.117647, 1)
109+
theme_override_colors/font_color = Color(0.117647, 0.117647, 0.117647, 1)
110+
theme_override_styles/focus = SubResource("StyleBoxFlat_7m75r")
111+
theme_override_styles/hover = SubResource("StyleBoxFlat_7m75r")
112+
theme_override_styles/pressed = SubResource("StyleBoxFlat_7m75r")
113+
theme_override_styles/normal = SubResource("StyleBoxFlat_7m75r")
99114
action_mode = 1
100115
fit_to_longest_item = false
101116

@@ -193,9 +208,14 @@ theme_override_constants/margin_left = 8
193208
unique_name_in_owner = true
194209
custom_minimum_size = Vector2(60, 0)
195210
layout_mode = 2
196-
theme_override_colors/font_focus_color = Color(0, 0, 0, 1)
197-
theme_override_colors/font_color = Color(0, 0, 0, 1)
211+
theme_override_colors/font_hover_pressed_color = Color(0.117647, 0.117647, 0.117647, 1)
212+
theme_override_colors/font_hover_color = Color(0.117647, 0.117647, 0.117647, 1)
213+
theme_override_colors/font_pressed_color = Color(0.117647, 0.117647, 0.117647, 1)
214+
theme_override_colors/font_focus_color = Color(0.117647, 0.117647, 0.117647, 1)
215+
theme_override_colors/font_color = Color(0.117647, 0.117647, 0.117647, 1)
198216
theme_override_styles/focus = SubResource("StyleBoxEmpty_e7f0k")
217+
theme_override_styles/hover = SubResource("StyleBoxEmpty_6oowp")
218+
theme_override_styles/pressed = SubResource("StyleBoxEmpty_6oowp")
199219
theme_override_styles/normal = SubResource("StyleBoxEmpty_fjquj")
200220
action_mode = 1
201221
selected = 0

0 commit comments

Comments
 (0)