Skip to content

Commit

Permalink
improved media type image params
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-morel committed Aug 25, 2024
1 parent 253d322 commit fd9c56f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/application/todoapp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def forward(self):
class Layout(Component):
r"""
\frame
\frame padding=20 weight:y='1:10' weight:x='1:10' pos:grid=0,0 pos:sticky='nsew'
\button command={back} image=img:backward{width: 10} pos:grid=0,0 pos:sticky='w' bootstyle='dark outline'
\button command={forward} image=img:forward{width: 10} pos:grid=2,0 pos:sticky='e' bootstyle='dark outline'
\frame padding=5 weight:y='1:10' weight:x='1:10' pos:grid=0,0 pos:sticky='nsew'
\button command={back} image=img:backward{width: 20} pos:grid=0,0 pos:sticky='w' bootstyle='dark outline'
\button command={forward} image=img:forward{width: 20} pos:grid=2,0 pos:sticky='e' bootstyle='dark outline'
\frame:outlet pos:grid=0,1
"""
code = __doc__
Expand Down
3 changes: 1 addition & 2 deletions src/taktk/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ def parse_media_spec(spec):
def parse_media_spec_props(props):
from .component.parser import evaluate_literal
props = props.split(';')
print(props)
return {x.split(':')[0]: evaluate_literal(x.split(':')[1].strip(), None) for x in props}
return {x.split(':')[0]: evaluate_literal(x.split(':')[1].strip(), None) for x in props if x.strip()}


def get_media(spec):
Expand Down

0 comments on commit fd9c56f

Please sign in to comment.