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
child widgets of a parent widget docked to the right side of the screen still try to default to the left and will try to "magnetize" as far left as possible (as far as allowed by the parent widgets max-width: value).
Using auto scaling in the parent widget causes the child widgets snap back to the left and stretch the parent container across the entire view
attempting to align the runaway widget to the right side (via the parent) does not fix the parent containers auto scaling being stretched
This is using the most recent src including the merge made last night (#5360)
test code;
from rich.console import Console
from rich.traceback import install
install()
from rich import pretty
pretty.install()
from textual.app import App
from textual.widgets import Button, Static
# buttons inside the sidebar
class StartButtons(Static):
def compose(self):
yield Button("Placeholder", variant="primary", id="p1")
yield Button("Placeholder", variant="error", id="p2")
# sidebar widget
class Sidebar(Static):
def compose(self):
yield StartButtons()
# side container
class SideContainer(Static):
def compose(self):
yield Sidebar()
# Main app
class Test4(App):
DEFAULT_CSS = """
StartButtons {
background: yellow;
align-horizontal: center;
}
SideContainer {
dock: right;
height: 99%;
width: 99%;
background: red;
# max-width: 60;
# align-horizontal: right;
}
Sidebar {
min-width: 30;
height: 20;
width: 20;
background: blue;
border: double green;
}
"""
BINDINGS = [
("q", "quit", "Quit"),
]
def compose(self):
yield SideContainer()
def action_quit(self):
self.exit()
# run
if __name__ == "__main__":
Test4().run()
child widgets of a parent widget docked to the right side of the screen still try to default to the left and will try to "magnetize" as far left as possible (as far as allowed by the parent widgets max-width: value).
Using auto scaling in the parent widget causes the child widgets snap back to the left and stretch the parent container across the entire view
attempting to align the runaway widget to the right side (via the parent) does not fix the parent containers auto scaling being stretched
This is using the most recent src including the merge made last night (#5360)
test code;
The text was updated successfully, but these errors were encountered: