Fix kitten @ set-background-opacity limited to min opacity of 0.1 instead of 0
Fixes #7463
This commit is contained in:
parent
9f03624e66
commit
f80b32df29
2 changed files with 4 additions and 2 deletions
|
|
@ -92,6 +92,8 @@ Detailed list of changes
|
|||
|
||||
- Scrolling with mouse wheel when a selection is active should update the selection (:iss:`7453`)
|
||||
|
||||
- Fix kitten @ set-background-opacity limited to min opacity of 0.1 instead of 0 (:iss:`7463`)
|
||||
|
||||
0.34.1 [2024-04-19]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
class SetBackgroundOpacity(RemoteCommand):
|
||||
|
||||
protocol_spec = __doc__ = '''
|
||||
opacity+/float: A number between 0.1 and 1
|
||||
opacity+/float: A number between 0 and 1
|
||||
match_window/str: Window to change opacity in
|
||||
match_tab/str: Tab to change opacity in
|
||||
all/bool: Boolean indicating operate on all windows
|
||||
|
|
@ -54,7 +54,7 @@ class SetBackgroundOpacity(RemoteCommand):
|
|||
args = RemoteCommand.Args(spec='OPACITY', count=1, json_field='opacity', special_parse='parse_opacity(args[0])')
|
||||
|
||||
def message_to_kitty(self, global_opts: RCOptions, opts: 'CLIOptions', args: ArgsType) -> PayloadType:
|
||||
opacity = max(0.1, min(float(args[0]), 1.0))
|
||||
opacity = max(0, min(float(args[0]), 1))
|
||||
return {
|
||||
'opacity': opacity, 'match_window': opts.match,
|
||||
'all': opts.all, 'match_tab': opts.match_tab, 'toggle': opts.toggle,
|
||||
|
|
|
|||
Loading…
Reference in a new issue