feat(tables): Indicador ordenación ▴/▾ Unicode en headers
- SortDirection.symbol() ahora retorna ▴/▾ en vez de ^/v - AdvancedTable usa los mismos glifos Unicode - VirtualAdvancedTable ya usaba symbol()
This commit is contained in:
parent
0ca97c2ba3
commit
b73ee76872
2 changed files with 6 additions and 6 deletions
|
|
@ -453,12 +453,12 @@ fn drawHeader(
|
|||
ctx.pushCommand(Command.text(lookup_x, text_y, "?", Style.Color.primary));
|
||||
}
|
||||
|
||||
// Draw sort indicator
|
||||
// Draw sort indicator (▴/▾ Unicode glyphs)
|
||||
if (table_state.sort_column == @as(i32, @intCast(idx))) {
|
||||
const indicator_x = col_x + @as(i32, @intCast(col.width)) - 12;
|
||||
const indicator_x = col_x + @as(i32, @intCast(col.width)) - 16;
|
||||
const indicator = switch (table_state.sort_direction) {
|
||||
.ascending => "^",
|
||||
.descending => "v",
|
||||
.ascending => "▴",
|
||||
.descending => "▾",
|
||||
.none => "",
|
||||
};
|
||||
if (indicator.len > 0) {
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ pub const SortDirection = enum {
|
|||
pub fn symbol(self: SortDirection) []const u8 {
|
||||
return switch (self) {
|
||||
.none => "",
|
||||
.ascending => " ^",
|
||||
.descending => " v",
|
||||
.ascending => "▴",
|
||||
.descending => "▾",
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue