added theme
This commit is contained in:
parent
cbc64a0b02
commit
b69be6e07c
@ -1,33 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://xixlsyswj6mv"
|
||||
path="res://.godot/imported/Cairo-VariableFont_slnt,wght.ttf-8e1ad3a3f88c2663b83086e73553b314.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Cairo-VariableFont_slnt,wght.ttf"
|
||||
dest_files=["res://.godot/imported/Cairo-VariableFont_slnt,wght.ttf-8e1ad3a3f88c2663b83086e73553b314.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
Binary file not shown.
53
assets/toggle_button_up.svg
Normal file
53
assets/toggle_button_up.svg
Normal file
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="13"
|
||||
height="13"
|
||||
viewBox="0 0 3.4395833 3.4395833"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
sodipodi:docname="toggle_button.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#111111"
|
||||
borderopacity="1"
|
||||
inkscape:showpageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="1"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="px"
|
||||
showgrid="true"
|
||||
inkscape:zoom="50.001796"
|
||||
inkscape:cx="6.3597716"
|
||||
inkscape:cy="6.4797673"
|
||||
inkscape:window-width="1896"
|
||||
inkscape:window-height="1029"
|
||||
inkscape:window-x="12"
|
||||
inkscape:window-y="39"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid7036"
|
||||
originx="0"
|
||||
originy="0" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs2" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
id="rect11457"
|
||||
style="fill:#ffffff;stroke-width:1.85208;paint-order:stroke markers fill;stop-color:#000000"
|
||||
d="M 1.7197916 0.79374999 L 0.26458333 2.1166666 L 0.84645995 2.1166666 L 1.7197916 1.3229167 L 2.5931233 2.1166666 L 3.175 2.1166666 L 1.7197916 0.79374999 z " />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
35
assets/toggle_button_up.svg.import
Normal file
35
assets/toggle_button_up.svg.import
Normal file
@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/toggle_button_up.svg-42d50bf036f845a14cc3c73e27b9d2ba.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/toggle_button_up.svg"
|
||||
dest_files=[ "res://.import/toggle_button_up.svg-42d50bf036f845a14cc3c73e27b9d2ba.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
@ -1,4 +1,4 @@
|
||||
extends VBoxContainer
|
||||
extends Control
|
||||
|
||||
var config: ConfigManager = preload("res://config_manager.tres")
|
||||
|
||||
@ -22,7 +22,9 @@ func _on_toggle_tab_container_button_toggled(is_toggled: bool) -> void:
|
||||
|
||||
|
||||
func set_window_size() -> void:
|
||||
OS.window_size = v_box_container_primary.rect_size
|
||||
var style_box := theme.get_stylebox("panel", "background") as StyleBoxFlat
|
||||
var margin := style_box.content_margin_bottom * 2
|
||||
OS.window_size = v_box_container_primary.rect_size + Vector2.ONE * margin
|
||||
if tab_container.visible:
|
||||
OS.window_size.y += tab_container.rect_size.y
|
||||
|
76
ui/composed_ui.tscn
Normal file
76
ui/composed_ui.tscn
Normal file
@ -0,0 +1,76 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/default_theme.theme" type="Theme" id=1]
|
||||
[ext_resource path="res://ui/tasks_list.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://ui/time_counter.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://ui/settings.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://ui/composed_ui.gd" type="Script" id=5]
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme = ExtResource( 1 )
|
||||
theme_type_variation = "background"
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
margin_left = 5.0
|
||||
margin_top = 5.0
|
||||
margin_right = 355.0
|
||||
margin_bottom = 755.0
|
||||
|
||||
[node name="VBoxContainerPrimary" type="VBoxContainer" parent="VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_right = 350.0
|
||||
margin_bottom = 187.0
|
||||
|
||||
[node name="TimeCounter" parent="VBoxContainer/VBoxContainerPrimary" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 350.0
|
||||
margin_bottom = 141.0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/VBoxContainerPrimary"]
|
||||
margin_top = 148.0
|
||||
margin_right = 350.0
|
||||
margin_bottom = 187.0
|
||||
alignment = 2
|
||||
|
||||
[node name="ToggleTabContainerButton" type="Button" parent="VBoxContainer/VBoxContainerPrimary/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 329.0
|
||||
margin_right = 350.0
|
||||
margin_bottom = 39.0
|
||||
theme_type_variation = "panel_toggle_button"
|
||||
toggle_mode = true
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_top = 194.0
|
||||
margin_right = 350.0
|
||||
margin_bottom = 750.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="TasksList" parent="VBoxContainer/TabContainer" instance=ExtResource( 2 )]
|
||||
margin_left = 5.0
|
||||
margin_top = 46.0
|
||||
margin_right = -5.0
|
||||
margin_bottom = -5.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Settings" type="ScrollContainer" parent="VBoxContainer/TabContainer"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 4.0
|
||||
margin_top = 32.0
|
||||
margin_right = -4.0
|
||||
margin_bottom = -4.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Settings" parent="VBoxContainer/TabContainer/Settings" instance=ExtResource( 4 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 342.0
|
||||
margin_bottom = 520.0
|
68
ui/main.tscn
68
ui/main.tscn
@ -1,68 +0,0 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://ui/time_counter.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://ui/tasks_list.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://ui/settings.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://ui/main.gd" type="Script" id=4]
|
||||
[ext_resource path="res://assets/default_theme.theme" type="Theme" id=5]
|
||||
|
||||
[node name="Main" type="VBoxContainer"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme = ExtResource( 5 )
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="VBoxContainerPrimary" type="VBoxContainer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
margin_right = 360.0
|
||||
margin_bottom = 72.0
|
||||
|
||||
[node name="TimeCounter" parent="VBoxContainerPrimary" instance=ExtResource( 1 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 360.0
|
||||
margin_bottom = 48.0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainerPrimary"]
|
||||
margin_top = 52.0
|
||||
margin_right = 360.0
|
||||
margin_bottom = 72.0
|
||||
alignment = 2
|
||||
|
||||
[node name="ToggleTabContainerButton" type="Button" parent="VBoxContainerPrimary/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 348.0
|
||||
margin_right = 360.0
|
||||
margin_bottom = 20.0
|
||||
toggle_mode = true
|
||||
|
||||
[node name="TabContainer" type="TabContainer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
margin_top = 76.0
|
||||
margin_right = 360.0
|
||||
margin_bottom = 760.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="TasksList" parent="TabContainer" instance=ExtResource( 2 )]
|
||||
margin_left = 4.0
|
||||
margin_top = 32.0
|
||||
margin_right = -4.0
|
||||
margin_bottom = -4.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Settings" type="ScrollContainer" parent="TabContainer"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 4.0
|
||||
margin_top = 32.0
|
||||
margin_right = -4.0
|
||||
margin_bottom = -4.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Settings" parent="TabContainer/Settings" instance=ExtResource( 3 )]
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 352.0
|
||||
margin_bottom = 648.0
|
@ -7,6 +7,7 @@ onready var file_path_button := $"%FilePathButton" as Button
|
||||
onready var theme_path_button := $"%ThemePathButton" as Button
|
||||
onready var sound_check_box := $"%SoundCheckBox" as CheckBox
|
||||
onready var open_data_dir_button := $"%OpenDataDirButton" as Button
|
||||
onready var file_path_open_button := $"%FilePathOpenButton" as Button
|
||||
onready var attributions_rich_text_label := $"%AttributionsRichTextLabel" as RichTextLabel
|
||||
onready var file_path_file_dialog := $"%FilePathFileDialog" as FileDialog
|
||||
onready var theme_path_file_dialog := $"%ThemePathFileDialog" as FileDialog
|
||||
@ -47,7 +48,8 @@ func _ready() -> void:
|
||||
|
||||
# warning-ignore:return_value_discarded
|
||||
open_data_dir_button.connect("pressed", self, "_on_open_data_dir_button_pressed")
|
||||
|
||||
# warning-ignore:return_value_discarded
|
||||
file_path_open_button.connect("pressed", self, "_on_file_path_open_button_pressed")
|
||||
_on_current_file_changed()
|
||||
|
||||
|
||||
@ -90,3 +92,8 @@ func _on_attributions_rich_text_label_meta_clicked(meta) -> void:
|
||||
func _on_open_data_dir_button_pressed() -> void:
|
||||
# warning-ignore:return_value_discarded
|
||||
OS.shell_open(OS.get_user_data_dir())
|
||||
|
||||
|
||||
func _on_file_path_open_button_pressed() -> void:
|
||||
# warning-ignore:return_value_discarded
|
||||
OS.shell_open(config.current_timesheet_file_path.get_base_dir())
|
||||
|
@ -29,7 +29,7 @@ text = "File Path"
|
||||
[node name="FilePathLineEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 59.0
|
||||
margin_right = 332.0
|
||||
margin_right = 223.0
|
||||
margin_bottom = 24.0
|
||||
size_flags_horizontal = 3
|
||||
caret_blink = true
|
||||
@ -37,11 +37,18 @@ caret_blink_speed = 0.5
|
||||
|
||||
[node name="FilePathButton" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 336.0
|
||||
margin_right = 360.0
|
||||
margin_left = 227.0
|
||||
margin_right = 251.0
|
||||
margin_bottom = 24.0
|
||||
text = "..."
|
||||
|
||||
[node name="FilePathOpenButton" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 255.0
|
||||
margin_right = 360.0
|
||||
margin_bottom = 24.0
|
||||
text = "open directory"
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_top = 28.0
|
||||
margin_right = 360.0
|
||||
@ -86,6 +93,7 @@ margin_top = 104.0
|
||||
margin_right = 360.0
|
||||
margin_bottom = 760.0
|
||||
size_flags_vertical = 3
|
||||
theme_type_variation = "small_text"
|
||||
bbcode_enabled = true
|
||||
bbcode_text = "Font: Cairo, Designed by Mohamed Gaber, Accademia di Belle Arti di Urbino
|
||||
|
||||
|
@ -11,6 +11,7 @@ script = ExtResource( 1 )
|
||||
unique_name_in_owner = true
|
||||
margin_right = 360.0
|
||||
margin_bottom = 24.0
|
||||
placeholder_text = "Task Name. Use \"/\" to create subtasks"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
margin_top = 28.0
|
||||
@ -25,12 +26,18 @@ margin_top = 359.0
|
||||
margin_right = 344.0
|
||||
margin_bottom = 373.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 6
|
||||
theme_type_variation = "time_label"
|
||||
text = "00:00:00"
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
[node name="StartButton" type="Button" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 348.0
|
||||
margin_right = 360.0
|
||||
margin_bottom = 732.0
|
||||
theme_type_variation = "play_button"
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
Loading…
Reference in New Issue
Block a user