diff --git a/src/textual/app.py b/src/textual/app.py index 346cfcff0f..46f38c74af 100644 --- a/src/textual/app.py +++ b/src/textual/app.py @@ -313,8 +313,8 @@ class App(Generic[ReturnType], DOMNode): scrollbar-background-active: ansi_default; scrollbar-color: ansi_blue; scrollbar-color-active: ansi_bright_blue; - scrollbar-color-hover: ansi_bright_blue; - scrollbar-corner-color: ansi_default; + scrollbar-color-hover: ansi_bright_blue; + scrollbar-corner-color: ansi_default; } .bindings-table--key { @@ -335,18 +335,18 @@ class App(Generic[ReturnType], DOMNode): } /* When a widget is maximized */ - Screen.-maximized-view { + Screen.-maximized-view { layout: vertical !important; hatch: right $panel; overflow-y: auto !important; align: center middle; .-maximized { - dock: initial !important; + dock: initial !important; } } /* Fade the header title when app is blurred */ - &:blur HeaderTitle { - text-opacity: 50%; + &:blur HeaderTitle { + text-opacity: 50%; } } *:disabled:can-focus { @@ -438,7 +438,7 @@ class MyApp(App[None]): """The default value of [Screen.ALLOW_IN_MAXIMIZED_VIEW][textual.screen.Screen.ALLOW_IN_MAXIMIZED_VIEW].""" CLICK_CHAIN_TIME_THRESHOLD: ClassVar[float] = 0.5 - """The maximum number of seconds between clicks to upgrade a single click to a double click, + """The maximum number of seconds between clicks to upgrade a single click to a double click, a double click to a triple click, etc.""" BINDINGS: ClassVar[list[BindingType]] = [ @@ -465,7 +465,7 @@ class MyApp(App[None]): ESCAPE_TO_MINIMIZE: ClassVar[bool] = True """Use escape key to minimize widgets (potentially overriding bindings). - + This is the default value, used if the active screen's `ESCAPE_TO_MINIMIZE` is not changed from `None`. """ @@ -537,7 +537,7 @@ def __init__( self._registered_themes: dict[str, Theme] = {} """Themes that have been registered with the App using `App.register_theme`. - + This excludes the built-in themes.""" for theme in BUILTIN_THEMES.values(): @@ -739,7 +739,7 @@ def __init__( self.theme_changed_signal: Signal[Theme] = Signal(self, "theme-changed") """Signal that is published when the App's theme is changed. - + Subscribers will receive the new theme object as an argument to the callback. """ @@ -802,7 +802,7 @@ def __init__( show=False, key_display=self.COMMAND_PALETTE_DISPLAY, priority=True, - tooltip="Open command palette", + tooltip="Open the command palette", ) ) diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots/test_help_panel.svg b/tests/snapshot_tests/__snapshots__/test_snapshots/test_help_panel.svg index d886a21616..b3185e56ae 100644 --- a/tests/snapshot_tests/__snapshots__/test_snapshots/test_help_panel.svg +++ b/tests/snapshot_tests/__snapshots__/test_snapshots/test_help_panel.svg @@ -19,161 +19,161 @@ font-weight: 700; } - .terminal-3186447019-matrix { + .terminal-2991149743-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3186447019-title { + .terminal-2991149743-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3186447019-r1 { fill: #121212 } -.terminal-3186447019-r2 { fill: #0178d4 } -.terminal-3186447019-r3 { fill: #4f4f4f } -.terminal-3186447019-r4 { fill: #c5c8c6 } -.terminal-3186447019-r5 { fill: #fea62b;font-weight: bold } -.terminal-3186447019-r6 { fill: #e0e0e0 } -.terminal-3186447019-r7 { fill: #000000 } + .terminal-2991149743-r1 { fill: #121212 } +.terminal-2991149743-r2 { fill: #0178d4 } +.terminal-2991149743-r3 { fill: #4f4f4f } +.terminal-2991149743-r4 { fill: #c5c8c6 } +.terminal-2991149743-r5 { fill: #fea62b;font-weight: bold } +.terminal-2991149743-r6 { fill: #e0e0e0 } +.terminal-2991149743-r7 { fill: #000000 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - HelpPanelApp + HelpPanelApp - + - - ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ -         ↑Scroll Up       -▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁         ↓Scroll Down     -         ←Move cursor     -left            -         →Move cursor     -right           -   home ^aGo to start     -    end ^eGo to end       -      pgupPage Up         -      pgdnPage Down       -     ^pgupPage Left       -     ^pgdnPage Right      -   shift+←Move cursor     -left and select▁▁ -        ^←Move cursor     -left a word     -  shift+^←Move cursor     -left a word and -select          -   shift+→Move cursor     -right and       -select          -        ^→Move cursor     -right a word    -  shift+^→Move cursor     -right a word    -and select      -         ⌫Delete          -character left  + + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +         ↑Scroll Up       +▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁         ↓Scroll Down     +         ←Move cursor     +left            +         →Move cursor     +right           +   home ^aGo to start     +    end ^eGo to end       +      pgupPage Up         +      pgdnPage Down       +     ^pgupPage Left       +     ^pgdnPage Right      +   shift+←Move cursor     +left and select▃▃ +        ^←Move cursor     +left a word     +  shift+^←Move cursor     +left a word and +select          +   shift+→Move cursor     +right and       +select          +        ^→Move cursor     +right a word    +  shift+^→Move cursor     +right a word    +and select      +         ⌫Delete          +character left  diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots/test_help_panel_key_display_not_duplicated.svg b/tests/snapshot_tests/__snapshots__/test_snapshots/test_help_panel_key_display_not_duplicated.svg index 3cd85cbfa4..14e1074974 100644 --- a/tests/snapshot_tests/__snapshots__/test_snapshots/test_help_panel_key_display_not_duplicated.svg +++ b/tests/snapshot_tests/__snapshots__/test_snapshots/test_help_panel_key_display_not_duplicated.svg @@ -19,138 +19,138 @@ font-weight: 700; } - .terminal-4067586418-matrix { + .terminal-2462193631-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-4067586418-title { + .terminal-2462193631-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-4067586418-r1 { fill: #e0e0e0 } -.terminal-4067586418-r2 { fill: #4f4f4f } -.terminal-4067586418-r3 { fill: #c5c8c6 } -.terminal-4067586418-r4 { fill: #121212 } -.terminal-4067586418-r5 { fill: #fea62b;font-weight: bold } -.terminal-4067586418-r6 { fill: #8d8d8d } -.terminal-4067586418-r7 { fill: #ffa62b;font-weight: bold } -.terminal-4067586418-r8 { fill: #495259 } + .terminal-2462193631-r1 { fill: #e0e0e0 } +.terminal-2462193631-r2 { fill: #4f4f4f } +.terminal-2462193631-r3 { fill: #c5c8c6 } +.terminal-2462193631-r4 { fill: #121212 } +.terminal-2462193631-r5 { fill: #fea62b;font-weight: bold } +.terminal-2462193631-r6 { fill: #8d8d8d } +.terminal-2462193631-r7 { fill: #ffa62b;font-weight: bold } +.terminal-2462193631-r8 { fill: #495259 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - HelpPanelApp + HelpPanelApp - - - - -      tabFocus Next      -shift+tabFocus Previous  - -       ^qQuit Quit the  -app and return  -to the command  -prompt. -      fooRing the bell   -       ^ppalette Open  -command palette - - - - - - - - - - - - - foo Ring the bell                    ^p palette + + + + +      tabFocus Next      +shift+tabFocus Previous  + +       ^qQuit Quit the  +app and return  +to the command  +prompt. +      fooRing the bell   +       ^ppalette Open  +the command  +palette + + + + + + + + + + + + foo Ring the bell                    ^p palette diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots/test_keymap_bindings_display_footer_and_help_panel.svg b/tests/snapshot_tests/__snapshots__/test_snapshots/test_keymap_bindings_display_footer_and_help_panel.svg index 92e02a2f01..92332be767 100644 --- a/tests/snapshot_tests/__snapshots__/test_snapshots/test_keymap_bindings_display_footer_and_help_panel.svg +++ b/tests/snapshot_tests/__snapshots__/test_snapshots/test_keymap_bindings_display_footer_and_help_panel.svg @@ -19,138 +19,138 @@ font-weight: 700; } - .terminal-3686474457-matrix { + .terminal-3208694071-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3686474457-title { + .terminal-3208694071-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3686474457-r1 { fill: #e0e0e0 } -.terminal-3686474457-r2 { fill: #4f4f4f } -.terminal-3686474457-r3 { fill: #c5c8c6 } -.terminal-3686474457-r4 { fill: #121212 } -.terminal-3686474457-r5 { fill: #fea62b;font-weight: bold } -.terminal-3686474457-r6 { fill: #8d8d8d } -.terminal-3686474457-r7 { fill: #ffa62b;font-weight: bold } -.terminal-3686474457-r8 { fill: #495259 } + .terminal-3208694071-r1 { fill: #e0e0e0 } +.terminal-3208694071-r2 { fill: #4f4f4f } +.terminal-3208694071-r3 { fill: #c5c8c6 } +.terminal-3208694071-r4 { fill: #121212 } +.terminal-3208694071-r5 { fill: #fea62b;font-weight: bold } +.terminal-3208694071-r6 { fill: #8d8d8d } +.terminal-3208694071-r7 { fill: #ffa62b;font-weight: bold } +.terminal-3208694071-r8 { fill: #495259 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - Counter + Counter - - - - Counter                                            -      tabFocus Next      -shift+tabFocus Previous  - -       ^qQuit Quit the  -app and return  -to the command  -prompt. -       ^ppalette Open  -command palette -      k +Increment       -    ↓ - jDecrement       - - - - - - - - - - - - k Increment  ↓ Decrement             ^p palette + + + + Counter                                            +      tabFocus Next      +shift+tabFocus Previous  + +       ^qQuit Quit the  +app and return  +to the command  +prompt. +       ^ppalette Open  +the command  +palette +      k +Increment       +    ↓ - jDecrement       + + + + + + + + + + + k Increment  ↓ Decrement             ^p palette diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots/test_keymap_bindings_key_display.svg b/tests/snapshot_tests/__snapshots__/test_snapshots/test_keymap_bindings_key_display.svg index 1801196c43..fccac0604a 100644 --- a/tests/snapshot_tests/__snapshots__/test_snapshots/test_keymap_bindings_key_display.svg +++ b/tests/snapshot_tests/__snapshots__/test_snapshots/test_keymap_bindings_key_display.svg @@ -19,138 +19,138 @@ font-weight: 700; } - .terminal-2134341471-matrix { + .terminal-3893370316-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-2134341471-title { + .terminal-3893370316-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-2134341471-r1 { fill: #e0e0e0 } -.terminal-2134341471-r2 { fill: #4f4f4f } -.terminal-2134341471-r3 { fill: #c5c8c6 } -.terminal-2134341471-r4 { fill: #121212 } -.terminal-2134341471-r5 { fill: #fea62b;font-weight: bold } -.terminal-2134341471-r6 { fill: #8d8d8d } -.terminal-2134341471-r7 { fill: #ffa62b;font-weight: bold } -.terminal-2134341471-r8 { fill: #495259 } + .terminal-3893370316-r1 { fill: #e0e0e0 } +.terminal-3893370316-r2 { fill: #4f4f4f } +.terminal-3893370316-r3 { fill: #c5c8c6 } +.terminal-3893370316-r4 { fill: #121212 } +.terminal-3893370316-r5 { fill: #fea62b;font-weight: bold } +.terminal-3893370316-r6 { fill: #8d8d8d } +.terminal-3893370316-r7 { fill: #ffa62b;font-weight: bold } +.terminal-3893370316-r8 { fill: #495259 } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - MyApp + MyApp - - - - Check the footer and help panel                    -      tabFocus Next      -shift+tabFocus Previous  - -       ^qQuit Quit the  -app and return  -to the command  -prompt. -       ^ppalette Open  -command palette -  correctIncrement       - - - - - - - - - - - - - correct Increment                    ^p palette + + + + Check the footer and help panel                    +      tabFocus Next      +shift+tabFocus Previous  + +       ^qQuit Quit the  +app and return  +to the command  +prompt. +       ^ppalette Open  +the command  +palette +  correctIncrement       + + + + + + + + + + + + correct Increment                    ^p palette