Updated branding colors, fix popup border

This commit is contained in:
Cole Deck
2025-02-19 19:53:46 +00:00
parent d9454f44d8
commit f873950bc0
4 changed files with 50 additions and 30 deletions

View File

@ -36,8 +36,9 @@ class Navbar(rio.Component):
office: str = ""
def sub_page(self, event: rio.DropdownChangeEvent):
page = event.value
self.session.navigate_to("/" + page)
self.checkpage = "n/a"
if page != 'n/a':
self.session.navigate_to("/" + page)
self.checkpage = "n/a"
def set_office(self, event: rio.DropdownChangeEvent):
settings = self.session[comps.Settings]
@ -51,6 +52,10 @@ class Navbar(rio.Component):
self.office = self.session[comps.Settings].office
print(self.office)
@rio.event.on_populate
def set_scan_init(self):
self.checkpage = "n/a"
def build(self) -> rio.Component:
# Which page is currently active? This will be used to highlight the
@ -66,7 +71,7 @@ class Navbar(rio.Component):
# done by using a `rio.Overlay` component.
return rio.Overlay(
rio.Row(
rio.Spacer(),
#rio.Spacer(),
# Use a card for visual separation
rio.Rectangle(
content=rio.Row(
@ -154,22 +159,28 @@ class Navbar(rio.Component):
spacing=1,
margin=1,
),
fill=self.session.theme.neutral_color,
corner_radius=self.session.theme.corner_radius_medium,
#fill=self.session.theme.neutral_color,
fill=rio.FrostedGlassFill(
color=rio.Color.from_hex("#a850f480"),
blur_size = 0.2
),
#corner_radius=self.session.theme.corner_radius_medium,
shadow_radius=0.8,
shadow_color=self.session.theme.shadow_color,
shadow_offset_y=0.2,
),
rio.Spacer(),
#rio.Spacer(),
# Proportions are an easy way to make the navbar's size relative
# to the screen. This assigns 5% to the first spacer, 90% to the
# navbar, and 5% to the second spacer.
proportions=(0.5, 9, 0.5),
#proportions=(0.5, 9, 0.5),
# Overlay assigns the entire screen to its child component.
# Since the navbar isn't supposed to take up all space, assign
# an alignment.
align_y=0,
margin=2,
#align_x=0.5,
grow_x = True,
margin=0,
)
)