]> code.delx.au - refind/commitdiff
Added transparency support for built-in selection icon.
authorsrs5694 <srs5694@users.sourceforge.net>
Mon, 14 Jan 2013 06:25:27 +0000 (01:25 -0500)
committersrs5694 <srs5694@users.sourceforge.net>
Mon, 14 Jan 2013 06:25:27 +0000 (01:25 -0500)
NEWS.txt
include/egemb_back_selected_small.h
libeg/libeg.h
libeg/screen.c
refind.spec
refind/main.c
refind/menu.c
refind/screen.c

index 09f77c9798a4b3aa511d0aaaaa6b5709c6be878b..5a335cd26155ca4a8f9e2037821463c4644e055a 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -8,6 +8,9 @@
 
 - Added icon for Haiku (os_haiku.icns).
 
+- Enable transparency of icons & main-menu text when the banner icon is
+  sized to cover these areas.
+
 - Fixed bug that could cause rEFInd to crash if fed a banner image that's
   too big. Note that "too big" can be substantially smaller than the screen
   resolution!
index c03d8b73c7ac1404a90bbec7309166d08f3aa573..b2c433c5b2130f2cfcc99b5310594f37e2295b5d 100644 (file)
-static const UINT8 egemb_back_selected_small_data[1503] = {
- 0x83, 0xbf, 0x02, 0xc8, 0xd2, 0xd6, 0xab, 0xdc, 0x02, 0xd6, 0xd2, 0xc8,
- 0x87, 0xbf, 0x01, 0xc3, 0xd6, 0x80, 0xdc, 0x04, 0xdb, 0xd7, 0xd5, 0xd3,
- 0xd1, 0xa1, 0xd0, 0x04, 0xd1, 0xd3, 0xd5, 0xd7, 0xdb, 0x80, 0xdc, 0x01,
- 0xd6, 0xc3, 0x84, 0xbf, 0x0b, 0xcc, 0xdb, 0xdc, 0xdc, 0xd5, 0xcd, 0xc7,
- 0xc3, 0xbf, 0xbe, 0xbd, 0xbc, 0x9f, 0xbb, 0x0b, 0xbc, 0xbd, 0xbe, 0xbf,
- 0xc3, 0xc7, 0xcd, 0xd5, 0xdc, 0xdc, 0xdb, 0xcc, 0x82, 0xbf, 0x0c, 0xcf,
- 0xdc, 0xdc, 0xd7, 0xcc, 0xc3, 0xba, 0xb4, 0xb0,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 0xab, 0xdc, 0x02, 0xd6, 0xd2,
- 0xc9, 0x83, 0xbf,
+static const UINT8 egemb_back_selected_small_data[1805] = {
+ 0x83, 0xbf, 0xb1, 0xff, 0x87, 0xbf, 0xb5, 0xff, 0x84, 0xbf, 0x85, 0xff,
+ 0x00, 0xbf, 0xa5, 0x00, 0x00, 0xbf, 0x85, 0xff, 0x82, 0xbf, 0x83, 0xff,
+ 0xad, 0x00, 0x83, 0xff, 0x80, 0xbf, 0x82, 0xff, 0xb1, 0x00, 0x82, 0xff,
+ 0x00, 0xbf, 0x82, 0xff, 0xb3, 0x00, 0x86, 0xff, 0xb5, 0x00, 0x85, 0xff,
+ 0xb5, 0x00, 0x84, 0xff, 0xb7, 0x00, 0x83, 0xff, 0xb7, 0x00, 0x83, 0xff,
+ 0xb7, 0x00, 0x82, 0xff, 0x00, 0xbf, 0xb7, 0x00, 0x00, 0xbf, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff, 0xb9, 0x00, 0x81, 0xff,
+ 0xb9, 0x00, 0x81, 0xff, 0x00, 0xbf, 0xb7, 0x00, 0x00, 0xbf, 0x82, 0xff,
+ 0xb7, 0x00, 0x83, 0xff, 0xb7, 0x00, 0x83, 0xff, 0xb7, 0x00, 0x84, 0xff,
+ 0xb5, 0x00, 0x85, 0xff, 0xb5, 0x00, 0x86, 0xff, 0xb3, 0x00, 0x82, 0xff,
+ 0x00, 0xbf, 0x82, 0xff, 0xb1, 0x00, 0x82, 0xff, 0x80, 0xbf, 0x83, 0xff,
+ 0xad, 0x00, 0x83, 0xff, 0x82, 0xbf, 0x85, 0xff, 0x00, 0xbf, 0xa5, 0x00,
+ 0x00, 0xbf, 0x85, 0xff, 0x84, 0xbf, 0xb5, 0xff, 0x87, 0xbf, 0xb1, 0xff,
+ 0x83, 0xbf, 0x83, 0x00, 0x02, 0x23, 0x4b, 0x5b, 0xab, 0x73, 0x02, 0x5b,
+ 0x4b, 0x23, 0x87, 0x00, 0x01, 0x0f, 0x5b, 0x80, 0x73, 0x04, 0x6f, 0x5f,
+ 0x57, 0x4f, 0x47, 0xa1, 0x43, 0x04, 0x47, 0x4f, 0x57, 0x5f, 0x6f, 0x80,
+ 0x73, 0x01, 0x5b, 0x0f, 0x84, 0x00, 0x0b, 0x33, 0x6f, 0x73, 0x73, 0x57,
+ 0x37, 0x1f, 0x0f, 0x00, 0x02, 0x03, 0x04, 0x9f, 0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, 0x60,
+ 0x80, 0x62, 0x9f, 0x63, 0x80, 0x62, 0x17, 0x60, 0x5f, 0x5c, 0x56, 0x4c,
+ 0x40, 0x30, 0x1e, 0x07, 0x33, 0x73, 0x63, 0x6b, 0x6f, 0x1b, 0x0f, 0x26,
+ 0x38, 0x47, 0x53, 0x5c, 0x62, 0x64, 0x64, 0xa5, 0x66, 0x16, 0x64, 0x64,
+ 0x62, 0x5c, 0x54, 0x47, 0x38, 0x26, 0x0f, 0x1b, 0x6f, 0x6f, 0x73, 0x5f,
+ 0x0f, 0x16, 0x2b, 0x3e, 0x4c, 0x58, 0x5f, 0x64, 0x64, 0xa7, 0x66, 0x14,
+ 0x64, 0x64, 0x5f, 0x58, 0x4c, 0x3e, 0x2b, 0x16, 0x0b, 0x5f, 0x73, 0x73,
+ 0x53, 0x00, 0x18, 0x2e, 0x3f, 0x4e, 0x5a, 0x60, 0x64, 0xa9, 0x66, 0x12,
+ 0x64, 0x60, 0x5a, 0x4e, 0x3f, 0x2e, 0x18, 0x00, 0x53, 0x73, 0x73, 0x4f,
+ 0x02, 0x1a, 0x30, 0x42, 0x50, 0x5a, 0x62, 0xab, 0x66, 0x11, 0x62, 0x5a,
+ 0x50, 0x42, 0x30, 0x1b, 0x02, 0x4f, 0x73, 0x73, 0x47, 0x04, 0x1c, 0x30,
+ 0x43, 0x50, 0x5b, 0x62, 0xab, 0x66, 0x11, 0x62, 0x5b, 0x50, 0x43, 0x30,
+ 0x1c, 0x04, 0x47, 0x73, 0x73, 0x43, 0x04, 0x1c, 0x32, 0x43, 0x52, 0x5b,
+ 0x62, 0xab, 0x66, 0x11, 0x62, 0x5b, 0x52, 0x43, 0x32, 0x1c, 0x04, 0x43,
+ 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66,
+ 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43,
+ 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b,
+ 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33,
+ 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33,
+ 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b,
+ 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43,
+ 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66,
+ 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43,
+ 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b,
+ 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33,
+ 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33,
+ 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b,
+ 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43,
+ 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66,
+ 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43,
+ 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b,
+ 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33,
+ 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33,
+ 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b,
+ 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43,
+ 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66,
+ 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43,
+ 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b,
+ 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33,
+ 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33,
+ 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b,
+ 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43,
+ 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66,
+ 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43,
+ 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b,
+ 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33,
+ 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33,
+ 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b,
+ 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43,
+ 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66,
+ 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43,
+ 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b,
+ 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33,
+ 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33,
+ 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b,
+ 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43,
+ 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66,
+ 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43,
+ 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b,
+ 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33,
+ 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33,
+ 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b,
+ 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43,
+ 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66,
+ 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43,
+ 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b,
+ 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33,
+ 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33,
+ 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b,
+ 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43,
+ 0x73, 0x73, 0x43, 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66,
+ 0x11, 0x63, 0x5b, 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43,
+ 0x06, 0x1e, 0x33, 0x43, 0x52, 0x5b, 0x63, 0xab, 0x66, 0x11, 0x63, 0x5b,
+ 0x52, 0x43, 0x33, 0x1e, 0x06, 0x43, 0x73, 0x73, 0x43, 0x04, 0x1c, 0x32,
+ 0x43, 0x52, 0x5b, 0x62, 0xab, 0x66, 0x11, 0x62, 0x5b, 0x52, 0x43, 0x32,
+ 0x1c, 0x04, 0x43, 0x73, 0x73, 0x47, 0x04, 0x1c, 0x30, 0x43, 0x50, 0x5b,
+ 0x62, 0xab, 0x66, 0x11, 0x62, 0x5b, 0x50, 0x43, 0x30, 0x1c, 0x04, 0x47,
+ 0x73, 0x73, 0x4f, 0x02, 0x1a, 0x30, 0x42, 0x50, 0x5a, 0x62, 0xab, 0x66,
+ 0x12, 0x62, 0x5a, 0x50, 0x42, 0x30, 0x1b, 0x02, 0x4f, 0x73, 0x73, 0x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, 0x42, 0x42, 0x3f, 0x3c, 0x38, 0x30, 0x26, 0x18, 0x08, 0x23, 0x5b,
+ 0x73, 0x63, 0x03, 0x00, 0x27, 0x73, 0x73, 0x57, 0x23, 0x06, 0x12, 0x1e,
+ 0x26, 0x2b, 0x2e, 0x2f, 0x30, 0x32, 0x9f, 0x33, 0x0d, 0x32, 0x30, 0x2f,
+ 0x2e, 0x2b, 0x26, 0x1e, 0x12, 0x06, 0x23, 0x57, 0x73, 0x73, 0x27, 0x80,
+ 0x00, 0x0c, 0x3f, 0x73, 0x73, 0x5f, 0x33, 0x0b, 0x07, 0x0f, 0x14, 0x18,
+ 0x1a, 0x1c, 0x1c, 0x9f, 0x1e, 0x0c, 0x1c, 0x1c, 0x1a, 0x18, 0x14, 0x0f,
+ 0x07, 0x0b, 0x33, 0x5f, 0x73, 0x73, 0x3f, 0x82, 0x00, 0x0b, 0x37, 0x6f,
+ 0x73, 0x73, 0x57, 0x37, 0x1f, 0x0f, 0x00, 0x02, 0x04, 0x04, 0x9f, 0x06,
+ 0x0b, 0x04, 0x04, 0x02, 0x00, 0x0f, 0x1f, 0x33, 0x57, 0x73, 0x73, 0x6f,
+ 0x37, 0x84, 0x00, 0x01, 0x0f, 0x5b, 0x80, 0x73, 0x04, 0x6f, 0x5f, 0x57,
+ 0x4f, 0x47, 0xa1, 0x43, 0x04, 0x47, 0x4f, 0x57, 0x5f, 0x6f, 0x80, 0x73,
+ 0x01, 0x5b, 0x13, 0x87, 0x00, 0x02, 0x27, 0x4b, 0x5b, 0xab, 0x73, 0x02,
+ 0x5b, 0x4b, 0x27, 0x83, 0x00,
 };
-static EG_EMBEDDED_IMAGE egemb_back_selected_small = { 64, 64, EG_EIPIXELMODE_GRAY, EG_EICOMPMODE_RLE, egemb_back_selected_small_data, 1503 };
+static EG_EMBEDDED_IMAGE egemb_back_selected_small = { 64, 64, EG_EIPIXELMODE_GRAY_ALPHA, EG_EICOMPMODE_RLE, egemb_back_selected_small_data, 1805 };
index 77516c614d0455b25830e35dbae09e9d69850cb6..088afdd8813d645907e2709328d54552947dcee2 100644 (file)
@@ -119,6 +119,7 @@ VOID egRenderText(IN CHAR16 *Text, IN OUT EG_IMAGE *CompImage, IN UINTN PosX, IN
 
 VOID egClearScreen(IN EG_PIXEL *Color);
 VOID egDrawImage(IN EG_IMAGE *Image, IN UINTN ScreenPosX, IN UINTN ScreenPosY);
+VOID egDrawImageWithTransparency(EG_IMAGE *Image, EG_IMAGE *BadgeImage, UINTN XPos, UINTN YPos, UINTN Width, UINTN Height);
 VOID egDrawImageArea(IN EG_IMAGE *Image,
                      IN UINTN AreaPosX, IN UINTN AreaPosY,
                      IN UINTN AreaWidth, IN UINTN AreaHeight,
index da934cf3c6736c154398e41b218f35e3737741b2..9f159e14d784d776497cab57b9f097e83c9a8717 100644 (file)
@@ -376,7 +376,7 @@ VOID egDrawImage(IN EG_IMAGE *Image, IN UINTN ScreenPosX, IN UINTN ScreenPosY)
     } else {
        CompImage = egCropImage(GlobalConfig.ScreenBackground, ScreenPosX, ScreenPosY, Image->Width, Image->Height);
        if (CompImage == NULL) {
-          Print(L"Error! Can't compose image in egDrawImage()!\n");
+          Print(L"Error! Can't crop image in egDrawImage()!\n");
           return;
        }
        egComposeImage(CompImage, Image, 0, 0);
@@ -393,6 +393,19 @@ VOID egDrawImage(IN EG_IMAGE *Image, IN UINTN ScreenPosX, IN UINTN ScreenPosY)
        egFreeImage(CompImage);
 } /* VOID egDrawImage() */
 
+// Display an unselected icon on the screen, so that the background image shows
+// through the transparency areas. The BadgeImage may be NULL, in which case
+// it's not composited in.
+VOID egDrawImageWithTransparency(EG_IMAGE *Image, EG_IMAGE *BadgeImage, UINTN XPos, UINTN YPos, UINTN Width, UINTN Height) {
+   EG_IMAGE *Background;
+
+   Background = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos, Width, Height);
+   if (Background != NULL) {
+      BltImageCompositeBadge(Background, Image, BadgeImage, XPos, YPos);
+      egFreeImage(Background);
+   }
+} // VOID DrawImageWithTransparency()
+
 VOID egDrawImageArea(IN EG_IMAGE *Image,
                      IN UINTN AreaPosX, IN UINTN AreaPosY,
                      IN UINTN AreaWidth, IN UINTN AreaHeight,
index 7b694729b9dd633d1ed9f11cd8cb5b7dd079c788..ed0ccff8639f3a7248d5f6884273c3bb5f271e54 100644 (file)
@@ -1,6 +1,6 @@
 Summary: EFI boot manager software
 Name: refind
-Version: 0.6.4
+Version: 0.6.4.2
 Release: 1%{?dist}
 License: GPLv3
 URL: http://www.rodsbooks.com/refind/
index 0024c3d8d9d5548265336a002c57d19a682d93d4..ba1c6946b508f5ff205d6318fa94b294312d2102 100644 (file)
@@ -128,7 +128,7 @@ static VOID AboutrEFInd(VOID)
 
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.4.2");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.4.3");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
index e6f9d4ffa59c6d463c22906acd60a5d636496bad..7f0265261dd7ebb5af73fef25ebce75e648930c9 100644 (file)
@@ -84,7 +84,7 @@ static CHAR16 ArrowDown[2] = { ARROW_DOWN, 0 };
 #define ALIGN_RIGHT 1
 #define ALIGN_LEFT 0
 
-static EG_IMAGE *SelectionImages[4] = { NULL, NULL, NULL, NULL };
+static EG_IMAGE *SelectionImages[2] = { NULL, NULL };
 static EG_PIXEL SelectionBackgroundPixel = { 0xff, 0xff, 0xff, 0 };
 static EG_IMAGE *TextBuffer = NULL;
 
@@ -104,33 +104,33 @@ static VOID InitSelection(VOID)
 
     // load small selection image
     if (GlobalConfig.SelectionSmallFileName != NULL) {
-        SelectionImages[2] = egLoadImage(SelfDir, GlobalConfig.SelectionSmallFileName, FALSE);
+        SelectionImages[1] = egLoadImage(SelfDir, GlobalConfig.SelectionSmallFileName, TRUE);
     }
-    if (SelectionImages[2] == NULL)
-        SelectionImages[2] = egPrepareEmbeddedImage(&egemb_back_selected_small, FALSE);
-    SelectionImages[2] = egEnsureImageSize(SelectionImages[2],
+    if (SelectionImages[1] == NULL)
+        SelectionImages[1] = egPrepareEmbeddedImage(&egemb_back_selected_small, TRUE);
+    SelectionImages[1] = egEnsureImageSize(SelectionImages[1],
                                            ROW1_TILESIZE, ROW1_TILESIZE, &MenuBackgroundPixel);
-    if (SelectionImages[2] == NULL)
+    if (SelectionImages[1] == NULL)
         return;
 
     // load big selection image
     if (GlobalConfig.SelectionBigFileName != NULL) {
-        SelectionImages[0] = egLoadImage(SelfDir, GlobalConfig.SelectionBigFileName, FALSE);
+        SelectionImages[0] = egLoadImage(SelfDir, GlobalConfig.SelectionBigFileName, TRUE);
         SelectionImages[0] = egEnsureImageSize(SelectionImages[0],
                                                ROW0_TILESIZE, ROW0_TILESIZE, &MenuBackgroundPixel);
     }
     if (SelectionImages[0] == NULL) {
         // calculate big selection image from small one
 
-        SelectionImages[0] = egCreateImage(ROW0_TILESIZE, ROW0_TILESIZE, FALSE);
+        SelectionImages[0] = egCreateImage(ROW0_TILESIZE, ROW0_TILESIZE, TRUE);
         if (SelectionImages[0] == NULL) {
-            egFreeImage(SelectionImages[2]);
-            SelectionImages[2] = NULL;
+            egFreeImage(SelectionImages[1]);
+            SelectionImages[1] = NULL;
             return;
         }
 
         DestPtr = SelectionImages[0]->PixelData;
-        SrcPtr  = SelectionImages[2]->PixelData;
+        SrcPtr  = SelectionImages[1]->PixelData;
         for (y = 0; y < ROW0_TILESIZE; y++) {
             if (y < (ROW1_TILESIZE >> 1))
                 src_y = y;
@@ -151,11 +151,7 @@ static VOID InitSelection(VOID)
             }
         }
     }
-
-    // non-selected background images
-    SelectionImages[1] = egCreateFilledImage(ROW0_TILESIZE, ROW0_TILESIZE, FALSE, &MenuBackgroundPixel);
-    SelectionImages[3] = egCreateFilledImage(ROW1_TILESIZE, ROW1_TILESIZE, FALSE, &MenuBackgroundPixel);
-}
+} // VOID InitSelection()
 
 //
 // Scrolling functions
@@ -639,19 +635,6 @@ static VOID TextMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State,
 // graphical generic style
 //
 
-// Display an unselected icon on the screen, so that the background image shows
-// through the transparency areas. The BadgeImage may be NULL, in which case
-// it's not composited in.
-static VOID DrawImageWithTransparency(EG_IMAGE *Image, EG_IMAGE *BadgeImage, UINTN XPos, UINTN YPos, UINTN Width, UINTN Height) {
-   EG_IMAGE *Background;
-
-   Background = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos, Width, Height);
-   if (Background != NULL) {
-      BltImageCompositeBadge(Background, Image, BadgeImage, XPos, YPos);
-      egFreeImage(Background);
-   }
-} // VOID DrawImageWithTransparency()
-
 
 // Display a submenu
 static VOID DrawSubmenuText(IN CHAR16 *Text, IN UINTN SelectedWidth, IN UINTN XPos, IN UINTN YPos)
@@ -668,7 +651,7 @@ static VOID DrawSubmenuText(IN CHAR16 *Text, IN UINTN SelectedWidth, IN UINTN XP
 
     // render the text
     egRenderText(Text, TextBuffer, TEXT_XMARGIN, TEXT_YMARGIN);
-    DrawImageWithTransparency(TextBuffer, NULL, XPos, YPos, TextBuffer->Width, TextBuffer->Height);
+    egDrawImageWithTransparency(TextBuffer, NULL, XPos, YPos, TextBuffer->Width, TextBuffer->Height);
 //    BltImage(TextBuffer, XPos, YPos);
 }
 
