diff options
author | Joe <rbo@gmx.us> | 2024-01-23 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-23 20:20:20 +0100 |
commit | 7c8b64a525e766e13e6edd816178edad81aee8c7 (patch) | |
tree | b380aa9a2ffdae848da8b0e85d7d7806f34977a3 /src | |
parent | ok (diff) | |
download | hardflip-7c8b64a525e766e13e6edd816178edad81aee8c7.tar.gz hardflip-7c8b64a525e766e13e6edd816178edad81aee8c7.tar.bz2 hardflip-7c8b64a525e766e13e6edd816178edad81aee8c7.tar.xz hardflip-7c8b64a525e766e13e6edd816178edad81aee8c7.tar.zst hardflip-7c8b64a525e766e13e6edd816178edad81aee8c7.zip |
good
Diffstat (limited to 'src')
-rw-r--r-- | src/i_host.go | 6 | ||||
-rw-r--r-- | src/i_ui.go | 23 |
2 files changed, 15 insertions, 14 deletions
diff --git a/src/i_host.go b/src/i_host.go index 491d236..76334e1 100644 --- a/src/i_host.go +++ b/src/i_host.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_host.go - * Fri Jan 19 18:44:09 2024 + * Tue Jan 23 18:11:24 2024 * Joe * * interfacing hosts @@ -51,13 +51,11 @@ package main -import "github.com/gdamore/tcell/v2" - func i_host_panel_dirs(ui HardUI, icons bool, dir_icon uint8, dir *DirsNode, curr *DirsNode, line int) { style := ui.style[DIR_STYLE] if dir == curr { - style = style.Background(tcell.ColorBlack) + // style = style.Background(tcell.ColorBlack) style = style.Reverse(true) } text := "" diff --git a/src/i_ui.go b/src/i_ui.go index 868f993..ea2a593 100644 --- a/src/i_ui.go +++ b/src/i_ui.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_ui.go - * Tue Jan 23 16:32:01 2024 + * Tue Jan 23 18:11:28 2024 * Joe * * interfacing with the user @@ -177,16 +177,16 @@ func i_draw_bottom_text(ui HardUI) { case DELETE_MODE: text = DELETE_KEYS_HINTS case LOAD_MODE: - text = "" + text = "Loading..." case ERROR_MODE: text = ERROR_KEYS_HINTS } i_draw_text(ui.s, - 0, ui.dim[H] - 1, ui.dim[W], ui.dim[H] - 1, + 1, ui.dim[H] - 1, ui.dim[W] - 1, ui.dim[H] - 1, ui.style[BOT_STYLE], text) i_draw_text(ui.s, - ui.dim[W] - 5, ui.dim[H] - 1, ui.dim[W], ui.dim[H] - 1, - ui.style[BOT_STYLE], " " + VERSION) + ui.dim[W] - len(VERSION) - 2, ui.dim[H] - 1, + ui.dim[W] - 1, ui.dim[H] - 1, ui.style[BOT_STYLE], " " + VERSION) } func i_draw_zhosts_box(ui HardUI) { @@ -255,7 +255,6 @@ func i_draw_error_msg(ui HardUI, load_err []error) { i_draw_text(ui.s, left, line, right, line, ui.style[ERR_STYLE], ui.err[ERROR_MSG]) if len(ui.err[ERROR_ERR]) > 0 { - left, right = i_left_right(len(ui.err[ERROR_ERR]), &ui) line += 1 i_draw_text(ui.s, left, line, right, line, ui.style[ERR_STYLE], ui.err[ERROR_ERR]) @@ -294,15 +293,19 @@ func i_draw_load_ui(ui *HardUI) { } i_draw_host_panel(*ui, false, nil, nil) i_draw_info_panel(*ui, false, nil) + text := "" + for i := 0; i < ui.dim[W] - 1; i++ { + text += " " + } + i_draw_text(ui.s, 1, ui.dim[H] - 1, ui.dim[W], ui.dim[H] - 1, + ui.style[BOT_STYLE], text) + i_draw_bottom_text(*ui) i_draw_msg(ui.s, 1, ui.style[BOX_STYLE], ui.dim, " Loading ") - text := "Loading " + strconv.Itoa(g_load_count) + " hosts" + text = "Loading " + strconv.Itoa(g_load_count) + " hosts" left, right := i_left_right(len(text), ui) i_draw_text(ui.s, left, ui.dim[H] - 2 - 1, right, ui.dim[H] - 2 - 1, ui.style[DEF_STYLE], text) - i_draw_text(ui.s, - ui.dim[W] - 5, ui.dim[H] - 1, ui.dim[W], ui.dim[H] - 1, - ui.style[DEF_STYLE].Dim(true), " " + VERSION) ui.s.Show() ui.s.PostEvent(nil) event := ui.s.PollEvent() |