diff --git a/Main.tscn b/Main.tscn index 6d7f9e4..515a231 100644 --- a/Main.tscn +++ b/Main.tscn @@ -1,11 +1,13 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://Main.gd" type="Script" id=1] [ext_resource path="res://ServerUI.tscn" type="PackedScene" id=2] +[ext_resource path="res://theme/default_theme.theme" type="Theme" id=3] [node name="Main" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 +theme = ExtResource( 3 ) script = ExtResource( 1 ) [node name="ServerUI" parent="." instance=ExtResource( 2 )] diff --git a/ServerUI.tscn b/ServerUI.tscn index 28f2161..6fc7864 100644 --- a/ServerUI.tscn +++ b/ServerUI.tscn @@ -20,75 +20,75 @@ __meta__ = { [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] margin_right = 1182.0 -margin_bottom = 32.0 +margin_bottom = 39.0 alignment = 1 [node name="Label" type="Label" parent="VBoxContainer/HBoxContainer"] -margin_left = 142.0 -margin_top = 9.0 -margin_right = 227.0 -margin_bottom = 23.0 +margin_left = 97.0 +margin_top = 11.0 +margin_right = 191.0 +margin_bottom = 28.0 text = "Server folder:" [node name="ServerPathLabel" type="Label" parent="VBoxContainer/HBoxContainer"] unique_name_in_owner = true -margin_left = 231.0 -margin_top = 9.0 -margin_right = 470.0 -margin_bottom = 23.0 +margin_left = 195.0 +margin_top = 11.0 +margin_right = 448.0 +margin_bottom = 28.0 text = "/home/username/long/path/to/server" [node name="OpenServerFolderButton" type="Button" parent="VBoxContainer/HBoxContainer"] -margin_left = 474.0 -margin_right = 533.0 -margin_bottom = 32.0 +margin_left = 452.0 +margin_right = 520.0 +margin_bottom = 39.0 rect_min_size = Vector2( 0, 32 ) text = "Open..." [node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer"] -margin_left = 537.0 -margin_top = 9.0 -margin_right = 611.0 -margin_bottom = 23.0 +margin_left = 524.0 +margin_top = 11.0 +margin_right = 606.0 +margin_bottom = 28.0 text = "Server port:" [node name="PortSpinBox" type="SpinBox" parent="VBoxContainer/HBoxContainer"] unique_name_in_owner = true -margin_left = 615.0 -margin_right = 689.0 -margin_bottom = 32.0 +margin_left = 610.0 +margin_right = 690.0 +margin_bottom = 39.0 min_value = 81.0 max_value = 8000.0 value = 3001.0 [node name="StartServerButton" type="Button" parent="VBoxContainer/HBoxContainer"] unique_name_in_owner = true -margin_left = 693.0 -margin_right = 778.0 -margin_bottom = 32.0 +margin_left = 694.0 +margin_right = 791.0 +margin_bottom = 39.0 rect_min_size = Vector2( 0, 32 ) text = "Start server" [node name="ServerStatusLabel" type="Label" parent="VBoxContainer/HBoxContainer"] unique_name_in_owner = true -margin_left = 782.0 -margin_top = 9.0 -margin_right = 918.0 -margin_bottom = 23.0 +margin_left = 795.0 +margin_top = 11.0 +margin_right = 946.0 +margin_bottom = 28.0 text = "Server is not running." [node name="OpenBrowserButton" type="Button" parent="VBoxContainer/HBoxContainer"] unique_name_in_owner = true -margin_left = 922.0 -margin_right = 1040.0 -margin_bottom = 32.0 +margin_left = 950.0 +margin_right = 1084.0 +margin_bottom = 39.0 rect_min_size = Vector2( 0, 32 ) size_flags_horizontal = 12 disabled = true text = "Open in browser" [node name="HSplitContainer" type="HSplitContainer" parent="VBoxContainer"] -margin_top = 41.0 +margin_top = 48.0 margin_right = 1182.0 margin_bottom = 611.0 size_flags_vertical = 3 @@ -96,34 +96,34 @@ split_offset = -263 [node name="VBoxContainer2" type="VBoxContainer" parent="VBoxContainer/HSplitContainer"] margin_right = 322.0 -margin_bottom = 570.0 +margin_bottom = 563.0 size_flags_horizontal = 3 [node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HSplitContainer/VBoxContainer2"] margin_right = 322.0 -margin_bottom = 32.0 +margin_bottom = 37.0 [node name="Label" type="Label" parent="VBoxContainer/HSplitContainer/VBoxContainer2/HBoxContainer2"] -margin_top = 9.0 -margin_right = 30.0 -margin_bottom = 23.0 +margin_top = 10.0 +margin_right = 34.0 +margin_bottom = 27.0 size_flags_horizontal = 0 text = "Files" [node name="RefreshFilesButton" type="Button" parent="VBoxContainer/HSplitContainer/VBoxContainer2/HBoxContainer2"] unique_name_in_owner = true -margin_left = 262.0 +margin_left = 251.0 margin_right = 322.0 -margin_bottom = 32.0 +margin_bottom = 37.0 rect_min_size = Vector2( 0, 32 ) size_flags_horizontal = 10 text = "Refresh" [node name="FileTree" type="Tree" parent="VBoxContainer/HSplitContainer/VBoxContainer2"] unique_name_in_owner = true -margin_top = 36.0 +margin_top = 41.0 margin_right = 322.0 -margin_bottom = 570.0 +margin_bottom = 563.0 size_flags_horizontal = 3 size_flags_vertical = 3 allow_rmb_select = true @@ -132,78 +132,78 @@ hide_root = true [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HSplitContainer"] margin_left = 334.0 margin_right = 1182.0 -margin_bottom = 570.0 +margin_bottom = 563.0 size_flags_horizontal = 3 [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HSplitContainer/VBoxContainer"] margin_right = 848.0 -margin_bottom = 570.0 +margin_bottom = 563.0 size_flags_vertical = 3 [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HSplitContainer/VBoxContainer/HBoxContainer"] margin_right = 848.0 -margin_bottom = 570.0 +margin_bottom = 563.0 size_flags_horizontal = 3 [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HSplitContainer/VBoxContainer/HBoxContainer/VBoxContainer"] margin_right = 848.0 -margin_bottom = 24.0 +margin_bottom = 39.0 [node name="Label" type="Label" parent="VBoxContainer/HSplitContainer/VBoxContainer/HBoxContainer/VBoxContainer/HBoxContainer"] -margin_top = 5.0 -margin_right = 32.0 -margin_bottom = 19.0 +margin_top = 11.0 +margin_right = 34.0 +margin_bottom = 28.0 text = "Title:" [node name="DocTitleLineEdit" type="LineEdit" parent="VBoxContainer/HSplitContainer/VBoxContainer/HBoxContainer/VBoxContainer/HBoxContainer"] unique_name_in_owner = true -margin_left = 36.0 +margin_left = 38.0 margin_right = 848.0 -margin_bottom = 24.0 +margin_bottom = 39.0 size_flags_horizontal = 3 placeholder_text = "(Optional)" [node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HSplitContainer/VBoxContainer/HBoxContainer/VBoxContainer"] -margin_top = 28.0 +margin_top = 43.0 margin_right = 848.0 -margin_bottom = 52.0 +margin_bottom = 82.0 [node name="Label" type="Label" parent="VBoxContainer/HSplitContainer/VBoxContainer/HBoxContainer/VBoxContainer/HBoxContainer2"] -margin_top = 5.0 -margin_right = 34.0 -margin_bottom = 19.0 +margin_top = 11.0 +margin_right = 37.0 +margin_bottom = 28.0 text = "Date:" [node name="DocDateLineEdit" type="LineEdit" parent="VBoxContainer/HSplitContainer/VBoxContainer/HBoxContainer/VBoxContainer/HBoxContainer2"] unique_name_in_owner = true -margin_left = 38.0 +margin_left = 41.0 margin_right = 848.0 -margin_bottom = 24.0 +margin_bottom = 39.0 size_flags_horizontal = 3 placeholder_text = "(Optional)" [node name="HSplitContainer" type="HSplitContainer" parent="VBoxContainer/HSplitContainer/VBoxContainer/HBoxContainer/VBoxContainer"] -margin_top = 56.0 +margin_top = 86.0 margin_right = 848.0 -margin_bottom = 570.0 +margin_bottom = 563.0 size_flags_vertical = 3 split_offset = 328 [node name="ContentEditContainer" type="VBoxContainer" parent="VBoxContainer/HSplitContainer/VBoxContainer/HBoxContainer/VBoxContainer/HSplitContainer"] margin_right = 848.0 -margin_bottom = 514.0 +margin_bottom = 477.0 size_flags_vertical = 3 [node name="Label" type="Label" parent="VBoxContainer/HSplitContainer/VBoxContainer/HBoxContainer/VBoxContainer/HSplitContainer/ContentEditContainer"] margin_right = 848.0 -margin_bottom = 14.0 +margin_bottom = 17.0 text = "Content" [node name="DocInputTextEdit" type="TextEdit" parent="VBoxContainer/HSplitContainer/VBoxContainer/HBoxContainer/VBoxContainer/HSplitContainer/ContentEditContainer"] unique_name_in_owner = true -margin_top = 18.0 +margin_top = 21.0 margin_right = 848.0 -margin_bottom = 514.0 +margin_bottom = 477.0 size_flags_horizontal = 3 size_flags_vertical = 3 show_line_numbers = true @@ -244,6 +244,7 @@ access = 2 [node name="FileTreeContextMenu" type="PopupMenu" parent="."] unique_name_in_owner = true +visible = true margin_right = 95.0 margin_bottom = 56.0 rect_min_size = Vector2( 95, 56 ) diff --git a/project.godot b/project.godot index ffc2b02..a41a73e 100644 --- a/project.godot +++ b/project.godot @@ -42,6 +42,7 @@ enabled=PoolStringArray( "res://addons/http_server/plugin.cfg" ) [gui] common/drop_mouse_on_gui_input_disabled=true +theme/custom="res://theme/default_theme.theme" [physics] diff --git a/theme/FontMono.tres b/theme/FontMono.tres new file mode 100644 index 0000000..aff0c96 --- /dev/null +++ b/theme/FontMono.tres @@ -0,0 +1,7 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[ext_resource path="res://theme/FreeMonoBold.ttf" type="DynamicFontData" id=1] + +[resource] +size = 18 +font_data = ExtResource( 1 ) diff --git a/theme/FontRg.tres b/theme/FontRg.tres new file mode 100644 index 0000000..bb85ecf --- /dev/null +++ b/theme/FontRg.tres @@ -0,0 +1,6 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[ext_resource path="res://theme/FreeSans.ttf" type="DynamicFontData" id=1] + +[resource] +font_data = ExtResource( 1 ) diff --git a/theme/FreeMono.ttf b/theme/FreeMono.ttf new file mode 100644 index 0000000..bdd48b0 Binary files /dev/null and b/theme/FreeMono.ttf differ diff --git a/theme/FreeMonoBold.ttf b/theme/FreeMonoBold.ttf new file mode 100644 index 0000000..9017537 Binary files /dev/null and b/theme/FreeMonoBold.ttf differ diff --git a/theme/FreeSans.ttf b/theme/FreeSans.ttf new file mode 100644 index 0000000..ec00c45 Binary files /dev/null and b/theme/FreeSans.ttf differ diff --git a/theme/default_theme.theme b/theme/default_theme.theme new file mode 100644 index 0000000..c330b86 Binary files /dev/null and b/theme/default_theme.theme differ diff --git a/theme/styleboxes/button/BtnDisabledStylebox.tres b/theme/styleboxes/button/BtnDisabledStylebox.tres new file mode 100644 index 0000000..9b14614 --- /dev/null +++ b/theme/styleboxes/button/BtnDisabledStylebox.tres @@ -0,0 +1,14 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +content_margin_left = 8.0 +content_margin_right = 8.0 +content_margin_top = 10.0 +content_margin_bottom = 10.0 +bg_color = Color( 0.168, 0.192, 0.2, 1 ) +border_width_bottom = 3 +border_color = Color( 0.2788, 0.41, 0.296293, 1 ) +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 diff --git a/theme/styleboxes/button/BtnHoverStylebox.tres b/theme/styleboxes/button/BtnHoverStylebox.tres new file mode 100644 index 0000000..e1238af --- /dev/null +++ b/theme/styleboxes/button/BtnHoverStylebox.tres @@ -0,0 +1,17 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +content_margin_left = 8.0 +content_margin_right = 8.0 +content_margin_top = 10.0 +content_margin_bottom = 10.0 +bg_color = Color( 0.0705882, 0.164706, 0.196078, 1 ) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 5 +border_color = Color( 0.164706, 0.85098, 0.254902, 1 ) +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 diff --git a/theme/styleboxes/button/BtnNormalStylebox.tres b/theme/styleboxes/button/BtnNormalStylebox.tres new file mode 100644 index 0000000..0c4f8d1 --- /dev/null +++ b/theme/styleboxes/button/BtnNormalStylebox.tres @@ -0,0 +1,14 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +content_margin_left = 8.0 +content_margin_right = 8.0 +content_margin_top = 10.0 +content_margin_bottom = 10.0 +bg_color = Color( 0.0705882, 0.164706, 0.196078, 1 ) +border_width_bottom = 3 +border_color = Color( 0.164706, 0.85098, 0.254902, 1 ) +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 diff --git a/theme/styleboxes/button/BtnPressedStylebox.tres b/theme/styleboxes/button/BtnPressedStylebox.tres new file mode 100644 index 0000000..9b6af69 --- /dev/null +++ b/theme/styleboxes/button/BtnPressedStylebox.tres @@ -0,0 +1,17 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +content_margin_left = 8.0 +content_margin_right = 8.0 +content_margin_top = 10.0 +content_margin_bottom = 10.0 +bg_color = Color( 0.0705882, 0.164706, 0.196078, 1 ) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 +border_color = Color( 0.164706, 0.85098, 0.254902, 1 ) +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 diff --git a/theme/styleboxes/lineedit/LineEditNormalStylebox.tres b/theme/styleboxes/lineedit/LineEditNormalStylebox.tres new file mode 100644 index 0000000..61d90ca --- /dev/null +++ b/theme/styleboxes/lineedit/LineEditNormalStylebox.tres @@ -0,0 +1,17 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +content_margin_left = 8.0 +content_margin_right = 8.0 +content_margin_top = 10.0 +content_margin_bottom = 12.0 +bg_color = Color( 0.0705882, 0.164706, 0.196078, 1 ) +border_width_left = 2 +border_width_top = 3 +border_width_right = 3 +border_width_bottom = 6 +border_color = Color( 0.164706, 0.85098, 0.254902, 1 ) +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 diff --git a/theme/styleboxes/lineedit/LineEditReadonlyStylebox.tres b/theme/styleboxes/lineedit/LineEditReadonlyStylebox.tres new file mode 100644 index 0000000..9a67f12 --- /dev/null +++ b/theme/styleboxes/lineedit/LineEditReadonlyStylebox.tres @@ -0,0 +1,17 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +content_margin_left = 8.0 +content_margin_right = 8.0 +content_margin_top = 10.0 +content_margin_bottom = 10.0 +bg_color = Color( 0.168, 0.192, 0.2, 1 ) +border_width_left = 2 +border_width_top = 3 +border_width_right = 3 +border_width_bottom = 6 +border_color = Color( 0.2788, 0.41, 0.296293, 1 ) +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 diff --git a/theme/styleboxes/scrollbar/ScrollBarGrabberHighlightStylebox.tres b/theme/styleboxes/scrollbar/ScrollBarGrabberHighlightStylebox.tres new file mode 100644 index 0000000..6488fd3 --- /dev/null +++ b/theme/styleboxes/scrollbar/ScrollBarGrabberHighlightStylebox.tres @@ -0,0 +1,8 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.4002, 0.87, 0.46284, 1 ) +corner_radius_top_left = 12 +corner_radius_top_right = 12 +corner_radius_bottom_right = 12 +corner_radius_bottom_left = 12 diff --git a/theme/styleboxes/scrollbar/ScrollBarGrabberPressedStylebox.tres b/theme/styleboxes/scrollbar/ScrollBarGrabberPressedStylebox.tres new file mode 100644 index 0000000..fe8eb5a --- /dev/null +++ b/theme/styleboxes/scrollbar/ScrollBarGrabberPressedStylebox.tres @@ -0,0 +1,8 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.1764, 0.63, 0.23688, 1 ) +corner_radius_top_left = 12 +corner_radius_top_right = 12 +corner_radius_bottom_right = 12 +corner_radius_bottom_left = 12 diff --git a/theme/styleboxes/scrollbar/ScrollBarGrabberStylebox.tres b/theme/styleboxes/scrollbar/ScrollBarGrabberStylebox.tres new file mode 100644 index 0000000..bab677d --- /dev/null +++ b/theme/styleboxes/scrollbar/ScrollBarGrabberStylebox.tres @@ -0,0 +1,8 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.164706, 0.85098, 0.254902, 1 ) +corner_radius_top_left = 12 +corner_radius_top_right = 12 +corner_radius_bottom_right = 12 +corner_radius_bottom_left = 12 diff --git a/theme/styleboxes/scrollbar/ScrollBarScrollStylebox.tres b/theme/styleboxes/scrollbar/ScrollBarScrollStylebox.tres new file mode 100644 index 0000000..855d826 --- /dev/null +++ b/theme/styleboxes/scrollbar/ScrollBarScrollStylebox.tres @@ -0,0 +1,13 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.168627, 0.192157, 0.2, 0 ) +border_width_left = 3 +border_width_top = 4 +border_width_right = 3 +border_width_bottom = 4 +border_color = Color( 0.168627, 0.192157, 0.2, 0 ) +corner_radius_top_left = 10 +corner_radius_top_right = 10 +corner_radius_bottom_right = 10 +corner_radius_bottom_left = 10