Add dynamic images to standard Qt buttons in the calibre style

This commit is contained in:
Kovid Goyal 2012-06-05 14:12:23 +05:30
parent 08dada2281
commit 00eca123da
7 changed files with 54 additions and 577 deletions

View File

@ -375,7 +375,6 @@ class Build(Command):
"common/common.h", "common/common.h",
"common/config_file.h", "common/config_file.h",
"style/blurhelper.h", "style/blurhelper.h",
"style/dialogpixmaps.h",
"style/fixx11h.h", "style/fixx11h.h",
"style/pixmaps.h", "style/pixmaps.h",
"style/qtcurve.h", "style/qtcurve.h",

View File

@ -13,7 +13,7 @@ from PyQt4.Qt import (QVariant, QFileInfo, QObject, SIGNAL, QBuffer, Qt,
ORG_NAME = 'KovidsBrain' ORG_NAME = 'KovidsBrain'
APP_UID = 'libprs500' APP_UID = 'libprs500'
from calibre.constants import (islinux, iswindows, isbsd, isfrozen, isosx, from calibre.constants import (islinux, iswindows, isbsd, isfrozen, isosx,
config_dir) config_dir, filesystem_encoding)
from calibre.utils.config import Config, ConfigProxy, dynamic, JSONConfig from calibre.utils.config import Config, ConfigProxy, dynamic, JSONConfig
from calibre.ebooks.metadata import MetaInformation from calibre.ebooks.metadata import MetaInformation
from calibre.utils.date import UNDEFINED_DATE from calibre.utils.date import UNDEFINED_DATE
@ -742,6 +742,35 @@ class Application(QApplication):
'pyd' if iswindows else 'so')) 'pyd' if iswindows else 'so'))
pi.load_style(path, 'Calibre') pi.load_style(path, 'Calibre')
self.setPalette(orig_pal) self.setPalette(orig_pal)
style = self.style()
icon_map = {}
pcache = {}
for k, v in {
'DialogYesButton': u'ok.png',
'DialogNoButton': u'window-close.png',
'DialogCloseButton': u'window-close.png',
'DialogOkButton': u'ok.png',
'DialogCancelButton': u'window-close.png',
'DialogHelpButton': u'help.png',
'DialogOpenButton': u'document_open.png',
'DialogSaveButton': u'save.png',
'DialogApplyButton': u'ok.png',
'DialogDiscardButton': u'trash.png',
'MessageBoxInformation': u'dialog_information.png',
'MessageBoxWarning': u'dialog_warning.png',
'MessageBoxCritical': u'dialog_error.png',
'MessageBoxQuestion': u'dialog_question.png',
}.iteritems():
if v not in pcache:
p = I(v)
if isinstance(p, bytes):
p = p.decode(filesystem_encoding)
# if not os.path.exists(p): raise ValueError(p)
pcache[v] = p
v = pcache[v]
icon_map[type('')(getattr(style, 'SP_'+k))] = v
style.setProperty(u'calibre_icon_map', icon_map)
self.__icon_map_memory_ = icon_map
def setup_styles(self, force_calibre_style): def setup_styles(self, force_calibre_style):
self.original_font = QFont(QApplication.font()) self.original_font = QFont(QApplication.font())

View File

@ -166,6 +166,7 @@ class ProceedQuestion(QDialog):
parent=self) parent=self)
if __name__ == '__main__': if __name__ == '__main__':
app = QApplication([]) from calibre.gui2 import Application
app = Application([])
ProceedQuestion(None).exec_() ProceedQuestion(None).exec_()

View File

@ -70,6 +70,8 @@ def get_path(path, data=False, allow_user_override=True):
return fpath return fpath
def get_image_path(path, data=False, allow_user_override=True): def get_image_path(path, data=False, allow_user_override=True):
if not path:
return get_path('images')
return get_path('images/'+path, data=data) return get_path('images/'+path, data=data)
def _compile_coffeescript(name): def _compile_coffeescript(name):

View File

