mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos,libghostty: font size is a u8
This commit is contained in:
@ -379,7 +379,7 @@ typedef struct {
|
|||||||
ghostty_platform_u platform;
|
ghostty_platform_u platform;
|
||||||
void* userdata;
|
void* userdata;
|
||||||
double scale_factor;
|
double scale_factor;
|
||||||
uint16_t font_size;
|
uint8_t font_size;
|
||||||
const char* working_directory;
|
const char* working_directory;
|
||||||
const char* command;
|
const char* command;
|
||||||
} ghostty_surface_config_s;
|
} ghostty_surface_config_s;
|
||||||
|
@ -252,7 +252,7 @@ extension Ghostty {
|
|||||||
/// libghostty, usually from the Ghostty configuration.
|
/// libghostty, usually from the Ghostty configuration.
|
||||||
struct SurfaceConfiguration {
|
struct SurfaceConfiguration {
|
||||||
/// Explicit font size to use in points
|
/// Explicit font size to use in points
|
||||||
var fontSize: UInt16? = nil
|
var fontSize: UInt8? = nil
|
||||||
|
|
||||||
/// Explicit working directory to set
|
/// Explicit working directory to set
|
||||||
var workingDirectory: String? = nil
|
var workingDirectory: String? = nil
|
||||||
|
@ -313,7 +313,7 @@ pub const Surface = struct {
|
|||||||
scale_factor: f64 = 1,
|
scale_factor: f64 = 1,
|
||||||
|
|
||||||
/// The font size to inherit. If 0, default font size will be used.
|
/// The font size to inherit. If 0, default font size will be used.
|
||||||
font_size: u16 = 0,
|
font_size: u8 = 0,
|
||||||
|
|
||||||
/// The working directory to load into.
|
/// The working directory to load into.
|
||||||
working_directory: [*:0]const u8 = "",
|
working_directory: [*:0]const u8 = "",
|
||||||
@ -1041,7 +1041,7 @@ pub const Surface = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn newSurfaceOptions(self: *const Surface) apprt.Surface.Options {
|
fn newSurfaceOptions(self: *const Surface) apprt.Surface.Options {
|
||||||
const font_size: u16 = font_size: {
|
const font_size: u8 = font_size: {
|
||||||
if (!self.app.config.@"window-inherit-font-size") break :font_size 0;
|
if (!self.app.config.@"window-inherit-font-size") break :font_size 0;
|
||||||
break :font_size self.core_surface.font_size.points;
|
break :font_size self.core_surface.font_size.points;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user