Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 786f15c

Browse files
marcnarcpaulusmack
authored andcommitted
gitk: Replace "next" and "prev" buttons with down and up arrows
Users often find that "next" and "prev" do the opposite of what they expect. For example, "next" moves to the next match down the list, but that is almost always backwards in time. Replacing the text with arrows makes it clear where the buttons will take the user. Signed-off-by: Marc Branchaud <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent c61f3a9 commit 786f15c

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

gitk

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,9 +2263,35 @@ proc makewindow {} {
22632263

22642264
# build up the bottom bar of upper window
22652265
${NS}::label .tf.lbar.flabel -text "[mc "Find"] "
2266-
${NS}::button .tf.lbar.fnext -text [mc "next"] -command {dofind 1 1}
2267-
${NS}::button .tf.lbar.fprev -text [mc "prev"] -command {dofind -1 1}
2266+
2267+
set bm_down_data {
2268+
#define down_width 16
2269+
#define down_height 16
2270+
static unsigned char down_bits[] = {
2271+
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
2272+
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
2273+
0x87, 0xe1, 0x8e, 0x71, 0x9c, 0x39, 0xb8, 0x1d,
2274+
0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01};
2275+
}
2276+
image create bitmap bm-down -data $bm_down_data -foreground $uifgcolor
2277+
${NS}::button .tf.lbar.fnext -width 26 -command {dofind 1 1}
2278+
.tf.lbar.fnext configure -image bm-down
2279+
2280+
set bm_up_data {
2281+
#define up_width 16
2282+
#define up_height 16
2283+
static unsigned char up_bits[] = {
2284+
0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f,
2285+
0xb8, 0x1d, 0x9c, 0x39, 0x8e, 0x71, 0x87, 0xe1,
2286+
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
2287+
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01};
2288+
}
2289+
image create bitmap bm-up -data $bm_up_data -foreground $uifgcolor
2290+
${NS}::button .tf.lbar.fprev -width 26 -command {dofind -1 1}
2291+
.tf.lbar.fprev configure -image bm-up
2292+
22682293
${NS}::label .tf.lbar.flab2 -text " [mc "commit"] "
2294+
22692295
pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \
22702296
-side left -fill y
22712297
set gdttype [mc "containing:"]

0 commit comments

Comments
 (0)