@ -1,343 +0,0 @@
#ifndef __DIALOG_PIXMAPS_H__
#define __DIALOG_PIXMAPS_H__
// Oxygen icons - created with Qt3's qembed...
static const unsigned int dialog_error_png_len = 1527;
static const unsigned char dialog_error_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x08,0x06,0x00,0x00,
0x00,0x73,0x7a,0x7a,0xf4,0x00,0x00,0x00,0x04,0x73,0x42,0x49,0x54,0x08,
0x08,0x08,0x08,0x7c,0x08,0x64,0x88,0x00,0x00,0x00,0x09,0x70,0x48,0x59,
0x73,0x00,0x00,0x03,0x76,0x00,0x00,0x03,0x76,0x01,0x7d,0xd5,0x82,0xcc,
0x00,0x00,0x00,0x19,0x74,0x45,0x58,0x74,0x53,0x6f,0x66,0x74,0x77,0x61,
0x72,0x65,0x00,0x77,0x77,0x77,0x2e,0x69,0x6e,0x6b,0x73,0x63,0x61,0x70,
0x65,0x2e,0x6f,0x72,0x67,0x9b,0xee,0x3c,0x1a,0x00,0x00,0x05,0x74,0x49,
0x44,0x41,0x54,0x78,0xda,0xed,0x57,0x4d,0x68,0x54,0x57,0x14,0xfe,0xee,
0x7b,0x93,0x99,0x24,0xa6,0x69,0x13,0x53,0x7f,0xea,0xa4,0x93,0x68,0x6d,
0xab,0x16,0x44,0x4a,0x15,0x17,0xd2,0x85,0x60,0xf7,0x62,0x40,0xa4,0x8a,
0x55,0x54,0x50,0xc4,0x2a,0x8a,0x28,0x62,0x15,0x17,0x8a,0x0b,0xa1,0xdd,
0xb8,0xb0,0x5d,0xb8,0x15,0xbb,0xb1,0x1b,0x75,0x61,0xd5,0x4a,0x4d,0x2b,
0x58,0x0b,0x41,0x29,0xa2,0x26,0xc6,0x9f,0x54,0x13,0x33,0x4e,0x26,0x99,
0x99,0xf7,0xe6,0xdd,0xdb,0xef,0xcc,0x7d,0xc9,0x8b,0x99,0x98,0xa9,0xb4,
0xc5,0x4d,0x2f,0x7c,0x9c,0x7b,0xef,0x7b,0xe7,0x9c,0xef,0x9d,0x7b,0xce,
0x79,0xef,0x29,0x63,0x0c,0x5e,0xe7,0x70,0xf0,0x9a,0x47,0x6c,0xbc,0xcd,
0x83,0x4a,0xb9,0x8d,0x21,0xb9,0x37,0x00,0x85,0x7f,0x38,0x06,0x00,0xf3,
0x0c,0xd0,0x5f,0x19,0x13,0x60,0xcc,0x78,0xe1,0x08,0x7e,0xda,0xb5,0xab,
0x6d,0x52,0x2a,0xf5,0x4d,0x2e,0x9d,0x9e,0xc2,0x7d,0xe5,0x56,0x55,0xc1,
0x11,0xc4,0x62,0x8a,0xc0,0xf0,0x5a,0xb9,0x2e,0x64,0xed,0x50,0x42,0x29,
0x80,0x36,0x74,0x10,0x40,0x17,0x8b,0x30,0x22,0x7d,0x1f,0x01,0xc1,0xb5,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0x31,0x2a,0xbf,0xae,0x5d,0x8b,
0x42,0x3a,0x5d,0x46,0x62,0xec,0xe8,0xbe,0x78,0x11,0x0f,0x0f,0x1d,0x42,
0xbd,0x31,0xa2,0x2b,0x28,0xd9,0x01,0x41,0x12,0x15,0x92,0x50,0x11,0xd9,
0x01,0x21,0x40,0x58,0x65,0x87,0x70,0xa9,0x3c,0xd5,0xf3,0xf0,0xcb,0xca,
0x95,0xc8,0xf5,0xf7,0xe3,0x65,0xe3,0xde,0xf9,0xf3,0x78,0x7a,0xe0,0x00,
0x9a,0x48,0xcc,0x15,0x3d,0xea,0xc4,0x13,0x09,0xa8,0x20,0x80,0xc7,0x48,
0xf6,0xdd,0xf8,0x8d,0x3e,0x26,0x78,0x1b,0x1a,0x09,0x5f,0x7b,0x3b,0xaa,
0xe3,0x35,0xa8,0xad,0xab,0x43,0x6d,0x4d,0x0d,0x62,0x84,0x5b,0x5d,0x8d,
0x38,0x93,0xb0,0x8e,0x91,0xe8,0xb9,0x76,0x0d,0xad,0xcb,0x96,0x95,0x39,
0x97,0x9a,0xef,0x3a,0x73,0x06,0x29,0xad,0xe1,0x32,0x67,0xa4,0xf4,0x3c,
0x46,0xac,0xbf,0xab,0x0b,0x39,0xee,0x15,0x78,0xdd,0x73,0x0c,0x0c,0x26,
0x20,0x10,0x08,0x06,0x32,0xf0,0x82,0x01,0xa8,0xa7,0x4f,0xc5,0x2a,0x8c,
0x52,0xa5,0xfd,0x5e,0x1a,0xd1,0xac,0xf1,0x99,0x0b,0x17,0x22,0x4d,0xc3,
0x0c,0xff,0x08,0xc4,0xb9,0x60,0xde,0xce,0x9d,0xf8,0x79,0xf9,0x72,0xbc,
0x7f,0xf3,0x26,0x14,0x00,0xcd,0x6b,0x09,0x91,0xbc,0x26,0x73,0xe3,0xa0,
0x42,0x0e,0x50,0xcb,0x55,0xaa,0xc4,0xaa,0x4a,0xc0,0x79,0x9c,0xb2,0x20,
0x1d,0x8e,0xa5,0x37,0x77,0xdf,0x3e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a,0x26,0xd4,0xe1,0x19,0x0b,0x01,0x3f,0x24,0xe2,0xc9,0x3c,0xdc,
0xcb,0x29,0xca,0x64,0x80,0x8e,0x7e,0xfc,0x71,0xf4,0x41,0xf0,0xe1,0xb8,
0x47,0xd0,0x3c,0xc9,0xd9,0x11,0xab,0x37,0xdf,0x9e,0xcd,0x04,0xef,0x3e,
0xcf,0x16,0x15,0x38,0x6c,0xf2,0x46,0x25,0xa3,0x22,0x8c,0x1d,0x51,0xc6,
0x47,0x73,0xbb,0xcf,0x89,0xeb,0x2a,0xfd,0x5e,0xbf,0xba,0x33,0xa3,0xc6,
0xf9,0xb2,0xec,0xcf,0xe8,0x55,0x7f,0xcd,0xea,0xc7,0xf7,0x8f,0x0c,0x60,
0x5e,0xf5,0xd7,0xec,0xff,0xbf,0xe3,0xbf,0x00,0x0f,0x56,0x81,0xab,0xdc,
0x79,0x68,0x79,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,
0x82
};
/* Generated by qembed */
static const unsigned int dialog_information_png_len = 1636;
static const unsigned char dialog_information_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x08,0x06,0x00,0x00,
0x00,0x73,0x7a,0x7a,0xf4,0x00,0x00,0x00,0x04,0x73,0x42,0x49,0x54,0x08,
0x08,0x08,0x08,0x7c,0x08,0x64,0x88,0x00,0x00,0x00,0x09,0x70,0x48,0x59,
0x73,0x00,0x00,0x03,0x76,0x00,0x00,0x03,0x76,0x01,0x7d,0xd5,0x82,0xcc,
0x00,0x00,0x00,0x19,0x74,0x45,0x58,0x74,0x53,0x6f,0x66,0x74,0x77,0x61,
0x72,0x65,0x00,0x77,0x77,0x77,0x2e,0x69,0x6e,0x6b,0x73,0x63,0x61,0x70,
0x65,0x2e,0x6f,0x72,0x67,0x9b,0xee,0x3c,0x1a,0x00,0x00,0x05,0xe1,0x49,
0x44,0x41,0x54,0x78,0xda,0xc5,0x57,0x5b,0x6c,0x54,0x45,0x18,0xfe,0xe6,
0xdc,0x76,0xb7,0xbb,0xdd,0x76,0xb1,0x2d,0xb4,0x05,0xa5,0x11,0xd1,0x8a,
0x82,0x48,0x49,0x04,0x1e,0x00,0xc5,0x48,0x34,0x12,0x89,0x11,0x02,0x3c,
0x60,0x8c,0x06,0xf1,0x12,0xa5,0xf2,0xe0,0x0b,0x62,0x13,0x8d,0x09,0x09,
0x98,0x28,0x31,0xe1,0x92,0x28,0x3e,0x11,0x8c,0xe2,0x2d,0x12,0x2e,0xb1,
0x34,0x62,0x23,0xa1,0x11,0x12,0x2e,0x2a,0x88,0x94,0x3b,0x94,0x16,0xe9,
0xee,0x76,0x77,0xcf,0x6d,0xc6,0x7f,0x7a,0x26,0x29,0xcb,0xee,0x76,0x0b,
0x2f,0x7e,0xc9,0xb7,0x33,0x3b,0x3b,0x73,0xbe,0xef,0xbf,0xe4,0x9c,0xb3,
0x4c,0x08,0x81,0xdb,0x00,0x23,0x6a,0x8a,0x4c,0x51,0x42,0x28,0xf2,0xa1,
0x71,0x64,0x30,0x30,0x02,0x28,0x41,0x93,0x18,0x21,0x56,0x12,0x63,0xc4,
0x0a,0xb5,0xc6,0x88,0x1e,0x31,0x4b,0x4c,0x13,0x93,0xc4,0x0c,0xd1,0x19,
0x89,0x11,0x63,0x04,0x11,0x5b,0x4a,0xb0,0x66,0xeb,0xee,0xa3,0xb3,0x4f,
0x9c,0xbb,0xbe,0x50,0xd3,0xf4,0xc9,0x95,0x15,0x56,0xbc,0x32,0x12,0x0a,
0x6b,0x1a,0x43,0xc6,0x76,0xed,0x54,0xd6,0x4d,0x09,0xc1,0x4f,0x34,0x37,
0x26,0x76,0x2e,0x9f,0xd7,0xbc,0x1f,0x40,0x8f,0x32,0x63,0x13,0x4b,0xa6,
0x79,0xb8,0x12,0x68,0x2a,0xe2,0x9a,0xd6,0x4d,0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,
0xb3,0xc4,0x6f,0xeb,0x3a,0xf3,0xef,0x84,0x9a,0xbf,0x78,0x74,0x6d,0x1d,
0xd5,0xd2,0xc7,0x70,0x10,0x82,0x03,0x22,0x78,0x0c,0xfc,0x73,0xcd,0x96,
0x21,0x28,0x43,0x1e,0x98,0xc6,0x30,0x1c,0x7a,0x53,0x3e,0xee,0x1f,0xdf,
0x88,0xb3,0xdd,0xe7,0x17,0x03,0xb8,0xc5,0x00,0x63,0xb3,0xe2,0xf1,0x38,
0xa5,0xcb,0x43,0x29,0x70,0x9f,0xe3,0xbb,0x35,0xf3,0x50,0x0c,0x0b,0xda,
0xf6,0x42,0x37,0x75,0x94,0x43,0xac,0x22,0x22,0xb5,0x66,0x16,0x7b,0x16,
0xd4,0x99,0xa6,0x3e,0xd8,0xb5,0xa5,0xe0,0x7b,0x02,0xa5,0x90,0xf3,0x38,
0x4c,0xdd,0x90,0x29,0x22,0x96,0x7e,0x20,0x5a,0xda,0x60,0xe1,0xeb,0xf2,
0x9a,0x90,0x11,0xc0,0x30,0x4a,0xd3,0xc8,0x80,0xcb,0x0b,0xe9,0x11,0x7d,
0x06,0x17,0x0c,0x4f,0xbe,0xb7,0x17,0xb3,0xdf,0xdd,0x55,0xd8,0x13,0x1e,
0x06,0xf7,0x38,0x5c,0x52,0xcd,0xbd,0xbc,0xeb,0x90,0x38,0xc9,0x31,0x00,
0x02,0x77,0x31,0xc2,0xad,0x19,0x60,0x39,0x47,0xc0,0x12,0x3e,0xf2,0x30,
0x78,0x48,0x12,0x44,0x5d,0x7e,0x27,0x01,0xbf,0xd0,0x00,0x17,0x00,0x89,
0x13,0x82,0x51,0x08,0x44,0x2d,0x13,0x61,0x13,0xb8,0x91,0xce,0x12,0x6d,
0x74,0x5d,0x4d,0xe1,0xc6,0x80,0x0d,0x0c,0x9d,0x0f,0x0c,0x08,0x02,0x7b,
0xac,0x35,0x99,0xca,0x66,0xa3,0x31,0x16,0x46,0xa0,0x86,0x40,0x58,0x48,
0x13,0x2c,0x30,0x02,0x22,0xd7,0x48,0xac,0x48,0x6a,0x2d,0x1d,0xe1,0x88,
0x05,0x2e,0x8d,0x50,0x10,0xe9,0xac,0x8d,0xd3,0x17,0xfa,0x71,0xb1,0x37,
0x09,0xf8,0x2e,0x94,0xa8,0x2a,0x91,0x97,0x14,0x84,0xfc,0x0c,0x08,0x71,
0xe3,0x78,0x77,0x4f,0x3d,0x33,0x4c,0xe8,0x8c,0xc1,0xb4,0x2c,0x98,0x66,
0x08,0x3a,0x45,0x61,0x99,0x34,0xa7,0x31,0x12,0x0a,0x41,0x33,0x01,0x3b,
0xcb,0x61,0xdb,0xb6,0x34,0x4e,0x82,0x7c,0x70,0xec,0x3c,0x9d,0x86,0x6f,
0x79,0xa0,0x85,0x40,0x8c,0xd3,0xdc,0x27,0xea,0x06,0x14,0x82,0x75,0x21,
0x7f,0x17,0xfd,0xc5,0x9a,0xf0,0x77,0xf8,0x76,0xb3,0xd0,0x4d,0xc8,0x5e,
0xf3,0xe8,0x23,0x2b,0x37,0xfb,0x44,0xc7,0x03,0x72,0x0c,0xd0,0x01,0x68,
0xf4,0x61,0xbb,0xc8,0x64,0x32,0xf9,0x0d,0x2a,0x4b,0x6a,0x58,0x4a,0x5c,
0x93,0x0b,0x18,0x0a,0x0e,0x4a,0x98,0xe8,0xe5,0x02,0xad,0x82,0x5b,0xb1,
0x27,0xb6,0xc3,0x4e,0x01,0xcc,0x20,0x21,0x59,0x6b,0x23,0x10,0xd3,0x0d,
0xa2,0x79,0xd3,0x68,0x05,0xeb,0xf9,0x50,0x7b,0x2d,0x45,0x33,0xff,0x9c,
0xa6,0xae,0x67,0x84,0x00,0x3b,0x09,0x70,0x6c,0x2f,0x34,0x70,0xef,0xa5,
0x5d,0xc8,0x25,0xfb,0x28,0xd7,0xaa,0xd9,0xf2,0x58,0x70,0xd1,0x02,0x48,
0xd3,0x46,0x9e,0x78,0xe1,0x35,0xa8,0xbc,0x83,0x1a,0x4d,0x17,0x7f,0x2a,
0x30,0x20,0x76,0xec,0xf0,0x21,0xf8,0x27,0xe8,0x3b,0x05,0x84,0x63,0x41,
0x03,0xaa,0x83,0x2a,0x1b,0x41,0x0a,0xed,0x81,0xc1,0xda,0x16,0xc0,0x75,
0x81,0x6c,0x32,0xa8,0xbd,0x66,0xe6,0x9f,0x93,0x34,0x2b,0x80,0xde,0x3f,
0x01,0x21,0x3e,0x95,0x5a,0x45,0xdf,0x07,0xd8,0xa2,0x45,0x3a,0xce,0x8e,
0x3d,0x8f,0xba,0x09,0xf5,0x88,0xd5,0x03,0x3a,0x0b,0x52,0x6a,0x28,0xba,
0x36,0xae,0xaf,0x6f,0xc1,0x70,0x18,0xb5,0x9a,0xca,0x1b,0x8a,0x02,0xbe,
0x03,0x78,0x8a,0xb2,0xfe,0xfd,0x17,0x80,0x2b,0x27,0xaf,0xe0,0x9e,0x0b,
0x63,0x95,0x81,0xa1,0x0c,0xe4,0x65,0x81,0x8b,0x45,0xe8,0x3d,0x65,0x83,
0x71,0x95,0x05,0x22,0x93,0x54,0x11,0x95,0x83,0xaa,0xb9,0xdc,0xaf,0xce,
0x07,0x06,0x7a,0xfe,0x72,0xe0,0xfb,0x8b,0xa4,0x46,0xd9,0x97,0x52,0x36,
0x7d,0xd5,0x4a,0x44,0x2a,0x36,0x22,0xde,0xa0,0xa1,0xbe,0x39,0xf0,0x69,
0x58,0xca,0x25,0x94,0x08,0x51,0x57,0x42,0xdc,0x27,0xba,0x20,0x01,0x65,
0x98,0x0d,0x45,0xde,0x99,0x05,0xaa,0xf7,0x73,0x64,0xb3,0x6f,0x8a,0x43,
0x1b,0x3e,0x1b,0xe9,0x5b,0x31,0x99,0x68,0x7d,0x03,0x86,0xd8,0x80,0x86,
0x29,0x26,0x6a,0x27,0x02,0x0c,0x41,0x17,0xab,0x72,0x0c,0xcd,0x4d,0x12,
0x73,0x55,0xba,0x6d,0x35,0x3a,0x81,0xa9,0xab,0x54,0xf3,0x8b,0x87,0x5d,
0x78,0x68,0x15,0x87,0x3e,0xde,0x58,0xf6,0xb5,0xbc,0xd0,0xc4,0xdb,0x73,
0x98,0xa6,0xed,0x14,0xd1,0xaa,0x6a,0x8c,0x1a,0x0f,0x8c,0x9d,0x1a,0x44,
0xa7,0x9b,0x52,0x7c,0x28,0xdd,0x52,0xcc,0xf7,0xa4,0x91,0x20,0xea,0xfd,
0xd7,0x80,0xaa,0x9f,0xa1,0x65,0x53,0xfd,0xdc,0x15,0x0b,0x45,0xd7,0x86,
0xf6,0xdb,0xff,0x63,0xa2,0xc0,0xe6,0xb6,0x19,0x46,0x2e,0xb9,0x1e,0x3a,
0x5b,0xe1,0xc5,0x46,0x87,0xd0,0x30,0x19,0x70,0xb2,0x40,0xa4,0x0a,0xa8,
0x88,0x07,0x86,0x72,0x69,0x20,0xd3,0x1f,0x64,0xe5,0xc2,0x11,0x98,0xb9,
0x5e,0x87,0x71,0xb1,0xd9,0x31,0x63,0xab,0x44,0xfb,0x5a,0x0f,0x84,0x32,
0x06,0xca,0x83,0xb5,0xac,0x30,0xad,0x70,0x62,0xb9,0x1e,0x62,0xaf,0x70,
0xe0,0x41,0x1f,0x08,0x73,0xcf,0xd7,0x85,0x6c,0x35,0xd3,0xf0,0x75,0xc6,
0x72,0x1a,0xf0,0x07,0x77,0xf8,0x26,0x67,0xe0,0xfa,0x36,0xd1,0xb5,0xc9,
0x85,0x42,0x59,0x03,0x77,0x0a,0xc6,0xe6,0xaa,0x87,0x59,0xfb,0x70,0x51,
0x96,0x37,0xf0,0x7f,0xe2,0x3f,0x0c,0x08,0x36,0xef,0x65,0xe9,0x4f,0x36,
0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
static const unsigned int dialog_warning_png_len = 1354;
static const unsigned char dialog_warning_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x08,0x06,0x00,0x00,
0x00,0x73,0x7a,0x7a,0xf4,0x00,0x00,0x00,0x04,0x73,0x42,0x49,0x54,0x08,
0x08,0x08,0x08,0x7c,0x08,0x64,0x88,0x00,0x00,0x00,0x09,0x70,0x48,0x59,
0x73,0x00,0x00,0x03,0x76,0x00,0x00,0x03,0x76,0x01,0x7d,0xd5,0x82,0xcc,
0x00,0x00,0x00,0x19,0x74,0x45,0x58,0x74,0x53,0x6f,0x66,0x74,0x77,0x61,
0x72,0x65,0x00,0x77,0x77,0x77,0x2e,0x69,0x6e,0x6b,0x73,0x63,0x61,0x70,
0x65,0x2e,0x6f,0x72,0x67,0x9b,0xee,0x3c,0x1a,0x00,0x00,0x04,0xc7,0x49,
0x44,0x41,0x54,0x78,0xda,0xd5,0x97,0x5d,0x6c,0x14,0x55,0x14,0xc7,0xff,
0xe7,0xde,0x3b,0x1f,0xfb,0xd5,0xee,0xb6,0x6c,0xbf,0x68,0x2b,0xa4,0x50,
0xa4,0xd0,0x42,0x04,0xa2,0x24,0x04,0x31,0x10,0xa3,0x01,0x4c,0x24,0xd1,
0x48,0x30,0xbc,0x48,0xf4,0xc9,0x44,0x7d,0xd5,0x60,0x88,0x31,0xc6,0x04,
0x13,0x8d,0xe8,0x83,0x2f,0xfa,0xce,0x03,0x3e,0x69,0x82,0x98,0xf0,0xa2,
0x2f,0x86,0x34,0x62,0x00,0xbf,0xa2,0x21,0x5a,0xd0,0xb6,0xd0,0xee,0xee,
0xcc,0x6c,0xe7,0xf3,0x7a,0xa7,0x3b,0x75,0x9a,0xdd,0x54,0x49,0x69,0x25,
0x9e,0xe4,0x97,0x73,0x32,0xf7,0x9e,0x39,0xff,0x73,0x66,0xe7,0x63,0x49,
0x4a,0x89,0x7b,0x69,0x4c,0xf1,0x3f,0x16,0x70,0x96,0xf8,0x3c,0x77,0x61,
0xcb,0xbf,0x04,0x9f,0x52,0x11,0xbd,0xc5,0xe3,0xf0,0x67,0x6b,0x08,0x70,
0x0e,0xfb,0xe4,0xec,0x7f,0x27,0xe0,0x3c,0xe5,0x22,0x9d,0x7f,0x1d,0xb5,
0x9f,0x18,0x03,0x24,0xd8,0xec,0xc7,0x97,0x59,0x9b,0xbf,0x1b,0x3b,0xa4,
0xb3,0xfa,0x97,0xe0,0x22,0x89,0x48,0x63,0x2f,0x06,0x76,0xe7,0xa8,0xe8,
0x78,0x1a,0xa2,0xed,0x30,0x82,0x19,0x7d,0x34,0xb2,0xc4,0x4b,0x00,0xf1,
0xd5,0x17,0x10,0x20,0x27,0x5d,0xf6,0xb2,0x68,0x7f,0x8a,0x60,0x74,0x00,
0x99,0x1e,0x88,0x8e,0x63,0x14,0xd9,0x78,0x05,0x17,0x90,0x5f,0x35,0x01,
0x69,0xf7,0xe2,0xd5,0xd0,0xeb,0xea,0x62,0xbd,0x07,0x01,0xaf,0x3a,0x0f,
0xeb,0x7b,0x0c,0xa1,0x53,0xe8,0x84,0x10,0x27,0xe3,0x3d,0xab,0x27,0xa0,
0x80,0x62,0x54,0xa7,0x13,0x62,0xcd,0x11,0x80,0x73,0xc0,0xaf,0x02,0x81,
0x02,0x21,0x44,0xf7,0x93,0x08,0x1c,0x7a,0x0e,0x40,0x71,0x75,0x04,0x7c,
0x44,0x5a,0x54,0xe3,0x6f,0x4a,0xea,0x2d,0xb1,0xf2,0x1e,0x44,0xaa,0xf8,
0xed,0xe9,0xba,0xc2,0x41,0xa4,0x44,0xf0,0xd2,0x4e,0x48,0x59,0x6a,0x8f,
0x38,0x7f,0x2b,0x9e,0xc2,0xca,0x0b,0xd8,0x82,0x72,0xe4,0xb2,0xa3,0xac,
0x74,0x10,0x90,0x2e,0x1c,0xcb,0x46,0x75,0xca,0x46,0x65,0xd2,0x81,0x6d,
0x39,0x80,0xb4,0xc1,0x8b,0xfb,0x11,0xda,0xec,0x19,0x70,0x94,0x57,0x56,
0xc0,0x25,0xd5,0xbd,0xcf,0xde,0x89,0xf8,0x60,0x81,0xb7,0x8f,0x02,0x51,
0x0d,0x81,0x5b,0x43,0x54,0x57,0x38,0x16,0xfc,0xb9,0x1a,0x10,0x55,0xc1,
0x72,0xeb,0x21,0xd1,0x95,0xf7,0x7d,0xf6,0x5e,0x9c,0xb3,0x72,0x02,0x7c,
0xac,0xf5,0x1d,0x7a,0x82,0x97,0xf6,0x03,0x91,0x35,0x5f,0x8c,0xb3,0xaa,
0x12,0x60,0x21,0x74,0x6a,0xe0,0xbc,0x0a,0xc8,0x98,0x0a,0x78,0xfb,0x2e,
0x25,0x8a,0x0e,0xc1,0x45,0xdf,0xca,0x08,0x38,0x4b,0x7a,0x60,0xb1,0xf7,
0x49,0x1f,0xce,0xf2,0x4c,0x1f,0x10,0x35,0x8a,0x71,0xa1,0x04,0xa8,0xe2,
0x52,0x4d,0x41,0xe8,0x15,0x00,0x35,0x85,0x3a,0x6e,0xe6,0x01,0x31,0x90,
0x09,0x6c,0xf6,0x61,0x9c,0x7b,0x77,0x02,0x88,0x08,0x1d,0xd8,0x10,0xd6,
0xe9,0x51,0xde,0xb9,0x1b,0x20,0x4b,0x91,0x14,0x52,0x45,0x65,0xdd,0x56,
0x58,0x4a,0x40,0x15,0xa0,0x04,0xcc,0x40,0x94,0x86,0x10,0xd8,0x74,0x20,
0xce,0x05,0x11,0x2d,0x5f,0xc0,0x67,0xd0,0xfd,0x80,0x9d,0x41,0x76,0xab,
0xce,0xcd,0x4c,0x5c,0x58,0x51,0x9b,0x47,0x18,0x95,0xf9,0xee,0xa5,0xa3,
0xe2,0x4c,0x05,0x60,0xb5,0x86,0x38,0xe5,0xb9,0xe9,0x02,0xe6,0xda,0x38,
0xf7,0x03,0x5c,0x81,0xb6,0x4c,0x01,0x44,0x68,0xd3,0xb6,0x7b,0x16,0xdf,
0x23,0xca,0x5b,0x00,0xaa,0x34,0x04,0xb0,0x06,0xdc,0xa8,0x82,0x3c,0x0b,
0xe4,0x5b,0xaa,0x60,0xa5,0x71,0x9c,0x27,0xeb,0x34,0x0b,0xad,0xdc,0x0b,
0xbf,0x86,0x3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x1f,0x08,0x13,
0x54,0x6c,0x5f,0x1b,0x83,0xfb,0xed,0x77,0x7f,0x76,0x3c,0x22,0x87,0xf1,
0xa0,0xac,0xa6,0x13,0x20,0x22,0x70,0x6c,0x73,0xa7,0x8c,0x6e,0x63,0xd0,
0x6e,0x4a,0x4e,0x08,0x14,0x7e,0x82,0xbb,0x88,0xba,0x62,0x2e,0x89,0x3d,
0xb4,0xe2,0xa7,0xb9,0x99,0x21,0x06,0xbf,0x62,0x76,0xa9,0x78,0x73,0xeb,
0x73,0x80,0x21,0xd2,0xbb,0xdb,0x24,0xa8,0x9f,0x20,0x28,0xed,0x34,0x36,
0x6a,0x7e,0xc8,0xa4,0x3e,0x89,0x13,0xd2,0xfd,0xad,0xf9,0x04,0x78,0x59,
0x98,0x1b,0xb2,0x00,0xab,0x47,0xad,0x97,0xe0,0x2a,0xe5,0xe7,0xbe,0xd7,
0xce,0x85,0x9e,0xb9,0xdf,0x9b,0x2e,0x91,0x73,0xf9,0x0f,0xac,0xa4,0xf1,
0x62,0x01,0xc6,0x00,0x97,0x99,0xfe,0x99,0xf3,0xe6,0xa0,0x7f,0x24,0xbe,
0x1d,0x5b,0x9f,0x03,0x5f,0x51,0x01,0xbe,0xd8,0x01,0x4d,0xae,0x45,0xb3,
0x85,0x0a,0x8e,0x74,0xb3,0x5c,0x22,0x66,0x2a,0x0e,0x17,0xaa,0x26,0x31,
0x0b,0x65,0x3c,0x61,0x00,0x37,0x90,0xc7,0x65,0x8c,0x49,0xbb,0x69,0x02,
0x4d,0xef,0x81,0x11,0x10,0x56,0xc3,0xae,0x42,0x36,0xbf,0x0f,0xee,0xf9,
0xdf,0xf3,0xbf,0x00,0xdc,0x19,0x00,0xc3,0x09,0xc5,0x7a,0xd4,0x00,0x00,
0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
#endif

