diff options
| author | dam <dam@gudinoff> | 2022-04-10 07:34:40 +0000 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2022-04-10 07:34:40 +0000 |
| commit | 8146ae8e43a26787159d5840bae876d79112bd44 (patch) | |
| tree | 37f9ba41ee63bef77662216a71deabbf457534b5 | |
| parent | e32cef1fee6eabd6db71af71356664d259c5eb2b (diff) | |
| download | surgery-log-8146ae8e43a26787159d5840bae876d79112bd44.tar.zst surgery-log-8146ae8e43a26787159d5840bae876d79112bd44.zip | |
Themed scrollbar. Tweaked theme of option_set_list.
| -rw-r--r-- | logic/database.gd | 2 | ||||
| -rw-r--r-- | option_set/option_set_list.gd | 12 | ||||
| -rw-r--r-- | themes/dark.tres | 46 |
3 files changed, 31 insertions, 29 deletions
diff --git a/logic/database.gd b/logic/database.gd index 92b707b..2f091b6 100644 --- a/logic/database.gd +++ b/logic/database.gd @@ -260,7 +260,7 @@ func clear_database(): #func DEBUG_create_fake_database(): # clear_database() -# for idx in range(500): +# for idx in range(100): # var today := OS.get_date(true) # var date_year = today.year + int(float(idx) / 30.0 / 12) # var date_month = 1 + int(float(idx) / 30.0) % 12 diff --git a/option_set/option_set_list.gd b/option_set/option_set_list.gd index 1ab753b..21692dd 100644 --- a/option_set/option_set_list.gd +++ b/option_set/option_set_list.gd @@ -75,10 +75,16 @@ func _ready(): normal_style.bg_color = Color.transparent selected_style = StyleBoxFlat.new() - var bg_color = get_stylebox("pressed", "Button").bg_color - selected_style.border_width_bottom = border_size - selected_style.border_color = bg_color.lightened(0.333) + var button_style := get_stylebox("pressed", "Button") + var bg_color := button_style.bg_color as Color + var corner_radius := button_style.corner_radius_top_right as int +# selected_style.border_width_bottom = border_size +# selected_style.border_color = bg_color.lightened(0.333) selected_style.bg_color = bg_color + selected_style.corner_radius_top_left = corner_radius + selected_style.corner_radius_top_right = corner_radius + selected_style.corner_radius_bottom_right = corner_radius + selected_style.corner_radius_bottom_left = corner_radius func mark_as_dirty(): diff --git a/themes/dark.tres b/themes/dark.tres index b4e7195..05de2a0 100644 --- a/themes/dark.tres +++ b/themes/dark.tres @@ -10,7 +10,7 @@ content_margin_right = 10.0 [sub_resource type="StyleBoxFlat" id=11] content_margin_left = 10.0 content_margin_right = 10.0 -bg_color = Color( 0.133333, 0.207843, 0.301961, 0.784314 ) +bg_color = Color( 0.223529, 0.352941, 0.501961, 0.784314 ) corner_radius_top_left = 15 corner_radius_top_right = 15 corner_radius_bottom_right = 15 @@ -19,7 +19,7 @@ corner_radius_bottom_left = 15 [sub_resource type="StyleBoxFlat" id=2] content_margin_left = 10.0 content_margin_right = 10.0 -bg_color = Color( 0.25098, 0.25098, 0.25098, 0.784314 ) +bg_color = Color( 0.25098, 0.25098, 0.25098, 0.870588 ) corner_radius_top_left = 15 corner_radius_top_right = 15 corner_radius_bottom_right = 15 @@ -28,7 +28,7 @@ corner_radius_bottom_left = 15 [sub_resource type="StyleBoxFlat" id=4] content_margin_left = 10.0 content_margin_right = 10.0 -bg_color = Color( 0.223529, 0.352941, 0.501961, 0.784314 ) +bg_color = Color( 0.337255, 0.529412, 0.74902, 0.870588 ) corner_radius_top_left = 15 corner_radius_top_right = 15 corner_radius_bottom_right = 15 @@ -42,7 +42,7 @@ content_margin_right = 10.0 bg_color = Color( 0, 0, 0, 0 ) draw_center = false border_width_bottom = 4 -border_color = Color( 0.223529, 0.352941, 0.501961, 1 ) +border_color = Color( 0.337255, 0.529412, 0.74902, 0.870588 ) [sub_resource type="StyleBoxFlat" id=7] content_margin_left = 10.0 @@ -59,6 +59,13 @@ corner_radius_top_right = 15 corner_radius_bottom_right = 15 corner_radius_bottom_left = 15 +[sub_resource type="StyleBoxFlat" id=20] +bg_color = Color( 0.223529, 0.352941, 0.501961, 0.784314 ) +corner_radius_top_left = 15 +corner_radius_top_right = 15 +corner_radius_bottom_right = 15 +corner_radius_bottom_left = 15 + [sub_resource type="StyleBoxFlat" id=13] content_margin_left = 20.0 content_margin_right = 20.0 @@ -70,35 +77,23 @@ corner_radius_top_right = 15 corner_radius_bottom_right = 15 corner_radius_bottom_left = 15 -[sub_resource type="StyleBoxFlat" id=14] -bg_color = Color( 0.25098, 0.25098, 0.25098, 0.784314 ) -corner_radius_top_left = 10 -corner_radius_top_right = 10 -corner_radius_bottom_right = 10 -corner_radius_bottom_left = 10 - -[sub_resource type="StyleBoxFlat" id=15] -bg_color = Color( 0.133333, 0.207843, 0.301961, 0.784314 ) -corner_radius_top_left = 10 -corner_radius_top_right = 10 -corner_radius_bottom_right = 10 -corner_radius_bottom_left = 10 - -[sub_resource type="StyleBoxFlat" id=16] +[sub_resource type="StyleBoxFlat" id=18] bg_color = Color( 0.223529, 0.352941, 0.501961, 0.784314 ) corner_radius_top_left = 10 corner_radius_top_right = 10 corner_radius_bottom_right = 10 corner_radius_bottom_left = 10 -[sub_resource type="StyleBoxFlat" id=17] -content_margin_left = 10.0 -bg_color = Color( 0.11, 0.11, 0.11, 1 ) +[sub_resource type="StyleBoxFlat" id=19] +bg_color = Color( 0.337255, 0.529412, 0.74902, 0.870588 ) corner_radius_top_left = 10 corner_radius_top_right = 10 corner_radius_bottom_right = 10 corner_radius_bottom_left = 10 +[sub_resource type="StyleBoxEmpty" id=17] +content_margin_left = 20.0 + [resource] default_font = ExtResource( 1 ) Button/styles/disabled = SubResource( 10 ) @@ -115,10 +110,11 @@ LineEdit/styles/normal = SubResource( 7 ) LineEdit/styles/read_only = null Panel/styles/panel = SubResource( 12 ) PopupMenu/constants/vseparation = 20 +PopupMenu/styles/hover = SubResource( 20 ) PopupMenu/styles/panel = SubResource( 13 ) VBoxContainer/constants/separation = 10 -VScrollBar/styles/grabber = SubResource( 14 ) -VScrollBar/styles/grabber_highlight = SubResource( 15 ) -VScrollBar/styles/grabber_pressed = SubResource( 16 ) +VScrollBar/styles/grabber = SubResource( 18 ) +VScrollBar/styles/grabber_highlight = SubResource( 18 ) +VScrollBar/styles/grabber_pressed = SubResource( 19 ) VScrollBar/styles/scroll = SubResource( 17 ) VScrollBar/styles/scroll_focus = SubResource( 17 ) |
