Rounded corners in emacs

This commit is contained in:
larstvei 2022-09-20 00:51:33 +02:00
parent c591c5b6a8
commit 70e2e4f269
3 changed files with 26 additions and 23 deletions

View File

@ -65,7 +65,7 @@
patches = [ patches = [
./patches/fix-window-role.patch ./patches/fix-window-role.patch
./patches/my-no-titlebar.patch ./patches/no-titlebar-rounded-corners.patch
./patches/system-appearance.patch ./patches/system-appearance.patch
]; ];
}); });

View File

@ -1,22 +0,0 @@
diff --git a/src/nsterm.m b/src/nsterm.m
index 44979c7c04e..eee75641f61 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -9021,7 +9021,7 @@ - (instancetype) initWithEmacsFrame: (struct frame *) f
else if (f->tooltip)
styleMask = 0;
else
- styleMask = (NSWindowStyleMaskTitled
+ styleMask = (NSWindowStyleMaskBorderless
| NSWindowStyleMaskResizable
| NSWindowStyleMaskMiniaturizable
| NSWindowStyleMaskClosable);
@@ -9098,7 +9098,7 @@ - (instancetype) initWithEmacsFrame: (struct frame *) f
[self setOpaque:NO];
/* toolbar support */
- [self createToolbar:f];
+ // [self createToolbar:f];
/* macOS Sierra automatically enables tabbed windows. We can't
allow this to be enabled until it's available on a Free system.

View File

@ -0,0 +1,25 @@
diff --git a/src/nsterm.m b/src/nsterm.m
index 44979c7c04e..234a647bade 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -9022,6 +9022,7 @@ - (instancetype) initWithEmacsFrame: (struct frame *) f
styleMask = 0;
else
styleMask = (NSWindowStyleMaskTitled
+ | NSFullSizeContentViewWindowMask
| NSWindowStyleMaskResizable
| NSWindowStyleMaskMiniaturizable
| NSWindowStyleMaskClosable);
@@ -9109,6 +9110,12 @@ - (instancetype) initWithEmacsFrame: (struct frame *) f
#endif
}
+ [self setTitlebarAppearsTransparent:YES];
+ [self setTitleVisibility:NSWindowTitleHidden];
+ [[self standardWindowButton:NSWindowCloseButton] setHidden:YES];
+ [[self standardWindowButton:NSWindowMiniaturizeButton] setHidden:YES];
+ [[self standardWindowButton:NSWindowZoomButton] setHidden:YES];
+
return self;
}