aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordam <dam@gudinoff>2022-04-04 10:02:13 +0000
committerdam <dam@gudinoff>2022-04-04 10:02:13 +0000
commitf40df1987a35adbc234a1b04b018d92d420b1e92 (patch)
treefbe2ef81b7aaf16a4a75259a9e09d2361de066ba
parent2599637e95cf5702711ac60d74dd6259c549796f (diff)
downloadsurgery-log-f40df1987a35adbc234a1b04b018d92d420b1e92.tar.zst
surgery-log-f40df1987a35adbc234a1b04b018d92d420b1e92.zip
Replaced icons and simplified dialog button labels.
-rw-r--r--dialog/dialog.gd2
-rw-r--r--fonts/entypo-fontello.ttfbin0 -> 6832 bytes
-rw-r--r--fonts/font_icons.tres4
-rw-r--r--logic/database.gd2
-rw-r--r--logic/stage.gd2
-rw-r--r--main.tscn66
-rw-r--r--menu/menu.gd4
-rw-r--r--option_set/option_set.tscn6
-rw-r--r--themes/dark.tres (renamed from theme_dark.tres)0
9 files changed, 52 insertions, 34 deletions
diff --git a/dialog/dialog.gd b/dialog/dialog.gd
index bfdbab5..1cf0e66 100644
--- a/dialog/dialog.gd
+++ b/dialog/dialog.gd
@@ -19,7 +19,6 @@ func _init():
self.connect("hide", self, "_clear_signals")
reject = Button.new()
- reject.text = "reject"
reject.anchor_top = 1.0
reject.anchor_left = 0.0
reject.anchor_right = 0.5
@@ -29,7 +28,6 @@ func _init():
add_child(reject)
accept = Button.new()
- accept.text = "accept"
accept.anchor_top = 1.0
accept.anchor_left = 0.5
accept.anchor_right = 1.0
diff --git a/fonts/entypo-fontello.ttf b/fonts/entypo-fontello.ttf
new file mode 100644
index 0000000..0e95ba4
--- /dev/null
+++ b/fonts/entypo-fontello.ttf
Binary files differ
diff --git a/fonts/font_icons.tres b/fonts/font_icons.tres
index 90f92cf..cc86d17 100644
--- a/fonts/font_icons.tres
+++ b/fonts/font_icons.tres
@@ -1,8 +1,8 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
-[ext_resource path="res://fonts/B612-Regular.ttf" type="DynamicFontData" id=1]
+[ext_resource path="res://fonts/entypo-fontello.ttf" type="DynamicFontData" id=1]
[resource]
-size = 128
+size = 64
use_filter = true
font_data = ExtResource( 1 )
diff --git a/logic/database.gd b/logic/database.gd
index f3a5928..ed39d43 100644
--- a/logic/database.gd
+++ b/logic/database.gd
@@ -75,7 +75,7 @@ func delete_action():
if selected_idx < 0:
return
- dialog.setup("The entry with process ID '%s' will be deleted from the database." % db[selected_idx].process_id, "Yes, delete", "No")
+ dialog.setup("The entry with process ID '%s' will be deleted from the database." % db[selected_idx].process_id, "Delete", "No")
dialog.connect("accepted", self, "delete_action_confirmed")
popup.open_popup("Delete entry?", dialog)
diff --git a/logic/stage.gd b/logic/stage.gd
index 2101ad9..104e888 100644
--- a/logic/stage.gd
+++ b/logic/stage.gd
@@ -112,7 +112,7 @@ func save_action():
func discard_action():
if get_stage().hash() != staged_entry_hash:
- dialog.setup("Changes made to this entry will be discarded.", "Yes, discard", "No")
+ dialog.setup("Changes made to this entry will be discarded.", "Discard", "No")
dialog.connect("accepted", self, "discard_action_confirmed")
popup.open_popup("Discard changes?", dialog)
else:
diff --git a/main.tscn b/main.tscn
index 7ee0c04..644d393 100644
--- a/main.tscn
+++ b/main.tscn
@@ -1,8 +1,8 @@
-[gd_scene load_steps=16 format=2]
+[gd_scene load_steps=17 format=2]
[ext_resource path="res://main.gd" type="Script" id=1]
[ext_resource path="res://date_picker/date_picker.tscn" type="PackedScene" id=2]
-[ext_resource path="res://theme_dark.tres" type="Theme" id=3]
+[ext_resource path="res://themes/dark.tres" type="Theme" id=3]
[ext_resource path="res://menu/menu.gd" type="Script" id=4]
[ext_resource path="res://logic/database.gd" type="Script" id=5]
[ext_resource path="res://fonts/font_icons.tres" type="DynamicFont" id=6]
@@ -16,6 +16,20 @@
[ext_resource path="res://dialog/dialog.gd" type="Script" id=14]
[ext_resource path="res://file_picker.gd" type="Script" id=15]
+[sub_resource type="StyleBoxFlat" id=1]
+content_margin_left = 15.0
+content_margin_right = 15.0
+content_margin_top = 15.0
+content_margin_bottom = 15.0
+bg_color = Color( 0, 0, 0, 0.75 )
+border_color = Color( 1, 1, 1, 1 )
+corner_radius_top_left = 50
+corner_radius_top_right = 50
+corner_radius_bottom_right = 50
+corner_radius_bottom_left = 50
+expand_margin_left = 7.0
+expand_margin_right = 7.0
+
[node name="main" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
@@ -29,10 +43,13 @@ script = ExtResource( 5 )
[node name="menu" type="MenuButton" parent="database"]
anchor_left = 1.0
anchor_right = 1.0
+margin_top = 32.0
margin_right = -32.0
grow_horizontal = 0
custom_fonts/font = ExtResource( 6 )
-text = "≡"
+custom_styles/normal = SubResource( 1 )
+text = ""
+flat = false
script = ExtResource( 4 )
[node name="actions" type="VBoxContainer" parent="database"]
@@ -46,39 +63,39 @@ grow_horizontal = 0
grow_vertical = 0
[node name="delete" type="Button" parent="database/actions"]
-margin_right = 102.0
-margin_bottom = 162.0
+margin_right = 80.0
+margin_bottom = 95.0
focus_mode = 0
custom_fonts/font = ExtResource( 6 )
+custom_styles/normal = SubResource( 1 )
enabled_focus_mode = 0
-text = ""
-flat = true
+text = ""
__meta__ = {
"_edit_use_anchors_": false
}
[node name="edit" type="Button" parent="database/actions"]
-margin_top = 166.0
-margin_right = 102.0
-margin_bottom = 328.0
+margin_top = 99.0
+margin_right = 80.0
+margin_bottom = 194.0
focus_mode = 0
custom_fonts/font = ExtResource( 6 )
+custom_styles/normal = SubResource( 1 )
enabled_focus_mode = 0
-text = ""
-flat = true
+text = ""
__meta__ = {
"_edit_use_anchors_": false
}
[node name="add" type="Button" parent="database/actions"]
-margin_top = 332.0
-margin_right = 102.0
-margin_bottom = 494.0
+margin_top = 198.0
+margin_right = 80.0
+margin_bottom = 293.0
focus_mode = 0
custom_fonts/font = ExtResource( 6 )
+custom_styles/normal = SubResource( 1 )
enabled_focus_mode = 0
-text = ""
-flat = true
+text = ""
__meta__ = {
"_edit_use_anchors_": false
}
@@ -208,14 +225,14 @@ margin_bottom = 994.0
[node name="discard" type="Button" parent="stage/controls/buttons"]
anchor_right = 0.5
-text = "discard"
+text = "Discard"
[node name="save" type="Button" parent="stage/controls/buttons"]
anchor_left = 0.5
anchor_right = 1.0
margin_bottom = 58.0
grow_horizontal = 0
-text = "save"
+text = "Save"
[node name="file_picker" type="FileDialog" parent="."]
anchor_right = 1.0
@@ -248,11 +265,11 @@ anchor_right = 0.95
anchor_bottom = 0.975
[node name="title" type="Label" parent="popup"]
-anchor_left = 0.05
+anchor_left = 0.124
anchor_top = 0.025
anchor_right = 0.95
anchor_bottom = 0.1
-margin_left = 80.0
+margin_left = 0.0799866
margin_right = -80.0
margin_bottom = -20.0
align = 1
@@ -262,11 +279,12 @@ autowrap = true
[node name="dismiss" type="Button" parent="popup"]
anchor_left = 0.05
anchor_top = 0.025
-anchor_right = 0.95
+anchor_right = 0.124
anchor_bottom = 0.1
-margin_right = -892.0
+margin_right = 0.0799866
margin_bottom = -20.0
-text = "<"
+custom_fonts/font = ExtResource( 6 )
+text = ""
flat = true
[node name="option_set_list" type="Control" parent="."]
diff --git a/menu/menu.gd b/menu/menu.gd
index 6bb5de0..5f13949 100644
--- a/menu/menu.gd
+++ b/menu/menu.gd
@@ -69,7 +69,7 @@ func export_option_sets_action():
func clear_option_sets_action():
- dialog.setup("All option sets from the dropdown menus will be deleted.", "Yes, delete.", "No")
+ dialog.setup("All option sets from the dropdown menus will be deleted.", "Delete all", "No")
dialog.connect("accepted", stage, "clear_option_sets")
popup.open_popup("Clear option sets?", dialog)
@@ -85,7 +85,7 @@ func export_data_action():
func clear_data_action():
- dialog.setup("All entries from the database will be deleted.", "Yes, delete.", "No")
+ dialog.setup("All entries from the database will be deleted.", "Delete all", "No")
dialog.connect("accepted", database, "clear_database")
popup.open_popup("Clear database?", dialog)
diff --git a/option_set/option_set.tscn b/option_set/option_set.tscn
index 2b0bc76..5499361 100644
--- a/option_set/option_set.tscn
+++ b/option_set/option_set.tscn
@@ -1,6 +1,7 @@
-[gd_scene load_steps=2 format=2]
+[gd_scene load_steps=3 format=2]
[ext_resource path="res://option_set/option_set.gd" type="Script" id=1]
+[ext_resource path="res://fonts/font_icons.tres" type="DynamicFont" id=2]
[node name="option_set" type="Control"]
anchor_right = 1.0
@@ -26,7 +27,8 @@ anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -100.0
grow_horizontal = 0
-text = "▽"
+custom_fonts/font = ExtResource( 2 )
+text = ""
__meta__ = {
"_edit_use_anchors_": false
}
diff --git a/theme_dark.tres b/themes/dark.tres
index 832b226..832b226 100644
--- a/theme_dark.tres
+++ b/themes/dark.tres