-
Notifications
You must be signed in to change notification settings - Fork 814
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4037 from Textualize/fix-percentage-dimensions
fix for percentage dimensions
- Loading branch information
Showing
10 changed files
with
1,124 additions
and
931 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
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
1,972 changes: 1,066 additions & 906 deletions
1,972
tests/snapshot_tests/__snapshots__/test_snapshots.ambr
Large diffs are not rendered by default.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
tests/snapshot_tests/snapshot_apps/input_percentage_width.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,35 @@ | ||
from textual.app import App, ComposeResult | ||
from textual.widgets import Input, TextArea, Static, Button, Label | ||
|
||
|
||
class InputVsTextArea(App[None]): | ||
CSS = """ | ||
Screen > *, Screen > *:focus { | ||
width: 50%; | ||
height: 1fr; | ||
border: solid red; | ||
} | ||
App #ruler { | ||
width: 1fr; | ||
height: 1; | ||
border: none; | ||
} | ||
""" | ||
|
||
def compose(self) -> ComposeResult: | ||
yield Label("[reverse]0123456789[/]0123456789" * 4, id="ruler") | ||
|
||
input = Input() | ||
input.cursor_blink = False | ||
yield input | ||
|
||
text_area = TextArea() | ||
text_area.cursor_blink = False | ||
yield text_area | ||
|
||
yield Static() | ||
yield Button() | ||
|
||
|
||
if __name__ == "__main__": | ||
InputVsTextArea().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
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