6.0.0-alt9
- gfxboot design
This commit is contained in:
parent
5264c5e241
commit
b4f95656dc
@ -7,7 +7,7 @@
|
||||
|
||||
Name: branding-simply-linux
|
||||
Version: 6.0.0
|
||||
Release: alt8
|
||||
Release: alt9
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: cpio gfxboot >= 4 fonts-ttf-dejavu fonts-ttf-droid
|
||||
@ -379,6 +379,9 @@ subst "s/Theme=.*/Theme=%theme/" /etc/plymouth/plymouthd.conf
|
||||
%_desktopdir/indexhtml.desktop
|
||||
|
||||
%changelog
|
||||
* Thu May 26 2011 Anton V. Boyarshinov <boyarsh@altlinux.ru> 6.0.0-alt9
|
||||
- gfxboot design
|
||||
|
||||
* Mon May 23 2011 Mikhail Efremov <sem@altlinux.org> 6.0.0-alt8
|
||||
- Font: Droid Sans.
|
||||
- Cursor theme: jimmac.
|
||||
|
@ -22,13 +22,15 @@ ahttpd:
|
||||
boot:
|
||||
cp -a /usr/src/design-bootloader-source ./
|
||||
cp -a components/bootloader/config design-bootloader-source/
|
||||
cp -af components/bootloader/menu.inc design-bootloader-source/src/
|
||||
cp -al components/bootloader/menu_*.jpg design-bootloader-source/data-install/
|
||||
cp -a components/bootloader/gfxboot.cfg design-bootloader-source/data-install/
|
||||
cp -a components/bootloader/gfxboot.cfg design-bootloader-source/data-boot/
|
||||
for size in 1024x768 800x600 640x480; do \
|
||||
convert images/boot.jpg -quality 97 -resize "$$size!" -fill '#c62530' -font /usr/share/fonts/ttf/dejavu/DejaVuSansCondensed-Bold.ttf -style Normal -weight Normal -pointsize 20 -gravity northeast -draw 'text 25,25 "$(STATUS)"' boot-$$size.jpg ;\
|
||||
done
|
||||
cp -al boot-800x600.jpg design-bootloader-source/data-boot/back.jpg
|
||||
convert images/boot.png -resize "800x600!" -fill '#c62530' -font /usr/share/fonts/ttf/dejavu/DejaVuSansCondensed-Bold.ttf -style Normal -weight Normal -pointsize 20 -gravity northeast -draw 'text 25,25 "$(STATUS)"' design-bootloader-source/data-install/back.jpg
|
||||
convert images/boot.jpg -resize "800x600!" -fill '#c62530' -font /usr/share/fonts/ttf/dejavu/DejaVuSansCondensed-Bold.ttf -style Normal -weight Normal -pointsize 20 -gravity northeast -draw 'text 25,25 "$(STATUS)"' design-bootloader-source/data-install/back.jpg
|
||||
#bootsplash
|
||||
mkdir -p $(datadir)/plymouth/themes/$(THEME)
|
||||
cp -al boot-800x600.jpg $(datadir)/plymouth/themes/$(THEME)/grub.jpg
|
||||
|
@ -35,13 +35,13 @@ background=back.jpg
|
||||
; max. visible main menu items
|
||||
mainmenu.entries=8
|
||||
; minimal main menu selection bar width
|
||||
mainmenu.bar.minwidth=294
|
||||
mainmenu.bar.minwidth=270
|
||||
; main menu selection bar transparency (0..255)
|
||||
mainmenu.bar.transparency=60
|
||||
mainmenu.bar.transparency=0
|
||||
; main menu colors
|
||||
mainmenu.bar.color=0x787878
|
||||
mainmenu.bar.color=0xffffff
|
||||
mainmenu.normal.fg=0x787878
|
||||
mainmenu.selected.fg=0xffffff
|
||||
mainmenu.selected.fg=0x118bca
|
||||
; boot option colors
|
||||
bootopt.label.fg=0x787878
|
||||
bootopt.text.fg=0x787878
|
||||
@ -75,7 +75,7 @@ keymap=
|
||||
; screen size
|
||||
screen.size=800,600
|
||||
; upper left corner
|
||||
mainmenu.pos=253,210
|
||||
mainmenu.pos=280,250
|
||||
; boot option input field position
|
||||
bootopt.pos=200,480
|
||||
|
||||
|
495
components/bootloader/menu.inc
Normal file
495
components/bootloader/menu.inc
Normal file
@ -0,0 +1,495 @@
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
%
|
||||
% Main menu (boot entry + boot options + panel).
|
||||
%
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
% max number of boot option input fields
|
||||
/boot.ed.max 2 def
|
||||
|
||||
% boot option input line separator
|
||||
/boot.splitchar 1 def
|
||||
/boot.splitstr 1 string dup 0 boot.splitchar put def
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Create new main window.
|
||||
%
|
||||
% ( ) ==> ( window )
|
||||
%
|
||||
/window.main {
|
||||
widget.size array
|
||||
dup .type t_main put
|
||||
dup .font font.normal put
|
||||
dup .ed.font font.normal put
|
||||
dup .color.fg boot.text.normal put
|
||||
|
||||
} def
|
||||
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Initialize main window.
|
||||
%
|
||||
% ( window ) ==> ( )
|
||||
%
|
||||
/main.init {
|
||||
pop
|
||||
} def
|
||||
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Redraw main window.
|
||||
% (E.g. after selecting a new language.)
|
||||
%
|
||||
% ( window ) ==> ( )
|
||||
%
|
||||
/main.redraw {
|
||||
|
||||
% boot.drawlabels
|
||||
|
||||
main.drawmenu
|
||||
/keepbootoptions 1 def
|
||||
menu.entry true MenuSelect
|
||||
/keepbootoptions .undef def
|
||||
|
||||
panel.show
|
||||
} def
|
||||
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Draw boot option input field labels.
|
||||
%
|
||||
% ( ) == > ( )
|
||||
%
|
||||
/boot.drawlabels {
|
||||
boot.show not { return } if
|
||||
|
||||
boot.text.options setcolor
|
||||
window.current .font get setfont
|
||||
boot.ed.list {
|
||||
dup .inp_x get 10 sub over .inp_y get moveto
|
||||
currentpoint
|
||||
currentpoint 0 exch moveto
|
||||
currentpoint rot 1 add fontheight image
|
||||
moveto
|
||||
dup .inp_show get {
|
||||
.inp_label get exec showright
|
||||
} { pop } ifelse
|
||||
} forall
|
||||
} def
|
||||
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Setup boot option input field.
|
||||
%
|
||||
% ( ) == > ( )
|
||||
%
|
||||
/boot.input.setup {
|
||||
% boot.show not { return } if
|
||||
|
||||
boot.ed.list {
|
||||
dup .inp_x get over .inp_y get boot.ed.height add moveto
|
||||
|
||||
currentpoint boot.ed.width 2 image
|
||||
|
||||
currentcolor
|
||||
currenttransparency
|
||||
|
||||
white setcolor
|
||||
0xe0 settransparency
|
||||
|
||||
2 index .inp_show get {
|
||||
boot.ed.width 2 fillrect
|
||||
} if
|
||||
|
||||
settransparency
|
||||
setcolor
|
||||
|
||||
pop
|
||||
|
||||
} forall
|
||||
} def
|
||||
|
||||
|
||||
/boot.input.preinit {
|
||||
|
||||
boot.ed.list { dup .inp_show false put .inp_buf get 0 0 put } forall
|
||||
|
||||
menu.args menu.entry get boot.splitchar split
|
||||
|
||||
0 1 boot.ed.list length 1 sub {
|
||||
over over aget dup .undef ne {
|
||||
boot.ed.list rot get dup .inp_show true put .inp_buf get exch strcpy pop
|
||||
} {
|
||||
pop pop exit
|
||||
} ifelse
|
||||
} for
|
||||
|
||||
free
|
||||
|
||||
config.nobootoptions menu.texts menu.entry get iselement {
|
||||
boot.ed.list 0 get .inp_show false put
|
||||
} if
|
||||
|
||||
boot.ed.list { splitcmdline } forall
|
||||
|
||||
} def
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Activate boot option input field.
|
||||
%
|
||||
% ( ) == > ( )
|
||||
%
|
||||
/bootoptions.init {
|
||||
window.current .color.fg get setcolor
|
||||
window.current .ed.font get setfont
|
||||
|
||||
boot.ed.list boot.window .ed.focus get get edit.hidecursor
|
||||
|
||||
boot.window .ed.focus 0 put
|
||||
|
||||
boot.show {
|
||||
boot.ed.list {
|
||||
dup .inp_show get {
|
||||
dup
|
||||
dup dup .inp_buf get exch over edit.init
|
||||
"" ne { ' ' edit.input } { pop } ifelse
|
||||
edit.hidecursor
|
||||
} {
|
||||
edit.done
|
||||
} ifelse
|
||||
} forall
|
||||
boot.ed.list boot.window .ed.focus get get dup .inp_show get { edit.showcursor } { pop } ifelse
|
||||
|
||||
boot.ed.list {
|
||||
dup .inp_show get .inp_visible exch put
|
||||
} forall
|
||||
|
||||
} if
|
||||
} def
|
||||
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Redraw boot option input field.
|
||||
%
|
||||
% ( ) == > ( )
|
||||
%
|
||||
/bootoptions.redraw {
|
||||
|
||||
% clear old options
|
||||
|
||||
boot.text.options setcolor
|
||||
window.current .font get setfont
|
||||
boot.ed.list {
|
||||
dup .inp_x get 10 sub over .inp_y get moveto
|
||||
currentpoint
|
||||
currentpoint 0 exch moveto
|
||||
currentpoint rot 1 add fontheight image
|
||||
moveto
|
||||
dup .inp_show get {
|
||||
.inp_label get exec showright
|
||||
} { pop } ifelse
|
||||
} forall
|
||||
|
||||
boot.drawlabels
|
||||
boot.input.setup
|
||||
|
||||
} def
|
||||
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Draw boot menu.
|
||||
%
|
||||
% No entry is marked as selected.
|
||||
%
|
||||
% ( ) == > ( )
|
||||
%
|
||||
/main.drawmenu {
|
||||
menu.text.normal setcolor
|
||||
|
||||
/x menu.start.x def
|
||||
/y menu.start.y def
|
||||
|
||||
/menu.bar.width.old menu.bar.width def
|
||||
|
||||
/menu.bar.width
|
||||
menu.bar.min.width
|
||||
menu.texts { menuitemmap strsize pop menu.text.xofs 2 mul add 2 add max } forall
|
||||
def
|
||||
|
||||
0 1 menu.visible.entries 1 sub {
|
||||
x y moveto currentpoint menu.bar.width.old menu.bar.height image
|
||||
x config.rtl { menu.bar.width menu.text.xofs sub } { menu.text.xofs } ifelse add
|
||||
y menu.text.yofs add moveto
|
||||
menu.texts exch menu.shift add get menuitemmap
|
||||
currentfont exch font.large setfont show.rtl setfont
|
||||
/y y menu.item.height add def
|
||||
} for
|
||||
|
||||
} def
|
||||
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Select/deselect menu entry.
|
||||
%
|
||||
% If an entry is selected (status = true), the boot options input field is
|
||||
% initialized.
|
||||
%
|
||||
% ( entry status ) ==> ( )
|
||||
%
|
||||
% status:
|
||||
% false not selected
|
||||
% true selected
|
||||
%
|
||||
% Note: menu.bar.width must be valid even if status = false.
|
||||
%
|
||||
/MenuSelect {
|
||||
/menu.status exch def
|
||||
|
||||
/menu.idx over def
|
||||
|
||||
menu.shift sub
|
||||
menu.item.height mul menu.start.y add
|
||||
menu.start.x exch
|
||||
moveto
|
||||
|
||||
currentpoint
|
||||
currentpoint menu.bar.width menu.bar.height image
|
||||
menu.bar.color setcolor
|
||||
currenttransparency
|
||||
menu.bar.transparency settransparency
|
||||
menu.bar.width menu.bar.height
|
||||
fillrect
|
||||
settransparency
|
||||
moveto
|
||||
|
||||
config.rtl { menu.bar.width menu.text.xofs sub } { menu.text.xofs } ifelse
|
||||
menu.text.yofs rmoveto
|
||||
menu.status {
|
||||
-18 3 rmoveto
|
||||
"menu_blue.jpg" findfile setimage
|
||||
0 0 image.size image
|
||||
18 -3 rmoveto
|
||||
/font.selected font.large.bold def
|
||||
menu.text.select
|
||||
} {
|
||||
-18 3 rmoveto
|
||||
"menu_gray.jpg" findfile setimage
|
||||
0 0 image.size image
|
||||
18 -3 rmoveto
|
||||
/font.selected font.large def
|
||||
menu.text.normal
|
||||
} ifelse
|
||||
setcolor
|
||||
menu.texts menu.idx get menuitemmap
|
||||
menu.status { config.talk { dup speak } if } if
|
||||
currentfont exch font.selected setfont show.rtl setfont
|
||||
|
||||
menu.status {
|
||||
% init boot options
|
||||
keepbootoptions .undef eq {
|
||||
|
||||
boot.input.preinit
|
||||
|
||||
false
|
||||
boot.ed.list {
|
||||
dup .inp_show get exch .inp_visible get xor or
|
||||
} forall
|
||||
{
|
||||
boot.input.setup
|
||||
boot.drawlabels
|
||||
} if
|
||||
|
||||
bootoptions.init
|
||||
} {
|
||||
bootoptions.redraw
|
||||
} ifelse
|
||||
|
||||
% set help context
|
||||
"main" help.setcontext
|
||||
menu.texts menu.idx get
|
||||
dup help.findpage "" eq {
|
||||
pop
|
||||
} {
|
||||
help.setcontext
|
||||
} ifelse
|
||||
} if
|
||||
|
||||
} def
|
||||
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Draw main window.
|
||||
%
|
||||
% ( window ) ==> ( )
|
||||
%
|
||||
/main.show {
|
||||
window.push
|
||||
|
||||
/menu.shift 0 def
|
||||
/menu.visible.entries menu.texts length menu.max.entries min def
|
||||
|
||||
% get index of default entry
|
||||
/menu.entry 0 def
|
||||
0 1 menu.texts length 1 sub {
|
||||
dup menu.texts exch get menu.dentry eq { /menu.entry exch def exit } { pop } ifelse
|
||||
} for
|
||||
|
||||
menu.entry menu.visible.entries sub 0 ge {
|
||||
/menu.shift menu.entry menu.texts length menu.visible.entries sub min def
|
||||
} if
|
||||
|
||||
boot.text.options setcolor
|
||||
|
||||
window.current .font get setfont
|
||||
|
||||
/boot.ed.width screen.size pop boot.pos.x boot.pos.y pop sub ptheme { 60 } { 20 } ifelse sub def
|
||||
/boot.ed.height fontheight 2 add def
|
||||
|
||||
/boot.window window.current def
|
||||
|
||||
/boot.ed.list [
|
||||
0 1 boot.ed.max 1 sub {
|
||||
[
|
||||
boot.pos.x boot.pos.y exch 10 add exch 1 sub 4 -1 roll boot.ed.height 5 add mul add
|
||||
over over moveto boot.ed.width boot.ed.height savescreen
|
||||
cmdlinelength string
|
||||
cmdlinelength
|
||||
.undef
|
||||
cmdlinelength string
|
||||
"More Options"
|
||||
false
|
||||
false
|
||||
]
|
||||
} for
|
||||
] def
|
||||
|
||||
boot.ed.list 0 get .inp_label /txt_bootoptions put
|
||||
|
||||
boot.window .ed.list boot.ed.list put
|
||||
boot.window .ed.focus 0 put
|
||||
|
||||
main.drawmenu
|
||||
|
||||
boot.drawlabels
|
||||
|
||||
menu.entry true MenuSelect
|
||||
|
||||
% find default splash mode
|
||||
% 0 1 splash.options length 1 sub {
|
||||
% splash.options over get menu.args menu.entry get exch strstr {
|
||||
% /splash.default exch def
|
||||
% } {
|
||||
% pop
|
||||
% } ifelse
|
||||
% } for
|
||||
|
||||
panel.init
|
||||
|
||||
"main" help.setcontext
|
||||
|
||||
} def
|
||||
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Split command line into hidden and normal part.
|
||||
%
|
||||
% ( edit_object ) == > ( )
|
||||
%
|
||||
/splitcmdline {
|
||||
dup length .inp_hidden le { pop return } if
|
||||
dup .inp_hidden get .undef eq { pop return } if
|
||||
|
||||
dup .inp_hidden get over .inp_buf get strcpy pop
|
||||
|
||||
dup .inp_hidden get "showopts" bootopt.find dup {
|
||||
dup "showopts" length add skipspaces
|
||||
2 index .inp_buf get exch strcpy dropspaces
|
||||
0 0 put
|
||||
.inp_hidden get dropspaces
|
||||
} {
|
||||
pop dup .inp_hidden get 0 0 put
|
||||
.inp_buf get dropspaces
|
||||
} ifelse
|
||||
} def
|
||||
|
||||
|
||||
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
% Handle keyboard input.
|
||||
%
|
||||
% ( key_in ) ==> ( key_out )
|
||||
%
|
||||
/main.input {
|
||||
dup 0 eq { return } if
|
||||
|
||||
% handle panel entries
|
||||
panel.input
|
||||
|
||||
dup keyF10 eq {
|
||||
power_off
|
||||
pop 0
|
||||
} if
|
||||
|
||||
dup keyEsc eq { exit_popup pop 0 } if
|
||||
|
||||
dup keyEnter eq {
|
||||
/window.action actStart def
|
||||
pop 0
|
||||
} if
|
||||
|
||||
dup keyUp eq {
|
||||
menu.entry 0 gt {
|
||||
menu.entry false MenuSelect
|
||||
menu.entry menu.shift eq {
|
||||
/menu.shift menu.shift 1 sub def main.drawmenu
|
||||
} if
|
||||
/menu.entry menu.entry 1 sub def
|
||||
menu.entry true MenuSelect
|
||||
} if
|
||||
pop 0
|
||||
} if
|
||||
|
||||
dup keyDown eq {
|
||||
menu.entry menu.texts length 1 sub lt {
|
||||
menu.entry false MenuSelect
|
||||
menu.visible.entries menu.entry menu.shift sub sub 1 eq {
|
||||
/menu.shift menu.shift 1 add def main.drawmenu
|
||||
} if
|
||||
/menu.entry menu.entry 1 add def
|
||||
menu.entry true MenuSelect
|
||||
} if
|
||||
pop 0
|
||||
} if
|
||||
|
||||
dup keyPgUp eq {
|
||||
menu.entry 0 gt {
|
||||
menu.entry false MenuSelect
|
||||
/menu.entry 0 def
|
||||
menu.shift 0 ne {
|
||||
/menu.shift 0 def main.drawmenu
|
||||
} if
|
||||
menu.entry true MenuSelect
|
||||
} if
|
||||
pop 0
|
||||
} if
|
||||
|
||||
dup keyPgDown eq {
|
||||
menu.entry menu.texts length 1 sub lt {
|
||||
menu.entry false MenuSelect
|
||||
/menu.entry menu.texts length 1 sub def
|
||||
menu.texts length menu.visible.entries sub dup menu.shift ne {
|
||||
/menu.shift exch def main.drawmenu
|
||||
} {
|
||||
pop
|
||||
} ifelse
|
||||
menu.entry true MenuSelect
|
||||
} if
|
||||
pop 0
|
||||
} if
|
||||
|
||||
dup 0 ne {
|
||||
"opt" help.setcontext
|
||||
} if
|
||||
|
||||
} def
|
||||
|
||||
|
BIN
components/bootloader/menu_blue.jpg
Normal file
BIN
components/bootloader/menu_blue.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 828 B |
BIN
components/bootloader/menu_gray.jpg
Normal file
BIN
components/bootloader/menu_gray.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 760 B |
BIN
images/boot.jpg
BIN
images/boot.jpg
Binary file not shown.
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 58 KiB |
Loading…
x
Reference in New Issue
Block a user