diff options
author | Joe <rbo@gmx.us> | 2025-01-20 17:41:05 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2025-01-20 17:41:05 +0100 |
commit | 8a713881f2bee207981b2883518138a4cfdd6adc (patch) | |
tree | 74c5c60f2b81e5f25a9f3398fcd1b021fdc5c39c /src/i_ui.go | |
parent | okok (diff) | |
download | hardflip-8a713881f2bee207981b2883518138a4cfdd6adc.tar.gz hardflip-8a713881f2bee207981b2883518138a4cfdd6adc.tar.bz2 hardflip-8a713881f2bee207981b2883518138a4cfdd6adc.tar.xz hardflip-8a713881f2bee207981b2883518138a4cfdd6adc.tar.zst hardflip-8a713881f2bee207981b2883518138a4cfdd6adc.zip |
box style or something
Diffstat (limited to 'src/i_ui.go')
-rw-r--r-- | src/i_ui.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/i_ui.go b/src/i_ui.go index 0ffa945..486cc29 100644 --- a/src/i_ui.go +++ b/src/i_ui.go @@ -205,6 +205,33 @@ func i_draw_msg(s tcell.Screen, lines int, box_style tcell.Style, box_style, title) } +func i_set_box_style(ui *HardUI) { + tmp := tcell.StyleDefault.Background(tcell.ColorReset) + + switch ui.mode { + case NORMAL_MODE, + LOAD_MODE, + WELCOME_MODE, + HELP_MODE: + // FIX: with custom config for default ayayaya + ui.style[BOX_STYLE] = tmp.Foreground(tcell.ColorReset) + ui.style[HEAD_STYLE] = tmp.Foreground(tcell.ColorReset) + case DELETE_MODE, + ERROR_MODE: + ui.style[BOX_STYLE] = tmp.Foreground(tcell.ColorRed).Dim(true) + ui.style[HEAD_STYLE] = tmp.Foreground(tcell.ColorRed).Dim(true) + case MKDIR_MODE, + INSERT_NAME_MODE, + INSERT_MODE, + RENAME_MODE: + ui.style[BOX_STYLE] = tmp.Foreground(tcell.ColorBlue).Dim(true) + ui.style[HEAD_STYLE] = tmp.Foreground(tcell.ColorBlue).Dim(true) + case FUZZ_MODE: + ui.style[BOX_STYLE] = tmp.Foreground(tcell.ColorPurple) + ui.style[HEAD_STYLE] = tmp.Foreground(tcell.ColorPurple) + } +} + func i_draw_bottom_text(ui HardUI, insert *HostNode, insert_err []error) { text := "" @@ -835,6 +862,7 @@ func i_ui(data_dir string) { } for { data.ui.s.Clear() + i_set_box_style(&data.ui) i_draw_bottom_text(data.ui, data.insert, data.insert_err) i_draw_host_panel(data.ui, data.opts.Icon, data.litems, &data) i_draw_info_panel(data.ui, data.opts.Perc, data.litems) |