455 Commits

Author SHA1 Message Date
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
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
ae09a98ffe Merge pull request #1471 from qwerasd205/macos-fix-transparent-titlebar
(macOS) Fix a couple transparent window + titlebar tabs bugs
2024-02-05 19:05:21 -08: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
Qwerasd
cf2968c186 fix(macOS): Prevent janky transition animation on DPI change 2024-02-05 15:48:02 -05:00
Qwerasd
7a4c97329e macOS: Add URL to documentation in comment 2024-02-05 15:41:33 -05:00
Qwerasd
e91e2d409b fix(macOS): Prevent incorrect scaling of the Metal layer after DPI change
Ref: https://developer.apple.com/library/archive/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/CapturingScreenContents/CapturingScreenContents.html#//apple_ref/doc/uid/TP40012302-CH10-SW27
2024-02-05 14:08:12 -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
Mitchell Hashimoto
da61f0797e Merge pull request #1457 from qwerasd205/macos-fix-fullscreen-separator
fix(macOS): Hide titlebar separator line in native fullscreen.
2024-02-04 13:39:16 -08:00
Qwerasd
7f217fc326 fix(macOS): Hide titlebar separator line in native fullscreen. 2024-02-04 14:22:44 -05:00
Qwerasd
181d64338d fix(macOS): Restore titlebar tabs when exiting non-native fullscreen 2024-02-03 20:03:34 -05:00
Mitchell Hashimoto
62785d9e54 macos: report color scheme for surface to libghostty 2024-02-02 13:19:46 -08: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
Mitchell Hashimoto
e5400bad06 config: add window-theme = auto for automatic choosing based on bg color 2024-02-01 20:49:28 -08:00
Mitchell Hashimoto
6482c25579 macos: titlebar tabs set window appearance based on bg luminance
Fixes #1427
2024-02-01 16:47:45 -08:00
Qwerasd
2944128e05 fix(macOS): restoring tabbed windows with titlebar tabs enabled 2024-01-31 20:07:35 -05:00
Mitchell Hashimoto
50125c0319 macos: whitespace 2024-01-31 15:44:34 -08:00
Mitchell Hashimoto
4a93181b79 macos: minor edits 2024-01-31 15:43:35 -08:00
Qwerasd
308f8cce36 macOS: center window title when titlebar tabs enabled
Uses a custom toolbar that populates itself with a centered text field and provides a method to set the text.
2024-01-31 16:16:41 -05:00
Mitchell Hashimoto
1a3d2d151e macos: fix tabs vs spaces 2024-01-31 12:06:58 -08:00
Mitchell Hashimoto
939bb22615 macos: do not hardcode true for titlebar tabs 2024-01-31 10:22:09 -08:00
Mitchell Hashimoto
fbac2d9810 macos: titlebar tab logic shuffling 2024-01-31 10:08:05 -08:00
Qwerasd
dacbdf3f38 fix(macOS): set titlebar background color to support transparent windows with titlebar tabs 2024-01-31 07:58:31 -05:00
Qwerasd
ba16d65d02 macOS: Added titlebar tabs 2024-01-30 18:48:36 -05:00
Pete Schaffner
63cc7dbe0d Move color extensions into OSColor
We are also now using the `darken(by:)` implementation to generate
the split divider color on macOS, which means we'll have a consistent
rendering across iOS and macOS.
2024-01-30 22:36:52 +01:00
Pete Schaffner
c248441057 Add ability to color the split divider on iOS
This adds the needed UIColor extensions to achieve the equivalent of
what we did on macOS
2024-01-30 14:31:25 +01:00
Mitchell Hashimoto
411a757cdf macos: fix uikit build, NSColor is not available 2024-01-29 22:23:06 -08:00
Mitchell Hashimoto
d625e9d7c4 macos: remove headers
Nothing personal, I remove them from all files.
2024-01-29 21:33:08 -08:00
Mitchell Hashimoto
18dfb642f5 macos: plumb through the split divider color 2024-01-29 21:32:10 -08:00
Pete Schaffner
375df57155 Tint split view divider based on theme background 2024-01-29 21:58:13 +01:00
Mitchell Hashimoto
a41ee3cabe macos: make global macOS fullscreen keybind work
Fixes #1389

This is just a fun AppKit quirk. This menu item is set automatically
based on the keyboard shortcut (apparently) and when its overwritten
then its gone forever. So, let's just not set it.
2024-01-27 09:58:02 -08:00
Mitchell Hashimoto
81532c0b56 macos: support reading service result text into terminal 2024-01-21 17:26:41 -08:00
Mitchell Hashimoto
4dbd10c913 apprt/embedded: support asking for selection text, existence 2024-01-21 17:22:44 -08:00
Mitchell Hashimoto
4c9fc452b6 macos: register that we accept/send text types for services 2024-01-21 17:07:24 -08:00
Mitchell Hashimoto
8b11d20cb0 macos: register a services menu 2024-01-21 16:39:52 -08:00
Mitchell Hashimoto
cc01049d55 macos: select split above/below should go to correct split when nested
Fixes #1330

I admit this code is a mess to understand, so I'm not 100% certain this
fix is correct. It definitely fixes #1330 but I'm not sure if this
breaks other split scenarios.

I believe that our logic here was simply wrong, notice that left/right
had opposite logic and this brings it all into consistency.

Long term, we should redo all of our directional movement since we've
refactored how split state is stored now on the controller with parent
references.
2024-01-19 21:11:20 -08:00
Mitchell Hashimoto
8b01d79502 macos: iOS bg color extends to unsafe areas 2024-01-18 20:31:41 -08:00
Mitchell Hashimoto
fd782746d4 macos: set proper content size for UIView views 2024-01-18 20:26:42 -08:00
Mitchell Hashimoto
487c22011c macos: make SurfaceView cross-platform! 2024-01-18 19:28:36 -08:00