Updated branding colors, fix popup border

master
Cole Deck 3 weeks ago
parent d9454f44d8
commit f873950bc0

@ -1,4 +1,6 @@
from peewee import *
import importlib
importlib.import_module('meilisearch')
from search import InventorySearch as ivs
from playhouse.shortcuts import ReconnectMixin

@ -18,9 +18,10 @@ from db_classes import *
#
# https://rio.dev/docs/api/theme
theme = rio.Theme.from_colors(
secondary_color=rio.Color.from_hex("004990ff"),
primary_color=rio.Color.from_hex("004990ff"),
neutral_color=rio.Color.from_hex("b1cad8FF"),
secondary_color=rio.Color.from_hex("#84329B"),
primary_color=rio.Color.from_hex("#84329B"),
#neutral_color=rio.Color.from_hex("#a850f480"),
neutral_color=rio.Color.from_hex("#D0A2F7"),
light=True,
)

@ -36,6 +36,7 @@ class Navbar(rio.Component):
office: str = ""
def sub_page(self, event: rio.DropdownChangeEvent):
page = event.value
if page != 'n/a':
self.session.navigate_to("/" + page)
self.checkpage = "n/a"
@ -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,
)
)

@ -257,30 +257,20 @@ class BrowsePage(rio.Component):
label="Search"
)
),
searchview,
rio.Popup(
anchor=rio.Text(
text="",
style='heading1',
align_x = 0.5
),
color=self.popup_color,
is_open=self.popup_show,
content=rio.Text(
text=self.popup_message,
),
),
rio.Popup(
anchor=rio.Text(
text="",
style='heading1',
align_x = 0.5
align_x = 0.5,
align_y = 0,
),
#color=self.popup_color,
is_open=self.info_show,
min_width=40,
position='fullscreen',
#position='fullscreen',
align_y = 1,
color=rio.Color.TRANSPARENT,
content=rio.Card(
rio.Column(
@ -308,12 +298,14 @@ class BrowsePage(rio.Component):
anchor=rio.Text(
text="",
style='heading1',
align_x = 0.5
align_x = 0.5,
align_y = 0,
),
#color=self.popup_color,
is_open=self.edit_show,
min_width=40,
position='fullscreen',
#position='fullscreen',
align_y = 1,
color=rio.Color.TRANSPARENT,
content=rio.Card(
rio.Column(
@ -374,12 +366,26 @@ class BrowsePage(rio.Component):
margin=2
),
align_x=0.5,
align_y=0.5
align_y=0.5,
)
),
searchview,
rio.Popup(
anchor=rio.Text(
text="",
style='heading1',
align_x = 0.5
),
color=self.popup_color,
is_open=self.popup_show,
content=rio.Text(
text=self.popup_message,
),
),
spacing=2,
min_width=60,
align_x=0.5,
align_y=0,
)

Loading…
Cancel
Save