mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
terminal: get rid of duplicate RGB struct
This commit is contained in:
@ -33,7 +33,7 @@ pub const Attribute = union(enum) {
|
|||||||
/// Underline the text
|
/// Underline the text
|
||||||
underline: Underline,
|
underline: Underline,
|
||||||
reset_underline: void,
|
reset_underline: void,
|
||||||
underline_color: RGB,
|
underline_color: color.RGB,
|
||||||
reset_underline_color: void,
|
reset_underline_color: void,
|
||||||
|
|
||||||
/// Blink the text
|
/// Blink the text
|
||||||
@ -53,10 +53,10 @@ pub const Attribute = union(enum) {
|
|||||||
reset_strikethrough: void,
|
reset_strikethrough: void,
|
||||||
|
|
||||||
/// Set foreground color as RGB values.
|
/// Set foreground color as RGB values.
|
||||||
direct_color_fg: RGB,
|
direct_color_fg: color.RGB,
|
||||||
|
|
||||||
/// Set background color as RGB values.
|
/// Set background color as RGB values.
|
||||||
direct_color_bg: RGB,
|
direct_color_bg: color.RGB,
|
||||||
|
|
||||||
/// Set the background/foreground as a named color attribute.
|
/// Set the background/foreground as a named color attribute.
|
||||||
@"8_bg": color.Name,
|
@"8_bg": color.Name,
|
||||||
@ -76,12 +76,6 @@ pub const Attribute = union(enum) {
|
|||||||
/// Set foreground color as 256-color palette.
|
/// Set foreground color as 256-color palette.
|
||||||
@"256_fg": u8,
|
@"256_fg": u8,
|
||||||
|
|
||||||
pub const RGB = struct {
|
|
||||||
r: u8,
|
|
||||||
g: u8,
|
|
||||||
b: u8,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const Underline = enum(u3) {
|
pub const Underline = enum(u3) {
|
||||||
none = 0,
|
none = 0,
|
||||||
single = 1,
|
single = 1,
|
||||||
|
Reference in New Issue
Block a user