View File

@ -19,6 +19,7 @@
*/ */
#include <QtGui> #include <QtGui>
#include <QDynamicPropertyChangeEvent>
#ifdef Q_WS_X11 #ifdef Q_WS_X11
#include <QtDBus/QtDBus> #include <QtDBus/QtDBus>
#endif #endif
@ -137,27 +138,6 @@ inline QPixmap getIconPixmap(const QIcon &icon, const QSize &size, int flags, QI
return getIconPixmap(icon, size, flags&QStyle::State_Enabled ? QIcon::Normal : QIcon::Disabled, state); return getIconPixmap(icon, size, flags&QStyle::State_Enabled ? QIcon::Normal : QIcon::Disabled, state);
} }
static Style::Icon pix2Icon(QStyle::StandardPixmap pix)
{
switch(pix)
{
case QStyle::SP_TitleBarNormalButton:
return Style::ICN_RESTORE;
case QStyle::SP_TitleBarShadeButton:
return Style::ICN_SHADE;
case QStyle::SP_ToolBarHorizontalExtensionButton:
return Style::ICN_RIGHT;
case QStyle::SP_ToolBarVerticalExtensionButton:
return Style::ICN_DOWN;
case QStyle::SP_TitleBarUnshadeButton:
return Style::ICN_UNSHADE;
default:
case QStyle::SP_DockWidgetCloseButton:
case QStyle::SP_TitleBarCloseButton:
return Style::ICN_CLOSE;
}
}
static Style::Icon subControlToIcon(QStyle::SubControl sc) static Style::Icon subControlToIcon(QStyle::SubControl sc)
{ {
switch(sc) switch(sc)
@ -982,6 +962,7 @@ Style::Style()
itsProgressBarAnimateTimer(0), itsProgressBarAnimateTimer(0),
itsAnimateStep(0), itsAnimateStep(0),
itsTitlebarHeight(0), itsTitlebarHeight(0),
calibre_icon_map(QHash<int,QString>()),
itsPos(-1, -1), itsPos(-1, -1),
itsHoverWidget(0L), itsHoverWidget(0L),
#ifdef Q_WS_X11 #ifdef Q_WS_X11
@ -3693,220 +3674,26 @@ QPalette Style::standardPalette() const
#endif #endif
} }
#if defined QTC_QT_ONLY bool Style::event(QEvent *event) {
#include "dialogpixmaps.h" if (event->type() == QEvent::DynamicPropertyChange) {
QDynamicPropertyChangeEvent *e = static_cast<QDynamicPropertyChangeEvent*>(event);
static QIcon load(const unsigned int len, const unsigned char *data) if (e->propertyName() == QString("calibre_icon_map")) {
{ QMap<QString,QVariant> m = property("calibre_icon_map").toMap();
QImage img; QMap<QString, QVariant>::const_iterator i = m.constBegin();
img.loadFromData(data, len); while (i != m.constEnd()) {
calibre_icon_map[i.key().toInt()] = i.value().toString();
return QIcon(QPixmap::fromImage(img)); ++i;
}
return true;
}
}
return BASE_STYLE::event(event);
} }
#endif
QIcon Style::standardIconImplementation(StandardPixmap pix, const QStyleOption *option, const QWidget *widget) const QIcon Style::standardIconImplementation(StandardPixmap pix, const QStyleOption *option, const QWidget *widget) const
{ {
switch(pix) if (calibre_icon_map.contains(pix))
{ return QIcon(calibre_icon_map.value(pix));
// case SP_TitleBarMenuButton:
// case SP_TitleBarMinButton:
// case SP_TitleBarMaxButton:
// case SP_TitleBarContextHelpButton:
case SP_TitleBarNormalButton:
case SP_TitleBarShadeButton:
case SP_TitleBarUnshadeButton:
case SP_DockWidgetCloseButton:
case SP_TitleBarCloseButton:
{
QPixmap pm(13, 13);
pm.fill(Qt::transparent);
QPainter painter(&pm);
drawIcon(&painter, Qt::color1, QRect(0, 0, pm.width(), pm.height()), false, pix2Icon(pix),
SP_TitleBarShadeButton==pix || SP_TitleBarUnshadeButton==pix);
return QIcon(pm);
}
case SP_ToolBarHorizontalExtensionButton:
case SP_ToolBarVerticalExtensionButton:
{
QPixmap pm(9, 9);
pm.fill(Qt::transparent);
QPainter painter(&pm);
drawIcon(&painter, Qt::color1, QRect(0, 0, pm.width(), pm.height()), false, pix2Icon(pix), true);
return QIcon(pm);
}
#if defined QTC_QT_ONLY
case SP_MessageBoxQuestion:
case SP_MessageBoxInformation:
{
static QIcon icn(load(dialog_information_png_len, dialog_information_png_data));
return icn;
}
case SP_MessageBoxWarning:
{
static QIcon icn(load(dialog_warning_png_len, dialog_warning_png_data));
return icn;
}
case SP_MessageBoxCritical:
{
static QIcon icn(load(dialog_error_png_len, dialog_error_png_data));
return icn;
}
/*
case SP_DialogYesButton:
case SP_DialogOkButton:
{
static QIcon icn(load(dialog_ok_png_len, dialog_ok_png_data));
return icn;
}
case SP_DialogNoButton:
case SP_DialogCancelButton:
{
static QIcon icn(load(dialog_cancel_png_len, dialog_cancel_png_data));
return icn;
}
case SP_DialogHelpButton:
{
static QIcon icn(load(help_contents_png_len, help_contents_png_data));
return icn;
}
case SP_DialogCloseButton:
{
static QIcon icn(load(dialog_close_png_len, dialog_close_png_data));
return icn;
}
case SP_DialogApplyButton:
{
static QIcon icn(load(dialog_ok_apply_png_len, dialog_ok_apply_png_data));
return icn;
}
case SP_DialogResetButton:
{
static QIcon icn(load(document_revert_png_len, document_revert_png_data));
return icn;
}
*/
#else
case SP_MessageBoxInformation:
return KIcon("dialog-information");
case SP_MessageBoxWarning:
return KIcon("dialog-warning");
case SP_MessageBoxCritical:
return KIcon("dialog-error");
case SP_MessageBoxQuestion:
return KIcon("dialog-information");
case SP_DesktopIcon:
return KIcon("user-desktop");
case SP_TrashIcon:
return KIcon("user-trash");
case SP_ComputerIcon:
return KIcon("computer");
case SP_DriveFDIcon:
return KIcon("media-floppy");
case SP_DriveHDIcon:
return KIcon("drive-harddisk");
case SP_DriveCDIcon:
case SP_DriveDVDIcon:
return KIcon("media-optical");
case SP_DriveNetIcon:
return KIcon("network-server");
case SP_DirOpenIcon:
return KIcon("document-open");
case SP_DirIcon:
case SP_DirClosedIcon:
return KIcon("folder");
// case SP_DirLinkIcon:
case SP_FileIcon:
return KIcon("application-x-zerosize");
// case SP_FileLinkIcon:
case SP_FileDialogStart:
return KIcon(Qt::RightToLeft==QApplication::layoutDirection() ? "go-edn" : "go-first");
case SP_FileDialogEnd:
return KIcon(Qt::RightToLeft==QApplication::layoutDirection() ? "go-first" : "go-end");
case SP_FileDialogToParent:
return KIcon("go-up");
case SP_FileDialogNewFolder:
return KIcon("folder-new");
case SP_FileDialogDetailedView:
return KIcon("view-list-details");
// case SP_FileDialogInfoView:
// return KIcon("dialog-ok");
// case SP_FileDialogContentsView:
// return KIcon("dialog-ok");
case SP_FileDialogListView:
return KIcon("view-list-icons");
case SP_FileDialogBack:
return KIcon(Qt::RightToLeft==QApplication::layoutDirection() ? "go-next" : "go-previous");
case SP_DialogOkButton:
return KIcon("dialog-ok");
case SP_DialogCancelButton:
return KIcon("dialog-cancel");
case SP_DialogHelpButton:
return KIcon("help-contents");
case SP_DialogOpenButton:
return KIcon("document-open");
case SP_DialogSaveButton:
return KIcon("document-save");
case SP_DialogCloseButton:
return KIcon("dialog-close");
case SP_DialogApplyButton:
return KIcon("dialog-ok-apply");
case SP_DialogResetButton:
return KIcon("document-revert");
// case SP_DialogDiscardButton:
// return KIcon("dialog-cancel");
case SP_DialogYesButton:
return KIcon("dialog-ok");
case SP_DialogNoButton:
return KIcon("dialog-cancel");
case SP_ArrowUp:
return KIcon("arrow-up");
case SP_ArrowDown:
return KIcon("arrow-down");
case SP_ArrowLeft:
return KIcon("arrow-left");
case SP_ArrowRight:
return KIcon("arrow-right");
case SP_ArrowBack:
return KIcon(Qt::RightToLeft==QApplication::layoutDirection() ? "go-next" : "go-previous");
case SP_ArrowForward:
return KIcon(Qt::RightToLeft==QApplication::layoutDirection() ? "go-previous" : "go-next");
case SP_DirHomeIcon:
return KIcon("user-home");
// case SP_CommandLink:
// case SP_VistaShield:
case SP_BrowserReload:
return KIcon("view-refresh");
case SP_BrowserStop:
return KIcon("process-stop");
case SP_MediaPlay:
return KIcon("media-playback-start");
case SP_MediaStop:
return KIcon("media-playback-stop");
case SP_MediaPause:
return KIcon("media-playback-pause");
case SP_MediaSkipForward:
return KIcon("media-skip-forward");
case SP_MediaSkipBackward:
return KIcon("media-skip-backward");
case SP_MediaSeekForward:
return KIcon("media-seek-forward");
case SP_MediaSeekBackward:
return KIcon("media-seek-backward");
case SP_MediaVolume:
return KIcon("player-volume");
case SP_MediaVolumeMuted:
return KIcon("player-volume-muted");
#endif
default:
break;
}
return BASE_STYLE::standardIconImplementation(pix, option, widget); return BASE_STYLE::standardIconImplementation(pix, option, widget);
} }

View File

@ -176,6 +176,7 @@ class Style : public QCommonStyle
QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget) const; QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget) const;
SubControl hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option, SubControl hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option,
const QPoint &pos, const QWidget *widget) const; const QPoint &pos, const QWidget *widget) const;
virtual bool event(QEvent *event);
private: private:
@ -353,6 +354,7 @@ class Style : public QCommonStyle
#endif #endif
mutable QList<int> itsMdiButtons[2]; // 0=left, 1=right mutable QList<int> itsMdiButtons[2]; // 0=left, 1=right
mutable int itsTitlebarHeight; mutable int itsTitlebarHeight;
QHash<int,QString> calibre_icon_map;
// Required for Q3Header hover... // Required for Q3Header hover...
QPoint itsPos; QPoint itsPos;