mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge branch 'main' into bug/2352/tabbed-content-active
This commit is contained in:
@@ -304,8 +304,6 @@ class StylesCache:
|
||||
Returns:
|
||||
New list of segments
|
||||
"""
|
||||
if styles.text_opacity != 1.0:
|
||||
segments = TextOpacity.process_segments(segments, styles.text_opacity)
|
||||
if styles.tint.a:
|
||||
segments = Tint.process_segments(segments, styles.tint)
|
||||
if styles.opacity != 1.0:
|
||||
@@ -405,6 +403,8 @@ class StylesCache:
|
||||
line = [make_blank(content_width, inner)]
|
||||
if inner:
|
||||
line = Segment.apply_style(line, inner)
|
||||
if styles.text_opacity != 1.0:
|
||||
line = TextOpacity.process_segments(line, styles.text_opacity)
|
||||
line = line_pad(line, pad_left, pad_right, inner)
|
||||
|
||||
if border_left or border_right:
|
||||
|
||||
@@ -16,7 +16,7 @@ from ..widgets import Static
|
||||
ButtonVariant = Literal["default", "primary", "success", "warning", "error"]
|
||||
"""The names of the valid button variants.
|
||||
|
||||
These are the variants that can be used with a [Button][textual.widgets.Button].
|
||||
These are the variants that can be used with a [`Button`][textual.widgets.Button].
|
||||
"""
|
||||
|
||||
_VALID_BUTTON_VARIANTS = {"default", "primary", "success", "warning", "error"}
|
||||
@@ -281,7 +281,8 @@ class Button(Static, can_focus=True):
|
||||
disabled: Whether the button is disabled or not.
|
||||
|
||||
Returns:
|
||||
A Button widget of the 'success' variant.
|
||||
A [`Button`][textual.widgets.Button] widget of the 'success'
|
||||
[variant][textual.widgets.button.ButtonVariant].
|
||||
"""
|
||||
return Button(
|
||||
label=label,
|
||||
@@ -313,7 +314,8 @@ class Button(Static, can_focus=True):
|
||||
disabled: Whether the button is disabled or not.
|
||||
|
||||
Returns:
|
||||
A Button widget of the 'warning' variant.
|
||||
A [`Button`][textual.widgets.Button] widget of the 'warning'
|
||||
[variant][textual.widgets.button.ButtonVariant].
|
||||
"""
|
||||
return Button(
|
||||
label=label,
|
||||
@@ -345,7 +347,8 @@ class Button(Static, can_focus=True):
|
||||
disabled: Whether the button is disabled or not.
|
||||
|
||||
Returns:
|
||||
A Button widget of the 'error' variant.
|
||||
A [`Button`][textual.widgets.Button] widget of the 'error'
|
||||
[variant][textual.widgets.button.ButtonVariant].
|
||||
"""
|
||||
return Button(
|
||||
label=label,
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user