diff options
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qcommonstyle.cpp | 198 | ||||
-rw-r--r-- | src/gui/styles/qmacstyle_mac.mm | 13 | ||||
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 4 | ||||
-rw-r--r-- | src/gui/styles/qs60style_simulated.cpp | 12 | ||||
-rw-r--r-- | src/gui/styles/qstylesheetstyle.cpp | 8 |
5 files changed, 129 insertions, 106 deletions
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index b1924e7..f8464cc 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -5662,10 +5662,16 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons OSType iconType = 0; switch (standardIcon) { case QStyle::SP_MessageBoxQuestion: + iconType = kQuestionMarkIcon; + break; case QStyle::SP_MessageBoxInformation: + iconType = kAlertNoteIcon; + break; case QStyle::SP_MessageBoxWarning: + iconType = kAlertCautionIcon; + break; case QStyle::SP_MessageBoxCritical: - iconType = kGenericApplicationIcon; + iconType = kAlertStopIcon; break; case SP_DesktopIcon: iconType = kDesktopIcon; @@ -5755,88 +5761,88 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons switch (standardIcon) { #ifndef QT_NO_IMAGEFORMAT_PNG case SP_FileDialogNewFolder: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/newdirectory-128.png"), QSize(128, 128)); break; case SP_FileDialogBack: return standardIconImplementation(SP_ArrowBack, option, widget); case SP_FileDialogToParent: return standardIconImplementation(SP_ArrowUp, option, widget); case SP_FileDialogDetailedView: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewdetailed-128.png"), QSize(128, 128)); break; case SP_FileDialogInfoView: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/fileinfo-128.png"), QSize(128, 128)); break; case SP_FileDialogContentsView: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filecontents-128.png"), QSize(128, 128)); break; case SP_FileDialogListView: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/viewlist-128.png"), QSize(128, 128)); break; case SP_DialogOkButton: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-ok-128.png"), QSize(128, 128)); break; case SP_DialogCancelButton: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-cancel-128.png"), QSize(128, 128)); break; case SP_DialogHelpButton: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-help-128.png"), QSize(128, 128)); break; case SP_DialogOpenButton: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-128.png"), QSize(128, 128)); break; case SP_DialogSaveButton: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-save-128.png"), QSize(128, 128)); break; case SP_DialogCloseButton: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-close-128.png"), QSize(128, 128)); break; case SP_DialogApplyButton: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-apply-128.png"), QSize(128, 128)); break; case SP_DialogResetButton: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-clear-128.png"), QSize(128, 128)); break; case SP_DialogDiscardButton: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-delete-128.png"), QSize(128, 128)); break; case SP_DialogYesButton: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-yes-128.png"), QSize(128, 128)); break; case SP_DialogNoButton: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-no-128.png"), QSize(128, 128)); break; case SP_ArrowForward: if (rtl) @@ -5847,24 +5853,24 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons return standardIconImplementation(SP_ArrowRight, option, widget); return standardIconImplementation(SP_ArrowLeft, option, widget); case SP_ArrowLeft: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/left-128.png"), QSize(128, 128)); break; case SP_ArrowRight: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/right-128.png"), QSize(128, 128)); break; case SP_ArrowUp: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/up-128.png"), QSize(128, 128)); break; case SP_ArrowDown: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/down-128.png"), QSize(128, 128)); break; case SP_DirHomeIcon: case SP_DirIcon: @@ -5882,71 +5888,71 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons QSize(128, 128), QIcon::Normal, QIcon::On); break; case SP_DriveCDIcon: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/cdr-128.png"), QSize(128, 128)); break; case SP_DriveDVDIcon: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/dvd-128.png"), QSize(128, 128)); break; case SP_FileIcon: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/file-128.png"), QSize(128, 128)); break; case SP_FileLinkIcon: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/filelink-128.png"), QSize(128, 128)); break; case SP_TrashIcon: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-32.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-128.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-32.png"), QSize(32, 32)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/trash-128.png"), QSize(128, 128)); break; case SP_BrowserReload: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/refresh-24.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/refresh-32.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/refresh-24.png"), QSize(24, 24)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/refresh-32.png"), QSize(32, 32)); break; case SP_BrowserStop: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/stop-24.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/stop-32.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/stop-24.png"), QSize(24, 24)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/stop-32.png"), QSize(32, 32)); break; case SP_MediaPlay: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-play-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-play-32.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-play-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-play-32.png"), QSize(32, 32)); break; case SP_MediaPause: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-pause-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-pause-32.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-pause-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-pause-32.png"), QSize(32, 32)); break; case SP_MediaStop: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-stop-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-stop-32.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-stop-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-stop-32.png"), QSize(32, 32)); break; case SP_MediaSeekForward: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-forward-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-forward-32.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-forward-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-forward-32.png"), QSize(32, 32)); break; case SP_MediaSeekBackward: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-backward-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-backward-32.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-backward-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-seek-backward-32.png"), QSize(32, 32)); break; case SP_MediaSkipForward: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-forward-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-forward-32.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-forward-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-forward-32.png"), QSize(32, 32)); break; case SP_MediaSkipBackward: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-backward-16.png")); - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-backward-32.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-backward-16.png"), QSize(16, 16)); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-skip-backward-32.png"), QSize(32, 32)); break; case SP_MediaVolume: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-volume-16.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-volume-16.png"), QSize(16, 16)); break; case SP_MediaVolumeMuted: - icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-volume-muted-16.png")); + icon.addFile(QLatin1String(":/trolltech/styles/commonstyle/images/media-volume-muted-16.png"), QSize(16, 16)); break; #endif // QT_NO_IMAGEFORMAT_PNG default: diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 5bd939f..116b03e 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -3146,6 +3146,18 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai break; case PE_PanelLineEdit: QWindowsStyle::drawPrimitive(pe, opt, p, w); + // Draw the focus frame for widgets other than QLineEdit (e.g. for line edits in Webkit). + // Focus frame is drawn outside the rectangle passed in the option-rect. + if (const QStyleOptionFrame *panel = qstyleoption_cast<const QStyleOptionFrame *>(opt)) { + if ((opt->state & State_HasFocus) && !qobject_cast<const QLineEdit*>(w)) { + int vmargin = pixelMetric(QStyle::PM_FocusFrameVMargin); + int hmargin = pixelMetric(QStyle::PM_FocusFrameHMargin); + QStyleOptionFrame focusFrame = *panel; + focusFrame.rect = panel->rect.adjusted(-hmargin, -vmargin, hmargin, vmargin); + drawControl(CE_FocusFrame, &focusFrame, p, w); + } + } + break; case PE_FrameTabWidget: if (const QStyleOptionTabWidgetFrame *twf @@ -3169,7 +3181,6 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai p->drawLine(opt->rect.topLeft(), opt->rect.bottomLeft()); } break; case PE_FrameStatusBarItem: - QCommonStyle::drawPrimitive(pe, opt, p, w); break; case PE_IndicatorTabClose: { bool hover = (opt->state & State_MouseOver); diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index d57b187..cb49fbc 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -58,8 +58,8 @@ #include <aknsskininstance.h> #include <aknsbasicbackgroundcontrolcontext.h> #include <avkon.mbg> -#include <AknFontAccess.h> -#include <AknLayoutFont.h> +#include <aknfontaccess.h> +#include <aknlayoutfont.h> #include <aknutils.h> #include <aknnavi.h> #include <gulicon.h> diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp index f87cf28..3f09ebc 100644 --- a/src/gui/styles/qs60style_simulated.cpp +++ b/src/gui/styles/qs60style_simulated.cpp @@ -94,12 +94,12 @@ bool saveThemeToBlob(const QString &themeBlob, dataOut << color; } - const int picturesCount = partPictures.count(); - dataOut << picturesCount; - foreach (const QString &key, partPictures.keys()) { - const QPicture picture = partPictures.value(key); - dataOut << key; - dataOut << picture; + dataOut << partPictures.count(); + QHashIterator<QString, QPicture> i(partPictures); + while (i.hasNext()) { + i.next(); + dataOut << i.key(); + dataOut << i.value(); // the QPicture } QDataStream blobOut(&blob); diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index c550938..bc1bece 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -1065,7 +1065,7 @@ QRect QRenderRule::boxRect(const QRect& cr, int flags) const r.adjust(-p[LeftEdge], -p[TopEdge], p[RightEdge], p[BottomEdge]); } } - if (!hasNativeBorder() && (flags & Border)) { + if (hasBorder() && (flags & Border)) { const int *b = border()->borders; r.adjust(-b[LeftEdge], -b[TopEdge], b[RightEdge], b[BottomEdge]); } @@ -1352,6 +1352,12 @@ void QRenderRule::configurePalette(QPalette *p, QPalette::ColorRole fr, QPalette if (br != QPalette::NoRole) p->setBrush(br, bg->brush); p->setBrush(QPalette::Window, bg->brush); + if (bg->brush.style() == Qt::SolidPattern) { + p->setBrush(QPalette::Light, bg->brush.color().lighter(115)); + p->setBrush(QPalette::Midlight, bg->brush.color().lighter(107)); + p->setBrush(QPalette::Dark, bg->brush.color().darker(150)); + p->setBrush(QPalette::Shadow, bg->brush.color().darker(300)); + } } if (!hasPalette()) |