Skip to content

Commit

Permalink
Merge pull request #108 from LayerTwo-Labs/marc
Browse files Browse the repository at this point in the history
Font standardized. New wallet format as well as full sha256 for bip39 hex. New quotes and settings format
  • Loading branch information
psztorc authored Aug 5, 2024
2 parents cc6499e + 5e2ed34 commit 5071751
Show file tree
Hide file tree
Showing 23 changed files with 248 additions and 183 deletions.
Binary file added assets/images/left-arrow-svgrepo-com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/images/left-arrow-svgrepo-com.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://c865fxarlp4e1"
path="res://.godot/imported/left-arrow-svgrepo-com.png-09d152a0374ac529486577896f020c4e.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/images/left-arrow-svgrepo-com.png"
dest_files=["res://.godot/imported/left-arrow-svgrepo-com.png-09d152a0374ac529486577896f020c4e.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/images/right-arrow-next-svgrepo-com (2).png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://4ulwmgydwoi2"
path="res://.godot/imported/right-arrow-next-svgrepo-com (2).png-665bbb95790be8cf11c37fcad0ac275c.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/images/right-arrow-next-svgrepo-com (2).png"
dest_files=["res://.godot/imported/right-arrow-next-svgrepo-com (2).png-665bbb95790be8cf11c37fcad0ac275c.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
2 changes: 1 addition & 1 deletion resource/GlobalFont.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var default_font: Font

func _ready():
# Load your custom font
default_font = load("res://assets/fonts/Satoshi-Regular.otf")
default_font = load("res://assets/fonts/Cantarell-Regular.ttf")

# Apply the font to all Control nodes
apply_font_override(get_tree().root)
Expand Down
Binary file modified resource/theme/black.theme
Binary file not shown.
4 changes: 0 additions & 4 deletions source/application/AddressInfo.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ extends GridContainer

var columns_count = 3
var rows_count = 4
var font_path = "res://assets/fonts/Satoshi-Regular.otf"

func _ready():
columns = columns_count
Expand All @@ -14,8 +13,6 @@ func setup_grid():
for child in get_children():
child.queue_free()

var font = load(font_path)

# Set up the grid
for i in range(rows_count * columns_count):
var label = Label.new()
Expand All @@ -24,7 +21,6 @@ func setup_grid():
label.size_flags_horizontal = SIZE_EXPAND_FILL
label.size_flags_vertical = SIZE_EXPAND_FILL
label.autowrap_mode = TextServer.AUTOWRAP_OFF
label.add_theme_font_override("font", font)
label.text = "check" # Empty by default
add_child(label)

Expand Down
38 changes: 16 additions & 22 deletions source/application/application.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,10 @@ script = ExtResource("2_6g70o")

[node name="Wallet" type="TabContainer" parent="MarginContainer/VBoxContainer/TabContainer"]
layout_mode = 2
current_tab = 1
tabs_visible = false
script = ExtResource("3_rk7qs")

[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet"]
visible = false
layout_mode = 2

[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer"]
Expand All @@ -82,7 +80,7 @@ layout_mode = 2
custom_minimum_size = Vector2(2.08165e-12, 45)
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "RESTORE WALLET"
text = "Restore Wallet"
horizontal_alignment = 1

[node name="Control" type="Control" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer2/VBoxContainer"]
Expand All @@ -103,7 +101,7 @@ layout_mode = 2
[node name="Load" type="Button" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer2/VBoxContainer"]
custom_minimum_size = Vector2(2.08165e-12, 60)
layout_mode = 2
text = "LOAD WALLET"
text = "Load Wallet"

[node name="Control" type="Panel" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer"]
custom_minimum_size = Vector2(8, 2.08165e-12)
Expand All @@ -126,7 +124,7 @@ layout_mode = 2
custom_minimum_size = Vector2(2.08165e-12, 45)
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "CREATE WALLET"
text = "Create Wallet"
horizontal_alignment = 1

[node name="Control" type="Control" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer2"]
Expand All @@ -136,9 +134,10 @@ layout_mode = 2
[node name="Create" type="Button" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer2"]
custom_minimum_size = Vector2(2.08165e-12, 220)
layout_mode = 2
text = "CREATE NEW WALLET"
text = "Create New Wallet"

[node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet"]
visible = false
layout_mode = 2

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2"]
Expand Down Expand Up @@ -171,23 +170,10 @@ text = "Fast Create"
layout_mode = 2
icon = ExtResource("4_a3gdc")

[node name="Hide" type="CheckButton" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer"]
custom_minimum_size = Vector2(10, 10)
layout_mode = 2
text = "Hide"

[node name="Spacer3" type="Control" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer"]
custom_minimum_size = Vector2(2.08165e-12, 5)
layout_mode = 2

[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer"]
layout_mode = 2
script = ExtResource("4_sm74a")

[node name="Spacer2" type="Control" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer"]
custom_minimum_size = Vector2(2.08165e-12, 5)
layout_mode = 2

[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer"]
layout_mode = 2
size_flags_vertical = 3
Expand All @@ -199,7 +185,7 @@ size_flags_vertical = 0

[node name="Header" type="Label" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer2/BIP39"]
layout_mode = 2
text = "BIP 39 Information"
text = "BIP 39 Seed Phrase"
horizontal_alignment = 1

[node name="Spacer" type="Control" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer2"]
Expand All @@ -212,14 +198,22 @@ size_flags_vertical = 0

[node name="Header" type="Label" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer2/Paths"]
layout_mode = 2
text = "BIP 32 HD Information"
text = "BIP 32"
horizontal_alignment = 1

[node name="LaunchPopUp" type="Button" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer2/Paths"]
custom_minimum_size = Vector2(2.08165e-12, 50)
layout_mode = 2
size_flags_vertical = 10
text = "CREATE WALLET"
text = "Create Wallet"

[node name="Spacer2" type="Control" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer"]
custom_minimum_size = Vector2(2.08165e-12, 5)
layout_mode = 2

[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer"]
layout_mode = 2
script = ExtResource("4_sm74a")

[node name="Nodes" parent="MarginContainer/VBoxContainer/TabContainer" instance=ExtResource("2_xvhh7")]
visible = false
Expand Down
30 changes: 16 additions & 14 deletions source/application/mnemonic.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ extends GridContainer

var columns_count = 13
var rows_count = 3

var header_font_path = "res://assets/fonts/Satoshi-Bold.otf"
var header_font_path = "res://assets/fonts/Cantarell-Bold.ttf"

func _ready():
columns = columns_count
Expand Down Expand Up @@ -66,6 +65,10 @@ func setup_grid():
else:
label.text = " "

# Set text color for WORDS row to blue
if i > 0 and i < 13:
label.add_theme_color_override("font_color", Color.DEEP_SKY_BLUE)

panel.add_child(label)
add_child(panel)

Expand All @@ -76,27 +79,26 @@ func setup_grid():
func _on_window_resize():
var parent_size = get_parent().size
var max_width = parent_size.x * 0.8 # 80% of parent width
var max_height = parent_size.y * 0.6 # 60% of parent height, adjust as needed

var min_height = 100
var cell_width = max_width / columns_count
var cell_height = cell_width * 0.6 # Adjust this factor for desired cell height

var cell_height = min_height / rows_count
var grid_width = cell_width * columns_count
var grid_height = cell_height * rows_count

# Ensure the grid doesn't exceed the maximum allowed size
var grid_height = min_height
# Ensure the grid doesn't exceed the maximum allowed width
grid_width = min(grid_width, max_width)
grid_height = min(grid_height, max_height)


# Update the grid size
custom_minimum_size = Vector2(grid_width, grid_height)
size = Vector2(grid_width, grid_height)

# Update cell sizes
for child in get_children():
child.custom_minimum_size = Vector2(cell_width, cell_height)

# Center the grid in its parent
position = Vector2((parent_size.x - grid_width) / 2, (parent_size.y - grid_height) / 2)

queue_sort()
3 changes: 0 additions & 3 deletions source/application/tabs_format.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ extends TabContainer
func _ready():
var theme = Theme.new()
set_tab_alignment(TabBar.ALIGNMENT_CENTER)
var font = load("res://assets/fonts/Satoshi-Black.otf")
theme.set_font("font", "TabContainer", font)
theme.set_font_size("font", "TabBar", 28)
theme.set_constant("tab_minimum_width", "TabContainer", 200) # Set minimum tab width
theme.set_constant("tab_height", "TabContainer", 80) # Adjust tab height
theme.set_constant("h_separation", "TabContainer", 6)
Expand Down
Loading

0 comments on commit 5071751

Please sign in to comment.