Skip to content

Commit

Permalink
Merge pull request #113 from LayerTwo-Labs/marc
Browse files Browse the repository at this point in the history
ux button updates for wallet
  • Loading branch information
mplatt8 authored Sep 4, 2024
2 parents fa536da + 3b45421 commit a87abe0
Show file tree
Hide file tree
Showing 14 changed files with 1,280 additions and 243 deletions.
6 changes: 3 additions & 3 deletions assets/data/quotes.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
"author": "Albert Hirschman"
},
{
"quote": "Monopolies don't innovate. The motto of any monopoly is: 'We don't care, because we don't have to'",
"quote": "Monopolies don't innovate. The motto of any monopoly is: 'We don't care, because we don't have to.'",
"author": "Marc Andreessen"
},
{
"quote": "It is self-deception to think that the status quo is going to be satisfactory for everyone forever. It's already not satisfactory for a lot of people",
"quote": "It is self-deception to think that the status quo is going to be satisfactory for everyone forever. It's already not satisfactory for a lot of people.",
"author": "David Deutsch"
},
{
"quote": "Ambition is common to all men; and those, who are unable to rise to distinction, are at least willing to reduce others to their own standard",
"quote": "Ambition is common to all men; and those, who are unable to rise to distinction, are at least willing to reduce others to their own standard.",
"author": "William Godwin"
},
]
192 changes: 21 additions & 171 deletions source/application/application.tscn
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
[gd_scene load_steps=13 format=3 uid="uid://d3umh8q67cxar"]
[gd_scene load_steps=11 format=3 uid="uid://d3umh8q67cxar"]

[ext_resource type="Theme" uid="uid://h5leavcufiab" path="res://resource/theme/black.theme" id="1_ool8a"]
[ext_resource type="Script" path="res://source/application/tabs_format.gd" id="2_6g70o"]
[ext_resource type="PackedScene" uid="uid://bi3mevmny3dj3" path="res://source/settings/settings.tscn" id="2_qna4f"]
[ext_resource type="Script" path="res://source/application/walletbutton.gd" id="2_x0thy"]
[ext_resource type="PackedScene" uid="uid://3423r8wl8vxb" path="res://source/nodes/nodes.tscn" id="2_xvhh7"]
[ext_resource type="Script" path="res://source/application/wallet_creator.gd" id="3_rk7qs"]
[ext_resource type="Script" path="res://source/nodes/dashboard.gd" id="4_1w6t5"]
[ext_resource type="Texture2D" uid="uid://itqhnp8fc877" path="res://assets/images/help-circle-outline-svgrepo-com.svg" id="4_a3gdc"]
[ext_resource type="Texture2D" uid="uid://dgqkqb642nnfx" path="res://assets/images/exit-svgrepo-com.svg" id="4_ry4n6"]
[ext_resource type="Script" path="res://source/application/mnemonic.gd" id="4_sm74a"]
[ext_resource type="PackedScene" uid="uid://he03ywtaoupd" path="res://source/create_wallet/wallet-create.tscn" id="7_wg8wv"]
[ext_resource type="PackedScene" uid="uid://duvvgc45h86gp" path="res://source/fast_withdrawal/fast_withdraw-new.tscn" id="9_al4dm"]
[ext_resource type="PackedScene" uid="uid://dwhtby81ylt3s" path="res://ui/components/left_menu/left_menu.tscn" id="11_x7vrd"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qsl1u"]
bg_color = Color(0, 0, 0, 1)
[sub_resource type="Theme" id="Theme_j82mx"]
TabContainer/styles/panel = null

[node name="Application" type="Control" groups=["application"]]
texture_filter = 4
Expand Down Expand Up @@ -47,188 +45,40 @@ theme_override_constants/margin_bottom = 4

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
script = ExtResource("2_x0thy")

[node name="TabContainer" type="TabContainer" parent="MarginContainer/VBoxContainer"]
[node name="TabContainer2" type="TabContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
script = ExtResource("2_6g70o")

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

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

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

[node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer2"]
layout_mode = 2
size_flags_horizontal = 3

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

[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer2/VBoxContainer"]
custom_minimum_size = Vector2(2.08165e-12, 45)
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Restore Wallet"
horizontal_alignment = 1

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

[node name="MnemonicIn" type="TextEdit" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer2/VBoxContainer"]
custom_minimum_size = Vector2(2.08165e-12, 100)
layout_mode = 2
placeholder_text = "Enter 12 words separated by a space"
wrap_mode = 1
autowrap_mode = 2

[node name="Control2" type="Control" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer2/VBoxContainer"]
custom_minimum_size = Vector2(2.08165e-12, 50)
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"

[node name="Control" type="Panel" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer"]
custom_minimum_size = Vector2(8, 2.08165e-12)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_qsl1u")

[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3

[node name="VBoxContainer2" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer"]
layout_mode = 2
size_flags_horizontal = 3

[node name="Control3" type="Control" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer2"]
custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 2

[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer2"]
custom_minimum_size = Vector2(2.08165e-12, 45)
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Create Wallet"
horizontal_alignment = 1

[node name="Control" type="Control" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer/HBoxContainer/MarginContainer/VBoxContainer2"]
custom_minimum_size = Vector2(2.08165e-12, 40)
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"

[node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet"]
[node name="Wallet" parent="MarginContainer/VBoxContainer/TabContainer2" instance=ExtResource("7_wg8wv")]
visible = false
layout_mode = 2

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

[node name="BoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3

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

[node name="Return" type="Button" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer"]
layout_mode = 2
icon = ExtResource("4_ry4n6")

[node name="LineEdit" type="LineEdit" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
placeholder_text = "Input random string or fast create"
max_length = 64
expand_to_text_length = true

[node name="Random" type="Button" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer"]
custom_minimum_size = Vector2(2.08165e-12, 50)
layout_mode = 2
text = "Fast Create"

[node name="Help" type="Button" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer"]
layout_mode = 2
icon = ExtResource("4_a3gdc")

[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="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer"]
[node name="TabContainer" type="TabContainer" parent="MarginContainer/VBoxContainer/TabContainer2"]
layout_mode = 2
size_flags_vertical = 3
tab_alignment = 1
clip_tabs = false
script = ExtResource("2_6g70o")

[node name="BIP39" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 3
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 Seed Phrase"
horizontal_alignment = 1

[node name="Spacer" type="Control" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer2"]
layout_mode = 2

[node name="Paths" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TabContainer/Wallet/MarginContainer2/VBoxContainer/BoxContainer/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 3
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"
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"

[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
[node name="Nodes" parent="MarginContainer/VBoxContainer/TabContainer2/TabContainer" instance=ExtResource("2_xvhh7")]
layout_mode = 2
script = ExtResource("4_1w6t5")

[node name="Fast Withdraw" parent="MarginContainer/VBoxContainer/TabContainer" instance=ExtResource("9_al4dm")]
[node name="Fast Withdraw" parent="MarginContainer/VBoxContainer/TabContainer2/TabContainer" instance=ExtResource("9_al4dm")]
visible = false
layout_mode = 2

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

[node name="Settings" parent="MarginContainer/VBoxContainer/TabContainer" instance=ExtResource("2_qna4f")]
[node name="Settings" parent="MarginContainer/VBoxContainer/TabContainer2/TabContainer" instance=ExtResource("2_qna4f")]
visible = false
layout_mode = 2

Expand All @@ -239,5 +89,5 @@ size_flags_vertical = 1

[node name="ChainProviderInfoLayer" type="CanvasLayer" parent="."]

[editable path="MarginContainer/VBoxContainer/TabContainer/Nodes"]
[editable path="MarginContainer/VBoxContainer/TabContainer/Nodes/ScrollContainer/Window/NodePanel1"]
[editable path="MarginContainer/VBoxContainer/TabContainer2/TabContainer/Nodes"]
[editable path="MarginContainer/VBoxContainer/TabContainer2/TabContainer/Nodes/ScrollContainer/Window/NodePanel1"]
28 changes: 22 additions & 6 deletions source/application/tabs_format.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,26 @@ extends TabContainer

func _ready():
var theme = Theme.new()
set_tab_alignment(TabBar.ALIGNMENT_CENTER)
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)
theme.set_constant("outline_size", "TabContainer", 5)
theme.set_constant("font_size", "TabContainer", 24)

# Set the tab bar background color to black
var tabbar_style = StyleBoxFlat.new()
tabbar_style.bg_color = Color.BLACK
tabbar_style.expand_margin_top = 5 # Adjust this value as needed
tabbar_style.expand_margin_bottom = 5 # Adjust this value as needed
theme.set_stylebox("tabbar_background", "TabContainer", tabbar_style)

# Remove side margins to ensure the background extends fully
theme.set_constant("side_margin", "TabContainer", 0)

# Ensure the panel (content area) remains unchanged
var panel_style = get_theme_stylebox("panel")
if panel_style:
theme.set_stylebox("panel", "TabContainer", panel_style)

self.theme = theme

# Ensure the TabContainer fills its parent
anchor_right = 1
anchor_bottom = 1
offset_right = 0
offset_bottom = 0
Loading

0 comments on commit a87abe0

Please sign in to comment.