mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 07:46:12 +03:00
config: add adjust-icon-height option
Metric modifier for the `icon_height` metric.
This commit is contained in:
@ -396,6 +396,18 @@ pub const compatibility = std.StaticStringMap(
|
||||
/// Thickness in pixels or percentage adjustment of box drawing characters.
|
||||
/// See the notes about adjustments in `adjust-cell-width`.
|
||||
@"adjust-box-thickness": ?MetricModifier = null,
|
||||
/// Height in pixels or percentage adjustment of maximum height for nerd font icons.
|
||||
///
|
||||
/// Increasing this value will allow nerd font icons to be larger, but won't
|
||||
/// necessarily force them to be. Decreasing this value will make nerd font
|
||||
/// icons smaller.
|
||||
///
|
||||
/// The default value for the icon height is 1.2 times the height of capital
|
||||
/// letters in your primary font, so something like -16.6% would make icons
|
||||
/// roughly the same height as capital letters.
|
||||
///
|
||||
/// See the notes about adjustments in `adjust-cell-width`.
|
||||
@"adjust-icon-height": ?MetricModifier = null,
|
||||
|
||||
/// The method to use for calculating the cell width of a grapheme cluster.
|
||||
/// The default value is `unicode` which uses the Unicode standard to determine
|
||||
|
@ -449,6 +449,7 @@ pub const DerivedConfig = struct {
|
||||
@"adjust-cursor-thickness": ?Metrics.Modifier,
|
||||
@"adjust-cursor-height": ?Metrics.Modifier,
|
||||
@"adjust-box-thickness": ?Metrics.Modifier,
|
||||
@"adjust-icon-height": ?Metrics.Modifier,
|
||||
@"freetype-load-flags": font.face.FreetypeLoadFlags,
|
||||
|
||||
/// Initialize a DerivedConfig. The config should be either a
|
||||
@ -488,6 +489,7 @@ pub const DerivedConfig = struct {
|
||||
.@"adjust-cursor-thickness" = config.@"adjust-cursor-thickness",
|
||||
.@"adjust-cursor-height" = config.@"adjust-cursor-height",
|
||||
.@"adjust-box-thickness" = config.@"adjust-box-thickness",
|
||||
.@"adjust-icon-height" = config.@"adjust-icon-height",
|
||||
.@"freetype-load-flags" = if (font.face.FreetypeLoadFlags != void) config.@"freetype-load-flags" else {},
|
||||
|
||||
// This must be last so the arena contains all our allocations
|
||||
@ -634,6 +636,7 @@ pub const Key = struct {
|
||||
if (config.@"adjust-cursor-thickness") |m| try set.put(alloc, .cursor_thickness, m);
|
||||
if (config.@"adjust-cursor-height") |m| try set.put(alloc, .cursor_height, m);
|
||||
if (config.@"adjust-box-thickness") |m| try set.put(alloc, .box_thickness, m);
|
||||
if (config.@"adjust-icon-height") |m| try set.put(alloc, .icon_height, m);
|
||||
break :set set;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user