@@ -766,17 +749,19 @@ static VOID GraphicsMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *Sta
 
 static VOID DrawMainMenuEntry(REFIT_MENU_ENTRY *Entry, BOOLEAN selected, UINTN XPos, UINTN YPos)
 {
-    UINTN ImageNum;
-
-    ImageNum = ((Entry->Row == 0) ? 0 : 2) + (selected ? 0 : 1);
-    if (SelectionImages != NULL) {
-       if ((ImageNum == 1) || (ImageNum == 3)) { // Image not selected; copy background
-          DrawImageWithTransparency(Entry->Image, Entry->BadgeImage, XPos, YPos,
-                                 SelectionImages[ImageNum]->Width, SelectionImages[ImageNum]->Height);
-       } else {
-          BltImageCompositeBadge(SelectionImages[ImageNum], Entry->Image, Entry->BadgeImage, XPos, YPos);
-       } // if/else
-    } // if
+   EG_IMAGE *Background;
+
+   if (SelectionImages != NULL) {
+      if (selected) {
+         Background = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos,
+                                  SelectionImages[Entry->Row]->Width, SelectionImages[Entry->Row]->Height);
+         egComposeImage(Background, SelectionImages[Entry->Row], 0, 0);
+         BltImageCompositeBadge(Background, Entry->Image, Entry->BadgeImage, XPos, YPos);
+      } else { // Image not selected; copy background
+         egDrawImageWithTransparency(Entry->Image, Entry->BadgeImage, XPos, YPos,
+                                     SelectionImages[Entry->Row]->Width, SelectionImages[Entry->Row]->Height);
+      } // if/else
+   } // if
 } // VOID DrawMainMenuEntry()
 
 static VOID DrawMainMenuText(IN CHAR16 *Text, IN UINTN XPos, IN UINTN YPos)
