179 Commits

Author SHA1 Message Date
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
Mitchell Hashimoto
6cf61f4d7b macos: show debug build warning even with releasesafe for now 2024-08-31 21:37:22 -07:00
Mitchell Hashimoto
80327402b8 Merge pull request #2120 from edmz/last_tab
macos: jump to last_tab
2024-08-26 20:22:52 -07:00
Mitchell Hashimoto
18419d3589 Clamp initial window size configurations to screen size
Fixes #2145
2024-08-26 10:09:05 -07:00
pnodet
7ff9af1520 style(macos): cleanup trailing spaces 2024-08-21 21:53:09 +02:00
Eduardo Dominguez
262902a28d macos: jump to last_tab 2024-08-19 12:19:00 -06:00
Łukasz Niemier
f9be02a20f chore: clean up typos 2024-08-05 13:56:57 +02:00
Mitchell Hashimoto
9785130c03 macos: add "Reset Terminal" context menu option 2024-08-01 14:58:03 -07:00
Mitchell Hashimoto
5268780f00 macos: comment on clearing tab 2024-07-21 10:09:18 -07:00
Justin Su
f57f9f2ec9 Use 1-indexed values when dealing with tabs 2024-07-21 03:32:43 -04:00
Justin Su
823e073795 Relabel all tabs and clear labels for tabs with no key equivalent 2024-07-21 02:27:51 -04:00
Justin Su
7919cb266e Update comment 2024-07-21 02:12:47 -04: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
fc52acd47a update config in TerminalController.windowDidLoad and TerminalController.configDidReload 2024-06-10 18:22:28 -07:00
Cameron Dart
29fb70197c macos: surface focus follow mouse 2024-06-10 16:07:33 -07:00
Mitchell Hashimoto
5092cb55ad Merge pull request #1837 from ghostty-org/titlebar-style
macos: macos-titlebar-style, remove titlebar-tabs option
2024-06-07 13:15:14 -07:00
Mitchell Hashimoto
550a9be241 config: introduce macos-window-shadow 2024-06-07 12:46:14 -07:00
Mitchell Hashimoto
5a026cf1a2 macos: set background color on transparency that matches Terminal.app 2024-06-07 12:35:57 -07:00
Mitchell Hashimoto
25484d2ccc macos: set background opacity/blur on window controller not surface 2024-06-07 12:31:45 -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
Troels Thomsen
f79674097f Avoid coloring when using native tabs 2024-05-21 08:58:51 +02:00
Mitchell Hashimoto
47874742a1 Extract guard statement 2024-05-21 08:58:10 +02:00
Troels Thomsen
242858b963 Color after setting window theme and tab mode 2024-05-21 08:05:55 +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
92d551a3c1 macos: only set bg color and titlebar color if opaque
Fixes #1771

I'm not convinced this fix won't regress some other behavior, but in my
titlebar tab and native tab modes with and without transparency, this
has looked okay to me.
2024-05-17 17:05:21 -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
cryptocode
2faa0c9bee Rename Split Horizontally/Vertically to Split Right/Down
I make the following suggestion through a PR since I already tried this locally and have a branch ready:

- Rename Split Horizontally to Split Right
- Rename Split Vertically to Split Down

Rationale:

The terms horizontal and vertical are ambiguous in the context of splitting (does it mean the splitter is vertical, or are the panes organized vertically?)
Different apps pick different interpretations, so people get confused.

IntelliJ made the same change as above based on user feedback: https://youtrack.jetbrains.com/issue/IJPL-130991/Split-Vertically-and-Split-Horizontally-are-ambiguous-and-should-be-renamed

Ghostty is using the left/right nomenclature in other menu items. In the codebase, SplitDirection is already left/right.
2024-05-10 11:17:11 +02:00
Mitchell Hashimoto
45eecf801e macos: show alert when creating new tab in non-native fs
Fixes #1683

The root issue is #392 and we can likely find a way to fix it, but for
now let's prevent the full program hang by showing an alert.
2024-04-16 09:34:10 -07: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
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
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
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