Skip to content

Commit af7cb90

Browse files
authored
Merge pull request #1074 from Textualize/input-align
Input align force left
2 parents 96be1ea + b4d87c7 commit af7cb90

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2222
- DOMQuery now raises InvalidQueryFormat in response to invalid query strings, rather than cryptic CSS error
2323
- Dropped quit_after, screenshot, and screenshot_title from App.run, which can all be done via auto_pilot
2424
- Widgets are now closed in reversed DOM order
25+
- Input widget justify hardcoded to left to prevent text-align interference
2526
- Changed `textual run` so that it patches `argv` in more situations
2627

2728
### Added
@@ -32,9 +33,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3233
- Added auto_pilot to App.run and App.run_async
3334
- Added Widget._get_virtual_dom to get scrollbars
3435
- Added size parameter to run and run_async
36+
- Added always_update to reactive
3537
- Returned an awaitable from push_screen, switch_screen, and install_screen https://github.com/Textualize/textual/pull/1061
3638

37-
3839
## [0.2.1] - 2022-10-23
3940

4041
### Changed

src/textual/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

3-
import sys
43
import inspect
5-
from typing import Callable, TYPE_CHECKING
4+
import sys
5+
from typing import Callable
66

77
import rich.repr
88
from rich.console import RenderableType
@@ -13,9 +13,6 @@
1313
from ._context import active_app
1414
from ._log import LogGroup, LogVerbosity
1515

16-
if TYPE_CHECKING:
17-
from .app import App
18-
1916
if sys.version_info >= (3, 10):
2017
from typing import TypeAlias
2118
else: # pragma: no cover

src/textual/widgets/_input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def cursor_width(self) -> int:
171171

172172
def render(self) -> RenderableType:
173173
if not self.value:
174-
placeholder = Text(self.placeholder)
174+
placeholder = Text(self.placeholder, justify="left")
175175
placeholder.stylize(self.get_component_rich_style("input--placeholder"))
176176
if self.has_focus:
177177
cursor_style = self.get_component_rich_style("input--cursor")

0 commit comments

Comments
 (0)