From 217084081fa8ebe3a6241ac850194404318fe621 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 7 Apr 2008 12:51:01 +0100 Subject: [PATCH] * Add a header to the language and keymap menus; this seems to make it feel like less of an accident when the language menu is displayed automatically on startup. --- debian/changelog | 8 ++++++++ xmenu.inc | 50 +++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 655a336..55720cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +gfxboot-theme-ubuntu (0.5.17) UNRELEASED; urgency=low + + * Add a header to the language and keymap menus; this seems to make it + feel like less of an accident when the language menu is displayed + automatically on startup. + + -- Colin Watson Mon, 07 Apr 2008 12:41:45 +0100 + gfxboot-theme-ubuntu (0.5.16) hardy; urgency=low * Set language using debian-installer/language= rather than locale= if it diff --git a/xmenu.inc b/xmenu.inc index 67e0329..ac098fe 100644 --- a/xmenu.inc +++ b/xmenu.inc @@ -19,9 +19,9 @@ /xmenu.selected.bg 0x6c6c6c newcolor small_layout { - /xmenu.maxlines 22 def + /xmenu.maxlines 21 def } { - /xmenu.maxlines 28 def + /xmenu.maxlines 27 def } ifelse % xmenu layout @@ -207,7 +207,9 @@ small_layout { xmenu.sizes - dup .saved.areas xmenu.columns array /xmenu.saved.areas over def put + dup .saved.areas xmenu.columns + xmenu.columns 1 gt xmenu .xm_title get .undef ne and { 1 add } if + array /xmenu.saved.areas over def put 0 1 xmenu.columns 1 sub { /xmenu.column exch def @@ -228,8 +230,26 @@ small_layout { } for + xmenu.columns 1 gt xmenu .xm_title get .undef ne and { + dup .saved.areas get xmenu.columns + [ + xmenu.x 1 sub xmenu.y xmenu.vspace sub xmenu.lheight sub 1 sub moveto + currentpoint + + xmenu.light xmenu.dark + xmenu.width 2 add xmenu.columns mul + xmenu.lheight 2 add + over over savescreen 5 1 roll + drawborder + ] put + } if + 0 1 xmenu .xm_list get length 1 sub { xmenu.viewentry } for + xmenu.columns 1 gt xmenu .xm_title get .undef ne and { + xmenu.viewheader + } if + /xmenu.oldentry xmenu .xm_current get def dup .x xmenu.x put @@ -330,6 +350,30 @@ small_layout { } def +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Draw menu header. +% +% ( ) ==> ( ) +% +/xmenu.viewheader { + xmenu.font setfont + + /xmenu.pos.y xmenu.y xmenu.vspace sub xmenu.lheight sub def + /xmenu.header.width xmenu.width 2 add xmenu.columns mul 2 sub def + + xmenu.x xmenu.pos.y moveto + + xmenu.normal.bg setcolor + xmenu.header.width xmenu.lheight fillrect + + xmenu.normal.fg setcolor + xmenu.x xmenu.header.width 2 div add + xmenu.pos.y xmenu.vspace add + moveto + xmenu .xm_title get exec showcenter +} def + + % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % Select menu entry. %