mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-19 15:41:20 +00:00
Refine spacing and header usage
This is 4pt header space, 12pt clickable frame height
This commit is contained in:
committed by
Mitchell Hashimoto
parent
2842b18a3f
commit
40e6a6dd58
@@ -26,7 +26,7 @@ extension Ghostty {
|
||||
Image(systemName: "ellipsis")
|
||||
.font(.system(size: 10, weight: .semibold))
|
||||
.foregroundColor(.primary.opacity(isHovering ? 0.8 : 0.3))
|
||||
.offset(y: -2)
|
||||
.offset(y: -3)
|
||||
.allowsHitTesting(false)
|
||||
.transition(.opacity)
|
||||
}
|
||||
|
||||
@@ -427,14 +427,18 @@ const DerivedConfig = struct {
|
||||
}
|
||||
|
||||
fn scaledPadding(self: *const DerivedConfig, x_dpi: f32, y_dpi: f32) rendererpkg.Padding {
|
||||
// Add 6pt header height for macOS overlay elements (tight fit around ellipsis)
|
||||
const header_height_pt: f32 = 6.0;
|
||||
const header_height_px: u32 = @intFromFloat(@floor(header_height_pt * y_dpi / 72));
|
||||
|
||||
const padding_top: u32 = padding_top: {
|
||||
const padding_top: f32 = @floatFromInt(self.window_padding_top);
|
||||
const scaled_padding: u32 = @intFromFloat(@floor(padding_top * y_dpi / 72));
|
||||
break :padding_top scaled_padding + header_height_px;
|
||||
|
||||
// Add 6pt header height for macOS surface grab overlay elements
|
||||
if (comptime builtin.os.tag == .macos) {
|
||||
const header_height_pt: f32 = 4.0;
|
||||
const header_height_px: u32 = @intFromFloat(@floor(header_height_pt * y_dpi / 72));
|
||||
break :padding_top scaled_padding + header_height_px;
|
||||
}
|
||||
|
||||
break :padding_top scaled_padding;
|
||||
};
|
||||
const padding_bottom: u32 = padding_bottom: {
|
||||
const padding_bottom: f32 = @floatFromInt(self.window_padding_bottom);
|
||||
|
||||
Reference in New Issue
Block a user