gitk: use text labels for next/prev search buttons

gitk allows searching for commits with various criteria, and provides
up/down search buttons to facilitate this search. These buttons are
labelled with bitmaps, and those bitmaps are not always recolored
correctly for the ui scheme as the theme colors are not known. Let's
just use text labels on these, allowing the styles to handle any
coloring needed. Use utf codepoints for the arrows, presuming that these
code points are available in the selected font.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
main
Mark Levedahl 2025-09-21 15:17:07 -04:00
parent 61c0cfe08c
commit 9950eff841
1 changed files with 2 additions and 25 deletions

27
gitk
View File

@ -2542,31 +2542,8 @@ proc makewindow {} {
# build up the bottom bar of upper window
ttk::label .tf.lbar.flabel -text "[mc "Find"] "

set bm_down_data {
#define down_width 16
#define down_height 16
static unsigned char down_bits[] = {
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
0x87, 0xe1, 0x8e, 0x71, 0x9c, 0x39, 0xb8, 0x1d,
0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01};
}
image create bitmap bm-down -data $bm_down_data -foreground $uifgcolor
ttk::button .tf.lbar.fnext -width 26 -command {dofind 1 1}
.tf.lbar.fnext configure -image bm-down

set bm_up_data {
#define up_width 16
#define up_height 16
static unsigned char up_bits[] = {
0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f,
0xb8, 0x1d, 0x9c, 0x39, 0x8e, 0x71, 0x87, 0xe1,
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01};
}
image create bitmap bm-up -data $bm_up_data -foreground $uifgcolor
ttk::button .tf.lbar.fprev -width 26 -command {dofind -1 1}
.tf.lbar.fprev configure -image bm-up
ttk::button .tf.lbar.fnext -command {dofind 1 1} -text \u2193 -width 3
ttk::button .tf.lbar.fprev -command {dofind -1 1} -text \u2191 -width 3

ttk::label .tf.lbar.flab2 -text " [mc "commit"] "