-
Notifications
You must be signed in to change notification settings - Fork 815
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix min width * changelog * snapshot tests * whitespace
- Loading branch information
1 parent
ca68b86
commit a11ff16
Showing
9 changed files
with
601 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
tests/snapshot_tests/snapshot_apps/missing_vertical_scroll.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from textual.app import App, ComposeResult | ||
from textual.containers import Horizontal | ||
from textual.widgets import OptionList | ||
|
||
|
||
class MissingScrollbarApp(App[None]): | ||
CSS = """ | ||
OptionList { | ||
height: 1fr; | ||
} | ||
#left { | ||
min-width: 25; | ||
} | ||
#middle { | ||
width: 5fr; | ||
} | ||
#right { | ||
min-width: 30; | ||
} | ||
""" | ||
|
||
def compose(self) -> ComposeResult: | ||
options = [str(n) for n in range(200)] | ||
with Horizontal(): | ||
yield OptionList(*options, id="left") | ||
yield OptionList(*options, id="middle") | ||
yield OptionList(*options, id="right") | ||
|
||
|
||
if __name__ == "__main__": | ||
MissingScrollbarApp().run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from textual.app import App, ComposeResult | ||
from textual.containers import Vertical | ||
from textual.widgets import Placeholder | ||
|
||
|
||
class VerticalApp(App): | ||
CSS = """ | ||
#top { | ||
height: 1fr; | ||
border: white; | ||
} | ||
#bottom { | ||
height:3fr; | ||
border: white; | ||
max-height: 10; | ||
} | ||
""" | ||
|
||
def compose(self) -> ComposeResult: | ||
with Vertical(): | ||
yield Placeholder(id="top") | ||
yield Placeholder(id="bottom") | ||
|
||
|
||
if __name__ == "__main__": | ||
VerticalApp().run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from textual.app import App, ComposeResult | ||
from textual.containers import Vertical | ||
from textual.widgets import Placeholder | ||
|
||
|
||
class VerticalApp(App): | ||
CSS = """ | ||
#top { | ||
min-height: 10; | ||
height: 1fr; | ||
border: white; | ||
} | ||
#bottom { | ||
height:3fr; | ||
border: white; | ||
} | ||
""" | ||
|
||
def compose(self) -> ComposeResult: | ||
with Vertical(): | ||
yield Placeholder(id="top") | ||
yield Placeholder(id="bottom") | ||
|
||
|
||
if __name__ == "__main__": | ||
VerticalApp().run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters