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 <marcnarc@xiplink.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Marc Branchaud committed
Dec 18, 2013 at 11:04 UTC
786f15c849916513531862a5f3fb45c0323b61f6
1 file changed
+28
-2
gitk
+28
-2
@@ -2263,9 +2263,35 @@ proc makewindow {} {
2263
2264
# build up the bottom bar of upper window
2265
${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
+
2293
${NS}::label .tf.lbar.flab2 -text " [mc "commit"] "
2294
+
2295
pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \
2296
-side left -fill y
2297
set gdttype [mc "containing:"]