Skip to content

Commit

Permalink
Color constants clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
easyuxd committed Aug 8, 2023
1 parent f6c1152 commit 8bb6d25
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 22 deletions.
18 changes: 7 additions & 11 deletions src/seedsigner/gui/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ class GUIConstants:
WARNING_COLOR = "#FFD60A"
DIRE_WARNING_COLOR = "#FF453A"
SUCCESS_COLOR = "#30D158"
BITCOIN_ORANGE = "#FF9416"
INFO_COLOR = "#0084FF"
ACCENT_COLOR = "#FF9F0A"
BITCOIN_ORANGE = "#FF9416"
TESTNET_COLOR = "#00F100"
REGTEST_COLOR = "#00CAF1"

Expand All @@ -43,7 +44,7 @@ class GUIConstants:
BODY_FONT_SIZE = 17
BODY_FONT_MAX_SIZE = TOP_NAV_TITLE_FONT_SIZE
BODY_FONT_MIN_SIZE = 15
BODY_FONT_COLOR = "#f8f8f8"
BODY_FONT_COLOR = "#FCFCFC"
BODY_LINE_SPACING = COMPONENT_PADDING

FIXED_WIDTH_FONT_NAME = "Inconsolata-Regular"
Expand All @@ -54,12 +55,12 @@ class GUIConstants:

BUTTON_FONT_NAME = "OpenSans-SemiBold"
BUTTON_FONT_SIZE = 18
BUTTON_FONT_COLOR = "#e8e8e8"
BUTTON_BACKGROUND_COLOR = "#2c2c2c"
BUTTON_FONT_COLOR = "#FCFCFC"
BUTTON_BACKGROUND_COLOR = "#2C2C2C"
BUTTON_HEIGHT = 32
BUTTON_SELECTED_FONT_COLOR = "black"
BUTTON_SELECTED_FONT_COLOR = BACKGROUND_COLOR

NOTIFICATION_COLOR = "#00f100"
NOTIFICATION_COLOR = "#00F100"



Expand All @@ -71,7 +72,6 @@ class FontAwesomeIconConstants:
CAMERA = "\uf030"
CHEVRON_UP = "\uf077"
CHEVRON_DOWN = "\uf078"
#SOLID_CIRCLE_CHECK = "\uf058"
CIRCLE = "\uf111"
CIRCLE_CHEVRON_RIGHT = "\uf138"
DICE = "\uf522"
Expand All @@ -86,14 +86,10 @@ class FontAwesomeIconConstants:
MAP = "\uf279"
PAPER_PLANE = "\uf1d8"
PEN = "\uf304"
#ROTATE_RIGHT = "\uf2f9"
SDCARD = "\uf7c2"
#SQUARE = "\uf0c8"
SQUARE_CARET_DOWN = "\uf150"
SQUARE_CARET_LEFT = "\uf191"
SQUARE_CARET_RIGHT = "\uf152"
SQUARE_CARET_UP = "\uf151"
#SQUARE_CHECK = "\uf14a"
UNLOCK = "\uf09c"
X = "\u0058"

Expand Down
4 changes: 2 additions & 2 deletions src/seedsigner/gui/screens/psbt_screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def __post_init__(self):
screen_y -= GUIConstants.COMPONENT_PADDING
self.components.append(IconTextLine(
icon_name=SeedSignerIconConstants.FINGERPRINT,
icon_color="#0084ff",
icon_color=GUIConstants.INFO_COLOR,
value_text=f"""{"Multisig" if self.is_multisig else self.fingerprint}: {"Change" if self.is_change_derivation_path else "Addr"} #{self.derivation_path_addr_index}""",
is_text_centered=False,
screen_x=GUIConstants.EDGE_PADDING,
Expand Down Expand Up @@ -685,7 +685,7 @@ def __post_init__(self):

icon = Icon(
icon_name=FontAwesomeIconConstants.PAPER_PLANE,
icon_color=GUIConstants.SUCCESS_COLOR,
icon_color=GUIConstants.INFO_COLOR,
icon_size=GUIConstants.ICON_LARGE_BUTTON_SIZE,
screen_y=self.top_nav.height + GUIConstants.COMPONENT_PADDING
)
Expand Down
14 changes: 7 additions & 7 deletions src/seedsigner/gui/screens/seed_screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def __post_init__(self):

self.fingerprint_icontl = IconTextLine(
icon_name=SeedSignerIconConstants.FINGERPRINT,
icon_color="#0084ff",
icon_color=GUIConstants.INFO_COLOR,
icon_size=GUIConstants.ICON_FONT_SIZE + 12,
label_text="fingerprint",
value_text=self.fingerprint,
Expand All @@ -442,7 +442,7 @@ class SeedOptionsScreen(ButtonListScreen):

def __post_init__(self):
self.top_nav_icon_name = SeedSignerIconConstants.FINGERPRINT
self.top_nav_icon_color = "#0084ff"
self.top_nav_icon_color = GUIConstants.INFO_COLOR
self.title = self.fingerprint
self.is_button_text_centered = False
self.is_bottom_list = True
Expand Down Expand Up @@ -510,7 +510,7 @@ def __post_init__(self):
(number_box_x + int(number_box_width/2), baseline_y),
font=number_font,
text=str(self.page_index * words_per_page + index + 1),
fill="#0084ff",
fill=GUIConstants.INFO_COLOR,
anchor="ms" # Middle (centered), baSeline
)

Expand Down Expand Up @@ -585,7 +585,7 @@ def __post_init__(self):
# Set up the fingerprint and passphrase displays
self.fingerprint_line = IconTextLine(
icon_name=SeedSignerIconConstants.FINGERPRINT,
icon_color="#0084ff",
icon_color=GUIConstants.INFO_COLOR,
label_text="Fingerprint",
value_text=self.fingerprint,
screen_x=GUIConstants.COMPONENT_PADDING,
Expand All @@ -595,7 +595,7 @@ def __post_init__(self):

self.derivation_line = IconTextLine(
icon_name=SeedSignerIconConstants.DERIVATION,
icon_color="#0084ff",
icon_color=GUIConstants.INFO_COLOR,
label_text="Derivation",
value_text=self.derivation_path,
screen_x=GUIConstants.COMPONENT_PADDING,
Expand All @@ -605,7 +605,7 @@ def __post_init__(self):

self.xpub_line = IconTextLine(
icon_name=FontAwesomeIconConstants.X,
icon_color="#0084ff",
icon_color=GUIConstants.INFO_COLOR,
label_text="Xpub",
value_text=f"{self.xpub[:18]}...",
font_name=GUIConstants.FIXED_WIDTH_FONT_NAME,
Expand Down Expand Up @@ -1012,7 +1012,7 @@ def __post_init__(self):

self.components.append(IconTextLine(
icon_name=SeedSignerIconConstants.FINGERPRINT,
icon_color="#0084ff",
icon_color=GUIConstants.INFO_COLOR,
label_text="changes fingerprint",
value_text=f"{self.fingerprint_without} >> {self.fingerprint_with}",
is_text_centered=True,
Expand Down
4 changes: 2 additions & 2 deletions src/seedsigner/gui/screens/tools_screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def __post_init__(self):

self.components.append(IconTextLine(
icon_name=SeedSignerIconConstants.FINGERPRINT,
icon_color="#0084ff",
icon_color=GUIConstants.INFO_COLOR,
label_text="fingerprint",
value_text=self.fingerprint,
is_text_centered=True,
Expand All @@ -387,7 +387,7 @@ def __post_init__(self):
if self.fingerprint:
self.components.append(IconTextLine(
icon_name=SeedSignerIconConstants.FINGERPRINT,
icon_color="#0084ff",
icon_color=GUIConstants.INFO_COLOR,
label_text="Fingerprint",
value_text=self.fingerprint,
screen_x=GUIConstants.EDGE_PADDING,
Expand Down
Binary file modified src/seedsigner/resources/fonts/seedsigner-icons.otf
Binary file not shown.

0 comments on commit 8bb6d25

Please sign in to comment.