Skip to content

Commit 9950eff

Browse files
committed
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 <[email protected]>
1 parent 61c0cfe commit 9950eff

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

gitk

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,31 +2542,8 @@ proc makewindow {} {
25422542
# build up the bottom bar of upper window
25432543
ttk::label .tf.lbar.flabel -text "[mc "Find"] "
25442544
2545-
set bm_down_data {
2546-
#define down_width 16
2547-
#define down_height 16
2548-
static unsigned char down_bits[] = {
2549-
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
2550-
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
2551-
0x87, 0xe1, 0x8e, 0x71, 0x9c, 0x39, 0xb8, 0x1d,
2552-
0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01};
2553-
}
2554-
image create bitmap bm-down -data $bm_down_data -foreground $uifgcolor
2555-
ttk::button .tf.lbar.fnext -width 26 -command {dofind 1 1}
2556-
.tf.lbar.fnext configure -image bm-down
2557-
2558-
set bm_up_data {
2559-
#define up_width 16
2560-
#define up_height 16
2561-
static unsigned char up_bits[] = {
2562-
0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f,
2563-
0xb8, 0x1d, 0x9c, 0x39, 0x8e, 0x71, 0x87, 0xe1,
2564-
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
2565-
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01};
2566-
}
2567-
image create bitmap bm-up -data $bm_up_data -foreground $uifgcolor
2568-
ttk::button .tf.lbar.fprev -width 26 -command {dofind -1 1}
2569-
.tf.lbar.fprev configure -image bm-up
2545+
ttk::button .tf.lbar.fnext -command {dofind 1 1} -text \u2193 -width 3
2546+
ttk::button .tf.lbar.fprev -command {dofind -1 1} -text \u2191 -width 3
25702547
25712548
ttk::label .tf.lbar.flab2 -text " [mc "commit"] "
25722549

0 commit comments

Comments
 (0)