Pete Schaffner
bbe35ee02e
Revert luminance check from commit f7129880f5c4
...
This fixes the issues reporting wrong toolbar colors:
https://github.com/mitchellh/ghostty/pull/1550#issuecomment-2021538747
2024-03-28 10:51:00 +01: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
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
Mitchell Hashimoto
ef4b3fed54
macos: remove some slight duplication
2024-03-26 11:14:43 -07:00
Mitchell Hashimoto
f7129880f5
macos: only set titlebar color with enough luminance to avoid #1549
2024-03-26 11:13:39 -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
447310425d
Fix wrong tint color and improve tab labeling
2024-02-24 18:54:01 +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
Pete Schaffner
021daeedb2
Hide zoom button in toolbar when not zoomed
...
Hiding it via its alphaValue would allow the button to still respond
to clicks…
2024-02-22 18:01:13 +01:00
Pete Schaffner
472a5c93ad
Move un-zoom button into the tab/toolbar
2024-02-22 17:54:51 +01:00
Troels Thomsen
a874280e4b
Avoid repainting new tab button for native tab bar
2024-02-16 13:57:11 -08:00
Mitchell Hashimoto
9e4cd0b51c
macos: minor reordering
2024-02-16 13:55:09 -08:00
Troels Thomsen
3bf18560bb
Set background color in title bar tab mode only
2024-02-16 21:53:26 +01:00
Troels Thomsen
05fe0e830b
Correct grammatical mistake
2024-02-16 21:52:46 +01:00
Troels Thomsen
41e94cf0be
Remove trailing whitespace
2024-02-15 23:39:14 +01:00
Mitchell Hashimoto
9bc972568c
macos: call occlusion callback for state change
2024-02-12 13:48:29 -08:00
Mitchell Hashimoto
118b51157a
macos: more robust surface focus state detection
...
Fixes #1500
This overhauls how we do focus management for surfaces to make it more
robust. This DID somehow all work before but was always brittle and was
a sketchy play with SwiftUI/AppKit behavior across macOS versions.
The new approach uses our window controller and terminal delegate
system to disseminate focus information whenever any surface changes
focus. This ensures that only ONE surface ever has focus in libghostty
because the controller ensures it is widely distributed.
2024-02-11 09:19:13 -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
Pete Schaffner
e00197c1bd
Add extensions to help finding private subviews
2024-02-07 11:10:43 +01:00
Mitchell Hashimoto
3c0317bf9d
macos: small stylistic edits
2024-02-05 19:04:50 -08:00
Qwerasd
1d6b952c8f
fix(macOS): Improve updating of transparent titlebar tabs backgrounds
...
FAR from a perfect fix, as the background seen through the tabs during window drags will be behind by a frame or so still, but definitely a vast improvement over not updating at all.
2024-02-05 17:05:13 -05:00
Qwerasd
878b5be185
fix(macOS): Restore custom titlebar background
...
Required for when a transparent background is used in conjunction with non-native fullscreen.
2024-02-05 16:15:43 -05:00
Mitchell Hashimoto
7001ef2739
Merge pull request #1458 from qwerasd205/macos-fix-title-label
...
(macOS) Fixed/improved titlebar tabs custom title label handling
2024-02-04 15:41:38 -08:00
Mitchell Hashimoto
bd38689539
macos: make label fileprivate
2024-02-04 15:41:15 -08:00
Qwerasd
a121549f32
macOS: Improve custom title label centering and overflow appearance.
2024-02-04 17:56:08 -05:00
Qwerasd
fdab397c61
macOS: Simplify native title hiding logic for titlebar tabs.
2024-02-04 16:55:18 -05:00
Qwerasd
4d335a220f
fix(macOS): Adjust custom toolbar title to fix clipping problems.
2024-02-04 16:55:07 -05:00
Qwerasd
181d64338d
fix(macOS): Restore titlebar tabs when exiting non-native fullscreen
2024-02-03 20:03:34 -05:00
Qwerasd
f590aebdfa
fix(macOS): Use better hardcoded colors for light titlebar tabs window button backdrop
2024-02-02 02:00:02 -05:00
Mitchell Hashimoto
98ad832d86
macos: set window button backdrop color based on appearance
2024-02-01 21:41:29 -08:00