You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example shows that align property is not working well. Static widget should be positioned vertically in the middle of CustomWidget. It was broken between 0.83.0 version and 2.1.2.
from __future__ importannotationsfromtextual.appimportApp, ComposeResultfromtextual.widgetimportWidgetfromtextual.widgetsimportFooter, StaticclassCustomWidget(Widget):
DEFAULT_CSS=""" CustomWidget { width: 1fr; background: grey; height: auto; min-height: 3; align: center middle; /* align doesn't work with height and min-height combination */ Static { background: red; } } """classMyApp(App):
defcompose(self) ->ComposeResult:
withCustomWidget():
yieldStatic("Some text")
yieldFooter()
MyApp().run()
With deleted min-height and static height: 3 static widget is positioned properly:
from __future__ importannotationsfromtextual.appimportApp, ComposeResultfromtextual.widgetimportWidgetfromtextual.widgetsimportFooter, StaticclassCustomWidget(Widget):
DEFAULT_CSS=""" CustomWidget { width: 1fr; background: grey; height: 3; align: center middle; /* now align works properly */ Static { background: red; } } """classMyApp(App):
defcompose(self) ->ComposeResult:
withCustomWidget():
yieldStatic("Some text")
yieldFooter()
MyApp().run()
The text was updated successfully, but these errors were encountered:
Fix issue with alignment in containers with auto _and_ min height/width.
Currently the size of the parent passed to `_align_size` doesn't account
for any min height/width when the container has auto dimensions.
FixesTextualize#5608
This issue with auto containers with auto children is proving tricky! The container size seems correct in the latest version at least, hopefully just the alignment need ironing out...
This example shows that align property is not working well. Static widget should be positioned vertically in the middle of
CustomWidget
. It was broken between 0.83.0 version and 2.1.2.With deleted
min-height
and staticheight: 3
static widget is positioned properly:The text was updated successfully, but these errors were encountered: