Skip to content

Commit

Permalink
layout: UI tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
clstaudt committed Jan 30, 2023
1 parent a797aa9 commit 83f2755
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/clients/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def build(self):
ListTile(
leading=Icon(
utils.TuttleComponentIcons.client_icon,
size=dimens.ICON_SIZE,
size=dimens.MD_ICON_SIZE,
),
title=views.TBodyText(self.client.name),
trailing=editor_controls,
Expand Down
2 changes: 1 addition & 1 deletion app/contacts/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def build(self):
ListTile(
leading=Icon(
utils.TuttleComponentIcons.contact_icon,
size=dimens.ICON_SIZE,
size=dimens.MD_ICON_SIZE,
),
title=views.TBodyText(utils.truncate_str(self.contact.name)),
subtitle=views.TBodyText(
Expand Down
2 changes: 1 addition & 1 deletion app/contracts/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def build(self):
ListTile(
leading=Icon(
utils.TuttleComponentIcons.contract_icon,
size=dimens.ICON_SIZE,
size=dimens.MD_ICON_SIZE,
),
title=views.TBodyText(self.contract.title),
subtitle=views.TBodyText(
Expand Down
16 changes: 15 additions & 1 deletion app/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@
class Spacer(Container):
"""Creates a space between controls"""

# FIXME: Unpythonic code, replace with
# class Spacer(Container):
# SPACE_SIZES = {
# 'lg': 40,
# 'md': 20,
# 'sm': 10,
# 'xs': 5,
# None: 15,
# }

# def __init__(self, size=None, **kwargs):
# self._space_size = self.SPACE_SIZES[size]
# super().__init__(height=self._space_size, width=self._space_size, **kwargs)

def __init__(
self,
lg_space: bool = False,
Expand Down Expand Up @@ -827,7 +841,7 @@ def __init__(
leading=Container(
content=TSubHeading(
subtitle=title,
align=utils.START_ALIGNMENT,
align=utils.TXT_ALIGN_LEFT,
expand=True,
color=colors.GRAY_DARK_COLOR,
),
Expand Down
3 changes: 2 additions & 1 deletion app/projects/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def build(self):
ListTile(
leading=Icon(
utils.TuttleComponentIcons.project_icon,
size=dimens.ICON_SIZE,
size=dimens.MD_ICON_SIZE,
),
title=views.TBodyText(self.project.title),
subtitle=views.TBodyText(
Expand All @@ -76,6 +76,7 @@ def build(self):
on_click=lambda e: self.on_view_details_clicked(self.project.id),
),
views.Spacer(md_space=True),
views.Spacer(md_space=True),
ResponsiveRow(
controls=[
views.TBodyText(
Expand Down

0 comments on commit 83f2755

Please sign in to comment.