mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Apply feedback
This commit is contained in:
@ -60,30 +60,22 @@ extension Ghostty {
|
|||||||
var opacity: Double = 0.85
|
var opacity: Double = 0.85
|
||||||
let key = "unfocused-split-opacity"
|
let key = "unfocused-split-opacity"
|
||||||
_ = ghostty_config_get(ghostty.config, &opacity, key, UInt(key.count))
|
_ = ghostty_config_get(ghostty.config, &opacity, key, UInt(key.count))
|
||||||
AppDelegate.logger.warning("ghostty_config_get(\(key))=\(opacity)")
|
|
||||||
return 1 - opacity
|
return 1 - opacity
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The color for the rectable overlay when unfocused.
|
||||||
private var unfocusedFill: Color {
|
private var unfocusedFill: Color {
|
||||||
var rgb: UInt32 = 16777215 // white default
|
var rgb: UInt32 = 16777215 // white default
|
||||||
let key = "unfocused-split-fill"
|
let key = "unfocused-split-fill"
|
||||||
_ = ghostty_config_get(ghostty.config, &rgb, key, UInt(key.count))
|
_ = ghostty_config_get(ghostty.config, &rgb, key, UInt(key.count))
|
||||||
AppDelegate.logger.warning("ghostty_config_get(\(key))=\(rgb)")
|
|
||||||
let red = Double((rgb >> 16) & 0xff)
|
let red = Double((rgb >> 16) & 0xff)
|
||||||
let green = Double((rgb >> 8) & 0xff)
|
let green = Double((rgb >> 8) & 0xff)
|
||||||
let blue = Double(rgb & 0xff)
|
let blue = Double(rgb & 0xff)
|
||||||
AppDelegate.logger.warning("red=\(red) green=\(green) blue=\(blue)")
|
return Color(
|
||||||
return Color.init(
|
red: red / 255,
|
||||||
red: 255,
|
green: green / 255,
|
||||||
green: 0,
|
blue: blue / 255
|
||||||
blue: 0
|
|
||||||
)
|
)
|
||||||
// return Color.init(
|
|
||||||
// red: red,
|
|
||||||
// green: green,
|
|
||||||
// blue: blue,
|
|
||||||
// opacity: unfocusedOpacity
|
|
||||||
// )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
@ -314,7 +314,8 @@ palette: Palette = .{},
|
|||||||
/// clamped to the nearest valid value.
|
/// clamped to the nearest valid value.
|
||||||
@"unfocused-split-opacity": f64 = 0.85,
|
@"unfocused-split-opacity": f64 = 0.85,
|
||||||
|
|
||||||
@"unfocused-split-fill": ?Color = null,
|
// The color to dim the unfocused split.
|
||||||
|
@"unfocused-split-fill": Color = Color{ .r = 255, .g = 255, .b = 255 },
|
||||||
|
|
||||||
/// The command to run, usually a shell. If this is not an absolute path,
|
/// The command to run, usually a shell. If this is not an absolute path,
|
||||||
/// it'll be looked up in the PATH. If this is not set, a default will
|
/// it'll be looked up in the PATH. If this is not set, a default will
|
||||||
|
@ -39,9 +39,9 @@ pub fn get(config: *const Config, k: Key, ptr_raw: *anyopaque) bool {
|
|||||||
ptr.* = @floatCast(value);
|
ptr.* = @floatCast(value);
|
||||||
},
|
},
|
||||||
|
|
||||||
?Color => {
|
Color => {
|
||||||
const ptr: *?c_uint = @ptrCast(@alignCast(ptr_raw));
|
const ptr: *c_uint = @ptrCast(@alignCast(ptr_raw));
|
||||||
ptr.* = if (value) |c| c.toInt() else null;
|
ptr.* = value.toInt();
|
||||||
},
|
},
|
||||||
|
|
||||||
else => |T| switch (@typeInfo(T)) {
|
else => |T| switch (@typeInfo(T)) {
|
||||||
|
Reference in New Issue
Block a user