mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-13 23:36:09 +03:00
cleanup: rename text-blending
to alpha-blending
+ correct docs
This commit is contained in:
@ -259,7 +259,8 @@ pub const renamed = std.StaticStringMap([]const u8).initComptime(&.{
|
||||
|
||||
/// What color space to use when performing alpha blending.
|
||||
///
|
||||
/// This affects how text looks for different background/foreground color pairs.
|
||||
/// This affects the appearance of text and of any images with transparency.
|
||||
/// Additionally, custom shaders will receive colors in the configured space.
|
||||
///
|
||||
/// Valid values:
|
||||
///
|
||||
@ -276,11 +277,7 @@ pub const renamed = std.StaticStringMap([]const u8).initComptime(&.{
|
||||
/// * `linear-corrected` - Same as `linear`, but with a correction step applied
|
||||
/// for text that makes it look nearly or completely identical to `native`,
|
||||
/// but without any of the darkening artifacts.
|
||||
///
|
||||
/// Note: This setting affects more than just text, images will also be blended
|
||||
/// in the selected color space, and custom shaders will receive colors in that
|
||||
/// color space as well.
|
||||
@"text-blending": TextBlending = .native,
|
||||
@"alpha-blending": AlphaBlending = .native,
|
||||
|
||||
/// All of the configurations behavior adjust various metrics determined by the
|
||||
/// font. The values can be integers (1, -1, etc.) or a percentage (20%, -15%,
|
||||
@ -1220,12 +1217,16 @@ keybind: Keybinds = .{},
|
||||
/// This is currently only supported on macOS and Linux.
|
||||
@"window-theme": WindowTheme = .auto,
|
||||
|
||||
/// The colorspace to use for the terminal window. The default is `srgb` but
|
||||
/// this can also be set to `display-p3` to use the Display P3 colorspace.
|
||||
/// The color space to use when interpreting terminal colors. "Terminal colors"
|
||||
/// refers to colors specified in your configuration and colors produced by
|
||||
/// direct-color SGR sequences.
|
||||
///
|
||||
/// Changing this value at runtime will only affect new windows.
|
||||
/// Valid values:
|
||||
///
|
||||
/// This setting is only supported on macOS.
|
||||
/// * `srgb` - Interpret colors in the sRGB color space. This is the default.
|
||||
/// * `display-p3` - Interpret colors in the Display P3 color space.
|
||||
///
|
||||
/// This setting is currently only supported on macOS.
|
||||
@"window-colorspace": WindowColorspace = .srgb,
|
||||
|
||||
/// The initial window size. This size is in terminal grid cells by default.
|
||||
@ -5825,13 +5826,13 @@ pub const GraphemeWidthMethod = enum {
|
||||
unicode,
|
||||
};
|
||||
|
||||
/// See text-blending
|
||||
pub const TextBlending = enum {
|
||||
/// See alpha-blending
|
||||
pub const AlphaBlending = enum {
|
||||
native,
|
||||
linear,
|
||||
@"linear-corrected",
|
||||
|
||||
pub fn isLinear(self: TextBlending) bool {
|
||||
pub fn isLinear(self: AlphaBlending) bool {
|
||||
return switch (self) {
|
||||
.native => false,
|
||||
.linear, .@"linear-corrected" => true,
|
||||
|
@ -391,7 +391,7 @@ pub const DerivedConfig = struct {
|
||||
links: link.Set,
|
||||
vsync: bool,
|
||||
colorspace: configpkg.Config.WindowColorspace,
|
||||
blending: configpkg.Config.TextBlending,
|
||||
blending: configpkg.Config.AlphaBlending,
|
||||
|
||||
pub fn init(
|
||||
alloc_gpa: Allocator,
|
||||
@ -463,7 +463,7 @@ pub const DerivedConfig = struct {
|
||||
.links = links,
|
||||
.vsync = config.@"window-vsync",
|
||||
.colorspace = config.@"window-colorspace",
|
||||
.blending = config.@"text-blending",
|
||||
.blending = config.@"alpha-blending",
|
||||
.arena = arena,
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user