ModalScreen takes the size of the terminal window when the program was first opened and not its current size. https://github.com/user-attachments/assets/ced75d88-f990-494a-a166-9f2c367c58f2 <!-- This is valid Markdown, please paste the following directly in to a GitHub issue --> # Textual Diagnostics ## Versions | Name | Value | |---------|--------| | Textual | 0.83.0 | | Rich | 13.8.0 | ## Python | Name | Value | |----------------|----------------------------------------------------| | Version | 3.12.5 | | Implementation | CPython | | Compiler | MSC v.1940 64 bit (AMD64) | | Executable | G:\Python\3.12\AudioPlayer\venv\Scripts\python.exe | ## Operating System | Name | Value | |---------|------------| | System | Windows | | Release | 11 | | Version | 10.0.22631 | ## Terminal | Name | Value | |----------------------|------------------| | Terminal Application | Windows Terminal | | TERM | *Not set* | | COLORTERM | *Not set* | | FORCE_COLOR | *Not set* | | NO_COLOR | *Not set* | ## Rich Console options | Name | Value | |----------------|----------------------| | size | width=128, height=36 | | legacy_windows | True | | min_width | 1 | | max_width | 128 | | is_terminal | False | | encoding | cp1252 | | max_height | 36 | | justify | None | | overflow | None | | no_wrap | False | | highlight | None | | markup | None | | height | None |