feat: add support for undercurl styles
This commit is contained in:
parent
b197b1235b
commit
0523350596
3 changed files with 7 additions and 0 deletions
|
@ -91,6 +91,7 @@ fn set_style(plane: nc.Plane, style: Widget.Theme.Style) void {
|
||||||
.bold => plane.set_styles(nc.style.bold),
|
.bold => plane.set_styles(nc.style.bold),
|
||||||
.italic => plane.set_styles(nc.style.italic),
|
.italic => plane.set_styles(nc.style.italic),
|
||||||
.underline => plane.set_styles(nc.style.underline),
|
.underline => plane.set_styles(nc.style.underline),
|
||||||
|
.undercurl => plane.set_styles(nc.style.undercurl),
|
||||||
.strikethrough => plane.set_styles(nc.style.struck),
|
.strikethrough => plane.set_styles(nc.style.struck),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,6 +204,10 @@ fn show_font(self: *Self, font: ?Widget.Theme.FontStyle) void {
|
||||||
self.plane.set_styles(nc.style.underline);
|
self.plane.set_styles(nc.style.underline);
|
||||||
_ = self.plane.print(" underline", .{}) catch return;
|
_ = self.plane.print(" underline", .{}) catch return;
|
||||||
},
|
},
|
||||||
|
.undercurl => {
|
||||||
|
self.plane.set_styles(nc.style.undercurl);
|
||||||
|
_ = self.plane.print(" undercurl", .{}) catch return;
|
||||||
|
},
|
||||||
.strikethrough => {
|
.strikethrough => {
|
||||||
self.plane.set_styles(nc.style.struck);
|
self.plane.set_styles(nc.style.struck);
|
||||||
_ = self.plane.print(" strikethrough", .{}) catch return;
|
_ = self.plane.print(" strikethrough", .{}) catch return;
|
||||||
|
|
|
@ -1101,6 +1101,7 @@ pub inline fn set_cell_style(cell: *nc.Cell, style: Widget.Theme.Style) void {
|
||||||
.bold => nc.cell_set_styles(cell, nc.style.bold),
|
.bold => nc.cell_set_styles(cell, nc.style.bold),
|
||||||
.italic => nc.cell_set_styles(cell, nc.style.italic),
|
.italic => nc.cell_set_styles(cell, nc.style.italic),
|
||||||
.underline => nc.cell_set_styles(cell, nc.style.underline),
|
.underline => nc.cell_set_styles(cell, nc.style.underline),
|
||||||
|
.undercurl => nc.cell_set_styles(cell, nc.style.undercurl),
|
||||||
.strikethrough => nc.cell_set_styles(cell, nc.style.struck),
|
.strikethrough => nc.cell_set_styles(cell, nc.style.struck),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1145,6 +1146,7 @@ pub inline fn set_style(plane: *const nc.Plane, style: Widget.Theme.Style) void
|
||||||
.bold => plane.set_styles(nc.style.bold),
|
.bold => plane.set_styles(nc.style.bold),
|
||||||
.italic => plane.set_styles(nc.style.italic),
|
.italic => plane.set_styles(nc.style.italic),
|
||||||
.underline => plane.set_styles(nc.style.underline),
|
.underline => plane.set_styles(nc.style.underline),
|
||||||
|
.undercurl => plane.set_styles(nc.style.undercurl),
|
||||||
.strikethrough => plane.set_styles(nc.style.struck),
|
.strikethrough => plane.set_styles(nc.style.struck),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue