mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge pull request #1074 from Textualize/input-align
Input align force left
This commit is contained in:
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- DOMQuery now raises InvalidQueryFormat in response to invalid query strings, rather than cryptic CSS error
|
||||
- Dropped quit_after, screenshot, and screenshot_title from App.run, which can all be done via auto_pilot
|
||||
- Widgets are now closed in reversed DOM order
|
||||
- Input widget justify hardcoded to left to prevent text-align interference
|
||||
- Changed `textual run` so that it patches `argv` in more situations
|
||||
|
||||
### Added
|
||||
@@ -32,9 +33,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Added auto_pilot to App.run and App.run_async
|
||||
- Added Widget._get_virtual_dom to get scrollbars
|
||||
- Added size parameter to run and run_async
|
||||
- Added always_update to reactive
|
||||
- Returned an awaitable from push_screen, switch_screen, and install_screen https://github.com/Textualize/textual/pull/1061
|
||||
|
||||
|
||||
## [0.2.1] - 2022-10-23
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
import inspect
|
||||
from typing import Callable, TYPE_CHECKING
|
||||
import sys
|
||||
from typing import Callable
|
||||
|
||||
import rich.repr
|
||||
from rich.console import RenderableType
|
||||
@@ -13,9 +13,6 @@ __all__ = ["log", "panic"]
|
||||
from ._context import active_app
|
||||
from ._log import LogGroup, LogVerbosity
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .app import App
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
from typing import TypeAlias
|
||||
else: # pragma: no cover
|
||||
|
||||
@@ -171,7 +171,7 @@ class Input(Widget, can_focus=True):
|
||||
|
||||
def render(self) -> RenderableType:
|
||||
if not self.value:
|
||||
placeholder = Text(self.placeholder)
|
||||
placeholder = Text(self.placeholder, justify="left")
|
||||
placeholder.stylize(self.get_component_rich_style("input--placeholder"))
|
||||
if self.has_focus:
|
||||
cursor_style = self.get_component_rich_style("input--cursor")
|
||||
|
||||
Reference in New Issue
Block a user