From: Mark Levedahl Date: Sun, 21 Sep 2025 19:17:07 +0000 (-0400) Subject: gitk: use text labels for next/prev search buttons X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9950eff84178459a90c6047bb168659b05a998e6;p=thirdparty%2Fgit.git 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 --- diff --git a/gitk b/gitk index 0d72621c03..d2bf3f10b3 100755 --- a/gitk +++ b/gitk @@ -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"] "