Did a real implementation for the question mark button for the standard style.
KPixmap2Bitmap is really useful for this type of thing :) svn path=/trunk/kdebase/kwin/; revision=38552
This commit is contained in:
parent
03f09a8927
commit
e25393dafa
2 changed files with 26 additions and 29 deletions
|
@ -31,33 +31,6 @@ static QPixmap* dis_menu_pix = 0;
|
|||
|
||||
static QPixmap* question_mark_pix = 0;
|
||||
|
||||
/* XPM */
|
||||
static const char *question_mark[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"16 16 2 1",
|
||||
/* colors */
|
||||
" c #000000",
|
||||
"X c None",
|
||||
/* pixels */
|
||||
"XXXXXXXXXXXXXXXX",
|
||||
"XXXXX XXX",
|
||||
"XXXX XXXXX XX",
|
||||
"XXX XXXXXXX XX",
|
||||
"XXX XXXXXXX XX",
|
||||
"XXXXXXXXXXX XX",
|
||||
"XXXXXXXXXX XXX",
|
||||
"XXXXXXXXX XXXX",
|
||||
"XXXXXXXX XXXXXX",
|
||||
"XXXXXXX XXXXXXX",
|
||||
"XXXXXXX XXXXXXX",
|
||||
"XXXXXXXXXXXXXXXX",
|
||||
"XXXXXXXXXXXXXXXX",
|
||||
"XXXXXXX XXXXXXX",
|
||||
"XXXXXXX XXXXXXX",
|
||||
"XXXXXXXXXXXXXXXX"
|
||||
};
|
||||
|
||||
|
||||
static bool pixmaps_created = FALSE;
|
||||
|
||||
static void create_pixmaps();
|
||||
|
@ -153,8 +126,12 @@ static void create_pixmaps()
|
|||
pindown_pix->setMask(QBitmap(16, 16, pindown_mask_bits, true));
|
||||
dis_pindown_pix->setMask(*pindown_pix->mask());
|
||||
|
||||
question_mark_pix = new QPixmap(question_mark );
|
||||
|
||||
question_mark_pix = new QPixmap(16, 16);
|
||||
aPainter.begin(question_mark_pix);
|
||||
kColorBitmaps(&aPainter, aGrp, 0, 0, 16, 16, true, help_light_bits,
|
||||
NULL, NULL, help_dark_bits, NULL, NULL);
|
||||
aPainter.end();
|
||||
question_mark_pix->setMask(QBitmap(16, 16, help_mask_bits, true));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -124,6 +124,26 @@ static unsigned char pinup_mask_bits[] = {
|
|||
0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xc0, 0x3f, 0xc0, 0x31, 0xc0, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static unsigned char help_mask_bits[] = {
|
||||
0x00,0x00,0x00,0x00,0xe0,0x03,0xf0,0x07,0x70,0x0e,0x60,0x0e,0x00,0x0f,0x80,
|
||||
0x07,0xc0,0x03,0xc0,0x01,0x80,0x01,0xc0,0x00,0xc0,0x01,0x80,0x01,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x4c,0x0b,0x08,0x58,0x65,0x09,0x08,0x90,0x00,0x00,
|
||||
0x00,0x09,0x04,0x00,0x00,0x72,0x6f,0x6f,0x74,0x00,0x24,0x31,0x24,0x47,0x6b,
|
||||
0x65,0x44,0x78,0x63 };
|
||||
|
||||
static unsigned char help_dark_bits[] = {
|
||||
0x00,0x00,0x00,0x00,0xe0,0x03,0x30,0x06,0x30,0x06,0x00,0x06,0x00,0x03,0x80,
|
||||
0x01,0xc0,0x00,0xc0,0x00,0x00,0x00,0xc0,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x65,0x64,0x28,0x29,0x00,0x00,0x00,0x00,0x90,0x00,0x00,
|
||||
0x00,0x21,0x00,0x00,0x00,0x34,0xfe,0x12,0x2b,0x00,0x00,0xff,0xff,0x58,0xc0,
|
||||
0x01,0x2b,0x45,0xfe };
|
||||
|
||||
static unsigned char help_light_bits[] = {
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x40,0x08,0x60,0x08,0x00,0x0c,0x00,
|
||||
0x06,0x00,0x03,0x00,0x01,0x80,0x01,0x00,0x00,0x00,0x01,0x80,0x01,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x4c,0x0b,0x08,0x58,0x65,0x09,0x08,0x90,0x00,0x00,
|
||||
0x00,0x09,0x04,0x00,0x00,0x72,0x6f,0x6f,0x74,0x00,0x24,0x31,0x24,0x47,0x6b,
|
||||
0x65,0x44,0x78,0x63 };
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue