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
Mitchell Hashimoto
01afa293c8
apprt/embedded: fix initialization on macOS
2024-01-18 08:55:03 -08:00
Mitchell Hashimoto
2568b4979b
macos: allow first click when non-focused to shift focus
...
This allows for example clicking on a split when focused on a different
app and having focus immediately jump to that split. Before this, you'd
have to click to focus the window, then second click to focus on the
split.
2024-01-17 20:30:34 -08:00
Mitchell Hashimoto
fa0ba0a354
macos: terminals with custom commands are not restorable
...
Fixes #1317
2024-01-17 08:26:48 -08:00
Mitchell Hashimoto
ed3f1df5f0
Merge pull request #1316 from qwerasd205/macos-file-handler
...
Added macOS file open handler
2024-01-16 18:56:34 -08:00
Mitchell Hashimoto
1005116f03
macos: detect error during surface initialization and render
2024-01-16 18:50:47 -08:00
Qwerasd
51f53aa9bf
Added macOS file open handler
2024-01-16 16:26:21 -05:00
Mitchell Hashimoto
b806b45bae
macos: use UIColor for iOS
2024-01-16 11:58:14 -08:00
Mitchell Hashimoto
376345dcae
macos: detect renderer health failures and show error view
2024-01-16 11:27:18 -08:00
Gregory Anders
e4d8ddb3d5
macos: respect minimum split size when using resize keys
2024-01-15 10:05:53 -06:00
Mitchell Hashimoto
875a774d4b
macos: remove AppState and unify onto Ghostty.App cross-platform
2024-01-14 19:35:57 -08:00
Mitchell Hashimoto
a12ef43441
ci: specifically target the main Ghostty target
2024-01-14 19:06:01 -08:00
Mitchell Hashimoto
5e69b30240
macos: iOS Ghostty.App converted to use Ghostty.Config
2024-01-14 15:55:31 -08:00
Mitchell Hashimoto
eba3d5414d
macos: Ghostty.Config to store all config-related operations
2024-01-14 15:53:33 -08:00
Mitchell Hashimoto
33b93799b9
macos: disable iOS file in macOS build
2024-01-14 15:00:00 -08:00
Mitchell Hashimoto
65fd02817e
macos: only load config files on macos target
2024-01-14 14:53:00 -08:00
Mitchell Hashimoto
4d9fd2becc
macos: iOS app can initialize Ghostty
2024-01-14 14:44:16 -08:00
Mitchell Hashimoto
83b004b6e1
macos: show ghostty icon on main app loading
2024-01-13 22:26:51 -08:00
Mitchell Hashimoto
48af1c6c99
macos: add iOS target
2024-01-13 22:24:35 -08:00
Thorsten Ball
2bf8dac864
macos: use switch statement instead of if-let
2024-01-13 08:32:50 +01:00
Thorsten Ball
90427a8d22
macos: respect window-new-tab-position configuration
2024-01-12 20:22:53 +01:00
Ryota
ad9de6707d
Fix comment
2024-01-12 00:54:16 +00:00
Ryota
3baae1dce8
Wrap around split focus with next and previous
2024-01-12 00:53:47 +00:00
Ryota
3500293bac
Add firstOrLast search based on next and previous
2024-01-12 00:53:19 +00:00
Ryota
ab8dfab9de
Add helper func for first and last leaf
2024-01-12 00:52:26 +00:00
Ryota
d9c4bd7e25
Add helper functions for finding root
2024-01-12 00:52:17 +00:00
Mitchell Hashimoto
8b0d4312ee
macos: invalidate restorable state whenever a terminal window is closed
2024-01-10 21:28:49 -08:00
Mitchell Hashimoto
837b551a92
macos: invalid restorable state whenever surface tree changes
...
Related to #1177
This detects whenever the surface tree (splits) change in any way and
requests that the restorable state be invalided by macOS.
2024-01-10 21:24:47 -08:00
Mitchell Hashimoto
88c525d593
macos: minor style changes
2024-01-10 09:37:36 -08:00
Thorsten Ball
3e811dad2c
macos: stop windows glitching when cascading
...
Noticed that windows glitch when cascading: they show up in center of
screen, then quickly move to the correct position at last-cascade point.
This fixes the issue, by moving the `showWindow` call to _after_ the
setting of the last cascade point.
Now if you look at the code and think: "shouldn't this work without the
async-dispatch, like this?"
```swift
if (!window.styleMask.contains(.fullScreen)) {
Self.lastCascadePoint = window.cascadeTopLeft(from: Self.lastCascadePoint)
}
c.showWindow(self)
```
Then, yes, I had the same thought, but it doesn't. And as discussed on
Discord, we probably don't know what's going on behind the scenes.
So this is the simplified code of the version we have to live with:
async dispatching the cascade and non-cascade versions both.
2024-01-10 18:28:19 +01:00