mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
macOS: Add a new value titlebar-and-corners for :opt:hide_window_decorations that emulates the behavior of hide_window_decorations yes in older versions of kitty
This commit is contained in:
@@ -42,6 +42,8 @@ Detailed list of changes
|
|||||||
|
|
||||||
- macOS: Fix a regression causing *burn-in* of text when resizing semi-transparent OS windows (:iss:`6439`)
|
- macOS: Fix a regression causing *burn-in* of text when resizing semi-transparent OS windows (:iss:`6439`)
|
||||||
|
|
||||||
|
- macOS: Add a new value ``titlebar-and-corners`` for :opt:`hide_window_decorations` that emulates the behavior of ``hide_window_decorations yes`` in older versions of kitty
|
||||||
|
|
||||||
- Remote control launch: Fix ``--env`` not implemented when using ``--cwd=current`` with the SSH kitten (:iss:`6438`)
|
- Remote control launch: Fix ``--env`` not implemented when using ``--cwd=current`` with the SSH kitten (:iss:`6438`)
|
||||||
|
|
||||||
0.29.0 [2023-07-10]
|
0.29.0 [2023-07-10]
|
||||||
|
|||||||
@@ -297,16 +297,12 @@ static NSUInteger getStyleMask(_GLFWwindow* window)
|
|||||||
NSUInteger styleMask = NSWindowStyleMaskMiniaturizable;
|
NSUInteger styleMask = NSWindowStyleMaskMiniaturizable;
|
||||||
if (window->ns.titlebar_hidden) styleMask |= NSWindowStyleMaskFullSizeContentView;
|
if (window->ns.titlebar_hidden) styleMask |= NSWindowStyleMaskFullSizeContentView;
|
||||||
|
|
||||||
if (window->monitor || !window->decorated)
|
if (window->monitor || !window->decorated) {
|
||||||
styleMask |= NSWindowStyleMaskBorderless;
|
styleMask |= NSWindowStyleMaskBorderless;
|
||||||
else
|
} else {
|
||||||
{
|
styleMask |= NSWindowStyleMaskTitled | NSWindowStyleMaskClosable;
|
||||||
styleMask |= NSWindowStyleMaskTitled |
|
|
||||||
NSWindowStyleMaskClosable;
|
|
||||||
|
|
||||||
if (window->resizable)
|
|
||||||
styleMask |= NSWindowStyleMaskResizable;
|
|
||||||
}
|
}
|
||||||
|
if (window->resizable) styleMask |= NSWindowStyleMaskResizable;
|
||||||
|
|
||||||
return styleMask;
|
return styleMask;
|
||||||
}
|
}
|
||||||
@@ -3021,6 +3017,11 @@ GLFWAPI void glfwCocoaSetWindowChrome(GLFWwindow *w, unsigned int color, bool us
|
|||||||
window->ns.titlebar_hidden = true;
|
window->ns.titlebar_hidden = true;
|
||||||
show_text_in_titlebar = false;
|
show_text_in_titlebar = false;
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
decorations_desc = "no-titlebar-and-no-corners";
|
||||||
|
window->decorated = false;
|
||||||
|
has_shadow = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
window->decorated = true;
|
window->decorated = true;
|
||||||
has_shadow = true;
|
has_shadow = true;
|
||||||
|
|||||||
@@ -1026,12 +1026,12 @@ opt('hide_window_decorations', 'no',
|
|||||||
option_type='hide_window_decorations', ctype='uint',
|
option_type='hide_window_decorations', ctype='uint',
|
||||||
long_text='''
|
long_text='''
|
||||||
Hide the window decorations (title-bar and window borders) with :code:`yes`. On
|
Hide the window decorations (title-bar and window borders) with :code:`yes`. On
|
||||||
macOS, :code:`titlebar-only` can be used to only hide the titlebar. Whether this
|
macOS, :code:`titlebar-only` and :code:`titlebar-and-corners` can be used to only hide the titlebar and the rounded corners.
|
||||||
works and exactly what effect it has depends on the window manager/operating
|
Whether this works and exactly what effect it has depends on the window manager/operating
|
||||||
system. Note that the effects of changing this option when reloading config
|
system. Note that the effects of changing this option when reloading config
|
||||||
are undefined. When using :code:`titlebar-only`, it is useful to also set
|
are undefined. When using :code:`titlebar-only`, it is useful to also set
|
||||||
:opt:`window_margin_width` and :opt:`placement_strategy` to prevent the rounded
|
:opt:`window_margin_width` and :opt:`placement_strategy` to prevent the rounded
|
||||||
corners from clipping text.
|
corners from clipping text. Or use :code:`titlebar-and-corners`.
|
||||||
'''
|
'''
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -594,6 +594,8 @@ def optional_edge_width(x: str) -> FloatEdges:
|
|||||||
def hide_window_decorations(x: str) -> int:
|
def hide_window_decorations(x: str) -> int:
|
||||||
if x == 'titlebar-only':
|
if x == 'titlebar-only':
|
||||||
return 0b10
|
return 0b10
|
||||||
|
if x == 'titlebar-and-corners':
|
||||||
|
return 0b100
|
||||||
if to_bool(x):
|
if to_bool(x):
|
||||||
return 0b01
|
return 0b01
|
||||||
return 0b00
|
return 0b00
|
||||||
|
|||||||
Reference in New Issue
Block a user