67 Commits

Author SHA1 Message Date
Mitchell Hashimoto
f0c2d3d75a macos: fix retain cycle preventing window from freeing 2025-01-06 07:02:04 -08:00
Damien Mehala
ade07c4c3c fix: quick terminal focus-follows-mouse behaviour
Quick Terminal now focuses on the surface under the mouse
pointer when `focus-follows-mouse` is enabled.

Fixes #3337
2024-12-30 11:04:21 -08:00
Mitchell Hashimoto
3bf1fdd7de macos: titlebar tabs can find titlebar container in fullscreen
Fixes #2850

In native fullscreen, the titlebar container is no longer part of our
NSWindow and is instead a separate window called
NSToolbarFullScreenWindow. We now search for this window when we are in
native fullscreen.
2024-11-29 10:35:02 -08:00
Qwerasd
2852c771b1 macos: fix various titlebar tabs problems in macOS 15.0
- Toolbar overflow indicator showing
- Doubled title on single-tab windows
- Tabs not properly placed in bar on restore of saved window
2024-09-16 22:54:00 -06:00
pnodet
7ff9af1520 style(macos): cleanup trailing spaces 2024-08-21 21:53:09 +02:00
Mitchell Hashimoto
e3f299ac80 macos: relabel tabs when mergeAllWindows is called
Fixes #1902
2024-07-02 14:08:21 -07:00
Mitchell Hashimoto
c9c1bd0531 macos: titlebar tabs should do nothing if no titlebar
Fixes #1876
2024-06-25 10:03:05 -07:00
Cameron Dart
29fb70197c macos: surface focus follow mouse 2024-06-10 16:07:33 -07:00
Mitchell Hashimoto
4dde7edfab config: macos-titlebar-style, remove titlebar-tabs option
Fixes #1833

This is an attempt to simplify the logic that has organically grown
convoluted over time with regards to how the titlebar and tab bar is
styled.

This field is one unified field that ONLY addresses titlebar and tab bar
styling. It can be one of "native", "transparent", or "tabs". The
"native" field is the new behavior in this commit: it makes the titlebar
and tab bar appearance be absolutely native. We do not color anything
(if we do its a bug).

The "transparent" option is the previous `macos-titlebar-tabs = false`
setting where the titlebar/tab bar is native but colored according to
the window background color.

The "tabs" option is `macos-titlebar-tabs = true`.

The `window-theme = auto` affect on titlebar appearance has been
removed. Now, the titlebar will NEVER be styled with "native" and MAY be
styled with "transparent" and will ALWAYS be styled with "tabs" (since
that's a totally custom look anyways).
2024-06-07 12:12:48 -07:00
Mitchell Hashimoto
47874742a1 Extract guard statement 2024-05-21 08:58:10 +02:00
Troels Thomsen
6366d562ca Recognize system theme 2024-05-19 23:01:09 +02:00
Mitchell Hashimoto
eee58b9ce6 macos: titlebar styling always applies to titlebar tabs 2024-05-17 20:38:51 -04:00
Mitchell Hashimoto
69a3137956 macos: use enum for window theme 2024-05-17 16:31:18 -04:00
Pete Schaffner
c437416014 Make title/tab bar respect window-theme setting 2024-05-14 20:17:28 -04:00
Mitchell Hashimoto
7a8c2fb8a0 Merge pull request #1623 from peteschaffner/titlebar-unzoom-button
Add un-zoom button to titlebar and tabs
2024-04-12 10:23:14 -07:00
Jon Parise
c09035f228 macos: fall back to the system titlebar font
We allow titlebarFont to be nil to differentiate between "system" (nil)
and "custom" (non-nil) behavior. For the "system" case, we need to use
the system _titlebar_ font (rather than just the default system font),
to match the system's conventions.
2024-04-12 09:05:35 -07:00
Pete Schaffner
620c0f9450 Fix new tab icon color not updating sometimes 2024-04-05 21:12:11 +02:00
Pete Schaffner
b947ed0070 Update titlebar tabs when config changes 2024-04-05 16:40:04 +02:00
Pete Schaffner
4ede25dd00 Update standard title/tab bar when config changes 2024-04-05 15:19:55 +02:00
Pete Schaffner
e4066aaa85 Put titlebar font code where it was intended 2024-04-03 15:36:04 +02:00
Pete Schaffner
ab26863088 Merge remote-tracking branch 'upstream/main' into titlebar-unzoom-button 2024-04-03 15:25:51 +02:00
Pete Schaffner
a0a1c991b5 Fix conflicting constraints issue 2024-04-02 22:31:23 +02:00
Pete Schaffner
f086bff651 Make things work with really dark backgrounds
This fixes issue #1549
2024-04-02 22:28:34 +02:00
Pete Schaffner
cf6017e777 Revert "Revert "Merge pull request #1550 from peteschaffner/titlebar-unzoom-button""
This reverts commit 7f59d844c098f65158b4c5674f53371e0c4a4f1a.
2024-03-28 10:48:05 +01:00
Jon Parise
baf75dfaaf macos: configurable titlebar fonts
Add support for configurable fonts for window and tab titles. This is
only implemented for macOS (and could be macOS-only if other platforms
aren't able to support this using their windowing toolkits). It plays
nicely with regular and titlebar tabs.
2024-03-26 16:56:39 -07:00
Mitchell Hashimoto
7f59d844c0 Revert "Merge pull request #1550 from peteschaffner/titlebar-unzoom-button"
This reverts commit 6b7a1ce1eb364936b58408bd67bbeaf0d3dc8579, reversing
changes made to b68e1c6a5d17b7e7b35902873a3241ee663f49a3.
2024-03-26 14:53:26 -07:00
Pete Schaffner
21ed1187a4 Select and uzoom when clicking button in unselected tab 2024-02-26 10:03:14 +01:00
Pete Schaffner
b6bfb9dac5 Don't use a toolbar for the traditional title/tab bar
I forgot I can use a `NSTitlebarAccessoryViewController` to house the
button
2024-02-25 21:47:15 +01:00
Pete Schaffner
55621c214c Rename "Un-zoom" to "Reset Zoom" and add tooltips 2024-02-25 12:40:43 +01:00
Pete Schaffner
c189f855d8 Reorganize a bit 2024-02-24 10:29:14 +01:00
Pete Schaffner
34f5bf4fe6 Move unzoom button logic into TerminalWindow
This fixed some bugs with keeping the correct button state when
reordering tabs
2024-02-23 22:30:03 +01:00
Pete Schaffner
dc60afc261 Get unzoom button working with standard title/tab bar
To do this I forced a toolbar, so that we would have a place to put the
button when no tabs were opened. I also took the opportunity to make the
standard title/tab bar meld better with the terminal's background color,
just as we do with titlebar tabs.
2024-02-23 15:08:35 +01:00
Troels Thomsen
a874280e4b Avoid repainting new tab button for native tab bar 2024-02-16 13:57:11 -08:00
Pete Schaffner
aad302f236 Make new tab icon respond to window's key status 2024-02-11 14:24:35 +01:00
Pete Schaffner
595c1e222b Remove vibrant layer before re-adding it 2024-02-11 13:52:11 +01:00
Pete Schaffner
1bcec0d49f Make new tab button images vibrant
This makes them blend better with the background in windows with
transparency.
2024-02-11 00:55:33 +01:00
Pete Schaffner
3b6bac0121 Make special blending mode class more generic
This allows us to specify what kind of context we'd like our vibrant
layer to exist in (light or dark).
2024-02-11 00:53:18 +01:00
Mitchell Hashimoto
49cc5e2f47 Merge pull request #1483 from peteschaffner/improve-titlebar-tabs-background-color
Improve titlebar unselected tabs background color
2024-02-10 07:52:24 -08:00
Mitchell Hashimoto
0e482b8519 macos: nitpicks 2024-02-10 07:52:02 -08:00
Mitchell Hashimoto
56b453a93f macos: comment why we guard 2024-02-09 14:22:21 -08:00
Troels Thomsen
c3dbd32462 Keep shadows for native tab bar 2024-02-09 23:10:31 +01:00
Pete Schaffner
77e82b4d2a Improve window buttons backdrop with window opacity 2024-02-09 22:46:49 +01:00
Pete Schaffner
20ed099940 Cache new tab button image to improve performance 2024-02-09 00:06:40 +01:00
Pete Schaffner
7e945a52f1 Move separator hiding back into updateConstraintsIfNeeded
I moved this into `update` when doing the tab bar background coloring
but the separators would still show briefly.
2024-02-08 18:16:17 +01:00
Pete Schaffner
95c8541efd Color the new tab button image appropriately 2024-02-08 17:46:16 +01:00
Pete Schaffner
8831c601a4 Use draw rect to do the "plus darker" blending
This is a lot simpler and doesn't require adding Obj-C into the mix.
2024-02-08 16:38:07 +01:00
Pete Schaffner
33a8368a68 Make unselected tabs blend better with background color
This enables the standard effect created by a sytem tab bar, which
ensures unselected tabs blend with the window's/titlebar's background
color. This also ensures the `windowButtonsBackdrop` view matches the
color of the adjacent tab (be it selected or not).
2024-02-08 10:14:15 +01:00
Pete Schaffner
93fb852d9b Add comments/docs and make method name clearer 2024-02-07 21:44:44 +01:00
Pete Schaffner
591c05641b Use shallow search to improve performance 2024-02-07 21:39:36 +01:00
Pete Schaffner
bc946109b7 Hide tab bar shadows which improves light themes
In a light appearance there was a shadow cast on top of the inactive
tabs that looked bad. In a dark appearance the shadow manifests as a
solid line that required a faux border to look right. This removes both
and improves the aesthetics of the tab bar in light themes.
2024-02-07 11:11:34 +01:00