12 Commits

Author SHA1 Message Date
Mitchell Hashimoto
cc8e1cd936 macos: support initial window size 2023-09-30 20:47:31 -07:00
Gregory Anders
8f75e83958 macos: rename indexTabs() to relabelTabs()
This is a better name because the tab label may not necessarily be an
index (if a user binds some non-numeric key, for instance).
2023-09-28 08:28:46 -07:00
Gregory Anders
59ba6fac2b macos: add tab index labels 2023-09-28 08:28:46 -07:00
Mitchell Hashimoto
d945640401 macos: break reference cycle to window to allow window to free memory
Fixes #366

The comment in the Swift code explains what was happening here:

> I don't know if this is the right place, but because of WindowAccessor in our
> SwiftUI hierarchy, we have a reference cycle between view and window and windows
> are never freed. When the window is closed, the window controller is deinitialized,
> so we can use this opportunity detach the view from the window and break the cycle.

An alternate solution would be to make our reference back to the window
"weak" but we appear to not be able to do that with SwiftUI property
wrappers such as `@State` and `@Binding` and so on.
2023-09-01 09:12:03 -07:00
Mitchell Hashimoto
4f5460475c Merge pull request #296 from mitchellh/mrn/macos-inherit-font-size
macOS: inherit font size when creating new tab
2023-08-18 09:22:06 -07:00
Thorsten Ball
12311e9707 macOS: simplify code for new tab 2023-08-18 06:26:15 +02:00
Thorsten Ball
3e7c4475a1 macOS: move newTab code to PrimaryWindowManager 2023-08-17 20:57:00 +02:00
Thorsten Ball
d2dae7a696 macOS: inherit font size when creating new tab
This is one part of #281.
2023-08-17 20:56:56 +02:00
Thorsten Ball
0597b03fa2 macOS: remove dead code from PrimaryWindowController
I think this is a left-over from the refactor that moved this field to
the `PrimaryWindowManager`.
2023-08-17 07:04:46 +02:00
Mitchell Hashimoto
8c01160afa macos: "+" button ensures tab is added to same window group 2023-08-04 17:39:40 -07:00
Mitchell Hashimoto
bb7c67b967 macos: implement newWindowForTab for "+" button 2023-08-04 17:35:57 -07:00
Mitchell Hashimoto
bf190ba442 macos: merge AppController and AppDelegate, organize groups 2023-08-04 17:05:52 -07:00