aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/date_picker/date_picker.tscn55
-rw-r--r--ui/modal_popup/modal_popup.gd2
-rw-r--r--ui/modal_popup/modal_popup.tscn6
-rw-r--r--ui/option_set/option_set_list.gd38
4 files changed, 38 insertions, 63 deletions
diff --git a/ui/date_picker/date_picker.tscn b/ui/date_picker/date_picker.tscn
index 0e2e64e..86839a2 100644
--- a/ui/date_picker/date_picker.tscn
+++ b/ui/date_picker/date_picker.tscn
@@ -8,6 +8,24 @@ anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 2 )
+[node name="split_upper" type="ColorRect" parent="."]
+anchor_top = 0.333
+anchor_right = 1.0
+anchor_bottom = 0.343
+color = Color( 0.501961, 0.501961, 0.501961, 0.501961 )
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="split_lower" type="ColorRect" parent="."]
+anchor_top = 0.666
+anchor_right = 1.0
+anchor_bottom = 0.676
+color = Color( 0.501961, 0.501961, 0.501961, 0.501961 )
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
[node name="year" type="Control" parent="."]
anchor_right = 0.333
anchor_bottom = 1.0
@@ -23,10 +41,6 @@ anchor_right = 1.0
anchor_bottom = 0.333
mouse_filter = 1
align = 1
-valign = 1
-__meta__ = {
-"_edit_use_anchors_": false
-}
[node name="current" type="Label" parent="year"]
anchor_top = 0.333
@@ -34,7 +48,6 @@ anchor_right = 1.0
anchor_bottom = 0.666
mouse_filter = 1
align = 1
-valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
@@ -43,8 +56,11 @@ __meta__ = {
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
+margin_top = 3.0
+margin_bottom = 3.0
grow_horizontal = 2
grow_vertical = 2
+rect_clip_content = true
focus_next = NodePath("../../../month/current/input")
custom_constants/minimum_spaces = 0
align = 1
@@ -57,7 +73,6 @@ anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 1
align = 1
-valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
@@ -75,7 +90,6 @@ anchor_right = 1.0
anchor_bottom = 0.333
mouse_filter = 1
align = 1
-valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
@@ -86,7 +100,6 @@ anchor_right = 1.0
anchor_bottom = 0.666
mouse_filter = 1
align = 1
-valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
@@ -95,6 +108,8 @@ __meta__ = {
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
+margin_top = 3.0
+margin_bottom = 3.0
grow_horizontal = 2
grow_vertical = 2
focus_next = NodePath("../../../day/current/input")
@@ -110,7 +125,6 @@ anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 1
align = 1
-valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
@@ -131,7 +145,6 @@ anchor_right = 1.0
anchor_bottom = 0.333
mouse_filter = 1
align = 1
-valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
@@ -142,7 +155,6 @@ anchor_right = 1.0
anchor_bottom = 0.666
mouse_filter = 1
align = 1
-valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
@@ -151,6 +163,8 @@ __meta__ = {
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
+margin_top = 3.0
+margin_bottom = 3.0
grow_horizontal = 2
grow_vertical = 2
focus_previous = NodePath("../../../month/current/input")
@@ -165,25 +179,6 @@ anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 1
align = 1
-valign = 1
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="split_upper" type="ColorRect" parent="."]
-anchor_top = 0.333
-anchor_right = 1.0
-anchor_bottom = 0.343
-color = Color( 0.501961, 0.501961, 0.501961, 0.501961 )
-__meta__ = {
-"_edit_use_anchors_": false
-}
-
-[node name="split_lower" type="ColorRect" parent="."]
-anchor_top = 0.666
-anchor_right = 1.0
-anchor_bottom = 0.676
-color = Color( 0.501961, 0.501961, 0.501961, 0.501961 )
__meta__ = {
"_edit_use_anchors_": false
}
diff --git a/ui/modal_popup/modal_popup.gd b/ui/modal_popup/modal_popup.gd
index 857f90e..2a45f38 100644
--- a/ui/modal_popup/modal_popup.gd
+++ b/ui/modal_popup/modal_popup.gd
@@ -42,7 +42,7 @@ func open_popup(title: String, item: Control):
if visible == true:
return
- self.color = get_color("background", "theme")
+ self.color = get_color("background", "Misc")
self.color.a = 0.85
self.title.text = title
diff --git a/ui/modal_popup/modal_popup.tscn b/ui/modal_popup/modal_popup.tscn
index 3814bef..4ee5939 100644
--- a/ui/modal_popup/modal_popup.tscn
+++ b/ui/modal_popup/modal_popup.tscn
@@ -17,11 +17,10 @@ anchor_right = 0.95
anchor_bottom = 0.975
[node name="title" type="Label" parent="."]
-anchor_left = 0.124
+anchor_left = 0.15
anchor_top = 0.025
anchor_right = 0.95
anchor_bottom = 0.1
-margin_left = 0.0799866
margin_right = -80.0
margin_bottom = -20.0
align = 1
@@ -31,10 +30,9 @@ autowrap = true
[node name="dismiss" type="Button" parent="."]
anchor_left = 0.05
anchor_top = 0.025
-anchor_right = 0.124
+anchor_right = 0.15
anchor_bottom = 0.1
margin_right = 0.0799866
margin_bottom = -20.0
custom_fonts/font = ExtResource( 2 )
text = ""
-flat = true
diff --git a/ui/option_set/option_set_list.gd b/ui/option_set/option_set_list.gd
index fda2c04..9f784f9 100644
--- a/ui/option_set/option_set_list.gd
+++ b/ui/option_set/option_set_list.gd
@@ -26,9 +26,9 @@ var selected_idx := -1
var selected_item := ""
var is_dirty := true
-var normal_style : StyleBoxFlat
-var selected_style : StyleBoxFlat
-var border_size := 5
+var normal_style : StyleBox
+var selected_style : StyleBox
+var border_size := 2
onready var font : Font = get_font("font")
onready var screen_dpcm : float = float(OS.get_screen_dpi()) / 2.54
@@ -68,31 +68,6 @@ func _init():
sensor.connect("on_scroll", self, "pointer_input_on_scroll_handler")
-func _ready():
- var button_style := get_stylebox("pressed", "Button")
- var label_style := get_stylebox("normal", "Label")
-
- normal_style = StyleBoxFlat.new()
- normal_style.border_width_bottom = border_size
- normal_style.border_color = Color.white * 0.333
- normal_style.bg_color = Color.transparent
- normal_style.content_margin_left = label_style.content_margin_left
- normal_style.content_margin_top = label_style.content_margin_top
- normal_style.content_margin_right = label_style.content_margin_right
-
- var bg_color := button_style.bg_color as Color
- var corner_radius := button_style.corner_radius_top_right as int
- selected_style = StyleBoxFlat.new()
- 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
- selected_style.content_margin_left = label_style.content_margin_left
- selected_style.content_margin_top = label_style.content_margin_top
- selected_style.content_margin_right = label_style.content_margin_right
-
-
func mark_as_dirty():
is_dirty = true
@@ -292,3 +267,10 @@ func _clear_signals():
disconnect(it.signal, it.target, it.method)
+func _notification(what):
+ if what == NOTIFICATION_THEME_CHANGED:
+ normal_style = get_stylebox("normal", "OptionSetList")
+ selected_style = get_stylebox("selected", "OptionSetList")
+ border_size = normal_style.get_margin(MARGIN_BOTTOM)
+
+