Skip to content

Commit 83f2755

Browse files
committed
layout: UI tweaks
1 parent a797aa9 commit 83f2755

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

app/clients/view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def build(self):
6060
ListTile(
6161
leading=Icon(
6262
utils.TuttleComponentIcons.client_icon,
63-
size=dimens.ICON_SIZE,
63+
size=dimens.MD_ICON_SIZE,
6464
),
6565
title=views.TBodyText(self.client.name),
6666
trailing=editor_controls,

app/contacts/view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def build(self):
4848
ListTile(
4949
leading=Icon(
5050
utils.TuttleComponentIcons.contact_icon,
51-
size=dimens.ICON_SIZE,
51+
size=dimens.MD_ICON_SIZE,
5252
),
5353
title=views.TBodyText(utils.truncate_str(self.contact.name)),
5454
subtitle=views.TBodyText(

app/contracts/view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def build(self):
6060
ListTile(
6161
leading=Icon(
6262
utils.TuttleComponentIcons.contract_icon,
63-
size=dimens.ICON_SIZE,
63+
size=dimens.MD_ICON_SIZE,
6464
),
6565
title=views.TBodyText(self.contract.title),
6666
subtitle=views.TBodyText(

app/core/views.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@
4040
class Spacer(Container):
4141
"""Creates a space between controls"""
4242

43+
# FIXME: Unpythonic code, replace with
44+
# class Spacer(Container):
45+
# SPACE_SIZES = {
46+
# 'lg': 40,
47+
# 'md': 20,
48+
# 'sm': 10,
49+
# 'xs': 5,
50+
# None: 15,
51+
# }
52+
53+
# def __init__(self, size=None, **kwargs):
54+
# self._space_size = self.SPACE_SIZES[size]
55+
# super().__init__(height=self._space_size, width=self._space_size, **kwargs)
56+
4357
def __init__(
4458
self,
4559
lg_space: bool = False,
@@ -827,7 +841,7 @@ def __init__(
827841
leading=Container(
828842
content=TSubHeading(
829843
subtitle=title,
830-
align=utils.START_ALIGNMENT,
844+
align=utils.TXT_ALIGN_LEFT,
831845
expand=True,
832846
color=colors.GRAY_DARK_COLOR,
833847
),

app/projects/view.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def build(self):
5858
ListTile(
5959
leading=Icon(
6060
utils.TuttleComponentIcons.project_icon,
61-
size=dimens.ICON_SIZE,
61+
size=dimens.MD_ICON_SIZE,
6262
),
6363
title=views.TBodyText(self.project.title),
6464
subtitle=views.TBodyText(
@@ -76,6 +76,7 @@ def build(self):
7676
on_click=lambda e: self.on_view_details_clicked(self.project.id),
7777
),
7878
views.Spacer(md_space=True),
79+
views.Spacer(md_space=True),
7980
ResponsiveRow(
8081
controls=[
8182
views.TBodyText(

0 commit comments

Comments
 (0)