@@ -792,7 +777,7 @@ static VOID DrawMainMenuText(IN CHAR16 *Text, IN UINTN XPos, IN UINTN YPos)
     else
        TextPosX = (TextBuffer->Width - TextWidth) / 2;
     egRenderText(Text, TextBuffer, TextPosX, 0);
-    DrawImageWithTransparency(TextBuffer, NULL, XPos, YPos, TextBuffer->Width, TextBuffer->Height);
+    egDrawImageWithTransparency(TextBuffer, NULL, XPos, YPos, TextBuffer->Width, TextBuffer->Height);
 }
 
 static VOID PaintAll(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN *itemPosX,
@@ -868,14 +853,50 @@ static VOID PaintIcon(IN EG_EMBEDDED_IMAGE *BuiltInIcon, IN CHAR16 *ExternalFile
    if (Icon != NULL) {
       if (Alignment == ALIGN_RIGHT)
          PosX -= Icon->Width;
-      DrawImageWithTransparency(Icon, NULL, PosX, PosY - (Icon->Height / 2), Icon->Width, Icon->Height);
+      egDrawImageWithTransparency(Icon, NULL, PosX, PosY - (Icon->Height / 2), Icon->Width, Icon->Height);
    }
 } // static VOID PaintIcon()
 
 inline UINTN ComputeRow0PosX(VOID) {
-   return ((UGAHeight / 2) - (5 * ROW0_TILESIZE / 6));
+//   return ((UGAHeight / 2) - (5 * ROW0_TILESIZE / 6));
+   return ((UGAHeight / 2) - ROW0_TILESIZE / 2);
 } // UINTN ComputeRow0PosX()
 
+// Display (or erase) the arrow icons to the left and right of an icon's row,
+// as appropriate.
+static VOID PaintArrows(SCROLL_STATE *State, UINTN PosX, UINTN PosY, UINTN row0Loaders) {
+   CHAR16 FileName[256];
+   EG_IMAGE *TempImage;
+   UINTN Width, Height, RightX, AdjPosY;
+
+   // NOTE: Assume that left and right arrows are of the same size....
+   Width = egemb_arrow_left.Width;
+   Height = egemb_arrow_left.Height;
+   RightX = (UGAWidth + (ROW0_TILESIZE + TILE_XSPACING) * State->MaxVisible) / 2 + TILE_XSPACING;
+   AdjPosY = PosY - (Height / 2);
+
+   // For PaintIcon() calls, the starting Y position is moved to the midpoint
+   // of the surrounding row; PaintIcon() adjusts this back up by half the
+   // icon's height to properly center it.
+   if ((State->FirstVisible > 0) && (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_ARROWS))) {
+      SPrint(FileName, 255, L"%s\\arrow_left.icns", GlobalConfig.IconsDir ? GlobalConfig.IconsDir : DEFAULT_ICONS_DIR);
+      PaintIcon(&egemb_arrow_left, FileName, PosX, PosY, ALIGN_RIGHT);
+   } else {
+      TempImage = egCropImage(GlobalConfig.ScreenBackground, PosX - Width, AdjPosY, Width, Height);
+      BltImage(TempImage, PosX - Width, AdjPosY);
+      egFreeImage(TempImage);
+   } // if/else
+
+   if ((State->LastVisible < (row0Loaders - 1)) && (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_ARROWS))) {
+      SPrint(FileName, 255, L"%s\\arrow_right.icns", GlobalConfig.IconsDir ? GlobalConfig.IconsDir : DEFAULT_ICONS_DIR);
+      PaintIcon(&egemb_arrow_right, FileName, RightX, PosY, ALIGN_LEFT);
+   } else {
+      TempImage = egCropImage(GlobalConfig.ScreenBackground, RightX, AdjPosY, Width, Height);
+      BltImage(TempImage, RightX, AdjPosY);
+      egFreeImage(TempImage);
+   } // if/else
+} // VOID PaintArrows()
+
 // Display main menu in graphics mode
 VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINTN Function, IN CHAR16 *ParamText)
 {
@@ -884,7 +905,6 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT
     UINTN row0Count, row1Count, row1PosX, row1PosXRunning;
     static UINTN *itemPosX;
     static UINTN row0PosY, textPosY;
-    CHAR16 FileName[256];
 
     State->ScrollMode = SCROLL_MODE_ICONS;
     switch (Function) {
@@ -907,7 +927,6 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT
             }
             row0PosX = (UGAWidth + TILE_XSPACING - (ROW0_TILESIZE + TILE_XSPACING) * row0Count) >> 1;
             row0PosY = ComputeRow0PosX();
-//            row0PosY = ((UGAHeight - LAYOUT_TOTAL_HEIGHT) >> 1) + LAYOUT_BANNER_YOFFSET;
             row1PosX = (UGAWidth + TILE_XSPACING - (ROW1_TILESIZE + TILE_XSPACING) * row1Count) >> 1;
             row1PosY = row0PosY + ROW0_TILESIZE + TILE_YSPACING;
             if (row1Count > 0)
@@ -937,22 +956,11 @@ VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINT
             break;
 
         case MENU_FUNCTION_PAINT_ALL:
-            BltClearScreen(TRUE);
             PaintAll(Screen, State, itemPosX, row0PosY, row1PosY, textPosY);
-            // For PaintIcon() calls, the starting Y position is moved to the midpoint
+            // For PaintArrows(), the starting Y position is moved to the midpoint
             // of the surrounding row; PaintIcon() adjusts this back up by half the
             // icon's height to properly center it.
-            if ((State->FirstVisible > 0) && (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_ARROWS))) {
-               SPrint(FileName, 255, L"%s\\arrow_left.icns", GlobalConfig.IconsDir ? GlobalConfig.IconsDir : DEFAULT_ICONS_DIR);
-               PaintIcon(&egemb_arrow_left, FileName, row0PosX - TILE_XSPACING,
-                         row0PosY + (ROW0_TILESIZE / 2), ALIGN_RIGHT);
-            } // if
-            if ((State->LastVisible < (row0Loaders - 1)) && (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_ARROWS))) {
-               SPrint(FileName, 255, L"%s\\arrow_right.icns", GlobalConfig.IconsDir ? GlobalConfig.IconsDir : DEFAULT_ICONS_DIR);
-               PaintIcon(&egemb_arrow_right, FileName,
-                         (UGAWidth + (ROW0_TILESIZE + TILE_XSPACING) * State->MaxVisible) / 2 + TILE_XSPACING,
-                         row0PosY + (ROW0_TILESIZE / 2), ALIGN_LEFT);
-            } // if
+            PaintArrows(State, row0PosX - TILE_XSPACING, row0PosY + (ROW0_TILESIZE / 2), row0Loaders);
             break;
 
         case MENU_FUNCTION_PAINT_SELECTION:
index cd2fc861dfe4303a616db1224798841f95284312..b9e3c8f5623e6425257f1382cc1d202aeffb1845 100644 (file)
@@ -560,7 +560,10 @@ VOID BltImageCompositeBadge(IN EG_IMAGE *BaseImage, IN EG_IMAGE *TopImage, IN EG
      }
 
      // blit to screen and clean up
-     egDrawImage(CompImage, XPos, YPos);
+     if (CompImage->HasAlpha)
+        egDrawImageWithTransparency(CompImage, NULL, XPos, YPos, CompImage->Width, CompImage->Height);
+     else
+        egDrawImage(CompImage, XPos, YPos);
      egFreeImage(CompImage);
      GraphicsScreenDirty = TRUE;
 }