From 079fbf1dfa41490b1dc3c3a393fb4aab5ae8cecb Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Tue, 8 Nov 2022 21:33:44 +0800 Subject: [PATCH] added qtstyle --- src/CMakeLists.txt | 10 +- src/style/CMQTStyle.cpp | 60 + .../bright/button/core_button_disabled.png | Bin 0 -> 1510 bytes .../button/core_button_disabled_selected.png | Bin 0 -> 1782 bytes .../button/core_button_enabled_selected.png | Bin 0 -> 1830 bytes .../bright/button/core_button_inactive.png | Bin 0 -> 2428 bytes .../bright/button/core_button_pressed.png | Bin 0 -> 3221 bytes .../bright/checkbox/core_checkbox_checked.png | Bin 0 -> 2048 bytes .../checkbox/core_checkbox_disabled.png | Bin 0 -> 935 bytes .../core_checkbox_disabled_checked.png | Bin 0 -> 1702 bytes .../bright/checkbox/core_checkbox_enabled.png | Bin 0 -> 1082 bytes .../bright/checkbox/core_checkbox_pressed.png | Bin 0 -> 2776 bytes .../core_checkbox_pressed_checked.png | Bin 0 -> 2652 bytes .../bright/combobox/core_dropdown_button.png | Bin 0 -> 1605 bytes .../core_dropdown_button_arrowdown.png | Bin 0 -> 1419 bytes ...core_dropdown_button_arrowdown_pressed.png | Bin 0 -> 1404 bytes .../combobox/core_dropdown_button_arrowup.png | Bin 0 -> 1398 bytes .../core_dropdown_button_disabled.png | Bin 0 -> 1587 bytes .../combobox/core_dropdown_button_pressed.png | Bin 0 -> 1801 bytes .../combobox/core_dropdown_checkmark.png | Bin 0 -> 1769 bytes .../bright/combobox/core_dropdown_divider.png | Bin 0 -> 134 bytes .../bright/combobox/core_dropdown_menu.png | Bin 0 -> 874 bytes .../bright/combobox/core_dropdown_menuup.png | Bin 0 -> 996 bytes .../bright/combobox/core_listitem_active.png | Bin 0 -> 182 bytes .../bright/lineedit/core_textinput_bg.png | Bin 0 -> 1315 bytes .../lineedit/core_textinput_bg_disabled.png | Bin 0 -> 454 bytes .../lineedit/core_textinput_bg_highlight.png | Bin 0 -> 394 bytes .../bright/listitem/core_listitem_active.png | Bin 0 -> 164 bytes .../bright/listitem/core_listitem_divider.png | Bin 0 -> 135 bytes .../progressbar/core_progressindicator_bg.png | Bin 0 -> 1802 bytes .../core_progressindicator_complete.png | Bin 0 -> 635 bytes .../core_progressindicator_fill.png | Bin 0 -> 629 bytes .../core_progressindicator_vbg.png | Bin 0 -> 903 bytes .../core_progressindicator_vcomplete.png | Bin 0 -> 614 bytes .../core_progressindicator_vfill.png | Bin 0 -> 594 bytes .../radiobutton/core_radiobutton_checked.png | Bin 0 -> 4471 bytes .../radiobutton/core_radiobutton_disabled.png | Bin 0 -> 3652 bytes .../core_radiobutton_disabled_checked.png | Bin 0 -> 4094 bytes .../radiobutton/core_radiobutton_inactive.png | Bin 0 -> 4245 bytes .../radiobutton/core_radiobutton_pressed.png | Bin 0 -> 5460 bytes .../bright/scrollbar/core_scrollbar.png | Bin 0 -> 1242 bytes .../bright/scrollbar/core_scrollbar_v.png | Bin 0 -> 385 bytes .../bright/slider/core_slider_active.png | Bin 0 -> 1167 bytes .../bright/slider/core_slider_cache.png | Bin 0 -> 1154 bytes .../bright/slider/core_slider_disabled.png | Bin 0 -> 1134 bytes .../bright/slider/core_slider_enabled.png | Bin 0 -> 1049 bytes .../bright/slider/core_slider_handle.png | Bin 0 -> 2843 bytes .../slider/core_slider_handle_disabled.png | Bin 0 -> 2708 bytes .../slider/core_slider_handle_pressed.png | Bin 0 -> 6577 bytes .../bright/slider/core_slider_inactive.png | Bin 0 -> 1162 bytes .../bright/slider/core_slider_vactive.png | Bin 0 -> 1077 bytes .../bright/slider/core_slider_vcache.png | Bin 0 -> 1063 bytes .../bright/slider/core_slider_vdisabled.png | Bin 0 -> 1064 bytes .../bright/slider/core_slider_venabled.png | Bin 0 -> 996 bytes .../bright/slider/core_slider_vinactive.png | Bin 0 -> 1071 bytes .../dark/button/core_button_disabled.png | Bin 0 -> 1291 bytes .../button/core_button_disabled_selected.png | Bin 0 -> 1655 bytes .../button/core_button_enabled_selected.png | Bin 0 -> 1665 bytes .../dark/button/core_button_inactive.png | Bin 0 -> 2262 bytes .../dark/button/core_button_pressed.png | Bin 0 -> 2853 bytes .../dark/checkbox/core_checkbox_checked.png | Bin 0 -> 1947 bytes .../dark/checkbox/core_checkbox_disabled.png | Bin 0 -> 787 bytes .../core_checkbox_disabled_checked.png | Bin 0 -> 1578 bytes .../dark/checkbox/core_checkbox_enabled.png | Bin 0 -> 925 bytes .../dark/checkbox/core_checkbox_pressed.png | Bin 0 -> 2478 bytes .../core_checkbox_pressed_checked.png | Bin 0 -> 2256 bytes .../dark/combobox/core_dropdown_button.png | Bin 0 -> 1425 bytes .../core_dropdown_button_arrowdown.png | Bin 0 -> 1404 bytes ...core_dropdown_button_arrowdown_pressed.png | Bin 0 -> 1465 bytes .../combobox/core_dropdown_button_arrowup.png | Bin 0 -> 1383 bytes .../core_dropdown_button_disabled.png | Bin 0 -> 1291 bytes .../combobox/core_dropdown_button_pressed.png | Bin 0 -> 1583 bytes .../dark/combobox/core_dropdown_checkmark.png | Bin 0 -> 1588 bytes .../dark/combobox/core_dropdown_divider.png | Bin 0 -> 134 bytes .../dark/combobox/core_dropdown_menu.png | Bin 0 -> 662 bytes .../dark/combobox/core_dropdown_menuup.png | Bin 0 -> 688 bytes .../dark/combobox/core_listitem_active.png | Bin 0 -> 149 bytes .../dark/lineedit/core_textinput_bg.png | Bin 0 -> 1315 bytes .../lineedit/core_textinput_bg_disabled.png | Bin 0 -> 454 bytes .../lineedit/core_textinput_bg_highlight.png | Bin 0 -> 394 bytes .../dark/listitem/core_listitem_active.png | Bin 0 -> 164 bytes .../dark/listitem/core_listitem_divider.png | Bin 0 -> 136 bytes .../progressbar/core_progressindicator_bg.png | Bin 0 -> 1724 bytes .../core_progressindicator_complete.png | Bin 0 -> 635 bytes .../core_progressindicator_fill.png | Bin 0 -> 658 bytes .../core_progressindicator_vbg.png | Bin 0 -> 815 bytes .../core_progressindicator_vcomplete.png | Bin 0 -> 614 bytes .../core_progressindicator_vfill.png | Bin 0 -> 602 bytes .../radiobutton/core_radiobutton_checked.png | Bin 0 -> 4298 bytes .../radiobutton/core_radiobutton_disabled.png | Bin 0 -> 3125 bytes .../core_radiobutton_disabled_checked.png | Bin 0 -> 3539 bytes .../radiobutton/core_radiobutton_inactive.png | Bin 0 -> 3968 bytes .../radiobutton/core_radiobutton_pressed.png | Bin 0 -> 4777 bytes .../dark/scrollbar/core_scrollbar.png | Bin 0 -> 1245 bytes .../dark/scrollbar/core_scrollbar_v.png | Bin 0 -> 369 bytes .../dark/slider/core_slider_active.png | Bin 0 -> 1160 bytes .../dark/slider/core_slider_cache.png | Bin 0 -> 1154 bytes .../dark/slider/core_slider_disabled.png | Bin 0 -> 1105 bytes .../dark/slider/core_slider_enabled.png | Bin 0 -> 983 bytes .../dark/slider/core_slider_handle.png | Bin 0 -> 3019 bytes .../slider/core_slider_handle_disabled.png | Bin 0 -> 1715 bytes .../slider/core_slider_handle_pressed.png | Bin 0 -> 6593 bytes .../dark/slider/core_slider_inactive.png | Bin 0 -> 1158 bytes .../dark/slider/core_slider_vactive.png | Bin 0 -> 1066 bytes .../dark/slider/core_slider_vcache.png | Bin 0 -> 1058 bytes .../dark/slider/core_slider_vdisabled.png | Bin 0 -> 1009 bytes .../dark/slider/core_slider_venabled.png | Bin 0 -> 929 bytes .../dark/slider/core_slider_vinactive.png | Bin 0 -> 1067 bytes src/style/bb10style/qbb10brightstyle.cpp | 349 + src/style/bb10style/qbb10brightstyle.h | 62 + src/style/bb10style/qbb10brightstyle.qrc | 57 + src/style/bb10style/qbb10darkstyle.cpp | 354 + src/style/bb10style/qbb10darkstyle.h | 62 + src/style/bb10style/qbb10darkstyle.qrc | 57 + src/style/cleanlooks/qcleanlooksstyle.cpp | 4492 +++++++++++++ src/style/cleanlooks/qcleanlooksstyle.h | 116 + src/style/motif/qcdestyle.cpp | 308 + src/style/motif/qcdestyle.h | 74 + src/style/motif/qmotifstyle.cpp | 2533 +++++++ src/style/motif/qmotifstyle.h | 128 + src/style/plastique/qplastiquestyle.cpp | 5880 +++++++++++++++++ src/style/plastique/qplastiquestyle.h | 118 + src/style/shared/qhexstring_p.h | 96 + src/style/shared/qstylecache_p.h | 105 + src/style/shared/qstylehelper.cpp | 391 ++ src/style/shared/qstylehelper_p.h | 88 + src/style/style.cmake | 34 + 127 files changed, 15371 insertions(+), 3 deletions(-) create mode 100644 src/style/CMQTStyle.cpp create mode 100644 src/style/bb10style/bright/button/core_button_disabled.png create mode 100644 src/style/bb10style/bright/button/core_button_disabled_selected.png create mode 100644 src/style/bb10style/bright/button/core_button_enabled_selected.png create mode 100644 src/style/bb10style/bright/button/core_button_inactive.png create mode 100644 src/style/bb10style/bright/button/core_button_pressed.png create mode 100644 src/style/bb10style/bright/checkbox/core_checkbox_checked.png create mode 100644 src/style/bb10style/bright/checkbox/core_checkbox_disabled.png create mode 100644 src/style/bb10style/bright/checkbox/core_checkbox_disabled_checked.png create mode 100644 src/style/bb10style/bright/checkbox/core_checkbox_enabled.png create mode 100644 src/style/bb10style/bright/checkbox/core_checkbox_pressed.png create mode 100644 src/style/bb10style/bright/checkbox/core_checkbox_pressed_checked.png create mode 100644 src/style/bb10style/bright/combobox/core_dropdown_button.png create mode 100644 src/style/bb10style/bright/combobox/core_dropdown_button_arrowdown.png create mode 100644 src/style/bb10style/bright/combobox/core_dropdown_button_arrowdown_pressed.png create mode 100644 src/style/bb10style/bright/combobox/core_dropdown_button_arrowup.png create mode 100644 src/style/bb10style/bright/combobox/core_dropdown_button_disabled.png create mode 100644 src/style/bb10style/bright/combobox/core_dropdown_button_pressed.png create mode 100644 src/style/bb10style/bright/combobox/core_dropdown_checkmark.png create mode 100644 src/style/bb10style/bright/combobox/core_dropdown_divider.png create mode 100644 src/style/bb10style/bright/combobox/core_dropdown_menu.png create mode 100644 src/style/bb10style/bright/combobox/core_dropdown_menuup.png create mode 100644 src/style/bb10style/bright/combobox/core_listitem_active.png create mode 100644 src/style/bb10style/bright/lineedit/core_textinput_bg.png create mode 100644 src/style/bb10style/bright/lineedit/core_textinput_bg_disabled.png create mode 100644 src/style/bb10style/bright/lineedit/core_textinput_bg_highlight.png create mode 100644 src/style/bb10style/bright/listitem/core_listitem_active.png create mode 100644 src/style/bb10style/bright/listitem/core_listitem_divider.png create mode 100644 src/style/bb10style/bright/progressbar/core_progressindicator_bg.png create mode 100644 src/style/bb10style/bright/progressbar/core_progressindicator_complete.png create mode 100644 src/style/bb10style/bright/progressbar/core_progressindicator_fill.png create mode 100644 src/style/bb10style/bright/progressbar/core_progressindicator_vbg.png create mode 100644 src/style/bb10style/bright/progressbar/core_progressindicator_vcomplete.png create mode 100644 src/style/bb10style/bright/progressbar/core_progressindicator_vfill.png create mode 100644 src/style/bb10style/bright/radiobutton/core_radiobutton_checked.png create mode 100644 src/style/bb10style/bright/radiobutton/core_radiobutton_disabled.png create mode 100644 src/style/bb10style/bright/radiobutton/core_radiobutton_disabled_checked.png create mode 100644 src/style/bb10style/bright/radiobutton/core_radiobutton_inactive.png create mode 100644 src/style/bb10style/bright/radiobutton/core_radiobutton_pressed.png create mode 100644 src/style/bb10style/bright/scrollbar/core_scrollbar.png create mode 100644 src/style/bb10style/bright/scrollbar/core_scrollbar_v.png create mode 100644 src/style/bb10style/bright/slider/core_slider_active.png create mode 100644 src/style/bb10style/bright/slider/core_slider_cache.png create mode 100644 src/style/bb10style/bright/slider/core_slider_disabled.png create mode 100644 src/style/bb10style/bright/slider/core_slider_enabled.png create mode 100644 src/style/bb10style/bright/slider/core_slider_handle.png create mode 100644 src/style/bb10style/bright/slider/core_slider_handle_disabled.png create mode 100644 src/style/bb10style/bright/slider/core_slider_handle_pressed.png create mode 100644 src/style/bb10style/bright/slider/core_slider_inactive.png create mode 100644 src/style/bb10style/bright/slider/core_slider_vactive.png create mode 100644 src/style/bb10style/bright/slider/core_slider_vcache.png create mode 100644 src/style/bb10style/bright/slider/core_slider_vdisabled.png create mode 100644 src/style/bb10style/bright/slider/core_slider_venabled.png create mode 100644 src/style/bb10style/bright/slider/core_slider_vinactive.png create mode 100644 src/style/bb10style/dark/button/core_button_disabled.png create mode 100644 src/style/bb10style/dark/button/core_button_disabled_selected.png create mode 100644 src/style/bb10style/dark/button/core_button_enabled_selected.png create mode 100644 src/style/bb10style/dark/button/core_button_inactive.png create mode 100644 src/style/bb10style/dark/button/core_button_pressed.png create mode 100644 src/style/bb10style/dark/checkbox/core_checkbox_checked.png create mode 100644 src/style/bb10style/dark/checkbox/core_checkbox_disabled.png create mode 100644 src/style/bb10style/dark/checkbox/core_checkbox_disabled_checked.png create mode 100644 src/style/bb10style/dark/checkbox/core_checkbox_enabled.png create mode 100644 src/style/bb10style/dark/checkbox/core_checkbox_pressed.png create mode 100644 src/style/bb10style/dark/checkbox/core_checkbox_pressed_checked.png create mode 100644 src/style/bb10style/dark/combobox/core_dropdown_button.png create mode 100644 src/style/bb10style/dark/combobox/core_dropdown_button_arrowdown.png create mode 100644 src/style/bb10style/dark/combobox/core_dropdown_button_arrowdown_pressed.png create mode 100644 src/style/bb10style/dark/combobox/core_dropdown_button_arrowup.png create mode 100644 src/style/bb10style/dark/combobox/core_dropdown_button_disabled.png create mode 100644 src/style/bb10style/dark/combobox/core_dropdown_button_pressed.png create mode 100644 src/style/bb10style/dark/combobox/core_dropdown_checkmark.png create mode 100644 src/style/bb10style/dark/combobox/core_dropdown_divider.png create mode 100644 src/style/bb10style/dark/combobox/core_dropdown_menu.png create mode 100644 src/style/bb10style/dark/combobox/core_dropdown_menuup.png create mode 100644 src/style/bb10style/dark/combobox/core_listitem_active.png create mode 100644 src/style/bb10style/dark/lineedit/core_textinput_bg.png create mode 100644 src/style/bb10style/dark/lineedit/core_textinput_bg_disabled.png create mode 100644 src/style/bb10style/dark/lineedit/core_textinput_bg_highlight.png create mode 100644 src/style/bb10style/dark/listitem/core_listitem_active.png create mode 100644 src/style/bb10style/dark/listitem/core_listitem_divider.png create mode 100644 src/style/bb10style/dark/progressbar/core_progressindicator_bg.png create mode 100644 src/style/bb10style/dark/progressbar/core_progressindicator_complete.png create mode 100644 src/style/bb10style/dark/progressbar/core_progressindicator_fill.png create mode 100644 src/style/bb10style/dark/progressbar/core_progressindicator_vbg.png create mode 100644 src/style/bb10style/dark/progressbar/core_progressindicator_vcomplete.png create mode 100644 src/style/bb10style/dark/progressbar/core_progressindicator_vfill.png create mode 100644 src/style/bb10style/dark/radiobutton/core_radiobutton_checked.png create mode 100644 src/style/bb10style/dark/radiobutton/core_radiobutton_disabled.png create mode 100644 src/style/bb10style/dark/radiobutton/core_radiobutton_disabled_checked.png create mode 100644 src/style/bb10style/dark/radiobutton/core_radiobutton_inactive.png create mode 100644 src/style/bb10style/dark/radiobutton/core_radiobutton_pressed.png create mode 100644 src/style/bb10style/dark/scrollbar/core_scrollbar.png create mode 100644 src/style/bb10style/dark/scrollbar/core_scrollbar_v.png create mode 100644 src/style/bb10style/dark/slider/core_slider_active.png create mode 100644 src/style/bb10style/dark/slider/core_slider_cache.png create mode 100644 src/style/bb10style/dark/slider/core_slider_disabled.png create mode 100644 src/style/bb10style/dark/slider/core_slider_enabled.png create mode 100644 src/style/bb10style/dark/slider/core_slider_handle.png create mode 100644 src/style/bb10style/dark/slider/core_slider_handle_disabled.png create mode 100644 src/style/bb10style/dark/slider/core_slider_handle_pressed.png create mode 100644 src/style/bb10style/dark/slider/core_slider_inactive.png create mode 100644 src/style/bb10style/dark/slider/core_slider_vactive.png create mode 100644 src/style/bb10style/dark/slider/core_slider_vcache.png create mode 100644 src/style/bb10style/dark/slider/core_slider_vdisabled.png create mode 100644 src/style/bb10style/dark/slider/core_slider_venabled.png create mode 100644 src/style/bb10style/dark/slider/core_slider_vinactive.png create mode 100644 src/style/bb10style/qbb10brightstyle.cpp create mode 100644 src/style/bb10style/qbb10brightstyle.h create mode 100644 src/style/bb10style/qbb10brightstyle.qrc create mode 100644 src/style/bb10style/qbb10darkstyle.cpp create mode 100644 src/style/bb10style/qbb10darkstyle.h create mode 100644 src/style/bb10style/qbb10darkstyle.qrc create mode 100644 src/style/cleanlooks/qcleanlooksstyle.cpp create mode 100644 src/style/cleanlooks/qcleanlooksstyle.h create mode 100644 src/style/motif/qcdestyle.cpp create mode 100644 src/style/motif/qcdestyle.h create mode 100644 src/style/motif/qmotifstyle.cpp create mode 100644 src/style/motif/qmotifstyle.h create mode 100644 src/style/plastique/qplastiquestyle.cpp create mode 100644 src/style/plastique/qplastiquestyle.h create mode 100644 src/style/shared/qhexstring_p.h create mode 100644 src/style/shared/qstylecache_p.h create mode 100644 src/style/shared/qstylehelper.cpp create mode 100644 src/style/shared/qstylehelper_p.h create mode 100644 src/style/style.cmake diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3874fb2..b1f71ec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Gui Widgets Svg Xml VulkanSupport) +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Gui Widgets Svg Xml) SET(CMQT_INCLUDE_PATH ${CMQT_ROOT_INCLUDE_PATH}/hgl/qt) @@ -31,6 +31,10 @@ SET(CMQT_Vulkan_FILES ${CMQT_INCLUDE_PATH}/QtVulkanWindow.h SOURCE_GROUP("Vulkan" FILES ${CMQT_Vulkan_FILES}) -add_cm_library(CMQT "CM" ${CMQT_DIALOG_FILES} ${CMQT_IMAGE_FILES} ${CMQT_MENU_SOURCE}) +SET(CMQT_STYLE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/style) -target_link_libraries(CMQT PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Svg Qt5::Xml Qt5::VulkanSupport) \ No newline at end of file +include(style/style.cmake) + +add_cm_library(CMQT "CM" ${CMQT_DIALOG_FILES} ${CMQT_IMAGE_FILES} ${CMQT_MENU_SOURCE} ${QT_STYLE_FILES}) + +target_link_libraries(CMQT PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Svg Qt5::Xml) diff --git a/src/style/CMQTStyle.cpp b/src/style/CMQTStyle.cpp new file mode 100644 index 0000000..2cbb722 --- /dev/null +++ b/src/style/CMQTStyle.cpp @@ -0,0 +1,60 @@ +#include +#include + +QT_BEGIN_NAMESPACE +QStyle *CreateBB10BrightStyle(); +QStyle *CreateBB10DarkStyle(); +QStyle *CreateCleanlooksStyle(); +QStyle *CreateCDEStyle(); +QStyle *CreateMotifStyle(); +QStyle *CreatePlastiqueStyle(); +QT_END_NAMESPACE + +namespace hgl +{ + namespace qt + { + QT_USE_NAMESPACE + + struct CreateQTExtraStyleConfig + { + QString name; + QStyle *(*create)(); + }; + + const CreateQTExtraStyleConfig qt_extra_styles[]= + { + #define DEF_QT_EXTRA_STYLE(name) {#name,Create##name##Style}, + + DEF_QT_EXTRA_STYLE(BB10Bright) + DEF_QT_EXTRA_STYLE(BB10Dark) + DEF_QT_EXTRA_STYLE(Cleanlooks) + DEF_QT_EXTRA_STYLE(CDE) + DEF_QT_EXTRA_STYLE(Motif) + DEF_QT_EXTRA_STYLE(Plastique) + + #undef DEF_QT_EXTRA_STYLE + }; + + const QStringList GetExtraGUIStyleList() + { + QStringList list; + + for(int i = 0;i < sizeof(qt_extra_styles) / sizeof(CreateQTExtraStyleConfig);i++) + list << qt_extra_styles[i].name; + + return list; + } + + QStyle *CreateQTExtraStyle(const QString &style_name) + { + for(int i = 0;i < sizeof(qt_extra_styles) / sizeof(CreateQTExtraStyleConfig);i++) + { + if(style_name.compare(qt_extra_styles[i].name, Qt::CaseInsensitive) == 0) + return qt_extra_styles[i].create(); + } + + return(nullptr); + } + }//namespace qt +}//namespace hgl diff --git a/src/style/bb10style/bright/button/core_button_disabled.png b/src/style/bb10style/bright/button/core_button_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..578a2383b871dfc427278acb84e6bc5d54a37bdb GIT binary patch literal 1510 zcmVL(^Az5!g| zEnxeq6}87@N1Jv3RQPLb;2q#jOir{se*8EJ#OG$`8iPAO1aSZU{bm8SMWq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OP5D45| zg6tM35HbwoSrOUvuw1T``qOpY>w!R^d}hD5WV6}FMP#Fn^5!ZqlfXTt)L*7)PO=uu Yzu6SFub|+GW&i*H07*qoM6N<$f_tBfb^rhX literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/button/core_button_enabled_selected.png b/src/style/bb10style/bright/button/core_button_enabled_selected.png new file mode 100644 index 0000000000000000000000000000000000000000..ff0850f616446d482d9baf0572f497c1fdc7292b GIT binary patch literal 1830 zcmV+>2if?EP)- zK~!ko?V3+$8`&MlKW{XWBH5M_WgY6+iItE-5_WTLPrEL42%)_c7EJIZ?Xo#^(-ztW z)+fWV?4=OWrpqP;=dchAJuIYPLR|=?xfDvV+d><%j%DIRBu>`09BVw1W`29n8(Wra zN#m6>YRQPlNSgQF_r34$`+o1w{2;(f)q9wEnCSxII_>dM?;4N?^68`L6<^?)hnX1A z4Ro}igR8(o`e@o}2%dSEc|!v;IXM}<`unSIWact^mzS428!@FXNhXso)BWkC4}SW= z^TEMETmQe1KAL{MEqLZ(rU%#y@cxDO4@~}LvR_2JJmS}!N+}uq{@~p8YuBIY|CiE7 z)7cvEx!Jh{(7W<-MGc-FJeJL7_W>?o0~S!MXn@o)p#s7{42S|oPfyR{5kiacKayk;Q>IM@GheZS7z31I3Uae$fGnIupEmNkV1 zt$g<<7k_p92S5JV=t{}lpD((G0EmE6C?Fm-+%B{9;!k709Uc4KZ~m(R7PM}1Ky)@U zn*_3&B@M0!16Y<7()P>idlGOz{N(a?kG%8l#}f~7>e)(>e9_s|{W5sSIM5aD{?55y zT6~nW#-t}uMa97_&x6pXBSWu2DIBtE<;s`jd@OZg^$67^w zZZ)`3Ro?5ZmlO~xxze7L*5}stT-B7{+#(UYPh;?Hb4fLpCpdQCzjty; z1y+sCH)+Ugj3+2*qG?qlVN*TTml5Pj#%#QvY0&&_@;0+}sN}K=R(%uZ0e$iAw32EI>Yh}+Xv4Wq^8``{ug7ZDpc8m7l1=q;KdEdkz@2@>vJ9{|QgoyksAd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PR~l*{`eUqHwd?HL z^r4AHwd=C_1lQdYWini4W#tv6E-5ML&4B}Ye;ItC`Ix{=S-!a6js5h;XYWh9I$_Wk z)B`B?V1~4GliE$cp91;q-C$UC-K;18QefHLn%7bHc;+JvKDBauB9FJJ{E6nm%eVXV Z7C}C0DdlSW#HP9bAqL%#R_+m=`X7WG3RVCB literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/button/core_button_pressed.png b/src/style/bb10style/bright/button/core_button_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..59b5bfa7c20c037b972297e41484ccd11390dffa GIT binary patch literal 3221 zcmbVPX*iT?AD^U1Sq`DBV=NuZtjuCEGG>e=TL{TEX2y~kGiJujSW=cmC@D+XQYlMW z4oVT75=RMTD_hx;Btk_Fy`xj-eLtM*e0ZPhdY=3K-}nFb`|lr~Bu9HoNeLwh001Cq zZAEkvuIj=!Kzyt4yZq`xhH%->6M8$#JkajRT z7J(KRWEH`tIY-#LP$GgU##GQgQ=o|eD@qI2|uqBjmpg=B{g@r=-d_IJ42w}1Vpm1Yj;|&f30xZ-3bHYQoWC1vYqxqA8 zNaIl0K`d?%GX%K7NcLlfad9A_r+YVQh-99{!p?!NT1AyP*w5p*L6uc95_rWIB;a31iSgxYk4* zNO%LG22rs_NQ^lFjYr{$2y+WK9F9R+An-_YGztSFp$RDCpB(>$#T&vb&?FKXgG6HB za0|FO2972fA(3cfJc2;N<9}kULpWS=2!;03ZjjLK4=n0mu~-6|M&>fvE=(r|oI3s~}WJ*xThP+XpzoI45*g-rRmBeN;fZy|r4f+TB7-I~=$Pi-zMV$StuGY*9v)hVaAMfP z(J0$;MhO5Ae`HO>y9fp*l=jn=Ex7(X)nl@X12R1=OXti=^wRV~^$HZ?%`A?b)jL?4 zh5=o*xyO22k`W1q?YdZv}>-P9Iwhj)7ReZWzJe`oVdGvZBY;~gBK|&GYDY#PO6jAP4 z##kKP35o4ci0#(0zf&F=07EagR#94`O*miM3q<2~3^A=$#F=p)tQ+>te~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z^1K0Xbaa%Ipz8AJE5e`vI>5y7@$pSf(~u(hy9Wh;>$=E4wg7j1eSL9dW#y@5Sq}#h zRkPXru(`SUW^HY4S7Pb7u50vS(f}&u%6)*@%Yzh<;q8i=aY~nilntGmjiTkT_0F*0F6ciUDqdM)j47QJ$Nn|xhH$i z?GYGNj6Qr`z!Zv1`0h)^^b``9FmF%h?)Tt1Ys8)i6!N~S;!^(o3`S#v{TBu!7m;UB z?;DzezNK34oh_}OK_bQ=e`YXpV|>hDG#ETrok)mG?1Pc>!D}Njsxo;g?^tAFkx@-# zuF*UgjcMXK&x7$ap`_8rhfc8%#v&7o%zv3Cf*=Stt4bPun16ie6ulmdeK7XH0r$Z_ zsgWuYdY*6m0rWz6o_Atd*1!U>EDO)`PX4(EOQq6_g@uKU@$vE7g9y;`ylBZj| z)BxJ;_B9f(dc6%)IlFVBQW!vLbaXUPtJSK2pGYJ=hb7tqSYBQZ-$yvRlBh}y z$(+gO^A|8_0FL8~0aJT>d+A&**R0iQZPdCa10W_RCllM-+m>zHhrn0UG*1P9X_}`% zE1S)>i^bwdp-@QJwk^1PS~ZZ%wrx=;6cWW^aU`3~wt<$!biQkI97oqQZB_^|uka4X z_kI6!5Cj#|G~Fw=+1+k;QV1~%+yaIb0oDQPzVBBI!>Dnc;uptvTKX@ezHR^j002ov JPDHLkV1hW+tJwem literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/checkbox/core_checkbox_disabled_checked.png b/src/style/bb10style/bright/checkbox/core_checkbox_disabled_checked.png new file mode 100644 index 0000000000000000000000000000000000000000..35751553e189f1e83015cab1c9748a9a7c1d3522 GIT binary patch literal 1702 zcmV;X23h%uP)Q ze!G z26s9s)wI^dZ~pkr+U)FX0eC+2(a=sAa1iL4`Fv(19*_HhJh1P^b~}TXQ%nIqz#JSL z+3jF?{od#EO|&D`{{H?y9zA;Wr~CKsuedCQVzH>JnFK&8ks1RC4Tr|v@Z16p zS5{X3Y}bVC$Z)LC2m;JBescGbvn|sBo0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C*PajI`@ozL%SCFY9~`Sw6LZnHv(V(fmdm za=(-C6^FFV1wngsJJsmh7W|71-#)}~U)}yyWBz5`?mGBfQ?2m2$9HwqxSqb9CYk@S z+dZ~>Za+|#@8gwvunEVX35z|#d4%&a+_z`>M`aWdaZUNedq_G?+4PZ4cNz8V9yPCw z@^ZUJxXtyXnOYA!-V1k*IjjWVMftF|kwZi>uivww!e;ikYNkq9!G%!@{;*^T8`&O`)7 zQEETl*Z|D2v9U?hG)vKF6tXPW1(jtP(P$K=X_m&u#wM}Z*0zDu+S=-L0@`lyDiNW( zyBp$P8QlOlFpZCt_IdY4tbA4>mUYC-VSo z;a(pz9|7Qd{`|Ri{P^+L0A2@!!GZ(;!CZ!xpV%n<;55V*};#VOf@cBBDSpmoulQr;SIC9#x(^d15vT zdgja--??+=)QcA{YF%AjK4#V}%X-n$(y~;W0=JAxrJ_la^dk{<@AdLv=D%&*POGZA zeP_RWm{l`ML>&MQVZC{}*|7@X12g~Q^ZWkAK^*@9z#9n3JKO%`00000NkvXXu0mjf D9QXC6 literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/combobox/core_dropdown_button_arrowdown.png b/src/style/bb10style/bright/combobox/core_dropdown_button_arrowdown.png new file mode 100644 index 0000000000000000000000000000000000000000..9ac049fb3dc9dcfb9e370b01d3b28473a29392a4 GIT binary patch literal 1419 zcmeAS@N?(olHy`uVBq!ia0vp^3P3E$!3HD)_;n_NI3=zTCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%s|1+P|wiV z#N6CmN5ROz&_Lh7NZ-&%*U;R`*vQJjKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8EkR}&8R-I5=oVMzl_XZ^<`pZ$OmImpPA){ffi_eM3D1{oGuTzrd=COM+4n&cLd=IHa;5RX-@T zIKQ+g85kdF$}r8qu)}W=NFmTQR{lkqz(`5Vami0E%}vcK@pQ3O0?O#6WTsd-JDM4o znwYp4x)>RlSr{5xIGVXQyBHf;I++-m8aSH4%)qAC(A?0;*wN6^!qmmk(9qS;$->aw z&BWBy+|tp=+0D@rrq?sCxFj(zITdDaCeU7}UJJZ>t(=Qe6HD@oLh|!-U@0IVBfliS zI3vG6!8zDe!8b8EGY`ZEMGwTcE~!PCWvMA{Mftf3;PAD|#A3gJnURr+lar&RF~r|a zhK?rA7M7OAhHg%-F3uK8P`xSSgqc3jG5Vmyfs|NaLckOVV#1R?kOR*=sd>O0Qv}Q! z2aHoDGcYjj_H=O!skn7#`rWj{2@=OA=N{8bm?E(1WqU?RQ0~%MTDCV|-r$|Gk^7cx z&%MJlgkCz9UcDStW^(EUYmc1DZ+n%=s`>Y7dN;JspRoS_``Sr+JYBArwi>0`wof2)Rx8WCq4<@YqO-`>VwKP8ya{{i2gM#&rhUop&UOTVyuIny1c(d*k{BwsRIt=j81<;B-3BX-0 zPmVi2YniHN&C!5yD!d6dJnW$;AnIUxX z#g54*WafD{tcqLTu3FUkTx>y*$kFLLKFJ-AxzCq0as8vHwQfSwD-UyXR|vKCiJ$(b c|3fT+;ndCbuKC;cT?7@6p00i_>zopr02X-j`2YX_ literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/combobox/core_dropdown_button_arrowdown_pressed.png b/src/style/bb10style/bright/combobox/core_dropdown_button_arrowdown_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..d11af56b71a155c00b46ac3a4af8a298f81866c0 GIT binary patch literal 1404 zcmeAS@N?(olHy`uVBq!ia0vp^3P3E$!3HD)_;n_NI3=zTCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%s|1+P|wiV z#N6CmN5ROz&_Lh7NZ-&%*U;R`*vQJjKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8EkR}&8R-I5=oVMzl_XZ^<`pZ$OmImpPA){ffi_eM3D1{oGuTzrd=COM+4n&cLd=IHa;5RX-@T zIKQ+g85kdF$}r8qu)}W=NFmTQR{lkqz(`5Vami0E%}vcK@pQ3O0?O#6WTsd-JDM4o znwYp4x)>RlSr{5xIGVXQyBHf;I++-m8aSH4%)qACz}(W!(9+q_!qmmd(9qS;$->aw z&BWBy+|tp=+0D@rrq?sCxFj(zITdDaCeU7}UQ4`st(=Qe6HD@oLh|!-U@0IVBfliS zI3vG6!8zDe!8b8EGY`ZEMGwTcE~!PCWvMA{Mftf3;PAD|#A3grxskbnKn^_fq~-y0Oc5|^ z@aVjG$-uz4#?!?yq~g|{X}(^E9VFU>MGrD_G&*EvED+eRLnwx$HP5C&yx{3xmT@yn?yUd- literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/combobox/core_dropdown_button_arrowup.png b/src/style/bb10style/bright/combobox/core_dropdown_button_arrowup.png new file mode 100644 index 0000000000000000000000000000000000000000..d10779d8d7eb1343eea5e0983fa5644939c20d72 GIT binary patch literal 1398 zcmbVMZA=q)7{BtO1ms0UHn%Q0kA+}HdoO*x8--qb6pEIW(uBGf=JoDcF3`JjJ!ruh zu`U_TxNJjXG81%}GyC9>#bq1WWcUKX_6vR>Dw$(J-LfoZ@ymosWOqQ>J`g|blDqpq z|NH%Z&&&UL?x?q^zA*oVd;kCn-3^pad4tNmGjEgf^cGirq#ANvKyDF3a-5bpfMmrW z2f8D4nDcQo+uL=6s|JAV5bqDj0nc875hHq9#pn}}sKN$->e@tO zQoKoQi11OaHD8KlgW6>|O2BYD9@obWdQl3)D30T*28QVrgf7-A$aF#{#L6=Y6c=M8 zJ}UE~0IG^~Q0$g%kP_)?3X!PCvo0*e)(WMR3{KEd7}Xl=BFcXUIzJp6y5lD$x+HNxX6>bSEV;-4RZZ-INVdzUWz=C7h%gF&T{% zN@0lEilSE1OgSk7hC7Uy2_elHjg7dd1$7um47Hjl6h-S$hZVKBj3$!>Co!jsBr{yM z5R++v;WB=C#qSyyc_x=|N*pbVl3x@%GacY<7iBTlE=ECTiwX453@@m*dOWMyQk=y1 zaI8xbBj8GX34R0rE*FLx9S#yVtmf@NNu$$>;|A2_sH2=#XpPJMpPIo+FtFMj|7n)Y zmePUha=rBxV|{oyL75my8I78uCxZZ>Iq#-Oe_}Scw7gt<&7M`(SU7U&(q|2|+phuH z75N9}^3GLkX(+utJDaS!ctl#x>O${o_cP3qPCT!a{5|-|tK+Fu{$1&PE%|YFl}^{S zuj!lefu8=+QG8eWhLqD>gqTbdVZ2g<4gQgrEJDoY$#8F3$sx`BqE)Mr-rRYo2*I$c z;oiSTW50zoGvf=lwaxjTryF|u$Hr>f(s0`k)&lL*L*x(}*gIT4LfBhdpS$?r6#Vv3 z?!BcakBcW?PH%m_X!_>OD;zb%x$NuC$coE+4 literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/combobox/core_dropdown_button_disabled.png b/src/style/bb10style/bright/combobox/core_dropdown_button_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..f9e1c9465be6bbccd69b35a3f2ddcb1e22689510 GIT binary patch literal 1587 zcmV-32F&@1P)_BW`L-5Io$uNLD0JLq`;1Yn@ zSZ~Z+6FxODwOfLbN~MBB-w*Acnw)B#FU&WsB`I0BwWW2jC)P86{_FFvLP`c%$khB96!7Q+I~%{3Cy#?~ZlnR>7yIrgZ=v z3kwT$G=B78E|+TqAOMsBm;frS1@L=RNC5l*!T^E*l=k-aH_uYf#+#d)89=tXr+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wu?coBsjsnfXe&AWMgahWx}*ssy)z_M=CS%J}#=lnW#al#BA- z2fjA{!A<6WG?D_^DHqvE)eb9BE;-Bq^Jbo7-iHAaiG=TP_L_RL*=!8hcl-A3{=

q&7ujB69)A-Qf%}H>-vLKN93ZHwdw}4rTerf84jq~Y=A+T* zN)R9#jjrT!xn0A1oZ6L zv!UVP;k@g*xkx0k^2n{AZQC&sIpBF-|EW`_R<2yR;(M%Lt6pj%ezfthCSHyoKOVk# z@nX!ftfZ>m35UZg>#ij8c0L{m1P+Qw?5#h%l{w0G*W$-Z{&TH(fx8&0F3M~)l`j*gCoPMkOq z?(gpps%p-4-H$ptIu;TFM-6vCEeeL+O_Z#I6b>c^hv-42C9^(*@;n^SUji^%i9 rF3Q#2jkXN1tg4>`+k*Fb7Tf;-7E9^>-R7o~00000NkvXXu0mjf3|D<% literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/combobox/core_dropdown_checkmark.png b/src/style/bb10style/bright/combobox/core_dropdown_checkmark.png new file mode 100644 index 0000000000000000000000000000000000000000..a8270aed56e62e64bf1987abd71b1d8d7bb238d2 GIT binary patch literal 1769 zcmbVNX;2eq7!IP*a#lnLsJJYSLQ9g}+=&FtDG>q)Xs|k(YXcFIjhlsVR7X<9LR%bA zD`-U>MQRm_qmEUJ2UkV09>or#pcH}Dsg+BtGGI3xwm%$y^qblJzW3YrdER?AKQ3mu zyNkaIi9~W&L`vg{eG&02oJA(yJ8RHkV)MggNq7Qkz-<}~A&K;;76B9{O)?UXX!Kc| znvgIO$=P5`Ov00t(E=T6qG=pDv`mwQK$A#e5t$Z^E)~H6Es|_B3&H0XFN1(lF9cO= zC8V@SkQ8HNHijf*$0X{qQ+0ej7!eMHWeNxa6M}1iOjDZKD##RqauF5)?xKHVvZcAPxj@U>eM1ak<=3fC0e}9b(X71{LNCm<#~~0h0?PtYLbC zAYLk;v_(ilFa^gg0y^Dhv(ao!8j2;;VLqSl;9xMQga*}`WyUp`RI@c`ib0B4b(qnD z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FdgVhg+0aS173@Vh>PA*we)^gyVX0Nu@WNzpfrQ0tDnm{r-UW|2N@iv literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/combobox/core_dropdown_menu.png b/src/style/bb10style/bright/combobox/core_dropdown_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..47e7b2d4b6e3dde1e9771aad9ffcbf832bb25a41 GIT binary patch literal 874 zcmV-w1C{)VP)$+f!p<1ot(E-Gmxu_C<6wJx8$&}wC>D!QN}*P(q1kL={ONcJ0Gymt zX1GQ51&^W#jPo^YLI7X#XK`NEHaBd>wvY&-Qp_M2*J3AN~8$&LagKgVgb3M;PwOU2F zT!v|y5JI3(C|n=T7(+gvhm;Zku(!8|X0r(?Wk=={5jf{CO%t|lLkNLj9xJp zLZDbI;^5!_rfDLMV<@H0-Kb$0NT<^n85sfRyl2df1d@E)M-ofM7+lwdl=56~`vwwd zJNP`iJv~3WxZiRcXr13`levT6!T$?*N0ZT7cZ@-)-DX#l>D2}Yscty?i*VNMx&Hn6 zbNqu;avw0p63vBJzm{Yiny$0O0%nKs`_F zt*@_7onBIYJNyR`VPRnbL?8>VZ zZ*+9@^<^)Yp6!z{?C8yg$XXJ%$B*L4l8wI`)~FNFBoQS;|54#Uu5j6Eiz;sDC5s+9VePN%y{ z=+f2}N3lah4*=W)Fmwgx34rff>(55YsN-MMFO%af<;#VQw*UYD07*qoM6N<$f=n+a literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/combobox/core_dropdown_menuup.png b/src/style/bb10style/bright/combobox/core_dropdown_menuup.png new file mode 100644 index 0000000000000000000000000000000000000000..2bde84e71d436303c36ae7ba78da5aa8619c8dbf GIT binary patch literal 996 zcmV193@2 zK~zY`?UuhzBUcoMznMG#jjdQaL3m-YA)!f?D&8^$Zn9c!#}lm5M7#l_K)eA;v1Ffs zZbdq8k#3bLU8=APEFuCMJCX(1Gxy#}5zojNSljGIq{xx(Gh-$2_2X8! zwzgJpx7#F1GCGxpL9tk5b91w{`on6oR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WnZ@6`a42vT6@LD>j0M&}|K@8sDk}Pq2)W`E))=yD1$uv<^Q;6Yt zmSuQ96ZY{`sKl`tHsoj65aVTdHbPQV6k%qi=ip#Tz)xu5&L9I zgrQ;A_`UOShZxG!;_-&rmL_kLmtwIZR{B3VBcL;c(;WY4meLXIKxezq`cPOH9-zXB zG2m!~b@noXEJ?)pP|`kkVz3jG@| zm%Utz?KxZjOUiY)a;XcO9V`TE3a;3>@y5jU)A;nZ3reDEf4y=$o9f#_5G!Rb_HwUVZnLx$Dww{a=raB3CE2{-EE< Q)6Q=z7H#7XhBt5j2STUH7XSbN literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/lineedit/core_textinput_bg_disabled.png b/src/style/bb10style/bright/lineedit/core_textinput_bg_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..ab1083e9fa02d804d5532950864e6fcf0f900b46 GIT binary patch literal 454 zcmV;%0XhDOP)NiT~rj(@DUMgPKKA6btYD`|)_3#Tb)5Vx?5g%%#@)CC~G13oMG_alhYx z0U#o}%8`fwfJ`Qnr##O$3;^EyH#!BfEQ2uye}P2=&N)<71rZ_d{VRYIFvd7zX3Xbv zjK^d2b!m*jXf%Sg7BR*L0AQT+WM)jKQzS{!8z>@BN`aXXLZBAN%wT4uX$m451U%QW zb$9`34tuvsN3WWV?tCq*JFA}ugPOUcRkwaA+|;ZYL!zs_kHew2`+q4DkpMsl;c8f; zX&4FswAMQjfwdOSxeLd?4d)!JwGa_#t#@t8#+c>daQFm3WmyjCLovoIFFx4ydcE-8 we}oXSx~_ZOev%|HP18zi{k&SOwzx-p14J9U168)o2LJ#707*qoM6N<$f=bV{SO5S3 literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/lineedit/core_textinput_bg_highlight.png b/src/style/bb10style/bright/lineedit/core_textinput_bg_highlight.png new file mode 100644 index 0000000000000000000000000000000000000000..55f8aee06642bff0a297a10e4da177c0d4b1aee9 GIT binary patch literal 394 zcmV;50d@X~P)f+-9DT&YAu#jXHA0>B$Z zoMmhGO5r^KAOP?LP1!vj4ZejzMc#vjqCB;K@nu-dlS0Il*+Wgk^q8vpySNBQu_bxCyDx`7I;J! zGca%qgD@k*tT_@uLG}_)Usv`!+|s<>&kwITbh@}Fs19D7*I&W)5S4_<9c#RLV`hB0uUrMFflMQ WFqofidL<8(XYh3Ob6Mw<&;$T6k{+=D literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/progressbar/core_progressindicator_bg.png b/src/style/bb10style/bright/progressbar/core_progressindicator_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..3ff930dea7cc95a381c7236bc2d4ea55354d124d GIT binary patch literal 1802 zcmbVNX;2eq7*2{@5sFlh!zo>YMI9j7&7DX{6E;yC0vLj#;t`X@1V}dBED}%@F=0w8 z9<@ps5yXmhq!lgJf?&k~s}!#RQ3SOdwY3IComnP$hXeyqi!Vr>JgRVh<7`qfKDT% zE@8_-xiK2i>K5c+NMcT$Qk|2o=4+^;C?L`-APDpbt^&;Z41-Bv7E)jH3W&Yqm`(*= ztKjKE>Kmt$reyWU{tL^GjSo6@bpaxdZS$ame^pLNEDGWx>;qULo|@C*E`~Rt!=^;$iHs9 zQ`@A>HX?KdVnQ=9HBpb$kV!C+yZ0M%C=%WX;xQdj6jcU{sx$S70gr)&RN{uF(P;!A zmj^-+mj!YeAcqG*5|)g?6T@sC#Fnv{pk$KcU04Q(#pUy*Y?hP{L68&@vn4DspUY-2 z#Zno_=TBl|3?^JLbXvSm*Bxq3_HEB^J5S_>di2gP_)UfQNtV@x;XF3#qe_eCFA%|uY0h5Rciav01DSy)7qJo zSKt=s61Kvf*IHV)-=FN!a1|aT7xz!^&zVoI%P`o!HWg|lUC(Nv(o34tmECP&1LMV( zX8Yqi&a?9?JG`ov>@*&fb<>^BHYP16Kd)(^SpDqBpC0G7Xc%sTdPUoVC!9^@GD}nM z!07c+udbDWGd~H7@=mzm>oaF;_d;uVE_Ys1_zc(HGtQrl*iN~G68YWWnA6b z+IsiZtK3`dQ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_h&S@R2vN~&1*~3WbJ9n+H?S<<9u`-xmJ) zia41A*QPm`D&p89haM`W1Pmc7g`@`C@fz0N>7nClWe6k@94hsbUd?{Hqi5co8O?lf zOCeW%bdTJmD2Xej91*dUQYfW-5%H8#&E#;h{#oGH2d|T&WK@ZAL`E5PzoCCg57YLS@m#x*+Rok+xdbivC!?x|? z3*hQr)fSOS5#j!W`}bVe9X5bdpe7<7a0X~#5Qu55b)irgD3{Agpw;bme~ZOp9)JoN zz5`JFp?KGI-BIK882Afl8R!|{0X5)QMEuRo&33t5ZUIgt61mrdDS-V~`w1Xk*{Td~ zZEa4WzW-I&u>AtmY zi%8q^JT^8qJOB}yxB#y1S4T|l8CXwYr~T0as8lLvCLaxhV*n?oCqtp%)FIf%pqRdF zZ*O-@p6Fk^@GjAP`s`5GeAi!kR;Zf>eyZdD!T&+9+_q!6DX*{ZqVel3*bjTK6)o2y{pGIZlVT$ z*|fy8)-l_*nV+Ax0kqa{{sm8dKiL322%FF9RpH8+zirF3b?Da9w-zFv4w>N$6Tf_FYJo!cUi9o zfAQ;!KWAoU-h`Zg4NL&v0BIlzSSu?l&ieX#G6;gxPN(yG?}om%V0r$_^MTS@DYf@% zFX^?tNHiMljE|4|`FuWDTwDyMr>DIj2pZQGETIxBAxcs=T4MDTg$YqIq?EERDGEPa dRTSP@{0&P2D!i1*l_&rJ002ovPDHLkV1lw*n4bUu literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/progressbar/core_progressindicator_vcomplete.png b/src/style/bb10style/bright/progressbar/core_progressindicator_vcomplete.png new file mode 100644 index 0000000000000000000000000000000000000000..f18e0abafb609970e75943965f4d56850f269c74 GIT binary patch literal 614 zcmV-s0-61ZP)j zK~zY`?Ug%dR6!Jm|1*!9yAL#C>_n7+g<@-KW04esv9ee}D+?RrqZh11F(~#Du@wzA z77AKeXe%NLMoB~oyURv%@7{ZN9>-!g2&>syg>7Vim}buK%|AagbAYi%EgDojyZCa- z$nwQTK{L&?IFO`SZt`?R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 zQrZ#%5M=HJ6)|H_rWC6Nd;ghVzOjAFCpK^bV@z7IWQn?I(6<%uZgB73y@u_6eiTm(YfCro`1gZm@!xbt3?Xf0QtVdt3j1pUgDfb4 z?=@K@a7Y4*Tr#`VJ^0BhD;NDH)ZZK8eZ{gilXSIX*N5Z&Qlkx z5Ga*Om5ZV{o)Dt$-n~1yc=6)sz`#H@m`rnj>9bWTIRMBLCr^vib*pFY+__H1Sjw`jqpGT& z%4u(p#1N!XDZeO+7ZE}{{r&xP)v8s|&6_tT?TJ?&{A#>VK;!|vXbb&dPm9><+2Wk` zg6(;>eED+cs#U8zg@uIzV=QV}R)ealp`4A^NS$vgl~M#j7%K=u6#&xQ+-$5{w=TAI z>(;cbPi8B4&DO1{X8}yx4y)Nk$i9okix)fYx#u2tZEdX#fKf_YDW%6%RUJ_s>3Nq^ z>bhPe2*Ma%Qi zrsaZ^($5t|>HUio#2SWCMhL0kp&S4p91gP&Km0JYZ{I$>zP{dQYHFhG?d@ljK~`2) ziW4VJ6fU{s5_#IRY0C8J)78AZJo|hG7-Jo>EO&k{N}3JB$RmV|;uh6^p526ajM*d0 za`<~u(tNIFnx>NwQkV_UxzUl&UK4IqVq9DOk|ZVZ|7~RLe*wt8YD389GRFV_002ov JPDHLkV1k0TL1q8| literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/radiobutton/core_radiobutton_disabled.png b/src/style/bb10style/bright/radiobutton/core_radiobutton_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..077aa79c650fb7db93e7f338aa97816fd1d72beb GIT binary patch literal 3652 zcmV-K4!iM*P)cf56?y)g8Zks>`J3%rEqu@bni42z)PY}{3QUnA>;hc%3 zB%rmlD9BL=y9on#1JP6j-5<1V0?mcAMSQ{SJ(CS z4_@OM28JUX)@q+rYN@*F)%(2P@BOa#fdAu-?nS3P=Xyi{E&vVy5&#9 zbH*KsM5NKtQD;WU*pjKF0|0VdIf~t3*L*%-IxjCzpE+~p*l#xeCYhU?Yg)Qa0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Yty5K1e&(5H zVq3RvP4REDyi~~nwF6L|e){R@bLY;TJ#O5%+W^SAu3vRrN+}2-S}+*=?$Dt_2R3fp zcsP^Eqhup;t9ud&pqdnWm(mAy~}R5_x&{ElRpnxDT?APgb<~*wKctL z*|K;r7|d1ASspKaxO7v=20*H>ulLQIIkWt(yY8xWyWPcH^<(Yr?PtIE;){W{wzd#1 z-H=kbjmJ4i8vs&LQbKm`-tBH|Y_v1RGKOKCQWT{xpLG}H{xX?Nktm8&2_f#0kr8v_ z#*OivJ9nn7#4AsJ9T>eRAo7G>w4{Ep(jvHYpDoGNUa-8+R-UWMn}QCJTa41AugOb!l6+Y)S0iy*q0eGgo12xO8t#xdLF;Qmp1S zA@?noEn8-L^2sM%b#-+T0A`wIw`rQE6-6oN9_g3^n5wF!f*?%7=#@$g4-Xryt*z;g zKKdy8!3Q5`SIqH4^IW7T0pPy-?vt9Dnrw}YjrP*g(p**_GEMV4S(b;#vd*6!p*2mb zAcRZ+a4|uRMx*TT;lr8FKmS}kdi1E)+1Y9K^z>YIf>TvhCDzy13)81hm+rp%Zh6Lx z8H(5IwXP?~80(cJssHD!@0z6`nx=UPA!Xd77L9S3Fn|%p*m+5ku1VJLi{x0kuGV!Z literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/radiobutton/core_radiobutton_inactive.png b/src/style/bb10style/bright/radiobutton/core_radiobutton_inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..cb4c6a81365f9cde29a81b3127a73c6f43744fb3 GIT binary patch literal 4245 zcmbVQc{r49+aJ3u$zzL(X`&>|j4>GdGL{)e_ARMlM#eHT&5SK;$dV}g5|Tm^*&|zI zEff_QOO{ZUWJ$7q<9X`&zCYgM{o}ijX4KqaU=6sD-GtSk#ufIuN&hyoa@AO}@eg(;{)Ai&=j zh+&O_b5*rK8vM4!7-@jqXf(1a80_ooEAI=FCsD3|p$G)x07F4Rjv*mO^(WG>esVrC>dX@D3^|8c>KjKTa1Or-t}6eDC{KP(vxm4|@6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fuY6jYZ{+(_gfjRWg7j;Z4fY{cVxz6S z9ih4NUC%+j`@5FhetnnYiv8GlW5B1#v-L(vF1&`B@7xrFljEX%7C&B1xY*I7a43pT zVld%}B&<950x9i_B1;wR1j^Fd#^yA!g)lt3lwM8+H*GregC2{rZKY>O4L)Ecj5Gyp z$M5XyOp^t;#5J;7Srg@ym2LGIJC*M`v!J&dYn38gR#rCn$NYy~4nA?(6q8fDLls|M zHr&I8uD0AzsVOCeS6E_y8$9Et_}D^v=wy1vV95nrM<=Io>FcMSnLlx;MmLf^HA%nl z29-HpfBo^>rjQbl7oeD@@D}V)6>X~TC%HT)u<2Fov%j|+n-jR&jfe2F;V#s~16bZNJjf`pL+CTp5BfXSBh1&jLyRi^| za)gnm?^b_;52YsFlNb6l^w!A>j<7Mz}=wdUL* zx55t9GuiU_JCIT;h}*y;;#tfBTS9?4yldnqj&%d{ckfP>=3LAI|42+i<4n=XL0gOi zRs3B9)%AI8XE>Dk5t5!;vSFMipCNVT;ppPDO(ajwZ5?1zv*%1cCoZR&Bj9j@Ga$v#IG2)nl`qm!eTO(w omE&3ZTV)nr`A>0svOsVy$47-5!gC7MbeN$wq?&Yxm0V?l}X8-^I literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/radiobutton/core_radiobutton_pressed.png b/src/style/bb10style/bright/radiobutton/core_radiobutton_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..88fd1344d2417b7fbc719453a4ca1a7ea29e73bd GIT binary patch literal 5460 zcmbVQWmHsqzaE+)q)SCcq5;fm`J^NXb{>k^qCkAwj;F2X3AUzRKKx@hV)-e{G9%gZ>i1xhix2ZIl^8 zAEb`;K!G4)5~B7JG7=yeuozfMT2@w81SBZ|mJpYa6bDO+f@Kw?Bo!niK>u9am)blW z92E><8vp3JTq$!q<8bZ@;^IC&K4LynVptC+aj?9+{4WkkNzqFQQBOZN9MV_R&GXi8 z1{liI-UIE9Lu1`QzZj8rSTCG1_obzOyMS>=ApRwG^ZX}Jmmw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u|L9Te2naGdXw?P4&8B$J%Zo=8Jo|!q;(VuX`wc!e~ z-Bu?)29)4Ou%gx+Rh}Xc+s%fW~p4IG|71 zv^J60=iaD<-suPN`)OWdEGJtrc887=tJbt@^QKHj#eShZoLkz%W{h9^ePlyi^a( z!OaF8>~Sgi(ziOXj&0xSxhJ7Z-QGE<*hdD^1}uq6_!cxbTQ**tpIjTtR<_iIa6S?u zX{gfh5-Plx<*AF&O4Ot>a>fg&%7`9E+{k-W}CrBU;&PZ&w9mG2OM<3trwi5^-lVHzO+m4LPbBR_^b6S9GV70!Zjv zBB_>Leq>iOuyVbO=vHml=1b}os9CY@UnSjC3r=@I#>ta2K51-RtHn3A!6}MLN-PSCmCrb)|BIGByH$(NUso7R%_;GPYD-f?10HPFdyHz4^hAV Ob85nMVdZM~!~O?1ap`~n literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/scrollbar/core_scrollbar.png b/src/style/bb10style/bright/scrollbar/core_scrollbar.png new file mode 100644 index 0000000000000000000000000000000000000000..79154e0568f75cf7e35bac47adbdb75e70bbbfbd GIT binary patch literal 1242 zcmbVMTWs4@7TbK-5*%QfQKPAL_3f`NMjN_RcH$@FeHS;pl=9Pj@zX0Q0)Or_BsDK z|M&fOFJuP?+FPG!#W1Wrosx5C?Fio8yU_RPwRH_G`+Q~CA96;E(9DwMRY1gff!BDQI_ZVX8}Xe6iG28%|vKkj4~ocfyRR)YpyXW=47>D z3rTUjX zH^C@(_cs(MB5%YOT@w{Wn~)uS(t@_1mg6|OAq>+Hd4*;KMNy&&hKlvlbgvYXlX8?1 z5-h_}Qmo0b9hPMkIhu%a0>vk2TA?L5kyKco5+sJ@6rO2f)3)bpwho(iO=P!$W$%j> zlP=VJ$IUy=M6(03CC7KXl2ZoBAr53T-LwNaD9>iJGIY(CprN{s1vc_4n%mfyqPY z-p?yLR8?)O*XwPyTJ4S5TZQm@l6L&n3pd}1kJrwe(b|?0*8#oQm1_U!DfRrJA7|F? zynf>1#RDyiU;aXNc6OdP@+Lv24j-;#?(*3O&z92ZJ%ir>?Bu0d?SV`43;VAfI-1Wf z?R+;x6+WH$`_D%fr#f%%yz#?lFLys~Ww{%x-(4?cOONizaz{VhclYX*E2mC}vfSlk z%DJv=NPX;cD)sRBT?KXyd$Qxm#Oeo@8T>7uY7xw l2~XG09W=V`-rC(Ug8lmOQsV9B!h3_iO9&WFhvYWD6|U%hEOGz4KUYd5+l6nO zH8-~XjS*q>S{YX~@3};>Sv&8SrwoEK*Idt@tI`?fm3h4IOODy)&`?<;1FLDx@vb+2 deb4^GlCZEP-TF&@J20>qJYD@<);T3K0RUUoo6-OP literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/slider/core_slider_active.png b/src/style/bb10style/bright/slider/core_slider_active.png new file mode 100644 index 0000000000000000000000000000000000000000..c23c0ebc26ff24d202e46adee2b09cf8d4b42d80 GIT binary patch literal 1167 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}P+!F-`7$qWoEGM+AuAr-gY-t_m737292@c#YV zHShY~9s8mFFY@fJYavXxf;@t`Y&|@DP35Az^b9#RiSTFM61f$8esAkPZ$*y@4vzUt zC#(>OZeq_=G})q}DL*rj}+hog;MYYU1kDj(kE&W>GQp8Dx-7{9rE zT(ZIM6vJ&1{0o>E7QJ`j_x=0FJ39FOQS(0wr|~IQY+z;BH2ZaNSoWn3>^a!ON^Qf}<9{(JeXeBM2N7AC0!L609E6KU35@FU2E=YY-KYO60Fc0S&_ zb?@Kz)32C0ReI06b+5E+!{$vbQ#Y>Pzhd^@(&U<)8p#IHES{rXiThSbu+8jHZ}OUA zS(dz}BrWx?N9g&Tj*AtUu0M9YcGX|^`s3D%0**kjgEOaoeXf2?-D`@5v7kSTgwMih zTPGO>HZ5H3JoRe&x%r<=Tx$B*%7W*$b*%q&=4Wtt+q#f0p^iyKY{4rWwNkZ~8dzIP zYuNt!#N8)mvF=`MrsK(r$@=HcpJksK6yWusUe})%q-u@{SLo& z?MCKpWhI6OsRpglhW>i8$FEv@y|(SWUAonXNBQ^m=LR#FSRXTJaJD*~`}XTqS0bBI z^~?Fb>ulGoUS0g@pv9eJuJ2l#U0Lqly_;8+_-xzc;)gqK#6FE#@;p7Syu5t35|iLY zNuP&dXQl;lUCao%eZAfN(rLr$?X&BvEYm=|-@kv~{qt=9*#s_?3WXh-UTeO6EBl?4 z|2*y4xi3rS{*amD^K8EJ$&?Mk^PNE={P%5kUc7iQv0F$RsQjebSP6 zFd-q~vvmD!?Mr2Elvl2@S4p!B$ohBHAlWfG`a-{O|Chh<_O;cozss+W-7O|EQT6Ss zpPN1zu?1&LOT8-Hc2P^|;KYf7*&imKFS5?xYu@2-w9s(RT80Ii&($uOwB2jp-=d5c zkNItCYipOi-X*;=ChwYw@4q8=^ta_+muS1lccAC^eZ{iyt%pgUw}pm!-h>a-{jZruirZ3S>zP<)R!f<-hZs<>+ra|f9vHa{bxlx?Q87h z`A^MLJzluVWeMW}M+W~ozhw+-ve!=E8}~k00DlG)3@rR5oGtfm{f3^ecEF;8!PC{x JWt~$(69BgK6@vf( literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/slider/core_slider_cache.png b/src/style/bb10style/bright/slider/core_slider_cache.png new file mode 100644 index 0000000000000000000000000000000000000000..6b7224d702f007fcc93727fb1ceb8fb13cbb91f7 GIT binary patch literal 1154 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}P+z>=CHs~H$r_&r@5Ln>~)y&3B*6E4H{;rX1o zrSW&>-j&*V>#J;XXQZ-|C+Ex7mTMuC{1+%}y?t$Vn^XM0R^BNhO)MY1_B)t}L^p~1 zGB4CL;mn-nc0DwFaz^R>Ig#bh-h5d!`vP~S=(Pivp0n3Wv=z4%S6CF!FlG?M4=(qwE(9Ixd}3<7+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/bb10style/bright/slider/core_slider_handle.png b/src/style/bb10style/bright/slider/core_slider_handle.png new file mode 100644 index 0000000000000000000000000000000000000000..076e272794b5e66556a599e91f4434b3931006c9 GIT binary patch literal 2843 zcmZ`*c{CK>7k@*HHQQuOjF7%rhEn_*5oRzl3<@RtQnqYmUw$+q+t1o$Es4YsWgBbO ztW&lzmZ6BUO-Mt+Z~FiDJMY~0dGDTc-#Pcbb3dP(V1_l|YFps?XPjL zGk49oMJFb(I~g13gQLIeSxadK)5Ga&XcGVcx6ogMfSf#0rV|=yWP*aua7*wC!>mGG zV*ucKWu$-AGI(k|KkS;N)v4Y##`}CnH+_Pb0KdUG6}*!Jo4N<3PWSi6;#qWT&Tf34 zco9`wT>Y>Xb4kLY$z-ah;(63qonN9%Lv3O*=0WnTLmB3r1oY~|>{xWLq3us11yOpm0~{f4!cIm{GbTzK8*{{yyS5$tOL;?X=HyKwhF z71)8ue+C!am7@bk?1^NrvE@6kk;PYJ1_(FChXgJ`e9<%E!l22yH)ZYh>({O}Ha6Q9 z78d7~ga;JC8*9byJe_Y|ym(;;M5UzK=#2e+ty8A<5fKMj%zz!Cv_+1zIPlZlF;ct{ zn4j*}2>fQY89>%zSo-*Ej9$!D+Q&r(y0{d#m6k4#bSH|a(5LI^_Ba_{)^8H9j;GKP98{H^0`oH z-*$KjWM_D0LwwD|4s-3(a^F_e)cEI5uODi_xY%CYd!_IggAffbmVaEN)=f{iefzda zR#w(3P&^%Bt*a;2&Z+=EF!b>8p}h&+S()2H-WzX~9#C_!iEKun=g~;X-BmOixnpcR z5au~iQ3jPxSR z?WLjpy0WseLKqybCX5MAt!DiIX{Ss~9ER@yT5qH1S}C&a!Ra^{%E!YabRo;iZcl>K zdk%&ickWo%KUklN;ORtc%03pJvd(7fL=d#2B18QAHiLM1d9`FKcr!j`n{{M@`P5Td zB>&M86X?Q_MTsC3aB*?nAlX*l%gM>v_>W)8nY4#zS=+s58a~~hZ~wRUCh}f_6;7u6 zv&M1e>nIe;I4mq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F)?w2XkA?t<4R3n9MjX& zON~&4lD7>_O!5PrQE4jntuwYvU5#Rv@oM_~Ww85f^j%~#myiuV2gugdGN9HtcE&Zc zLXUef$q%1q&%+)Yy!+#`3TZM)?7Vy(-t*_qP9vYx6%V0Rd>`t<coo)wX# zk?yY!OifLhrbu3%K(Qw~yXep9byTR$USji;InH{2d{_;*5wkKgH5ePSO{C`La2uw` z{IT~JsG>{+bX!`66OYH= zy?*_AVt;@C*68S{`}F#Q($VjEm&f_`!doGQtZU3PQ@+H9Z65KnJj|sth$a|(DnZY|e|7QsNI~gW)M}hKZ WuEag955dea78s$h`jxs4G5-Y}KQ*EN literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/slider/core_slider_handle_disabled.png b/src/style/bb10style/bright/slider/core_slider_handle_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..5989fcaaeb7c0fdb0428aba73458bf7492bb7fec GIT binary patch literal 2708 zcmZuzc{tST7yk|#GGuM6H(_SD8Zoj)2+^p7>{ph-M9E(EG6_XPQ%zZ>(a1>1 z*a|Ze?r^PRABxZrWtrdf`}>~vIq&CrKF|A{=e(cuE+^C8&PG&NUKjuXQS@0WM;>B- zyAYT+8?ojvJOE?P*;oPG-=n*Bmh99eme+wR4U6O1*6ax&Ipb}6hxtd zgB>tW01#G2Tb*`_8C`jN{k)T_{73Fqz#ZeJ-f;V#M%R{7c3_3P~U9Cp#TSl+?X$Yc|?3444;5fDzZcw(oSyZ`D(&)ObKzW$_yD)QKTN2f~1V zdwP17>sd*S#PV_E|~~*3i(PhAS2=tjCmBUX3#D)2{I#*-Hmh*4A=vyLu;XDghQ&pNatD%niS{ zhPK^+JzvUS?-OEwtj~Vj(z^U^qbR9`Wr#w7E(~G@gwVM1%F6zbdh$3WfZj7bJ^gB| zKJ+54!;()trl7+OWC*NjHE-Y&S??2*^-Fqlb8~Vm914mJtR1A!;shL|BP%N_lk!VS zjHC8&Tlo zZ#MX}KU&&VcV@u;Sl}&5ZVs7v$Lgk(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S_A zYMSJlYx$@X)4ILAJrO+_%QkE~Ly3MWr)eH+yY~TvEXCu8#zVGNehcwYTjWL27D(VU z(8p;#75`&*`U|rvI-~e&|J_2jOi)`uI3zAE4k3edn>wbYm8>BxtlY13N4r^m)-kKpqz$mboF z=TlLs_4Gj=WuUF26Y-QlAXrIvZp1K*k@U8!b(n~V2!HPWUb0Ed+7w*nxzhB7p5olP zbrUkf=8isx^jCcoiA3V^ej7<)2m~T@c-p-l-j!2=wQ?{+Kjv_GRuRj_{S)aQwb#QC-9b|qF*EC++RMeXy~7rFzn5EHP*QcYuH>{iO@{fnoCL;6UxXWNcx<2>Vx+P#HTp*QzU6 z&O;^I^P+aG|88FLyK?wd|Nm~i{@;(GkMHxZicPp}WS6S*`bPkL#?I=Mh0m@30YqyU Ay#N3J literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/slider/core_slider_handle_pressed.png b/src/style/bb10style/bright/slider/core_slider_handle_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..8cb79118b9a2103e23ef5666c9b241876a01d4f2 GIT binary patch literal 6577 zcmV;i8BXSjP)(d9$dShjrIU}9px1mXb3;V>AROb8o}u-Q$*F3x6a zvs+t9QJc+XYb(1|PO)LLjBJQy`H(%btXmo#BhB62Z~y2X z>*>vVJtHI8l9r}k^$1Dh>G#q1_xruqzyAGzkB(`1NHgM7HUtX+)BspvoofJ8Q$Mi; zfMUJY0i343*9D->8chJ&5b%$D1m^NU_yDW}umQk&02S7Rr-xykiS?Rru1mJgigi}4 z*9w4M0LKBm4d6`#{9PY`5yPkfa4&$(0OkWo0nnI1LouuY>YP4g>YN^FC@M1?06GD@ z0^lVC{B0kBX$X1&+zsF^%S@#JB&oAT0iqQ{s522LMq(7BFmN2!*-4$9mbu#p;1vY? z!~eg)Gz2RFJON;<^%)Wthy(+N2ZdHkE?`*2uy7m}5C;I4_1a~<=dS_mLcrfMyTLRB z=UG6uSQDH85VuA$2elX+#ejh$QP)K)M&^J~88B(pbrR0AB|1 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o$@m@92$(MMsv2pbkntYTpk04HC;v4 zdpve!o5zj8VcRXz5n8r(i*`LQr%Ss+jzZTvsN zEJ4q9kY%@Q*h1TEleuhWZ6a;s=^I6`jnxDCP00RGO3?PJtPGqrtu@=fA>jYbR8HHKxwqaB^ZMdgKa zQ4H_lAztdLi=&n_pq~MF1_6I`s;BJACOw$u?Fj%|tcg!>d`$}C{xmu=s}8c!85@l$ zf}31+nUZv(qY7XzfL&8%wyr*yF+i0Tpsm(tNHDtsqK;14%GcX%-77Y}#l_jmCswqz z3ju%6m7b!j17-}67r@;B?t`3!O#x zSJFO)ek7t7=7Xq>01jSB-!ZenWP&P$S&w*yb*=$WP3?UxVSeK@#_n)-!L0nz2A~N* j8v_0jd~|$tT+Z=-#_A%3Qo~zp00000NkvXXu0mjf{{&y# literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/slider/core_slider_inactive.png b/src/style/bb10style/bright/slider/core_slider_inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..883653492326a05c4e18cdb7bf3e8b4f8686ef06 GIT binary patch literal 1162 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}PsxmL6iGXn#QxTlL_NX4zUH)B1PgvzjecwYZZ zb}oOqiER1ZV}&J!+)mtF+m=X|Yx-W}UfJzX&MJ9m_Ox9ZyIyXZoxqvY>?-zAZSTwG zgi_7!qqA@29?a`f`BW|AULF&Cyz+kGz4dytTJ^RCNr<=2lmC+_aZd8w!-r=o?-w&D z;RlQUTWUT(sIRZr&cM?3RJ(32`vT?*v;ED}CC?~t*|g;mdjP+}4|(5W2BVMDb{tIT zyZP!<))EP>W&7u@+w<$>)f1;ad7VA?&QFx#O33v$$7esbo_>GNo~vJrt~+jwUbb>) zX7@pv$xpmKi8M$tcIWbHZ9RG; zO>W!9{y$+_n=5~>4$S?!{Py;JyG`Y}T4NZpdwqK&*@B%`ZVi!fc;NKD^@ZEn;Jxbc zHDA|u-D1;N`)J`?+0_k)zOk9@|NrT6+uZnkA78(<%oi5-UYuGqW4%_p z>@keAoPK7`%GWQXuPGT?oZ>!RC?D1L$*KED!1asfHq+186c)cqYZVgpSbj;7EqGPx zS``g1gQD6cW<~FUwlCjyG5wYvU+}zJZt+j(VLvWuC2>dbCUMBU8h=*HN(sLdLnzGyXc4 zes#O|p@V~=Lel4D*qP@3Wto<&sk_~!wkPlQx@__~fB)eGFOeS31xixAvv$7uwk$02 zYSEN`VP(~e7cM-g!q^NR2Xh5( zTU|Z7U+?O5c6P3g&vBhMJ>&Lnp;h*ZQymvns4yGze^+2PpS|<>vgdYHYs)^jZ``Y z?(@$d7rhBI^4;v`BFFwgqJh1AawJ3jj&-}=eXV-m+(7`Gx;$U&8gpo-lKwwnslnjs L>gTe~DWM4f+6gR; literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/slider/core_slider_vactive.png b/src/style/bb10style/bright/slider/core_slider_vactive.png new file mode 100644 index 0000000000000000000000000000000000000000..03062326f2b4f1abcf5b079660409e7c5c717201 GIT binary patch literal 1077 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}Q1vgWMg_6!Wnhdf;zLn>~)y&0Pkohrfp;dy28 zr@~2U-j~aAXH6}eyOl@Ebwy~qxTA@2a+7n}Mz<>ACE~?aj_a3*yY3O*uhwHwq`ahD z=}gp;-7k;MP~x*UTX}e^@2wQWT=z>RXDv^jv^>sTys_I!d&%J)|KC58k*j!U^ZfkJ z2bG;b=imi$g?CPg&p-XlM(2iVOM%hmP!2~Yj^3G~iY_;cPXs#|@CT-uK2ALNwyAY8 z>tunZ8UHQqD$X@&H@P0X`b8S||8V)5SYpN9gT-~6op_W1m| zrkcC8vl6deIph}St9vhGo!TUE|8}p-moIO+nx*@4*S~h1)6yKvPF~W^oH>(y#>`{$ zWTlP#_k40XzVf=d?p}AgY(yKf-st`Mmx0+Nwvn$0sK9J&KJ=a1{IBpwl~N#xF0qI<=WT zVI3zjH%7EYExkF7Lv8DvBH@YI|8DK6eYkvn`)+^NpUGU;keZA6euKN4leE43@xjOfKXqa?i`~QNsXQC$?8yj;83L1Y` znxV!%*>CCIq6CAC!kyp$3zlvZ+_^XT^XJc3-B!vTH0f{dSg|8CXR^)PX0hFS{!cAa z-h-ijT9Jb&Id2X=PsY2Wj-YUPGC;s1}y=WlgNi`^~F)w;wjRr;Wbe{08z z`UU$}q)g9$Y5jZu_OzuwTVnqh%JAKmUdq&zS!5u7Z_kFE)Bb$1Hl2RYV9Tw0tG7ta z{9gQe+j{$cAUN&fvMlqSvw^RXfyD-27wd=94_&?RBDnlh@ktlm`8R)O-aIp@^857u z$M5$ibFwf^%AA!Qw)(4GQ|3BerA0@k9@$m$`q%fLH}&m+iQ- z{y6Rbb;?q`R?^Bd?W33843kUxCH}efxb^vY_L zEbL|=5yEr$hFZ^G`Mxt*$Idp@-q85ne=4;&Pwb9b%Y^cqQTH;Ru1&?8M;I6y-0$6Q W+7qk4?!D|HkWx=qKbLh*2~7YaW#K^p literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/slider/core_slider_vcache.png b/src/style/bb10style/bright/slider/core_slider_vcache.png new file mode 100644 index 0000000000000000000000000000000000000000..b0d94d7127f49655495b25ec1937fda7698a84f7 GIT binary patch literal 1063 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}Q1&Q8@^>lhfAw|KfZhE&{od-HyFbgInpkMF-* zs@wb3nR{pLHVE%pyCyq|D@gY9B963Y{t?`%5?jsr4$4p8t8wpKqmM-D7o)%IbDVe0 zj-^xi03*;L z_<+sx9h3LhWG)s-I#{RJ(mylSi9^U~#+e)r#V-LCAGipn1k2LLO;g;uCQ)Dsx z|M%CEYOy;4I;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ruxV?};hnVE(N*TY}Gs&?$y@uEHP2GjPx_C4L3yQgS)eqQiK`RUcYQ#57< qc-<_Q(cLfmbaAQ@ez3^@-hEvGr4^qT`+b4=k-^i|&t;ucLK6URzQM5o literal 0 HcmV?d00001 diff --git a/src/style/bb10style/bright/slider/core_slider_vinactive.png b/src/style/bb10style/bright/slider/core_slider_vinactive.png new file mode 100644 index 0000000000000000000000000000000000000000..18a9819af85953c443ac895775738cf74f596568 GIT binary patch literal 1071 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}OhSGGocFarbg9#0p?kcwMxZ~A8_mx{1|_+Dpx zIc1Vs?&T$K^Llu@OZ9sfIo*AXwNxd}F_{^P?O)sDEo6B}ebKXC7s%v@F+EXqmEX|I} zV%?D+EAGh2$XwAmttEJI+UcjKlxGBQ+PLpw`ZI^6K@Yu!r=QbH?PC6SQ9HTs-wER< z-`ab2gRp*MVS0EN<6qgH<^P_1KD<|d@5gnUm*4lSIl`gi@rr9z(T|-k^SA%iSDSoN zOK_)(r&Pw&#Au}%U$2((3+@cw9^Ch{_2}olhs7V~?%Vg+p8a0jqX!SzgXL?po)zu1 zGH&NN{KC!P>|-URUEiLX)@SJaTXk8Uhhyj4A9|jO-&m@$oTo2;_UxI7l2V#ocfu?g zpDNqCE7_a`J#+1U`d@jd7G&$ZGUU~Uz*kN{LsXP*-M*ha{jThDm7|rP{Em9+X!@T$ zfBw3(D1TGq|5^hp!N7F)^rdwh_Gd}`I%&;2H|KJMoTTJL>8VCdne(&+1M7Fx`)jBD zGue8oQ~K>;W~H??=2E>@QcGi5EE{=drBWn9fZUOtoU=F>-Ex9_eO zdi?mYmf*zP+p{^Ac^-OxC{@X-W1o<%%+3#o_8yx1K0Vv|dw+ej7we|a-t*P%eg<%{ zHE+tjE$JF4r!eE0mXP4tdo%7%GOybo{Nw3v{V!{`_-!k7Q4*WE+j8x`f5(sK|Ki&3 z=i{?ON_*!1=+qlwaY^$cPl?R`)*mOC&Fwlb)xZ3JLGHroOIy_r_Et@QJ~z74^+JQ%bZpatIrU8 QSp=lc)78&qol`;+07gUTF#rGn literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/button/core_button_disabled.png b/src/style/bb10style/dark/button/core_button_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..79245dbf1152210594327160557e9e1cb1793583 GIT binary patch literal 1291 zcmV+m1@!ufP)jt|paYrPW*ccXd?aH-X zbmM}saNUK8QJWeUt%7c3gE7spfC21?rjW72bY>p!zUzYf%4L9-DW(v;C%GYS?z!i? z_dDm@H%vY_K@(4!%rE7efB^7;7aEAW4TL}~JD9CD1fE~Y`#_rpKCab(Qg$#KJ{3H_ zlyB3(T>JQ1&+YGSU#?Ut=i@kj8E}sPCLPDgrBbQ+i*H{1_WEbn@9WP?*}-h-Q1JXx z{tVCzaQ>C^?`&*te0a>$*E%~oKcD|){!9J*C_9)f?gL+0UP%Gz#l=PU(%Y9ljiTs+ zo{IHQ4c3yQ2cGB6-TLO%CqqL+64>k?=&zDYYHI-)yD~PZffXQu$k;$5Bhu?t6h#-t zu8h5}aat2V$2he=`N3pgxm5CVZx z%GJ)vXa>k+GQO1ZNM$aiq^GCH*N-VPo>HnsAP@*qU+sx0<8L#-_V%`Dq`AW|O#GV< zh`XDr1Avv`=p?6U#Ns$MyGhl>W>2e~lzDZRtZMYl_mo>s?PFHdfs1F3|13Kar-SxW zmGkHN-O1+M=KTMY^An~0 zu4>{XN=(?^tY!i;-;JU6_TU!f@#i9fr>GhA}rBbO4 ztpt>2!G(a=*Vp%JE|+_QUFD_%3c$H?x!iK^-o5zX(%Ex$Dt+QVs1x<|_V)g!SA{0+ zHGqkUi67XNn=oE1I@yx;TTKAiRsY80QQ&UqvPfSca0LoIzMc?-y9&*|3*?{l5ZXY{RA_CDM2NP}$4JH!80X^u! z1My%?lo(?4K$_^81Bnp{#zRq1LnwzD5?W)~7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&9n}FE1ZQBoheSKd`DMuW~xxbL@Y0vW}E?v6xO;b}-pMGW* zI{V1IRElvyM)>;D)YQ~>@#4jAJd*(k>GdenYIv$UYDWxVH$H}mm3Uj$!gK3)WKy7z-cjKv3r=CwHlkKTg zsx@c`t*fgWN+c2k$BrHQrK_v!K9H7D4%oImxk#`pnt*MZW()aLBKR4%@a} zKC|CnT-R+7LTo0Vxm{NQXbPBAO5L?AYmzXQe*tT7ZO~WQy4C;y002ovPDHLkV1g0X B8dLxP literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/button/core_button_enabled_selected.png b/src/style/bb10style/dark/button/core_button_enabled_selected.png new file mode 100644 index 0000000000000000000000000000000000000000..7b1a6ce40b582827a16b1ee43c240e959ed0e289 GIT binary patch literal 1665 zcmV-{27dX8P)4gF1{08Qz&{tl z$#^l57y>bd^x)BOFfky(cmM>wKw?_|wQ1^>zXiK(X}j&tbZ4H2eY;GTZg~Yi@3Co9B7Y19}-?uBK@Nkx1nFjyHCEfBf^~x7GFO zct?D?D0pHx(FjBVw!OSiKi$k9Br-y1;n*bM0wzH&v+v=-$)4Uja+N1v0(? z1gRO-US=|x?cIC2_bHtE9H8c#wYmSj{cWjK>TLy_@d3L)1JDAr109Rhc6Gl&$$P#& zWGa<<=is4(t$;c5_eiaO<`%%!pRevx*IZu*8n6*)Qll5TVCok-6!l$_)8tu);SkD6*+5r2PD$~u8SAVi_H=Zf@wM**f{n?=g@ za6O49AN4s2coJMslCnJ}*KW?aaCDJ=^Tk-CAL$d+0LIcft~ZbCl?ZKW0Ap$4_a<4; zHw#>?RLOX<>Wn7JrU4In%z$$d(L=cNRTX-E`+i=|iA3a{a!sLqR0DP^{n zl$GT#0vaI}qxAF4qb^X6Y&p+Pt3c;c=4-jK<gyTRjVlB;W%i@+s{VqPt@M!2A~S9iM<=0>rc9)r+MC26mu z!L70-wVKwxqE99&c{s4TcBxf0xRrkh7#{5vJdOGn7(A)wAHNqd;F zy{bEwaJR@jMn7Ls*8cR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HIlURBfeUi-3k%0)>N1F}+Zr6ZhB&_OXxa18rRjDV z*K)&qZY+r1T#M6Kr}ev!-HMugWdH2wozxp*!=QSS*Hi?n{#Ld#P5469`OI)>_&m-M YcQ4$yF_N2|X8zL%;)%Fr{&8FX1CTei0RR91 literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/button/core_button_pressed.png b/src/style/bb10style/dark/button/core_button_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..c149b64a26eed80033f1dfe18aac857a27be3c3e GIT binary patch literal 2853 zcmbVOc|6p4A0KQgQ7pNSX;!Tqb1}vY!!kz(6YCtuY{twFgE`EM`{)sywveMsa+Huo z+6N)l(Sc}_tE5CEEOKA9ct+Rr{IRe7&i4 zGGuFlqiEC;y?(nSMc=id%=4l_MM$Iyow&ZjFghOqSu(jk0GQ0C`vHysof#4Q5HJIQ zBz#%UR3VjOhh=ctQ2MqFG@Q*7p+O)si*O#D5eNvuK7b#KgM-Z0HA28FCJy3;qQEIU zJmAl=j^qPQkw={wk%0^h6JlWwHVem!2-tv-4i0AraRk_K9ONS}Ry5zp>zfj1-!eC)xVbCx`D3|XCLtrqNZ4M;TKxAPch~Nn6;RYPRcV8F? zfPleg@q{cc2fWQl_u+;JaS)NxPgh{`D3q_n9Kq*6i9!Yor}JP4C>+LSZ{O>qwLs_y z{8z@`S__;bcmT{15O72I3{gIOzxx6f#qOUSZ5xWzVD0%VQBvqZ1TG_l4RC~H0uCZN zfihW4tO){1FfukoqK%M9A_9RhAsSoajZg?8#tK6~z%9RU{2kU9Ni-o@;qfLYlnDYs zL|B<1&?F-i3XQQu;z^cYv1E=wNarwsFMe4fzn`&I|A@un`2bzWAs!JjMS z3jDb|Fy09TrqCHI&h~mcJ)dq%0Qjs>fJx$W+2D`y#j^g!Kb%Cs8xzqY#YniZNWB%p z(g<&Y!5AV)Rzw2c1o9cn{C{Ew6N!Os7svk;%a<)t1#VBjmcD55wRr%JsAKq|)==+R zL4ZIzUC0DW=kS4-onAo^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&uFeemD`Z2nHNYk6MZMqPdJ6N%oG(pPzV#~){Zm~M)b*wZjO^v7<+_4Zt+ zs6UTvkW=U(55<){IJOEzF(gmfeqVBCKe@!ye}2ePc4=l>Yt2HYpCz^5^i+`(b=4I_ sYqgO(u9i&IqqKrTZnpn=erty^Xs@HRAlW7wzWw7$CLSf+wDLajANt$giU0rr literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/checkbox/core_checkbox_checked.png b/src/style/bb10style/dark/checkbox/core_checkbox_checked.png new file mode 100644 index 0000000000000000000000000000000000000000..5a8af330946553414ab9afe7a970ca3580a54097 GIT binary patch literal 1947 zcmV;M2W0q(P)`fA`Le_ZizI#db&=J2pfF6-d&cptd0KRH7(_(jpZBAE1OLq!dc1 zg+V}}N)SQh6G|uvl&a+eA4u~uDK#afB?u5{qkx-)5Wkw>`W4%Wz22SKxt9<7@a}qN zy?$mFj&)@1$h&)f{-1O1xpxNs$4%s3=<4VS0ToF%%7nuOY`|`4Y#7fA*wxWx09Am$ z%tea=qYaG>E`XUP6`~sO?fKE3r3Vfk*ycFSTCH_WS)`#5{g!3Dy7dcNf7<+L^AI3` z!L)+io!udz>XDs~EI)MU(Eg;7qxtRG7$=mR)@{P^dSa4PA# zjCzR#s@mGx9snLoG9>_o5Iz9gwl^f9;>kCb6QBYt+qO3dAxJjKbPcAOO*jdq0R65z zJ`noEm%drItZ8*nX+Y~zDLSNp-b?2qhxYA$gXeMCVFN|4c|CmkGQ6-nF0(j%P zjnWlnMk#4PXYk}zFzpe?#nl>Bf~BYdS8F1UODXeb5>C4Nxu^koVwNRbNa8?a2QtBUcd2A5DUNFWf% z0<HDfv*=($+rsQb3VJn}g{;91OXF;PyWv@LT5C>rj$=#s&6cJJLc}j1F*9gsRy|Zd$bKVc;HksB=n@_Isr4`g#V;Ba8VIZaC zo>dYU=ZSNQ_tgm=T_0dcC`2d}$_w|~3&VW<`75*T(w@aMYHq#nSYERq~x&=uRuzP zVHjz+)a&;*CiZZCzdtWr>-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O3YFK`8|x1X4;!0Q1jMn;PR?qhK%;#(_u-!ihJ=87Ng&<%Yli zoX6bEQ|~Dl2x{m*bQr3tLahiVF`r7|!Ts?~AH-DcMVsZ82ct)-!aYkR@!P$zT3a>u z)WJX~jEDorxeC4>+?}}hI+8^9%X+#4Tzt4MjL zNhTNy<4|m%DqJd=d~3Lkl1xqJ^R>d)+J>d2MPyc1YKPOph{ld?0H@>L`0cuKTwO_~ zKN3SI+yO!eY}-aMF@t1cwg$L8h#o$gFXE~S&KRgt0w?oucjNWJ)s&7)szMbigb?WJ?nU3hXwfYX51d4c z5Ku+FOHmjrHqQh=D%lvgQl3qfiB~Td@bJNX93LD4p)@~sIX5e;?w&rhx3yzeAOuzA zj$4*1mrN!wKK5&4l&fc&n3^f|D7RgR*VHHB~nd* z+tOycQ2W+GN-0;}Q%Z?sVise!er^g}xq@}{qSKR4KtOQvmSv{XX?^2?H}AWIG4@|Bmn*(bX&A<9!!RCt$vr8hE2Z&R zaM26^1cSlC(U<~PJ@c)pv?~ChXN_K|ap;zoAfQc4TDa$1`Wn{AF2I zQV8*4Eucav4N^*b;GK81%kqwG+q1T9r-cw!#WveCO+Te{FY+(Oa*u$S02XcAp68q| c;(fCJ0kB^aU>AAotpET307*qoM6N<$f}Tdz8UO$Q literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/checkbox/core_checkbox_enabled.png b/src/style/bb10style/dark/checkbox/core_checkbox_enabled.png new file mode 100644 index 0000000000000000000000000000000000000000..5e51e7f39b62d0e9967c247e2e787933fc46dc5e GIT binary patch literal 925 zcmV;O17iG%P)G zK~!ko?OIK16G0e$W_HI-x=Jby*;0kZ7CaV&LXSC@p8N}H!Qv^1h1@*Xt29FW1wGV5 z3q2J23kpI&Z>51hOnV56?62$Ls(p57Pff^Qfr< zxF(h&36B7P3&1VUlz$H;*gR?~015zdl8a^oXqRWo0RX5yri6?G(AHk8O>Dg0ca*2v04M;fr(o+tO9xP>KCRx`+S;lMC1s5E($dnC^_S}( z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Js=J}bEs5RZICLVC_z0SP@uhZ55;jqNr~;)#A|2m*_|Fd4&%fmj(~=i8ELfg z&c|=xf8LuJSr6F9LOV5P|H#Gx!~jGAMD{Rm13(>spE;7**b_YaC>sUPE5R>Yd;sg2 z!4fyFuH&RjIrM>%er^^^ywe3etq?^e7`<& zcx3&B@LV>R1YiTe`0?>i@`e1xm$cqby_5Rp{=NI($=}uC%y4NNJhzmy0Q9-8Yn=J` z%vYTAQ?e6TyEN|V^iYRb+w!Qqy;W&jY4MiGW#S8yQ&B9Vw1@1gQkS(|JA@10}{i|yx;YPO`> zP0HQ+Z0+Ao+rC=<_QK6>*YH)Xxt6`_P3Bd~{>E%F+S|44FD<2ZIPGv6t{qOx{&riw z^%^B!v#~GNENnzme9u0!oV?r^(Zqh6uqLjN13FB4jJeX8kGP0Ow= z*ADmpyhagT?>|zcuTlCMrPuuJ+Tr#;J!wl;Sep?5&}cMZ7)E#N$e5b8COW}etR|dM zTeg-`ssKR+HY7)=YaReFLDoDu#6bmYnc%Hc_06YP3(D(hG#l^+C zI$0&Dz~JEEZxUWtW%r2)Gcz-Dc%E+B0@TsW;#>u=ju$84a@oEr`>P+y z0EE-i)ALexzs-VbwVH}VB7;Yd9-Vew_d~R&psIa$ic7KO$q00000NkvXXu0mjfgkP+a literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/combobox/core_dropdown_button_arrowdown.png b/src/style/bb10style/dark/combobox/core_dropdown_button_arrowdown.png new file mode 100644 index 0000000000000000000000000000000000000000..4c1d085360a25d343c3ff8a3205ec0c570f0214e GIT binary patch literal 1404 zcmeAS@N?(olHy`uVBq!ia0vp^3P3E$!3HD)_;n_NI3=zTCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F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rTAwo4FFja&PZ|5aMRhC^3^R@%y}{X9^%qng Ndb;|#taD0e0sxh@?$H1M literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/combobox/core_dropdown_button_arrowdown_pressed.png b/src/style/bb10style/dark/combobox/core_dropdown_button_arrowdown_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..1ee578e07c2f7885ec7e60033607db59d4c43bd4 GIT binary patch literal 1465 zcmeAS@N?(olHy`uVBq!ia0vp^3P3E$!3HD)_;n_NI3=zTCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%s|1+P|wiV z#N6CmN5ROz&_Lh7NZ-&%*U;R`*vQJjKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8EkR}&8R-I5=oVMzl_XZ^<`pZ$OmImpPA){ffi_eM3D1{oGuTzrd=COM+4n&cLd=IHa;5RX-@T zIKQ+g85kdF$}r8qu)}W=NFmTQR{lkqz(`5Vami0E%}vcK@pQ3O0?O#6WTsd-JDM4o znwYp4x)>RlSr{5xIGVXQyBHf;I++-m8aSH4%)qAC(ag=*&D_x3!qnN-(9qS;$->aw z&BWBy+|tp=+0D@rrq?sCxFj(zITdDaCeU7}UNgLUt(=Qe6HD@oLh|!-U@0IVBfliS zI3vG6!8zDe!8b8EGY`ZEMGwTcE~!PCWvMA{Mftf3;PAD|#A3g>sgaR|k(rsL5yan4 zhK?rA7M7OAhHg%-F3uK8P`xSSgqc3jG5Vmyfs|NaLckOVV#1R?kOR*=sd>O0Qv}Q! z%11wJU|?W;>FMGaQgQ3f^jPmh0TRd0>#!{BR#>!9fwRf5tI1&k2g~ja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QgQ3ZwDVqv9R!X^>&DeG=X-iMHLK4*xLiYo#nGnYXp+8Y`~h|j zk)uxc53g3|T%zjfJxk4eeUpMpp_tjG+;a2TEVCQ?Pv*?}S@$!zY>Ce4C||eTdCeAm z*|GH(vMjP}8#TJ*6lI(9zVS7jb>HFR@OLlcn(Nt@WRB{d`&-Y>ak$|29x)fqhO1de zjn?xh@(8dvPOMbrP;7Wwbkf*e{y}1Bhf~ARq=Ux$nQ9y7NeXb}1xOzFUOVsSQk~Oc zf7I4z3Y1&$dofqcJ8l{dbR>I){>+fp1x!2Eoi+^*y?Tl}$#^x(MrMQg=XXAvwJh?9 z)2wAFmIvSe4HZdZPB5GO@r-^+tbD$H(6-N-=X5w&EbcHC$UL8wo+oi^Mp=`g{|AM4 zj`J5R?|myF)f-^kRi*P;reUGx3T`ir=l}NHa#`GRY5(k| zlDY7Ya+00|$0F`uYS-F+L}z$Dk-f34mhGj;m$X^Sv@gl76J)hyoZD>Y@c!qbka7)O oMhD)NFIVpPxNu8hLp&oJ!(YWa;#Y18w1bL1Pgg&ebxsLQ0AQ-!)&Kwi literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/combobox/core_dropdown_button_disabled.png b/src/style/bb10style/dark/combobox/core_dropdown_button_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..af6793b87c2cafe026fcd1f68b561b4b25ad4b1c GIT binary patch literal 1291 zcmV+m1@!ufP)1SZb44U(UhB_?DcS90cvbZZ1wQh2Bh^98AFwdhV&` z67Z!5<3rCm6iR7hC>T?Ro)U0cFx8=!w@&2}+o+Z$YgaQnIcQ{$E%`&FjtiNAVbIK* z`OVvzc{?lqzy&5csj={9Ap#%_AOxVRgK_Hsd;nhddbZXPys%mb0q9lW*G(RPa&|E5 zp9)`FUF%g~Jow_l!2JCDoxQ!in?Vq~2f#W5Ofbg&a2)69=;-K=55Io+Le-ZugPHQN zaJS%I0uTj&8#ix!yt%bG^_t#$@&5QX&z?T}PW`T?v*}U`++A}W0I_^NZ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Kqv7 z>B@dRanAdQ=v_3F+dUmXcLD53DgUu;dk6o=^a?Ns#pv?OxV-=X002ovPDHLkV1n2F BS4RK< literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/combobox/core_dropdown_button_pressed.png b/src/style/bb10style/dark/combobox/core_dropdown_button_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..df6d4025548ff88d3bce1d598add4ae8dfaeae6a GIT binary patch literal 1583 zcmV+~2GIG5P)(i%!o2SEoO@i%x#i4s+L=pR3iO`l z&rI(*=l{r z`NQ`0?GNV!Pp8r^00;rVmaSXf8_$d%T%h$HO!Not+%OL|c1X5l&}$G=&L-?!DayB(MO$ z0Wf6&ZiLDCf-$zedvEuL1OkDY983)WM$#iD5&8EY*x#1R<=&UTOabNqq5#$c=m79) z4e5~mQ90gLbckFo_rbxB4z?1Je_)9h)76!Kz`TVwJ(QnFn^&z9s;e&`fY} za54W@=c4T23G%7wU@M<0R!z%iHD(Kl1}R1efZ6k~PqpRsnymz`F1QOSG|HBDr zMmI6Xb9Ab$+^x29-R|yPO?dBW-d0->y}GpAmD}rV^_ukdKn0p6Htul&g&0WNpSKOKK&T}u@pXhHg&qBg2i;( z$;_v37RktKVslnbdNBu`2wI&rY6R#+&`X6mD=!tR46aedZ7ro00l@#)ZwP1v!wG<> zqFhmSjsZeIBlvIrS~0%@T)}cI7ji|cYHS_=?tgQfM@m^ld>X>K22-b564o_Dd>SI9 zEbgB<&ei!dp3$_T#1SeuCn5xc!Axb8aSuQ-lf1!4`*yI%^?pRHNkjuWq5&Pver@J^ z)S5)(dOt?{cCbwH2A5XfQ}vmqnUUaJO}G*OqqVj5dNP@OM=r{_ls5ukUE%JCdHcw| z>8i!ms;mWo0)SCDf5ym`mX;eb-X+y?i-^$M+dCj9XbM0PN$;Y}gSt@iaWHm&+D@)2;#N+X60|Ns;3L*X@ zqTDQoGflG~Y%vvWj!ul-89UY0)pb_pf+lmr=Ryns8WEMcy1LGe-5ER8+}xZIwwN+a zvw*o0r&ugT48!OoqVVa{r(-8io_sTvN_A$l+4e?hv#F_RIFU#s`}+ER>Fw^^1F~%Z9v<5%~K$8p5EPw|> hh`WYiJiyb~{s+NKjM(ti?X~~_002ovPDHLkV1k78-x2@- literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/combobox/core_dropdown_checkmark.png b/src/style/bb10style/dark/combobox/core_dropdown_checkmark.png new file mode 100644 index 0000000000000000000000000000000000000000..578c80aa5f1bbf0ada42627df328b4b84956968d GIT binary patch literal 1588 zcmbVMX;2eq7!HVlAc|C-2y|E@qv$~P$g#fliiJc>mJwH+(bnGS8Ob_2xrhtnV3nceSuzwdpX z_udL~&aAkY#2ArC6i3b`EW(;9yeZLQ=fe-@1NCu2zG6aJlVEB;; z);PKVvk=B%TY{vK6!E+p13|CXEA`5xELRA^YPCAZfgl-zMuum(i>G`UF3*$@1HpLg zoWspKSQijvr1IINyhb8;IuwG_Z8E(ec6o*qC8P}WQEm{HLZH(bjB8Na!&{ht+<2+B z$GY6jfELEXF6Hb(Jqo6Tz(Vf++fYzZ@CJK>a|lJDN(k1z)XBJblF&$m8!7FeF-Wa~ zU>KD{C;}-}FsveQ+<@Xr!T{r_!ia`AUWP?*2vs5|Dw7%2Fl>NTYJ(D2!8(-=#Syhy z6~dA(4^O%5OvtW7use)Z{wEgGa}33^oRwuuLLFc(VtLk6#JT}}t^zPoc84n{2g@@Q zEx~Y(WejcPSSK);U(E3``*Ibchx7&%9*P^68xfU`P^e&qQ6YnH$uO4wKRE*hXTV@{ z{Hs|)M?wb%w=Y^>5MB%q;}Rx@6GkJgp^^}Z!fBGwS$)@!`#a}!WQk8rGaWs6IBr1n zX+%nE)$Pt%AL4DrmFC@9{c+c;qVXEQ*WcS+d0W@t+gTO0d(VSoVBmSRQtrga;*ZBX zC6Vpq>Rs$7R`a~-hjpg?xqSg2zp7okCYnaJpH^wg#_Qs>spO9Hnl7#F>5 z)m(SEHY#Oq;s&k0<~&G`iu5!>8&fA%5ZTn>g^|<7kDIXNG}&|hl?mFXy*HLMohxrk zzEYw*Bz|W-@x7z2wz|T&cbo0-g!Z)u%{P%VzsDR6+q(JL%Jhk{bq;yr&1zkq>}=*c5)qnOM~^=fdNAfpFwe_`deFWNN~q zj`XYF<_?@m%5F_s5q0luM@1ua8cyGy{cFUbg>S{KnbCXo$;lSHFw<|H(IDGAw*ds! zo!c`y>9dW`+r`Y!3Ha6zPAshN!_MxzSfiW1DSy<|T{$FdgVhg*i5OE$3kNC8kt*we)^gyVYhpa1{&8#0R+7%DI_ Y_+&7fSPER(2b5;;boFyt=akR{099fizyJUM literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/combobox/core_dropdown_menu.png b/src/style/bb10style/dark/combobox/core_dropdown_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..1f523620504722eb878e02cc9fcdc356fca56e39 GIT binary patch literal 662 zcmV;H0%`q;P)34!P@|YhJ+M*T^G;wDhQZUZ51;P4xiw zRp3jZfdt#M!BJM$uD6${*p?kDwVi~L9~K>UG~fKNGeZC{91ITuVEb*uJVqFXsMqVL zR4OnGBNv+_2}Yw4dc7Vv=OCiB&e^)^vILxSbi3U`j*5T_Iaf-}B~nVQEp+kwBs>dR z1T8C|h@(|;i}~5VCVH_xf7K!L4u6OL7jU-AK3+F7-T+*CLAaK8t^iQBt9K<`*E8qp z?}H;ENkmKc^fqM}Mz(I{EPO&la9#JyF5#~0etLvYX5k4Dq19@2b_s7bo8KSd$=pR8 z$K^Clk88EsXIHEHa&KTRsEn`gizJD%-^wTsw;t$+@vP#amC4@MUQu;vQa6mTJG@2x0UO2w0M$9O8~^|S07*qoM6N<$f_88sV*mgE literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/combobox/core_dropdown_menuup.png b/src/style/bb10style/dark/combobox/core_dropdown_menuup.png new file mode 100644 index 0000000000000000000000000000000000000000..62c7a2e558bdb552800229c9a1a8d12a9656115a GIT binary patch literal 688 zcmV;h0#E&kP)zh}dQ*d+=pgclJ-xd16qdxEA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_5G!Rb_HwUVZnLx$Dww{a=raB3CE2{-EE< Q)6Q=z7H#7XhBt5j2STUH7XSbN literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/lineedit/core_textinput_bg_disabled.png b/src/style/bb10style/dark/lineedit/core_textinput_bg_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..6bcaf91f87610143e3ed75f2eb063de7255e04c9 GIT binary patch literal 454 zcmV;%0XhDOP)NiT~rj(@DUMgPKKA6btYD`|)_3#Tb)5Vx?5g%%#@)CC~G13oMG_alhYx z0U#o}%8`fwfJ`Qnr##O$3;^EyH#!BfEQ2uye}P2=&N)<71rZ_d{VRYIFvd7zX3Xbv zjK^d2b!m*jXf%Sg7BR*L0AQT+WM)jKQzS{!8z>@BN`aXXLZBAN%wT4uX$m451U%QW zb$9`34tuvsN3WWV?tCq*JFA}ugPOUcRkwaA+|;ZYL!zs_kHew2`+q4DkpMsl;c8f; zX&4FswAMQjfwdOSxeLd?4d)!JwGa_#t#@t8#+c>daQFm3WmyjCLovoIFFx4ydcE-8 we}oXSx~_ZOev%|HP18zi{k&SOwzx-p14J9U168)o2LJ#707*qoM6N<$f=v*#TL1t6 literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/lineedit/core_textinput_bg_highlight.png b/src/style/bb10style/dark/lineedit/core_textinput_bg_highlight.png new file mode 100644 index 0000000000000000000000000000000000000000..9b115897e85ad9d23ff4a94002bf57c145c4942c GIT binary patch literal 394 zcmV;50d@X~P)f+-9DT&YAu#jXHA0>B$Z zoMmhGO5r^KAOP?LP1!vj4ZejzMc#vjqCB;K@nu-dlS0Il*+Wgk^q8vpySNBQu_bxCyDx`7I;J! zGca%qgD@k*tT_@uLG}_)Usv`!+|s=490H4^?gE7jJzX3_A`ZVjWyr{&z{9+O@4wTt ute^vj{Q92wEq$K$FvU~EH4uUJ_wq9ZFqiOMVp#~(%;4$j=d#Wzp$Pz>e=I}* literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/listitem/core_listitem_divider.png b/src/style/bb10style/dark/listitem/core_listitem_divider.png new file mode 100644 index 0000000000000000000000000000000000000000..39e3a8a4f5e175d8548c9513bb3a3e083afa95d2 GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^Od!m`1|*BN@u~nRwj^(N7l!{JxM1({$v_d#0*}aI z1_o|n5N2eUHAey{$X?><>&kwITbh?m!{|D92vA7W)5S4_<9hO+|Nr+JG6R7yvj_u& Y(FJCcCsGD;feIKrUHx3vIVCg!08rZ=!~g&Q literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/progressbar/core_progressindicator_bg.png b/src/style/bb10style/dark/progressbar/core_progressindicator_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..95fcafb437030ec740b92350a76e3ae2420fbb2d GIT binary patch literal 1724 zcmbVNX;2eq7)}5wQWU|CBH*}*pL{KjmbhnJV1dW zGb&OKZZ*~xMMsC$i$O{)2u13RMG+KXJn%w95i8PeIBb77{^-u^e&73j@AJI(Y@Q_M zt10fj?j#aviYN+^5-UKwGu&K>uYKiSgjiKBO&tZ$s=_Go zOfe`nMxq*Rl+A?3*+LOK#$^bz^YF%n7P(4$|x_F*gKAC6kt>Z z*M(8WoJtT&fJn@Q0!%6xq69-hAQYlP44B1Y1p{;t0%;(f2GK(x7MDTif*>&dPzY-# zm6|I>gyXgdDU71QaU+*Tvsf%t3xkT8l4%f!!*OuX=^=zhh&kPW%dH^>^V|sr1T`y7 zS|hH-41j}CuE0|9Fbd)6SO|KfSp0$5U>;8tkusW9Zlpm}kfzr=;u_U9<5KirH$JLu zmZcj}niMr-sU{^+5B1y$Fp;}Y8*(TT-f)+hv_w(lDF~)a)uRSngoIIu8>&jH;({zT z2th0uWYNJ;HUve$LOPp|Fxe1O$Yg*K6C5AIa##?X&gAo90SAI00mNrUzQ#Ib-I18kp4Zyh-1%*@UDVTMXl>w85OPl|3{yMy z`-dD1s^E`Ac~&pV@Vt9&`6@5l)x!1WjIP?tZ{FYO+t_Enkn8?B-0vFvtYgmk`~%L^ zv}w*iiP?h|iD$q-+uNOa94&lGk{^^RM?KQ(n&59aRd~@nA3XWa3@*wc>Z= z4BnmWjZXHhVe;R?itE)&GkuQkAXh-V0<=D8N6UR1WmnGZva-*gZbo{a zZ-3Gh<9julQt*O2JayCSJbe1&>}&5H^=PaLzfwPcHTgOOXKGZR#pWpFyU)h`m_5?$ zF{8ZYzM^Q7@2t$NC~sGA%R<+-N>R|(0tw{&Gicu7m*ob)LubDbRI3x#DZ8~ZhrMMR z{FAJi6%QMiIo~WGADq=SbCRyE=n5&u&srb&YfhGl?Y~bnPvtax^ms&8cR)d)L@3%K z@yyNXIpdr~X52PPgIj)S3jPBY@*0nM_c!Rg7qqLU+hV0{ZGR2~IK4a^(P}u|=}~Wu zv|lL!+`PIIp@1tVwgpYj-F&X=i1hHQGi^_9sMTs=j>eevXnW+dDsN;ySZ zw8nYR$IH8F?ejE`9K|I?)sX#royF2t{`C(lkl0uC-u*i>zigmf9*Ce9ub-LU6xfCD zcXdmvspSmvoPvCA)~-)doXb|ZWUt6Ajwde};h7%G?DNe@-3vM{-4lu33|S@M$h<8Y hb0yY?j?(eaM|iAWHG9E(WW{15q^m{0%! literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/progressbar/core_progressindicator_complete.png b/src/style/bb10style/dark/progressbar/core_progressindicator_complete.png new file mode 100644 index 0000000000000000000000000000000000000000..e849c8f179b9bbd3a41f046d7e5e863fb28fd7e6 GIT binary patch literal 635 zcmV->0)+jEP)1P~E?C2(vckCD8%UcGjD zxhKG_#SddGHN3Xkh)UXWC;30rmx!P|!o(pzDCq6+r!yDozps(qo3vM$tu>-jq#dl| z44xUoI6|!vl}?QoW&u3d7oeWdR7*RwtwSdH0a)$?+Kh3zCqN@i&LqY`TL;eYt1$yx zQTuqeZx28aMzKaNr!8j+05F0u_Id*7I9xY5HK`qERsul)5u@GS`PLIaBs(jt4oq4H zn2ZRdAh56yNwBgfU-v{&Vcs@3LI&Wt1EKBT4YPZ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><2|y9u5f7Ew2Co002ovPDHLkV1g}6X08AL literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/progressbar/core_progressindicator_vcomplete.png b/src/style/bb10style/dark/progressbar/core_progressindicator_vcomplete.png new file mode 100644 index 0000000000000000000000000000000000000000..d750e4671c11e589f937f70214877a1cfeb73e18 GIT binary patch literal 614 zcmV-s0-61ZP)j zK~zY`?Ug%dR6!Jm|1*!9yAL#C>_n7+g<@-KW04esv9ee}D+?RrqZh11F(~#Du@wzA z77AKeXe%NLMoB~oyURv%@7{ZN9>-!g2&>syg>7Vim}buK%|AagbAYi%EgDojyZCa- z$nwQTK{L&?IFO`SZt`?R6dTVf8rNQ3J^Agg!Sj#a%{AKY-f}amwv9(&J&a>m&tP_N z>uafY#ku8$+TzgQOOHPsX{P4+`+6Ih@#r{@P7iE6!+8b+K+i0t=P<4d@eDA!!!uw#cQ>g_p)lso^!)v8K`^AgP*2Rh%y=;Kmic>TSSZ-i zj@@lzuLQxCdFFd=!Q4CU7GmzXS0xzhj|Rb>aX2#$%;77=V6ckey*t!jQ-5$GH}edF zc{BIlSBp_SkTG}+{x88qa1`nQzt(~X5JX|HAiOSV2^xY-Adt-=gnSbOE21acV+A4_ z=(_6^P&R{B;%PWzXKwDQ>Q5ytKm%+GA}Cm>to5a=Rro)?K6fygP~yy<$rxG^q#y|D zW=`n26a*~^I&EMgiq3yrsQnn~R@^wY|HWi1PE7ACC1ouTNdes(krap(5G8AAMcC7; zw`vdmx&7C3%(k-5-XzUsC)@ZeiX_&b@^c&b& zcxas>NKB!P1_>O&TN1t9+n1Sn9*c`0=O(*RuDb`OnU^0kFf)H(R?{vzY;fh>r&H)G zJcuP&8szRmlI6J{4Zo@6M=ucnq<8yT|H$yejrdkv%B#8?%=>>@sq{kPLS^w|2 zkVhxaIFZM-uw_}=wG1cK=%2V{K^e}YaQ=EN>;+dwj=@rYrMv(>?7%vIu@+_#?FDGy zLdNsK6=Uk41x-s1SfHl$@@DW1ZV1y+KXhsUD4xg_2;MD_pi z>gCf(sOZl5$e^tWEk)1-sQso1XlX)Z2=jY=v|Hx>hvn|ie-6{ak2BBzPnb@||A6(4 oxRA4Ho@tv7w{(N}pVjp17bV;QL1>K20000007*qoM6N<$f>>=2MF0Q* literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/radiobutton/core_radiobutton_checked.png b/src/style/bb10style/dark/radiobutton/core_radiobutton_checked.png new file mode 100644 index 0000000000000000000000000000000000000000..1721586ac5f0aeaf67b994ef06f1299a9bf51ccc GIT binary patch literal 4298 zcmV;*5H;_KP)GVPlK|M<*z5-oR2%~U?ApD{eE7!?PwnjJoM1b4lrdH= zgop?s$^k&rw78~eeY&p4O~dRh9Z`Ddr;q;hz3E??ZhMxt0i>!&S7$yKfX$7~J^&$? zTkD=)7heDL`e~ironLVrXNKY?0LTK*kTncrXKAeT_e<|u`iEtAE$jDiHCa8nI`^3X zY;J7U07L-z0buo-)x~R{T)QNlPT!_@`<{5t!~=oAzyIKYA8had z%>d}D9$hUyHGnNmEe3!R0CdNjJFNTezwev<{ryW^uHud#h@y(w7Wi zOH)e}KmY))yz0tZx=(fA?-54=pxAv60OKZIp{t8u?SDzVPgm7c^?qW2Cz?-0 z0R)a5Jwk7~`KG_lX0tbYZab{>kx)u;^SAFdzkJIQs>do3@3YZ9kVALMfz2i48K#C1 zK&J#Tzk$*s6BSV(XgYyCTYoDyKmBVvm(9ArNCHT>KGd?TS6+SP)nAMsH=YAXS5{Z{ zUNk@#+^$`_%*D4a{u$@|YL5{qR_+1U&s$*3yZb@C-zvkgt`s^`4uq880+3Rk*NhSX zgb-*1pc+Bc(lNd?fSByZTfbe)UwwYPE%P^%Q6Qzd%)Ku>|H6-^PoHiN1@gQATU%QF z0E#<0I_UH-PybuTajsXoMgR;4;46wm$#)-H>kEvVPCkey(V29>rGyZ2NZ)Wiuv7y| z0tT)a8G_zz!SHH)6yH4xp!^sv=V`z}A*lstgDn zKVkg6sZ?r_$E1${U{+r?j^6Y4>&@e07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y} zGj80wckfM}M7RQg8LJ*gOPBoINEk7s9j;1>pIl^JS72xaenUeEQt03ED2spa4pZvV ztlR>wzWVA{ckbNzn&UW)Qp%ITV2~Hw08OXUK1yi~rL?T7s_M>oJbtC8oKXfK5C})f zWy}7-?1_#eDLW6+t$JT5P(lELd|%L{1VNLcI1@+fZyt1d+fQ)Cxws3iyu5sWOH0c$ zobz_hc~c+|$X##?JDpC4bX_0a*48#+%9JVhC6mc&PeW#;8U!Mj-LS;aW-OrtB!C>x zm)N=6!v2`Rzy+ldK-UNiO5oEq6lo5${hLL@D^J;iGuN4SxM^G{6l$)oumAO^QKLE- zV~v48AbHV42$@VKs_Xh?_4W0`=FFLMS0a(P+>?LB+~$m71yK9-@0junH)}~+G{{Zn ziY~mdr0V3VmbI=Cn7W3b$iO)Ax;XyoKij!vubb2LDR2Y;N=ix&zwyQ!PfwXLJ4GYMS9mD&2-;*j;br7ia2`NnfR?no81v5od|5 zt7nt|{#*}eTfIyk{vY1D>oul^4qUEvsXUJWKut}}&NttD^WQ2fE0d1n9QFJCiAy#J zl*{ExD5YZvA^rsm7F@M;>()h_bMHKwrMMaJj%FE#L5eTCLJNk9G+I&t=qBNv$7MR5 zmc7U8MJ}5WXC&$=6@I1NH7KRo`Sa&*+_GiMJ}G5}bKc3z{Rn=y6KNaUz$hibsOP}T&5pDLQ2`K>w4-^oa<8=N@tAu2qDF4P%m(X svGLA{W|Xz;lT!BRx}L-TKNt4=FI@i76x!{vlK=n!07*qoM6N<$f&>Bg1poj5 literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/radiobutton/core_radiobutton_disabled.png b/src/style/bb10style/dark/radiobutton/core_radiobutton_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..e646c9174b272fbcd1e204bc981e28da5e0c51a2 GIT binary patch literal 3125 zcmV-549fF~P)jW5C5@^e+NRA@R8gqZ5TGKc3Q0`B#_z+%_F>;+@Ah_Pr++Y; zP7Dr@7&vvL)ydx5x%tfR{hI~;&j+~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b/src/style/bb10style/dark/radiobutton/core_radiobutton_disabled_checked.png new file mode 100644 index 0000000000000000000000000000000000000000..93b3118e8df2112c721c832b0537e4b917d6f113 GIT binary patch literal 3539 zcmV;^4J`7BP)Tp)35FOCt+a}-Ci9<)S?vP?;&NM7E1 z&prE~bKUE=NZWNV>;MM@c`wg7zw`UQ&jJ3AH*zNiofw;t0H^>I0915Id;$Oi;E7KL zzyV!$&Q7_twUtszCCjqF7`x`Uk|e<} z40xXB&Ck!XbUGchoD~2I0yF`@VlA;>ociR{uf_9nvM0H4%K*<$o{s`B&wg>1KKZpL ze`s0O*8;oUDD;s~N^$SK_o}+C({j07m*LVh4W8$DBO@cWZQH&sF9FE=K2+EB-@Nsk zw|+LTYJdSKcXf9y)D6%Fcl`Kqb^Eus|2<=DeZYt`3HN}$zCNX)p+T+}*p*G!b=bDe z&YnGMbIyG>^S;DTN>9H2FR%aQ#*G{8n}NJ8z^U|<0iY?D%h8R0wDGSU$N3YXYXm?m z0L?HAvU>GutyC)Ak%-7NO+Gd@W)}(t4}c3GC)OY-it@YTA07Xj_V#uLU_OydR8|ad zDm_Jo0igqf1AkE}m9_;;dOHBMrKN=?5()JhhT^t1P1BIi=k4j~Y2U46eUPD0=-}Dm zvo8yEnM))SS1G%6P1J-$2qARyBbzq}a9s3O0BSrQryU&~cN`o5RI61qG&HEay}gQ9 zZ@cejOQq7b&5vx}KnS6PkjOO+*_A&`pPx1W=m%aq5FQyFd0qf>0kiGMx(0Z zIQT;~&-0+Fs+>q9sBlLyu_it;I`aI1*A9dM=wj_R7SYU9CI&$5U)BG;a=HAppuYh? zvtbydudh$HZTqgIKC&z$lgU&U78X3=EAs%TuIq1%jgI{SfE`c7=dR0OW;zoBfx2t= zuC8*q{EdL0ivqyFz<_qQzyW~kx=1FInj}dOo2~%hmSsJ)J zaQN`yZ;NM4gl1AIl~T&(GQnMLmStgJV8BnuqGFBw{Uh&xi-3TD7}o@t&16*&s6%^) zVzzBRD%g_&gej#kO;i37CF+u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zsYD4Oor1q+L25qpUGr04+hE^9RN&S*GXSrpIU3( zrWS*ePN$t>vB(5-86R9c9zT^%r~i>LHp3X3FirEC_h_ywXQpXZ8DrC)=jD$cJ^HI~ zI6M)^G^PL)Ez9!GoHtw)2C0jY}vBq*?c~~I*@c4~#0NJc4%Bu6{&xbc}-u%sp ziHS{tq|!f-Z1l%#Z*P|)kqDJ#ncPfADW%|?^FpD(ve~RFf^$CvyCCvB0suWdJ;#n5 zIr6VvU0q9#<9uNlM*ij%pB1)hwc1Q6?I(m7Pd)Y2LvO$R_BO^?@IIO@*fbHinx!ZT zi9{k&C=`-Jluta*d|zO77pk|IwM5 znftF8*RPQK=j!^E`z0)*E8Zso(CFys`0t%Ncm8(o-o0tgxyL!5VvL>Fb-gCPRJVC| z948`4Qa6?_1mWPpgH12J^wI;v!^49CLv*vbE{koOo0~r$92^|pvuDqz+qP|+_p=4h z^ClHVS**(<->OM>UAL7G5{Ed)2Y?Sh{4n&w3ooqx?6c2$XJ==-%H?v*ah!%Ld|c5q z&AGO=w)1P&tQmjqx#vEA_~D0xqPM^~&&aZT;g(#^?ebl&>xKv+zT0T5bC?2vJm-8) zmgUmzSl1niKwQ_=2q8^azNlwjVQdfx7%IYAE^^N2Wm&G`|66VCe*x;7jBuJd;e7xA N002ovPDHLkV1kj9osa+k literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/radiobutton/core_radiobutton_inactive.png b/src/style/bb10style/dark/radiobutton/core_radiobutton_inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..fd61937d6570d7f635798083f25bed396bccf220 GIT binary patch literal 3968 zcmbVPc{r47|Hs&}D|;H#$dZ`FGGk~k43TAQF|uUL3;2r%bH>r(khqAF2oDdBxQ#W| zncEv~-@=02_DZrbklQJ;Eb%NCx<4y|z##KrNOV6k$c9P?AUl%@q^PhS@AJ2w__W5=jl^qIq}@nns2ah{0qQ$d4RAp`pQ_TH3%M3JDE%H?W7pvP-msD=|8lh$4YaO+W`Djkp90@u?=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J-t4>ZUbSk;T9 zNYY$m%eBclMoX8xj7)4>YwM<3*4|s!&^y(GxQ8(($fZvD3mn~aq&qcIi>ULAIqE;5hr4nioC1r^* z({oFK^Zge^0T~&U?(IKcP5ak~9Q9ky=rQI++k6Q1XiNA<`h^b)CO-?oRZjD7HWXj6oykF#vH2U`yaWoH*s}^vq*yJOA`BX9IJL@RsTkXUVH_as2 zwG;9!FY5jK(jK=CkADQFVQgo>&P*L0oi8=%Mv8Ku*HXAgop;97YQdt`Bn4pHEWmL= z4>??#f>J`X@_Ja54fZSaC8$)D%gf36?U@x@?0FOr#B|YJD?@4)H?} zpZk$6!NDIy4{yB5O3{;nK%tz%($Y^4(C&ikBa zvOn0$s_X9Dlk+Fj1?Z0qkTVN{n^FmUg}n8JF9rrOUA?^4wcNrpoL$*~9vMqvA>-Ll z3Bl7N`$M*tW7?%8&Jw=In$$Npk5}xHK3+XMvBznCe6^GBl1bQXhl(%!CBEsV`%Ryh zM}2&1(Rv^u{@(aJkyo)h-EJH`!g}4EbyvzE4yfZ3$UI$ju&A?3R=;9sf6XefEKSE3 z{?`?%9Pfy_`6APdry1%ntLB+Mp|_?+WXYoA?K~B z`%%l&;fpUkBw@Sir9;IvS*7n$gS@5=XV95xB8fg1B>5>q63W)o^#Pn-Hk)0OrW*Z% zzTsY;BEheQQ~SaewbmttQWG_9B-TWTU4a`22k@8w(GwDt!8sKR4;!uZhI&1SHc;tL zoZkRyTQl15qXL|FoZj9LGx4MK+(RySd7k60mlYn^CwhoAUuZ;6j8w=Lc2qt@ghN6Dmdh(>O-Deu8^PuwTdd+ P|HL+y4%k|A--Q1I{v6T{ literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/radiobutton/core_radiobutton_pressed.png b/src/style/bb10style/dark/radiobutton/core_radiobutton_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..58a1a57b4c885a505b406074a58e317f6cc77ff7 GIT binary patch literal 4777 zcmbVQc{r5o-yd7DCOe5Sh%94fEHh(Y##U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ol7{Jo@H~@zQDSyvT}B2VxrL^ zC*jEx`R})GE(G)KJ{66m7p;x%?QbuawC*pJFS|z?;Q&b{@&?kW){Nel3tSIway+`N znt*X}HWesz%G~bh%}|JF@?UnS7m;8l4>?}qW51*4!fYcxsC1=yZ~q4CsTo$L%a35r z_}qxP7lL7qSiXzm47L&-nb*(9(4!FI47vy1VSnzlREGH{e9$`Nt6*a-t+=l90GOJQ z7QX%)tLMu5`sGj_X+_Rx_kKBdlkg?GeeS1NA;dCMm6xyYY-@|*WRU0G9^8uq4num_ z>;th#(Lrhat4Au0$5R21+?!EHAcDArqXZA+1kXK?JC!|{Fy1iDMHg$`oeAC5+Ip?h zvdszFyUl^gu;3YyAGjhuN&|t6q`4YqDp7koMl1ImL_% z&dkG-QrKI(cFc8ryC<_bFkf$-@K7ueV%)25J5p!|+>0)r5p8C__w(nGnb9Rwg@JqY F{{WP>YbO8z literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/scrollbar/core_scrollbar.png b/src/style/bb10style/dark/scrollbar/core_scrollbar.png new file mode 100644 index 0000000000000000000000000000000000000000..384f60758af92b5abbb1117e1fdc3684ff6dd195 GIT binary patch literal 1245 zcmbVMZD`zN9M32{=H`_S=4>b0koiHx%j?~x$$D#ZNzMj#^|&7M2EsL$Ja-q{B)25> z?mD$=#aSt$!w;@93l{w9%f6Kft>{o^-RQ;`3U0a&RVY>D5IP0VC+%JJL)ixd$@Bc5 z=l}ct-}8EE=;`3T!}|~f2`Yn98m^uGyEg#8J@tkPmu^qadc$_XtEdh@1l`U9R58^e zNCQ=`o%$N|AxK-n$Yi~2@;I;ACa(HAc-1UJG=lW?SIeq43OqCqiiQ=#e!H}Up@tsA zo{c2QWLX3yV{pO&!xKXpZDLg8bgcgv+E?WvfeAbnt(s$&%U5IA7B3I?{xN}}TPogY z4BK`pn@pji?Eo}_lOc_al4z8|DJIOa>{BRBQY1mr1Vx7^mS;)iOchBw?Ct;-Va8Nlu`{5t*f1SjBQZ)zU!At^w^fvE+TR zyyyVcvz?4>kF`1=RkA(XE!kyM9FCw#RWmGK_RF&!tppt71)wJ!+eEkW%Nx7c7pPuQ z785c@4wOre9<$t*+T_pKDl`D%Eal@OjmdJRQuKU zj(+*^`1*;nca|pm15WNI_uRqM+rR&@e(Q}!qw(gnkVm<<4nK$gc<8`^Rpdz>xt>i< z*4Kis%+EjedHv^WHnNygUw(DZDwHq0DO0tspsdJV#i>8|5)Hm@H^<@jmxtSFVe-B69iE_f9xgxcs&iV&ChG)V2?yr<=f|YIE8g$QTQH^SLezb!p|_yiF=<{25G8py>>}LdG@l2fg+x_mHt*wUB6zx;9$I@TgaOiz>r|@ MboFyt=akR{0Qw)9g#Z8m literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/slider/core_slider_active.png b/src/style/bb10style/dark/slider/core_slider_active.png new file mode 100644 index 0000000000000000000000000000000000000000..6bdb413ced97a5ec29b77aa204c9ed85c3442f8d GIT binary patch literal 1160 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}P!636iXeFg>=QBN1gkcwMxZ~AA*gvzjgcwfES zc;?-A&-#C+@7nDdWx{=zt*6te^Oi%)kw>n@0xR2(X}G*OC{iUPD43u7*!4n(OO>$8 zLiWiGoJ&2c1Co6`_&l9wCs_3z~ewVOL@B3JF(Xm>P$ z@8qplQI-t$3|qEr+w)Cf@&5ll?;Ubq{N(#D?5l3duw%c)a`n2M^L{2*6f8cozP7OX z*SG$kpL~`mZaSR6m1Dc_9dp3O4LcsZeD&_vmStaCr{A{!v**}~6~ULLF&{2tWKflB zYzSZU+Pj%!492YT|^nSYTmjMfBD{5zuU*- zuc?+wFMDiPvPX&al?i{{?wInhZn*O*My55R+-$n#Gh;Bx36EX zMt6OC*4aHhd-`RyP1Bf97s}t-G_CpRmQG=D{p(R(-@^V^{}t3+GRsHBlr4BguC8n6 z1g6QslhYTapAT1)37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rlM zgj5&|{MN?Ln>17JZrs}I*LtCLqk7q$t+4877pzd)Wm0!aYBLpi<#z^C#op$u{~+1O z!)K0UQE@=h_1{gfprU&*&ekxt;XdcMYbi0-a2=UPs+nq>!G@jUB2U%|>N>1d6|0&* zrDIVUxG^G%Ud?1O)eSB1FK?Xskr~8@5!Sy6^4uiJrhXImUl=zQY#kg@om6C;SrEO)lZChDcx!P!$W02Q`kj!iF1tOe^E#;qRE+{NU{JjmSJjrO%`0k}7ofN%>pZpl~U{w*Y8!dow1=H~oKch94jR literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/slider/core_slider_disabled.png b/src/style/bb10style/dark/slider/core_slider_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..6a233315e42588f3827f7abaebdb6e77960902e6 GIT binary patch literal 1105 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}O3cVfis1_lP^d!8Fr-kN*fVkPG5J{Vw(3CU)*q_oDn;<;t@8r`hJdxBa@S#NXCr?-zaz-3Se? z(5SPekve-N7KSEgUCEuZ&huIAvgr|CyY;k>v@X2QZzJF|@57%TpQ`6oGIkIE|DL-{ z65s#%bswJsuLJXfvVGqeD;Vxqy`QpdG{(~`__RigV z&rhS`!$;=g%G95Ixwp+1Y0P3_(0m%EHo4Nq-1__9#pmU&T3z;YKj!8qc}8{RyRc%0 zO$-Hpk9{ro^YeT6{PWL)F?!QYd7RlB(l)=0n09qt*y{GbfB(+6ul)1m_PH-*btd_S zGxToXzkQzJ#r;(|OVggG*_-k_e(SXGLzULlpv4+aBCan=c$Q4zIDBD!h?e`=w9oBR zpHB5x4fPvLQsv)YaVCq6U%{LazjFl$+5YHn_> zp9iBNYxB!nN=vUSnNkq@eOjW#&CSM7Q{Daj{jZhYjh_42-P`G`my(rRhX_MUVuf#@ z$lE=|Pwyy+y7C?_aNuBM&}6&3x6ksoMD;xJ)vKx&c26_lQEZv;|A#!=<)sNu3|;G9 z*H_GYuH7|h--(*r+y45fecmGMb0T5a_NkQ&Q)=w~Z%&QOf3>S_VZyAlX_rmT##=>4 zD#@K!dHSJz>6C~c2@j9EEiO#CUG`;DcFdub*$Qdsl#B zbf84!)80=(R&(RlUw^%OZP@AWwepD)|L!U#N*wxLyCq8Z|A!9+`g8r(um8X0U#y5* zy_aIN=SuTHe#6^u%ltyG8Y&*iHa0fSpL+UfdGXGexa+0Pfg-XDO$r4v$1|g*g#sP+ zFRiq+6c{Pm98Gs~%(5Hx+8?b%YS@roC?l`c^{J;7XSbN literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/slider/core_slider_enabled.png b/src/style/bb10style/dark/slider/core_slider_enabled.png new file mode 100644 index 0000000000000000000000000000000000000000..2b297e5ca204a811a00f1bd8f1de260715653473 GIT binary patch literal 983 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}ODvrIvjF9QQ}il>WXNX4zUH}_{tr%SMZc>meM z)_YpYo20;~@P8M1OgZ=!Bc0fIWwVSdrZ_B&77Fy(wxr%=*@PZe-?^JbVl*^GF5ilC zp71h=H7a^zwTRx)-c?@ed&~3N_i43rC>^#``1SX|!r!VN_kG{{ymqIsgA0D}#a{jL zogate`HF#_tYElTw7Z>wjp5K${;=OX&v>nVeLcY(P_)oTi0Q?eHEVe!&PZmL$7mQbJbpH9VRS#^85YNa^tX3z?Y*`+%*`dO|Mqc9w#j9gt3_N`qrAR9F-3=IF|>#_-vvYggCKUc?lrX*5IRr+QtS>)xup`|i9gvoB?w;i9pTTgfY@ zzwdV5_TM+x-rlaI^$Mt_@8FVfUE@Vfd;jj$UU&AfqEA#m!;5q0&MjLl#Wp!gIn*}P zRibUW&{YGuLqCL6&+{JsFlm)j=-$j1#bsJrZYsK8O^!RNAlM)~`%V1OzSd+{7vcSf7wRlcPzr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diff --git a/src/style/bb10style/dark/slider/core_slider_handle_disabled.png b/src/style/bb10style/dark/slider/core_slider_handle_disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..49cb6a42a76ab836000f762c02ad64951bc0d507 GIT binary patch literal 1715 zcmV;k22A;hP)5DP+z)DqfaN&8^Qg9wG9A_(@S4}J8Z(3gUJ zDwX!BPzutPLM?rgN=plZAOwR_p;Q#5f>e}j$Zl45H@lme>`otMZXAOZiSF#&$@#&+ z&MfTSJO4T7+gn-7R6JfM0;gXf(?B`1ty$s@t?$EeeGKD=RAiHQ+7a>Q)eD3iul!nM^V| zI_kOWdKLU1vJ`{dYq|<4d%_gR4W`SM6 znIH*s8aNz@L>M0*_hn3Z8p&jmYPCwc-QEREIKye}W6WOQPk@Pu3F7fMI?`-5xqJ7n zI(-v+txao-`4-rj%jL*sv*=1B62Y=88jS|P81SRc!T$qbHWG<2Fff4bB!CM>0xki@Ugz>D9kZnCK8FLA!i`SWHM@%V#evCcETK0=C8}p_*u#2 zavistP6@LOm<@$OWHK3oMkbR{u6Y*Nsgp3r0aB?{AY#jtVofTQQm2P?5@tp{SwY1W zH}~lxObXZ^3WZ1{5`h)QHBp`gVmb)37wiOzpauPn?#w05v<|{dD`A3;tB#Hup+yc(G+wDMFO|4c_#kA+0zG@>3z*&Ih<>kN$ zQ!16z$Bt$FcT$+Ifs1P6gCJRpGk=)_zS2<`fZxC_nF~U!u`G+FrKOHr3v|8=;}Y<8 zyWQTgA*)17%H^`M{)=dy?GN@&6O>9Nt(R#G!*IvTQ=R@lFW&$D1MC3y)a!Lmwj$|- z3%hsko?1;l1AG<)VE}#wW?HS*4%0NXE6Z41T%=yFD;M@I_Woxb#mh%`Cw47nHlNSC z3xIr0u~<|ttO2~tqa6f0ikI*FZ)5Mx!t(O6+StJN!QK^D-tkHlFI}19E^r+@WKv0DN`=!!#;83H{z%)&g$)s-v1eRs7xVY%vBI^iU*q*VQ zcVotR3gf-Ky^M~Ic0H}uFbozJ7Fbi{F+4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So2U!-_YN} zt!-Qd;2*8nzLyz^Ed5P3nK_xjh_dc^M=$d$>}_JNwPyPsf`ONZa@wxXz4hA08~_^u ztVjPg9WvFVATGo$D=(alVnh!QiBebH0=1+8{Sv?v2nJ$9J!RK7>A^H_j{vyOn)rmk z*Q6ltPh((U)j>WwHJIB)DAxSx2W# zQ!CoqieRAadQZ`fO|mnSJyrv_8)jR_bgg@xi_~~HqB@;}0mDD1 z!bV~zV5Y3@uuGO0-C+7d3Rr+v1E@geQueZDLddXNEXpfxwP3u2V4!h0Ovms6Gtkt{ z1+W;vLYM_S*|m)*be7#;N&6V~k%)Gf52Ee|u&Q$=)nZ2*6 z+&fO9?=EKx%*r240FDA^LNL&S_mB6Ft2zD;A8gfV8{K)r00000NkvXXu0mjftzLYx literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/slider/core_slider_inactive.png b/src/style/bb10style/dark/slider/core_slider_inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..08a1aecb6c0b8ebf0c9517b422b1e1f2b978541c GIT binary patch literal 1158 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}Pk?&eUrS_TFdVNVywkcwMxZ=Us+NtI#$@c#3g zb8onJi?lSAL^?DjL||dD9oX*8|RY~bR?o@dDW*wE5-SHZ7UOcFWMhi@b;jC zlFLG=WW}k=a#_xvx?OgdizVX5+?(lfHapbhJeW^jN_qT!vdzgSC;zCOpPWB0ecnk1 z7Xsja@uDg0`=>;FV*bE*fia^sk5z&HKu%Vkk;IwgEq|VG;!}v>cpB)#F!R`Qsn0ym zW~|j&+rqu@!KwCerN_dL|L%-gce!wm8N-AiJr<_Mo%`Q)JFgJ zXYT&o6)>;Y%x$}*&&0KB*RV2#=;`QHRQ;}6e{IYDFSmA{4$nU0Fm>DX?TK3K3=b}= zIPGHJcW2qJ!V;CabstWb3qKZC&Rv^p*0A*xQQ20MvEL#n+ws4^rmH*^QHzld99p&XwF{MjY%yZ7#ebKm%6?1jJ;5m>xp9?EBiH@FS8Kma z;$mTvZcWJ9m)x~|>eE(%4!6bSy+_{6+oYp$+cIXe&Wz5Tdp%T&{5cpEUFIDW$v-+H z$ctyM@t42<-b!aG?|mfmEhKG8_?*AD%`Y`iXIsv#Uq4xXhU=7*DXU6j*S~-9V#kyZ zSNJoYv%hw&)O~P~Pj7?hox7zgUg}?qy3-zi_Wb$!ndhHReppZejFOB0?$tSXMb18% zGAsG~u{N_qXP?{X@2m6*G0i*_&X&=7UO4rD>Gy|udYaXFI-z?%A7A_X`@4EMzINfh z$7`myo+{#5c4E`boYrNTzD^y&wzjtG{r=ljGtL!Xw4%~V<&^)g|CZbSrYijXE%)qL z*!lf;OwBAUEgxH)+m;%6`d~tVbcqemVU2LF(#UC7W&4k_CvCj3H9(_8_<&8rPath9 z)*ah@{4w*i)KcxGyMQY7w^nuu@w$Jn+RN+I5!^qc`Sq@M&Zjqp{i(CBpJMAbEp;ll zViw~RW)9I^-x=QQTDSY%*Q)ZJ#{~rOgQ+X_GxDDPd1%7dC}UuW!QkoY=d#Wzp$P#0 CIuFkP literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/slider/core_slider_vactive.png b/src/style/bb10style/dark/slider/core_slider_vactive.png new file mode 100644 index 0000000000000000000000000000000000000000..c8e467d9e67b30a6dae3274d3484537b4a9aac24 GIT binary patch literal 1066 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}P^y4UPuN(>Cl+dW+zLn>~)z3H1FlPbaf;dy0w zdighH!`mvpm(QxTOc2ZAU#98Q>1DWRqsNlHA{U!q26bpG>8udof8>}SRxI2qQWebK z)RcRax3oMk@N(7)cJsu^ci)udWM&C{&rU15cilN$Lp6bG_M>h8@29psH_`uJnf9!< zjRWW$eBc4&@!pz`ZudTHOjs{)==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r6+uJ-FKzSPUw$6lPA zY=0zaqkGV)J&QDE%rILmAb59Y?ei$Dou6L!->=VRX=ZHy`Eu=~DU-CGZrVKQhqd~N z$XT;zM^6dLi=H<1B`|P52^p((>h<-^du4g&_Vd)F?|yszqGz*yet2yE)ho?MjyafA zB|q$Mo!@--VAEp@O&!DU7bj=`KRrLL@67r0{oAkoYo8gJG3%R#4B!3TUp_8veR+QQ zw-_zC4 JWt~$(69CuH_O<{3 literal 0 HcmV?d00001 diff --git a/src/style/bb10style/dark/slider/core_slider_vdisabled.png b/src/style/bb10style/dark/slider/core_slider_vdisabled.png new file mode 100644 index 0000000000000000000000000000000000000000..27d348122b4d2cda4ef5c12af2f7397227148dc7 GIT binary patch literal 1009 zcmeAS@N?(olHy`uVBq!ia0vp^X&}tO1|%)-KS=^oY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPaw=}P^n6&FLpb&GNr;B4q#jUqD9kZp~Mc6-lchi2m zW=ol>^*YaOT@$l+KZsrw=k)UAQd7$%OSU`l`?@GDWIz6HW&DEj_~;Me8e0M;1&J*+Niwxv`>K8*wD41C~$ z>G9@0KYsb$O+2_wKKb+Q-YQV*K_Zum!2B%=xZ)LCp2+lklm@Y&EL7NbMLDj`syC+D9A{cJzuv25j(TT_DU+ze{NDg!(XK1-%8yK{SIzR}Dx?K@-g zY`T;dZdFS@Gub=a*HPfb-o1PG=iZK6ef{-)sbs#XLEo27nd^9Cy~F}$V;7ea#rlV< zUhk6k@%Nt}>SbH}H^|G-%ix)3e7Z(@5H!eQ4Y0c;6O*b1k(z1)ag(mLZvE{|v z_wVa1jg3F2ZNF{%vHD}h95*+&b5l=0^$!aRJ7@5Dr$$$spwIssE-u^O-`O|kY})bU zjS+Vwia)(KF}}G?)_?isn@^uU^**jD=Wg(KvVsysy2`yB8`ct^I1f?)52g-ea3|UjF{)vi^yZM8(tQm*3|7v#-6M&;9Yw>1$EJBCfgD zOSSh->QDH!+}Y)c#ksp-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10style/qbb10brightstyle.cpp @@ -0,0 +1,349 @@ +/*************************************************************************** +** +** Copyright (C) 2014 BlackBerry Limited. All rights reserved. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qbb10brightstyle.h" + +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +QBB10BrightStyle::QBB10BrightStyle() : + QPixmapStyle() +{ + addDescriptor(PB_Enabled, + QLatin1String("://bright/button/core_button_inactive.png"), + QMargins(13, 13, 13, 13), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_Checked, + QLatin1String("://bright/button/core_button_enabled_selected.png"), + QMargins(13, 13, 13, 13), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_Pressed, + QLatin1String("://bright/button/core_button_pressed.png"), + QMargins(13, 13, 13, 13), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_Disabled, + QLatin1String("://bright/button/core_button_disabled.png"), + QMargins(13, 13, 13, 13), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_PressedDisabled, + QLatin1String("://bright/button/core_button_disabled_selected.png"), + QMargins(13, 13, 13, 13), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + + addDescriptor(LE_Enabled, + QLatin1String("://bright/lineedit/core_textinput_bg.png"), + QMargins(8, 8, 8, 8)); + addDescriptor(LE_Disabled, + QLatin1String("://bright/lineedit/core_textinput_bg_disabled.png"), + QMargins(8, 8, 8, 8)); + addDescriptor(LE_Focused, + QLatin1String("://bright/lineedit/core_textinput_bg_highlight.png"), + QMargins(8, 8, 8, 8)); + + copyDescriptor(LE_Enabled, TE_Enabled); + copyDescriptor(LE_Disabled, TE_Disabled); + copyDescriptor(LE_Focused, TE_Focused); + + addPixmap(CB_Enabled, + QLatin1String("://bright/checkbox/core_checkbox_enabled.png"), + QMargins(16, 16, 16, 16)); + addPixmap(CB_Checked, + QLatin1String("://bright/checkbox/core_checkbox_checked.png"), + QMargins(16, 16, 16, 16)); + addPixmap(CB_Pressed, + QLatin1String("://bright/checkbox/core_checkbox_pressed.png"), + QMargins(16, 16, 16, 16)); + addPixmap(CB_PressedChecked, + QLatin1String("://bright/checkbox/core_checkbox_pressed_checked.png"), + QMargins(16, 16, 16, 16)); + addPixmap(CB_Disabled, + QLatin1String("://bright/checkbox/core_checkbox_disabled.png"), + QMargins(16, 16, 16, 16)); + addPixmap(CB_DisabledChecked, + QLatin1String("://bright/checkbox/core_checkbox_disabled_checked.png"), + QMargins(16, 16, 16, 16)); + + addPixmap(RB_Enabled, + QLatin1String("://bright/radiobutton/core_radiobutton_inactive.png"), + QMargins(16, 16, 16, 16)); + addPixmap(RB_Checked, + QLatin1String("://bright/radiobutton/core_radiobutton_checked.png"), + QMargins(16, 16, 16, 16)); + addPixmap(RB_Pressed, + QLatin1String("://bright/radiobutton/core_radiobutton_pressed.png"), + QMargins(16, 16, 16, 16)); + addPixmap(RB_Disabled, + QLatin1String("://bright/radiobutton/core_radiobutton_disabled.png"), + QMargins(16, 16, 16, 16)); + addPixmap(RB_DisabledChecked, + QLatin1String("://bright/radiobutton/core_radiobutton_disabled_checked.png"), + QMargins(16, 16, 16, 16)); + + addDescriptor(PB_HBackground, + QLatin1String("://bright/progressbar/core_progressindicator_bg.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_HContent, + QLatin1String("://bright/progressbar/core_progressindicator_fill.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_HComplete, + QLatin1String("://bright/progressbar/core_progressindicator_complete.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_VBackground, + QLatin1String("://bright/progressbar/core_progressindicator_vbg.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(PB_VContent, + QLatin1String("://bright/progressbar/core_progressindicator_vfill.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(PB_VComplete, + QLatin1String("://bright/progressbar/core_progressindicator_vcomplete.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + + addDescriptor(SG_HEnabled, + QLatin1String("://bright/slider/core_slider_enabled.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SG_HDisabled, + QLatin1String("://bright/slider/core_slider_disabled.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SG_HActiveEnabled, + QLatin1String("://bright/slider/core_slider_inactive.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SG_HActivePressed, + QLatin1String("://bright/slider/core_slider_active.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SG_HActiveDisabled, + QLatin1String("://bright/slider/core_slider_cache.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SG_VEnabled, + QLatin1String("://bright/slider/core_slider_venabled.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(SG_VDisabled, + QLatin1String("://bright/slider/core_slider_vdisabled.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(SG_VActiveEnabled, + QLatin1String("://bright/slider/core_slider_vinactive.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(SG_VActivePressed, + QLatin1String("://bright/slider/core_slider_vactive.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(SG_VActiveDisabled, + QLatin1String("://bright/slider/core_slider_vcache.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + + addPixmap(SH_HEnabled, + QLatin1String("://bright/slider/core_slider_handle.png")); + addPixmap(SH_HDisabled, + QLatin1String("://bright/slider/core_slider_handle_disabled.png")); + addPixmap(SH_HPressed, + QLatin1String("://bright/slider/core_slider_handle_pressed.png")); + addPixmap(SH_VEnabled, + QLatin1String("://bright/slider/core_slider_handle.png")); + addPixmap(SH_VDisabled, + QLatin1String("://bright/slider/core_slider_handle_disabled.png")); + addPixmap(SH_VPressed, + QLatin1String("://bright/slider/core_slider_handle_pressed.png")); + + addDescriptor(DD_ButtonEnabled, + QLatin1String("://bright/combobox/core_dropdown_button.png"), + QMargins(14, 14, 14, 14), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(DD_ButtonDisabled, + QLatin1String("://bright/combobox/core_dropdown_button_disabled.png"), + QMargins(14, 14, 14, 14), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(DD_ButtonPressed, + QLatin1String("://bright/combobox/core_dropdown_button_pressed.png"), + QMargins(14, 14, 14, 14), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(DD_ItemSelected, + QLatin1String("://bright/combobox/core_listitem_active.png")); + + addPixmap(DD_ArrowEnabled, + QLatin1String("://bright/combobox/core_dropdown_button_arrowdown.png"), + QMargins(35, 39, 35, 39)); + copyPixmap(DD_ArrowEnabled, DD_ArrowDisabled); + addPixmap(DD_ArrowPressed, + QLatin1String("://bright/combobox/core_dropdown_button_arrowdown_pressed.png"), + QMargins(35, 39, 35, 39)); + addPixmap(DD_ArrowOpen, + QLatin1String("://bright/combobox/core_dropdown_button_arrowup.png"), + QMargins(35, 39, 35, 39)); + addDescriptor(DD_PopupDown, + QLatin1String("://bright/combobox/core_dropdown_menu.png"), + QMargins(12, 12, 12, 12), + QTileRules(Qt::StretchTile, Qt::StretchTile)); + addDescriptor(DD_PopupUp, + QLatin1String("://bright/combobox/core_dropdown_menuup.png"), + QMargins(12, 12, 12, 12), + QTileRules(Qt::StretchTile, Qt::StretchTile)); + addPixmap(DD_ItemSeparator, + QLatin1String("://bright/combobox/core_dropdown_divider.png"), + QMargins(5, 0, 5, 0)); + + addDescriptor(ID_Selected, + QLatin1String("://bright/listitem/core_listitem_active.png")); + addPixmap(ID_Separator, + QLatin1String("://bright/listitem/core_listitem_divider.png")); + + addDescriptor(SB_Horizontal, + QLatin1String("://bright/scrollbar/core_scrollbar.png"), + QMargins(7, 8, 7, 8), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SB_Vertical, + QLatin1String("://bright/scrollbar/core_scrollbar_v.png"), + QMargins(8, 7, 8, 7), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); +} + +QBB10BrightStyle::~QBB10BrightStyle() +{ +} + +void QBB10BrightStyle::polish(QApplication *application) +{ + QPixmapStyle::polish(application); +} + +void QBB10BrightStyle::polish(QWidget *widget) +{ + // Hide the text by default + if (QProgressBar *pb = qobject_cast(widget)) + pb->setTextVisible(false); + + if (QComboBox *cb = qobject_cast(widget)) { + QAbstractItemView *list = cb->view(); + QPalette p = list->palette(); + p.setBrush(QPalette::HighlightedText, p.brush(QPalette::Text)); + list->setPalette(p); + } + + if (qobject_cast(widget)) { + QPalette p = widget->palette(); + p.setBrush(QPalette::Disabled, QPalette::HighlightedText, p.brush(QPalette::Text)); + widget->setPalette(p); + } + + QPixmapStyle::polish(widget); +} + +QPalette QBB10BrightStyle::standardPalette() const +{ + QPalette p; + + QColor color = QColor(38, 38, 38); + p.setBrush(QPalette::ButtonText, color); + p.setBrush(QPalette::WindowText, color); + p.setBrush(QPalette::Text, color); + + color.setAlpha(179); + p.setBrush(QPalette::Disabled, QPalette::ButtonText, color); + p.setBrush(QPalette::Disabled, QPalette::WindowText, color); + p.setBrush(QPalette::Disabled, QPalette::Text, color); + + p.setColor(QPalette::Window, QColor(248, 248, 248)); + + p.setBrush(QPalette::Highlight, QColor(0, 168, 223)); + p.setBrush(QPalette::HighlightedText, QColor(250, 250,250)); + + return p; +} + +void QBB10BrightStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const +{ + switch (element) { + case CE_PushButtonLabel: + { + const bool on = option->state & State_On || option->state & State_Sunken; + const QStyleOptionButton *button = qstyleoption_cast(option); + QStyleOptionButton newOpt = *button; + if (on) + newOpt.palette.setBrush(QPalette::ButtonText, QColor(250, 250, 250)); + QPixmapStyle::drawControl(CE_PushButtonLabel, &newOpt, painter, widget); + break; + } + case CE_ProgressBarLabel: + // Don't draw the progress bar label + break; + default: + QPixmapStyle::drawControl(element, option, painter, widget); + } +} + +void QBB10BrightStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const +{ + QPixmapStyle::drawPrimitive(element, option, painter, widget); + + if (element == PE_PanelItemViewItem) { + // Draw the checkbox for current item + if (widget->property("_pixmap_combobox_list").toBool() + && option->state & QStyle::State_Selected) { + QPixmap pix(QLatin1String("://bright/combobox/core_dropdown_checkmark.png")); + QRect rect = option->rect; + const int margin = rect.height() / 2; + QPoint pos(rect.right() - margin - pix.width() / 2, + rect.top() + margin - pix.height() / 2); + painter->drawPixmap(pos, pix); + } + } +} + +QStyle *CreateBB10BrightStyle() +{ + return(new QBB10BrightStyle); +} + +QT_END_NAMESPACE diff --git a/src/style/bb10style/qbb10brightstyle.h b/src/style/bb10style/qbb10brightstyle.h new file mode 100644 index 0000000..5840cef --- /dev/null +++ b/src/style/bb10style/qbb10brightstyle.h @@ -0,0 +1,62 @@ +/*************************************************************************** +** +** Copyright (C) 2014 BlackBerry Limited. All rights reserved. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QBB10BRIGHTSTYLE_H +#define QBB10BRIGHTSTYLE_H + +#include + +QT_BEGIN_NAMESPACE + +class QBB10BrightStyle : public QPixmapStyle +{ + Q_OBJECT + +public: + QBB10BrightStyle(); + ~QBB10BrightStyle(); + + void polish(QApplication *application) Q_DECL_OVERRIDE; + void polish(QWidget *widget) Q_DECL_OVERRIDE; + + QPalette standardPalette() const Q_DECL_OVERRIDE; + + void drawControl(ControlElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget = 0) const Q_DECL_OVERRIDE; + void drawPrimitive(PrimitiveElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const Q_DECL_OVERRIDE; +}; + +QT_END_NAMESPACE + +#endif // QBB10BRIGHTSTYLE_H diff --git a/src/style/bb10style/qbb10brightstyle.qrc b/src/style/bb10style/qbb10brightstyle.qrc new file mode 100644 index 0000000..2172536 --- /dev/null +++ b/src/style/bb10style/qbb10brightstyle.qrc @@ -0,0 +1,57 @@ + + + bright/button/core_button_disabled.png + bright/button/core_button_disabled_selected.png + bright/button/core_button_inactive.png + bright/button/core_button_enabled_selected.png + bright/button/core_button_pressed.png + bright/checkbox/core_checkbox_checked.png + bright/checkbox/core_checkbox_disabled.png + bright/checkbox/core_checkbox_disabled_checked.png + bright/checkbox/core_checkbox_enabled.png + bright/checkbox/core_checkbox_pressed.png + bright/checkbox/core_checkbox_pressed_checked.png + bright/combobox/core_dropdown_button.png + bright/combobox/core_dropdown_button_arrowdown.png + bright/combobox/core_dropdown_button_arrowdown_pressed.png + bright/combobox/core_dropdown_button_arrowup.png + bright/combobox/core_dropdown_button_disabled.png + bright/combobox/core_dropdown_button_pressed.png + bright/combobox/core_dropdown_checkmark.png + bright/combobox/core_dropdown_divider.png + bright/combobox/core_dropdown_menu.png + bright/combobox/core_dropdown_menuup.png + bright/combobox/core_listitem_active.png + bright/lineedit/core_textinput_bg.png + bright/lineedit/core_textinput_bg_disabled.png + bright/lineedit/core_textinput_bg_highlight.png + bright/listitem/core_listitem_active.png + bright/listitem/core_listitem_divider.png + bright/progressbar/core_progressindicator_bg.png + bright/progressbar/core_progressindicator_complete.png + bright/progressbar/core_progressindicator_fill.png + bright/progressbar/core_progressindicator_vbg.png + bright/progressbar/core_progressindicator_vcomplete.png + bright/progressbar/core_progressindicator_vfill.png + bright/radiobutton/core_radiobutton_checked.png + bright/radiobutton/core_radiobutton_disabled.png + bright/radiobutton/core_radiobutton_disabled_checked.png + bright/radiobutton/core_radiobutton_inactive.png + bright/radiobutton/core_radiobutton_pressed.png + bright/scrollbar/core_scrollbar.png + bright/scrollbar/core_scrollbar_v.png + bright/slider/core_slider_active.png + bright/slider/core_slider_cache.png + bright/slider/core_slider_disabled.png + bright/slider/core_slider_enabled.png + bright/slider/core_slider_handle.png + bright/slider/core_slider_handle_disabled.png + bright/slider/core_slider_handle_pressed.png + bright/slider/core_slider_inactive.png + bright/slider/core_slider_vactive.png + bright/slider/core_slider_vcache.png + bright/slider/core_slider_vdisabled.png + bright/slider/core_slider_venabled.png + bright/slider/core_slider_vinactive.png + + diff --git a/src/style/bb10style/qbb10darkstyle.cpp b/src/style/bb10style/qbb10darkstyle.cpp new file mode 100644 index 0000000..1b646e8 --- /dev/null +++ b/src/style/bb10style/qbb10darkstyle.cpp @@ -0,0 +1,354 @@ +/*************************************************************************** +** +** Copyright (C) 2014 BlackBerry Limited. All rights reserved. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qbb10darkstyle.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +QBB10DarkStyle::QBB10DarkStyle() : + QPixmapStyle() +{ + addDescriptor(PB_Enabled, + QLatin1String("://dark/button/core_button_inactive.png"), + QMargins(13, 13, 13, 13), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_Checked, + QLatin1String("://dark/button/core_button_enabled_selected.png"), + QMargins(13, 13, 13, 13), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_Pressed, + QLatin1String("://dark/button/core_button_pressed.png"), + QMargins(13, 13, 13, 13), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_Disabled, + QLatin1String("://dark/button/core_button_disabled.png"), + QMargins(13, 13, 13, 13), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_PressedDisabled, + QLatin1String("://dark/button/core_button_disabled_selected.png"), + QMargins(13, 13, 13, 13), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + + addDescriptor(LE_Enabled, + QLatin1String("://dark/lineedit/core_textinput_bg.png"), + QMargins(8, 8, 8, 8)); + addDescriptor(LE_Disabled, + QLatin1String("://dark/lineedit/core_textinput_bg_disabled.png"), + QMargins(8, 8, 8, 8)); + addDescriptor(LE_Focused, + QLatin1String("://dark/lineedit/core_textinput_bg_highlight.png"), + QMargins(8, 8, 8, 8)); + + copyDescriptor(LE_Enabled, TE_Enabled); + copyDescriptor(LE_Disabled, TE_Disabled); + copyDescriptor(LE_Focused, TE_Focused); + + addPixmap(CB_Enabled, + QLatin1String("://dark/checkbox/core_checkbox_enabled.png"), + QMargins(16, 16, 16, 16)); + addPixmap(CB_Checked, + QLatin1String("://dark/checkbox/core_checkbox_checked.png"), + QMargins(16, 16, 16, 16)); + addPixmap(CB_Pressed, + QLatin1String("://dark/checkbox/core_checkbox_pressed.png"), + QMargins(16, 16, 16, 16)); + addPixmap(CB_PressedChecked, + QLatin1String("://dark/checkbox/core_checkbox_pressed_checked.png"), + QMargins(16, 16, 16, 16)); + addPixmap(CB_Disabled, + QLatin1String("://dark/checkbox/core_checkbox_disabled.png"), + QMargins(16, 16, 16, 16)); + addPixmap(CB_DisabledChecked, + QLatin1String("://dark/checkbox/core_checkbox_disabled_checked.png"), + QMargins(16, 16, 16, 16)); + + addPixmap(RB_Enabled, + QLatin1String("://dark/radiobutton/core_radiobutton_inactive.png"), + QMargins(16, 16, 16, 16)); + addPixmap(RB_Checked, + QLatin1String("://dark/radiobutton/core_radiobutton_checked.png"), + QMargins(16, 16, 16, 16)); + addPixmap(RB_Pressed, + QLatin1String("://dark/radiobutton/core_radiobutton_pressed.png"), + QMargins(16, 16, 16, 16)); + addPixmap(RB_Disabled, + QLatin1String("://dark/radiobutton/core_radiobutton_disabled.png"), + QMargins(16, 16, 16, 16)); + addPixmap(RB_DisabledChecked, + QLatin1String("://dark/radiobutton/core_radiobutton_disabled_checked.png"), + QMargins(16, 16, 16, 16)); + + addDescriptor(PB_HBackground, + QLatin1String("://dark/progressbar/core_progressindicator_bg.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_HContent, + QLatin1String("://dark/progressbar/core_progressindicator_fill.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_HComplete, + QLatin1String("://dark/progressbar/core_progressindicator_complete.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(PB_VBackground, + QLatin1String("://dark/progressbar/core_progressindicator_vbg.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(PB_VContent, + QLatin1String("://dark/progressbar/core_progressindicator_vfill.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(PB_VComplete, + QLatin1String("://dark/progressbar/core_progressindicator_vcomplete.png"), + QMargins(10, 10, 10, 10), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + + addDescriptor(SG_HEnabled, + QLatin1String("://dark/slider/core_slider_enabled.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SG_HDisabled, + QLatin1String("://dark/slider/core_slider_disabled.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SG_HActiveEnabled, + QLatin1String("://dark/slider/core_slider_inactive.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SG_HActivePressed, + QLatin1String("://dark/slider/core_slider_active.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SG_HActiveDisabled, + QLatin1String("://dark/slider/core_slider_cache.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SG_VEnabled, + QLatin1String("://dark/slider/core_slider_venabled.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(SG_VDisabled, + QLatin1String("://dark/slider/core_slider_vdisabled.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(SG_VActiveEnabled, + QLatin1String("://dark/slider/core_slider_vinactive.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(SG_VActivePressed, + QLatin1String("://dark/slider/core_slider_vactive.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + addDescriptor(SG_VActiveDisabled, + QLatin1String("://dark/slider/core_slider_vcache.png"), + QMargins(50, 50, 50, 50), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); + + addPixmap(SH_HEnabled, + QLatin1String("://dark/slider/core_slider_handle.png")); + addPixmap(SH_HDisabled, + QLatin1String("://dark/slider/core_slider_handle_disabled.png")); + addPixmap(SH_HPressed, + QLatin1String("://dark/slider/core_slider_handle_pressed.png")); + addPixmap(SH_VEnabled, + QLatin1String("://dark/slider/core_slider_handle.png")); + addPixmap(SH_VDisabled, + QLatin1String("://dark/slider/core_slider_handle_disabled.png")); + addPixmap(SH_VPressed, + QLatin1String("://dark/slider/core_slider_handle_pressed.png")); + + addDescriptor(DD_ButtonEnabled, + QLatin1String("://dark/combobox/core_dropdown_button.png"), + QMargins(14, 14, 14, 14), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(DD_ButtonDisabled, + QLatin1String("://dark/combobox/core_dropdown_button_disabled.png"), + QMargins(14, 14, 14, 14), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(DD_ButtonPressed, + QLatin1String("://dark/combobox/core_dropdown_button_pressed.png"), + QMargins(14, 14, 14, 14), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(DD_ItemSelected, + QLatin1String("://dark/combobox/core_listitem_active.png")); + addPixmap(DD_ArrowEnabled, + QLatin1String("://dark/combobox/core_dropdown_button_arrowdown.png"), + QMargins(35, 39, 35, 39)); + copyPixmap(DD_ArrowEnabled, DD_ArrowDisabled); + addPixmap(DD_ArrowPressed, + QLatin1String("://dark/combobox/core_dropdown_button_arrowdown_pressed.png"), + QMargins(35, 39, 35, 39)); + addPixmap(DD_ArrowOpen, + QLatin1String("://dark/combobox/core_dropdown_button_arrowup.png"), + QMargins(35, 39, 35, 39)); + addDescriptor(DD_PopupDown, + QLatin1String("://dark/combobox/core_dropdown_menu.png"), + QMargins(12, 12, 12, 12), QTileRules(Qt::StretchTile, Qt::StretchTile)); + addDescriptor(DD_PopupUp, + QLatin1String("://dark/combobox/core_dropdown_menuup.png"), + QMargins(12, 12, 12, 12), QTileRules(Qt::StretchTile, Qt::StretchTile)); + addPixmap(DD_ItemSeparator, + QLatin1String("://dark/combobox/core_dropdown_divider.png"), + QMargins(5, 0, 5, 0)); + + addDescriptor(ID_Selected, + QLatin1String("://dark/listitem/core_listitem_active.png")); + addPixmap(ID_Separator, + QLatin1String("://dark/listitem/core_listitem_divider.png")); + + addDescriptor(SB_Horizontal, + QLatin1String("://dark/scrollbar/core_scrollbar.png"), + QMargins(7, 8, 7, 8), + QTileRules(Qt::RepeatTile, Qt::StretchTile)); + addDescriptor(SB_Vertical, + QLatin1String("://dark/scrollbar/core_scrollbar_v.png"), + QMargins(8, 7, 8, 7), + QTileRules(Qt::StretchTile, Qt::RepeatTile)); +} + +QBB10DarkStyle::~QBB10DarkStyle() +{ +} + +void QBB10DarkStyle::polish(QApplication *application) +{ + QPixmapStyle::polish(application); +} + +void QBB10DarkStyle::polish(QWidget *widget) +{ + // Hide the text by default + if (QProgressBar *pb = qobject_cast(widget)) + pb->setTextVisible(false); + + if (QComboBox *cb = qobject_cast(widget)) { + QAbstractItemView *list = cb->view(); + QPalette p = list->palette(); + p.setBrush(QPalette::HighlightedText, p.brush(QPalette::Text)); + list->setPalette(p); + } + + if (qobject_cast(widget) || qobject_cast(widget)) { + QPalette p = widget->palette(); + p.setBrush(QPalette::Text, QColor(38, 38, 38)); + widget->setPalette(p); + } + + if (qobject_cast(widget)) { + QPalette p = widget->palette(); + p.setBrush(QPalette::Disabled, QPalette::HighlightedText, p.brush(QPalette::Text)); + widget->setPalette(p); + } + + QPixmapStyle::polish(widget); +} + +QPalette QBB10DarkStyle::standardPalette() const +{ + QPalette p; + + QColor color = QColor(250, 250, 250); + p.setBrush(QPalette::ButtonText, color); + p.setBrush(QPalette::WindowText, color); + p.setBrush(QPalette::Text, color); + + color.setAlpha(179); + p.setBrush(QPalette::Disabled, QPalette::ButtonText, color); + p.setBrush(QPalette::Disabled, QPalette::WindowText, color); + p.setBrush(QPalette::Disabled, QPalette::Text, color); + + p.setColor(QPalette::Window, QColor(18, 18, 18)); + + p.setBrush(QPalette::Highlight, QColor(0, 168, 223)); + p.setBrush(QPalette::HighlightedText, QColor(250, 250,250)); + + return p; +} + +void QBB10DarkStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const +{ + switch (element) { + case CE_PushButtonLabel: + { + const bool on = option->state & State_On || option->state & State_Sunken; + const QStyleOptionButton *button = qstyleoption_cast(option); + QStyleOptionButton newOpt = *button; + if (on) + newOpt.palette.setBrush(QPalette::ButtonText, QColor(38, 38, 38)); + QPixmapStyle::drawControl(CE_PushButtonLabel, &newOpt, painter, widget); + break; + } + case CE_ProgressBarLabel: + // Don't draw the progress bar label + break; + default: + QPixmapStyle::drawControl(element, option, painter, widget); + } +} + +void QBB10DarkStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const +{ + QPixmapStyle::drawPrimitive(element, option, painter, widget); + + if (element == PE_PanelItemViewItem) { + // Draw the checkbox for current item + if (widget->property("_pixmap_combobox_list").toBool() + && option->state & QStyle::State_Selected) { + QPixmap pix(QLatin1String("://dark/combobox/core_dropdown_checkmark.png")); + QRect rect = option->rect; + const int margin = rect.height() / 2; + QPoint pos(rect.right() - margin - pix.width() / 2, + rect.top() + margin - pix.height() / 2); + painter->drawPixmap(pos, pix); + } + } +} + +QStyle *CreateBB10DarkStyle() +{ + return(new QBB10DarkStyle); +} + +QT_END_NAMESPACE diff --git a/src/style/bb10style/qbb10darkstyle.h b/src/style/bb10style/qbb10darkstyle.h new file mode 100644 index 0000000..cd75b94 --- /dev/null +++ b/src/style/bb10style/qbb10darkstyle.h @@ -0,0 +1,62 @@ +/*************************************************************************** +** +** Copyright (C) 2014 BlackBerry Limited. All rights reserved. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QBB10DARKSTYLE_H +#define QBB10DARKSTYLE_H + +#include + +QT_BEGIN_NAMESPACE + +class QBB10DarkStyle : public QPixmapStyle +{ + Q_OBJECT + +public: + QBB10DarkStyle(); + ~QBB10DarkStyle(); + + void polish(QApplication *application) Q_DECL_OVERRIDE; + void polish(QWidget *widget) Q_DECL_OVERRIDE; + + QPalette standardPalette() const Q_DECL_OVERRIDE; + + void drawControl(ControlElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget = 0) const Q_DECL_OVERRIDE; + void drawPrimitive(PrimitiveElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const Q_DECL_OVERRIDE; +}; + +QT_END_NAMESPACE + +#endif // QBB10DARKSTYLE_H diff --git a/src/style/bb10style/qbb10darkstyle.qrc b/src/style/bb10style/qbb10darkstyle.qrc new file mode 100644 index 0000000..31a5236 --- /dev/null +++ b/src/style/bb10style/qbb10darkstyle.qrc @@ -0,0 +1,57 @@ + + + dark/button/core_button_disabled.png + dark/button/core_button_disabled_selected.png + dark/button/core_button_inactive.png + dark/button/core_button_enabled_selected.png + dark/button/core_button_pressed.png + dark/checkbox/core_checkbox_checked.png + dark/checkbox/core_checkbox_disabled.png + dark/checkbox/core_checkbox_disabled_checked.png + dark/checkbox/core_checkbox_enabled.png + dark/checkbox/core_checkbox_pressed.png + dark/checkbox/core_checkbox_pressed_checked.png + dark/combobox/core_dropdown_button.png + dark/combobox/core_dropdown_button_arrowdown.png + dark/combobox/core_dropdown_button_arrowdown_pressed.png + dark/combobox/core_dropdown_button_arrowup.png + dark/combobox/core_dropdown_button_disabled.png + dark/combobox/core_dropdown_button_pressed.png + dark/combobox/core_dropdown_checkmark.png + dark/combobox/core_dropdown_divider.png + dark/combobox/core_dropdown_menu.png + dark/combobox/core_dropdown_menuup.png + dark/combobox/core_listitem_active.png + dark/lineedit/core_textinput_bg.png + dark/lineedit/core_textinput_bg_disabled.png + dark/lineedit/core_textinput_bg_highlight.png + dark/listitem/core_listitem_active.png + dark/listitem/core_listitem_divider.png + dark/progressbar/core_progressindicator_bg.png + dark/progressbar/core_progressindicator_complete.png + dark/progressbar/core_progressindicator_fill.png + dark/progressbar/core_progressindicator_vbg.png + dark/progressbar/core_progressindicator_vcomplete.png + dark/progressbar/core_progressindicator_vfill.png + dark/radiobutton/core_radiobutton_checked.png + dark/radiobutton/core_radiobutton_disabled.png + dark/radiobutton/core_radiobutton_disabled_checked.png + dark/radiobutton/core_radiobutton_inactive.png + dark/radiobutton/core_radiobutton_pressed.png + dark/scrollbar/core_scrollbar.png + dark/scrollbar/core_scrollbar_v.png + dark/slider/core_slider_active.png + dark/slider/core_slider_cache.png + dark/slider/core_slider_disabled.png + dark/slider/core_slider_enabled.png + dark/slider/core_slider_handle.png + dark/slider/core_slider_handle_disabled.png + dark/slider/core_slider_handle_pressed.png + dark/slider/core_slider_inactive.png + dark/slider/core_slider_vactive.png + dark/slider/core_slider_vcache.png + dark/slider/core_slider_vdisabled.png + dark/slider/core_slider_venabled.png + dark/slider/core_slider_vinactive.png + + diff --git a/src/style/cleanlooks/qcleanlooksstyle.cpp b/src/style/cleanlooks/qcleanlooksstyle.cpp new file mode 100644 index 0000000..74c6299 --- /dev/null +++ b/src/style/cleanlooks/qcleanlooksstyle.cpp @@ -0,0 +1,4492 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qcleanlooksstyle.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qstylehelper_p.h" +#include "qstylecache_p.h" + +QT_BEGIN_NAMESPACE + +using namespace QStyleHelper; + +enum Direction { + TopDown, + FromLeft, + BottomUp, + FromRight +}; + +// from windows style +static const int windowsItemFrame = 2; // menu item frame width +static const int windowsItemHMargin = 3; // menu item hor text margin +static const int windowsItemVMargin = 8; // menu item ver text margin +static const int windowsRightBorder = 15; // right border on windows +static const int progressAnimationFps = 24; + +/* XPM */ +static const char * const dock_widget_close_xpm[] = { + "11 13 7 1", + " c None", + ". c #D5CFCB", + "+ c #8F8B88", + "@ c #6C6A67", + "# c #ABA6A3", + "$ c #B5B0AC", + "% c #A4A09D", + " ", + " +@@@@@@@+ ", + "+# #+", + "@ $@ @$ @", + "@ @@@ @@@ @", + "@ @@@@@ @", + "@ @@@ @", + "@ @@@@@ @", + "@ @@@ @@@ @", + "@ $@ @$ @", + "+% #+", + " +@@@@@@@+ ", + " "}; + +static const char * const qt_cleanlooks_arrow_down_xpm[] = { + "11 7 2 1", + " c None", + "x c #000000", + " ", + " x x ", + " xxx xxx ", + " xxxxxxx ", + " xxxxx ", + " xxx ", + " x "}; + +static const char * const qt_cleanlooks_arrow_up_xpm[] = { + "11 7 2 1", + " c None", + "x c #000000", + " x ", + " xxx ", + " xxxxx ", + " xxxxxxx ", + " xxx xxx ", + " x x ", + " "}; + +static const char * const dock_widget_restore_xpm[] = { + "11 13 7 1", + " c None", + ". c #D5CFCB", + "+ c #8F8B88", + "@ c #6C6A67", + "# c #ABA6A3", + "$ c #B5B0AC", + "% c #A4A09D", + " ", + " +@@@@@@@+ ", + "+# #+", + "@ #@@@# @", + "@ @ @ @", + "@ #@@@# @ @", + "@ @ @ @ @", + "@ @ @@@ @", + "@ @ @ @", + "@ #@@@# @", + "+% #+", + " +@@@@@@@+ ", + " "}; + +static const char * const workspace_minimize[] = { + "11 13 7 1", + " c None", + ". c #D5CFCB", + "+ c #8F8B88", + "@ c #6C6A67", + "# c #ABA6A3", + "$ c #B5B0AC", + "% c #A4A09D", + " ", + " +@@@@@@@+ ", + "+# #+", + "@ @", + "@ @", + "@ @", + "@ @@@@@@@ @", + "@ @@@@@@@ @", + "@ @", + "@ @", + "+% #+", + " +@@@@@@@+ ", + " "}; + + +static const char * const qt_titlebar_context_help[] = { + "10 10 3 1", + " c None", + "# c #000000", + "+ c #444444", + " +####+ ", + " ### ### ", + " ## ## ", + " +##+ ", + " +## ", + " ## ", + " ## ", + " ", + " ## ", + " ## "}; + +static const char * const qt_cleanlooks_radiobutton[] = { + "13 13 9 1", + " c None", + ". c #ABA094", + "+ c #B7ADA0", + "@ c #C4BBB2", + "# c #DDD4CD", + "$ c #E7E1E0", + "% c #F4EFED", + "& c #FFFAF9", + "* c #FCFEFB", + " #@...@# ", + " @+@#$$#+@ ", + " @+$%%***&@@ ", + "#+$%**&&**&+#", + "@@$&&******#@", + ".#**********.", + ".$&******&*&.", + ".$*&******&*.", + "+#********&#@", + "#+*********+#", + " @@*******@@ ", + " @+#%*%#+@ ", + " #@...+# "}; + +static const char * const qt_cleanlooks_radiobutton_checked[] = { + "13 13 20 1", + " c None", + ". c #A8ABAE", + "+ c #596066", + "@ c #283138", + "# c #A9ACAF", + "$ c #A6A9AB", + "% c #6B7378", + "& c #8C9296", + "* c #A2A6AA", + "= c #61696F", + "- c #596065", + "; c #93989C", + "> c #777E83", + ", c #60686E", + "' c #252D33", + ") c #535B62", + "! c #21292E", + "~ c #242B31", + "{ c #1F262B", + "] c #41484E", + " ", + " ", + " ", + " .+@+# ", + " $%&*&=# ", + " -&;>,'+ ", + " @*>,)!@ ", + " +&,)~{+ ", + " #='!{]# ", + " #+@+# ", + " ", + " ", + " "}; + + +static const char * const qt_scrollbar_button_arrow_left[] = { + "4 7 2 1", + " c None", + "* c #BFBFBF", + " *", + " **", + " ***", + "****", + " ***", + " **", + " *"}; + +static const char * const qt_scrollbar_button_arrow_right[] = { + "4 7 2 1", + " c None", + "* c #BFBFBF", + "* ", + "** ", + "*** ", + "****", + "*** ", + "** ", + "* "}; + +static const char * const qt_scrollbar_button_arrow_up[] = { + "7 4 2 1", + " c None", + "* c #BFBFBF", + " * ", + " *** ", + " ***** ", + "*******"}; + +static const char * const qt_scrollbar_button_arrow_down[] = { + "7 4 2 1", + " c None", + "* c #BFBFBF", + "*******", + " ***** ", + " *** ", + " * "}; + +static const char * const qt_spinbox_button_arrow_down[] = { + "7 4 2 1", + " c None", + "* c #BFBFBF", + "*******", + " ***** ", + " *** ", + " * "}; + +static const char * const qt_spinbox_button_arrow_up[] = { + "7 4 2 1", + " c None", + "* c #BFBFBF", + " * ", + " *** ", + " ***** ", + "*******"}; + +static const char * const qt_scrollbar_button_left[] = { + "16 16 6 1", + " c None", + ". c #BFBFBF", + "+ c #979797", + "# c #FAFAFA", + "< c #FAFAFA", + "* c #FAFAFA", + " .++++++++++++++", + ".+#############+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + ".+<<<<<<<<<<<<<+", + " .++++++++++++++"}; + +static const char * const qt_scrollbar_button_right[] = { + "16 16 6 1", + " c None", + ". c #BFBFBF", + "+ c #979797", + "# c #FAFAFA", + "< c #FAFAFA", + "* c #FAFAFA", + "++++++++++++++. ", + "+#############+.", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+<<<<<<<<<<<<<+.", + "++++++++++++++. "}; + +static const char * const qt_scrollbar_button_up[] = { + "16 16 6 1", + " c None", + ". c #BFBFBF", + "+ c #979797", + "# c #FAFAFA", + "< c #FAFAFA", + "* c #FAFAFA", + " .++++++++++++. ", + ".+############+.", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+<<<<<<<<<<<<<<+", + "++++++++++++++++"}; + +static const char * const qt_scrollbar_button_down[] = { + "16 16 6 1", + " c None", + ". c #BFBFBF", + "+ c #979797", + "# c #FAFAFA", + "< c #FAFAFA", + "* c #FAFAFA", + "++++++++++++++++", + "+##############+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + ".+<<<<<<<<<<<<+.", + " .++++++++++++. "}; + +static const char * const qt_cleanlooks_menuitem_checkbox_checked[] = { + "8 7 6 1", + " g None", + ". g #959595", + "+ g #676767", + "@ g #454545", + "# g #1D1D1D", + "0 g #101010", + " ..", + " .+ ", + " .+ ", + "0 .@ ", + "@#++. ", + " @# ", + " . "}; + +static const char * const qt_cleanlooks_checkbox_checked[] = { + "13 13 3 1", + " c None", + ". c #272D33", + "% c #666666", + + " ", + " % ", + " %. ", + " %.% ", + " %.. ", + " %.% %.. ", + " %..%..% ", + " %...% ", + " %..% ", + " %.% ", + " % ", + " ", + " "}; + +static void qt_cleanlooks_draw_gradient(QPainter *painter, const QRect &rect, const QColor &gradientStart, + const QColor &gradientStop, Direction direction = TopDown, QBrush bgBrush = QBrush()) +{ + int x = rect.center().x(); + int y = rect.center().y(); + QLinearGradient *gradient; + switch (direction) { + case FromLeft: + gradient = new QLinearGradient(rect.left(), y, rect.right(), y); + break; + case FromRight: + gradient = new QLinearGradient(rect.right(), y, rect.left(), y); + break; + case BottomUp: + gradient = new QLinearGradient(x, rect.bottom(), x, rect.top()); + break; + case TopDown: + default: + gradient = new QLinearGradient(x, rect.top(), x, rect.bottom()); + break; + } + if (bgBrush.gradient()) + gradient->setStops(bgBrush.gradient()->stops()); + else { + gradient->setColorAt(0, gradientStart); + gradient->setColorAt(1, gradientStop); + } + painter->fillRect(rect, *gradient); + delete gradient; +} + +static void qt_cleanlooks_draw_buttongradient(QPainter *painter, const QRect &rect, const QColor &gradientStart, + const QColor &gradientMid, const QColor &gradientStop, Direction direction = TopDown, + QBrush bgBrush = QBrush()) +{ + int x = rect.center().x(); + int y = rect.center().y(); + QLinearGradient *gradient; + bool horizontal = false; + switch (direction) { + case FromLeft: + horizontal = true; + gradient = new QLinearGradient(rect.left(), y, rect.right(), y); + break; + case FromRight: + horizontal = true; + gradient = new QLinearGradient(rect.right(), y, rect.left(), y); + break; + case BottomUp: + gradient = new QLinearGradient(x, rect.bottom(), x, rect.top()); + break; + case TopDown: + default: + gradient = new QLinearGradient(x, rect.top(), x, rect.bottom()); + break; + } + if (bgBrush.gradient()) + gradient->setStops(bgBrush.gradient()->stops()); + else { + int size = horizontal ? rect.width() : rect.height() ; + if (size > 4) { + float edge = 4.0/(float)size; + gradient->setColorAt(0, gradientStart); + gradient->setColorAt(edge, gradientMid.lighter(104)); + gradient->setColorAt(1.0 - edge, gradientMid.darker(100)); + gradient->setColorAt(1.0, gradientStop); + } + } + painter->fillRect(rect, *gradient); + delete gradient; +} + +static void qt_cleanlooks_draw_mdibutton(QPainter *painter, const QStyleOptionTitleBar *option, const QRect &tmp, bool hover, bool sunken) +{ + QColor dark; + dark.setHsv(option->palette.button().color().hue(), + qMin(255, (int)(option->palette.button().color().saturation()*1.9)), + qMin(255, (int)(option->palette.button().color().value()*0.7))); + + QColor highlight = option->palette.highlight().color(); + + bool active = (option->titleBarState & QStyle::State_Active); + QColor titleBarHighlight(255, 255, 255, 60); + + if (sunken) + painter->fillRect(tmp.adjusted(1, 1, -1, -1), option->palette.highlight().color().darker(120)); + else if (hover) + painter->fillRect(tmp.adjusted(1, 1, -1, -1), QColor(255, 255, 255, 20)); + + QColor mdiButtonGradientStartColor; + QColor mdiButtonGradientStopColor; + + mdiButtonGradientStartColor = QColor(0, 0, 0, 40); + mdiButtonGradientStopColor = QColor(255, 255, 255, 60); + + if (sunken) + titleBarHighlight = highlight.darker(130); + + QLinearGradient gradient(tmp.center().x(), tmp.top(), tmp.center().x(), tmp.bottom()); + gradient.setColorAt(0, mdiButtonGradientStartColor); + gradient.setColorAt(1, mdiButtonGradientStopColor); + QColor mdiButtonBorderColor(active ? option->palette.highlight().color().darker(180): dark.darker(110)); + + painter->setPen(QPen(mdiButtonBorderColor, 1)); + const QLine lines[4] = { + QLine(tmp.left() + 2, tmp.top(), tmp.right() - 2, tmp.top()), + QLine(tmp.left() + 2, tmp.bottom(), tmp.right() - 2, tmp.bottom()), + QLine(tmp.left(), tmp.top() + 2, tmp.left(), tmp.bottom() - 2), + QLine(tmp.right(), tmp.top() + 2, tmp.right(), tmp.bottom() - 2) + }; + painter->drawLines(lines, 4); + const QPoint points[4] = { + QPoint(tmp.left() + 1, tmp.top() + 1), + QPoint(tmp.right() - 1, tmp.top() + 1), + QPoint(tmp.left() + 1, tmp.bottom() - 1), + QPoint(tmp.right() - 1, tmp.bottom() - 1) + }; + painter->drawPoints(points, 4); + + painter->setPen(titleBarHighlight); + painter->drawLine(tmp.left() + 2, tmp.top() + 1, tmp.right() - 2, tmp.top() + 1); + painter->drawLine(tmp.left() + 1, tmp.top() + 2, tmp.left() + 1, tmp.bottom() - 2); + + painter->setPen(QPen(gradient, 1)); + painter->drawLine(tmp.right() + 1, tmp.top() + 2, tmp.right() + 1, tmp.bottom() - 2); + painter->drawPoint(tmp.right() , tmp.top() + 1); + + painter->drawLine(tmp.left() + 2, tmp.bottom() + 1, tmp.right() - 2, tmp.bottom() + 1); + painter->drawPoint(tmp.left() + 1, tmp.bottom()); + painter->drawPoint(tmp.right() - 1, tmp.bottom()); + painter->drawPoint(tmp.right() , tmp.bottom() - 1); +} + +/*! + \class QCleanlooksStyle + \brief The QCleanlooksStyle class provides a widget style similar to the + Clearlooks style available in GNOME. + \since 4.2 + + \inmodule QtWidgets + + The Cleanlooks style provides a look and feel for widgets + that closely resembles the Clearlooks style, introduced by Richard + Stellingwerff and Daniel Borgmann. + + \sa {Cleanlooks Style Widget Gallery}, QWindowsXPStyle, QMacStyle, QWindowsStyle, + QPlastiqueStyle +*/ + +/*! + Constructs a QCleanlooksStyle object. +*/ +QCleanlooksStyle::QCleanlooksStyle() : QProxyStyle(QStyleFactory::create(QLatin1String("Windows"))), animateStep(0), animateTimer(0) +{ + setObjectName(QLatin1String("CleanLooks")); +} + +/*! + Destroys the QCleanlooksStyle object. +*/ +QCleanlooksStyle::~QCleanlooksStyle() +{ +} + +/*! + \fn void QCleanlooksStyle::drawItemText(QPainter *painter, const QRect &rectangle, int alignment, const QPalette &palette, + bool enabled, const QString& text, QPalette::ColorRole textRole) const + + Draws the given \a text in the specified \a rectangle using the + provided \a painter and \a palette. + + Text is drawn using the painter's pen. If an explicit \a textRole + is specified, then the text is drawn using the \a palette's color + for the specified role. The \a enabled value indicates whether or + not the item is enabled; when reimplementing, this value should + influence how the item is drawn. + + The text is aligned and wrapped according to the specified \a + alignment. + + \sa Qt::Alignment +*/ +void QCleanlooksStyle::drawItemText(QPainter *painter, const QRect &rect, int alignment, const QPalette &pal, + bool enabled, const QString& text, QPalette::ColorRole textRole) const +{ + if (text.isEmpty()) + return; + + QPen savedPen = painter->pen(); + if (textRole != QPalette::NoRole) { + painter->setPen(QPen(pal.brush(textRole), savedPen.widthF())); + } + if (!enabled) { + QPen pen = painter->pen(); + painter->setPen(pen); + } + painter->drawText(rect, alignment, text); + painter->setPen(savedPen); +} + +static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50) +{ + const int maxFactor = 100; + QColor tmp = colorA; + tmp.setRed((tmp.red() * factor) / maxFactor + (colorB.red() * (maxFactor - factor)) / maxFactor); + tmp.setGreen((tmp.green() * factor) / maxFactor + (colorB.green() * (maxFactor - factor)) / maxFactor); + tmp.setBlue((tmp.blue() * factor) / maxFactor + (colorB.blue() * (maxFactor - factor)) / maxFactor); + return tmp; +} + +/*! + \reimp +*/ +void QCleanlooksStyle::drawPrimitive(PrimitiveElement elem, + const QStyleOption *option, + QPainter *painter, const QWidget *widget) const +{ + Q_ASSERT(option); + QRect rect = option->rect; + int state = option->state; + QColor button = option->palette.button().color(); + QColor buttonShadow = option->palette.button().color().darker(110); + QColor buttonShadowAlpha = buttonShadow; + buttonShadowAlpha.setAlpha(128); + QColor darkOutline; + QColor dark; + darkOutline.setHsv(button.hue(), + qMin(255, (int)(button.saturation()*3.0)), + qMin(255, (int)(button.value()*0.6))); + dark.setHsv(button.hue(), + qMin(255, (int)(button.saturation()*1.9)), + qMin(255, (int)(button.value()*0.7))); + QColor tabFrameColor = mergedColors(option->palette.background().color(), + dark.lighter(135), 60); + + switch (elem) { +#ifndef QT_NO_TABBAR + case PE_FrameTabBarBase: + if (const QStyleOptionTabBarBase *tbb + = qstyleoption_cast(option)) { + painter->save(); + painter->setPen(QPen(darkOutline.lighter(110), 0)); + switch (tbb->shape) { + case QTabBar::RoundedNorth: { + QRegion region(tbb->rect); + region -= tbb->selectedTabRect; + painter->drawLine(tbb->rect.topLeft(), tbb->rect.topRight()); + painter->setClipRegion(region); + painter->setPen(option->palette.light().color()); + painter->drawLine(tbb->rect.topLeft() + QPoint(0, 1), + tbb->rect.topRight() + QPoint(0, 1)); + } + break; + case QTabBar::RoundedWest: + painter->drawLine(tbb->rect.left(), tbb->rect.top(), tbb->rect.left(), tbb->rect.bottom()); + break; + case QTabBar::RoundedSouth: + painter->drawLine(tbb->rect.left(), tbb->rect.bottom(), + tbb->rect.right(), tbb->rect.bottom()); + break; + case QTabBar::RoundedEast: + painter->drawLine(tbb->rect.topRight(), tbb->rect.bottomRight()); + break; + case QTabBar::TriangularNorth: + case QTabBar::TriangularEast: + case QTabBar::TriangularWest: + case QTabBar::TriangularSouth: + painter->restore(); + QProxyStyle::drawPrimitive(elem, option, painter, widget); + return; + } + painter->restore(); + } + return; +#endif // QT_NO_TABBAR + case PE_IndicatorViewItemCheck: + { + QStyleOptionButton button; + button.QStyleOption::operator=(*option); + button.state &= ~State_MouseOver; + proxy()->drawPrimitive(PE_IndicatorCheckBox, &button, painter, widget); + } + return; + case PE_IndicatorHeaderArrow: + if (const QStyleOptionHeader *header = qstyleoption_cast(option)) { + QRect r = header->rect; + QImage arrow; + if (header->sortIndicator & QStyleOptionHeader::SortUp) + arrow = QImage(qt_cleanlooks_arrow_up_xpm); + else if (header->sortIndicator & QStyleOptionHeader::SortDown) + arrow = QImage(qt_cleanlooks_arrow_down_xpm); + if (!arrow.isNull()) { + r.setSize(arrow.size()); + r.moveCenter(header->rect.center()); + arrow.setColor(1, header->palette.foreground().color().rgba()); + painter->drawImage(r, arrow); + } + } + break; + case PE_IndicatorButtonDropDown: + proxy()->drawPrimitive(PE_PanelButtonCommand, option, painter, widget); + break; + case PE_IndicatorToolBarSeparator: + { + QRect rect = option->rect; + const int margin = 6; + if (option->state & State_Horizontal) { + const int offset = rect.width()/2; + painter->setPen(QPen(option->palette.background().color().darker(110))); + painter->drawLine(rect.bottomLeft().x() + offset, + rect.bottomLeft().y() - margin, + rect.topLeft().x() + offset, + rect.topLeft().y() + margin); + painter->setPen(QPen(option->palette.background().color().lighter(110))); + painter->drawLine(rect.bottomLeft().x() + offset + 1, + rect.bottomLeft().y() - margin, + rect.topLeft().x() + offset + 1, + rect.topLeft().y() + margin); + } else { //Draw vertical separator + const int offset = rect.height()/2; + painter->setPen(QPen(option->palette.background().color().darker(110))); + painter->drawLine(rect.topLeft().x() + margin , + rect.topLeft().y() + offset, + rect.topRight().x() - margin, + rect.topRight().y() + offset); + painter->setPen(QPen(option->palette.background().color().lighter(110))); + painter->drawLine(rect.topLeft().x() + margin , + rect.topLeft().y() + offset + 1, + rect.topRight().x() - margin, + rect.topRight().y() + offset + 1); + } + } + break; + case PE_Frame: + painter->save(); + painter->setPen(dark.lighter(108)); + painter->drawRect(option->rect.adjusted(0, 0, -1, -1)); + painter->restore(); + break; + case PE_FrameMenu: + painter->save(); + { + painter->setPen(QPen(darkOutline, 1)); + painter->drawRect(option->rect.adjusted(0, 0, -1, -1)); + QColor frameLight = option->palette.background().color().lighter(160); + QColor frameShadow = option->palette.background().color().darker(110); + + //paint beveleffect + QRect frame = option->rect.adjusted(1, 1, -1, -1); + painter->setPen(frameLight); + painter->drawLine(frame.topLeft(), frame.bottomLeft()); + painter->drawLine(frame.topLeft(), frame.topRight()); + + painter->setPen(frameShadow); + painter->drawLine(frame.topRight(), frame.bottomRight()); + painter->drawLine(frame.bottomLeft(), frame.bottomRight()); + } + painter->restore(); + break; + case PE_FrameDockWidget: + + painter->save(); + { + QColor softshadow = option->palette.background().color().darker(120); + + QRect rect= option->rect; + painter->setPen(softshadow); + painter->drawRect(option->rect.adjusted(0, 0, -1, -1)); + painter->setPen(QPen(option->palette.light(), 0)); + painter->drawLine(QPoint(rect.left() + 1, rect.top() + 1), QPoint(rect.left() + 1, rect.bottom() - 1)); + painter->setPen(QPen(option->palette.background().color().darker(120), 0)); + painter->drawLine(QPoint(rect.left() + 1, rect.bottom() - 1), QPoint(rect.right() - 2, rect.bottom() - 1)); + painter->drawLine(QPoint(rect.right() - 1, rect.top() + 1), QPoint(rect.right() - 1, rect.bottom() - 1)); + + } + painter->restore(); + break; + case PE_PanelButtonTool: + painter->save(); + if ((option->state & State_Enabled || option->state & State_On) || !(option->state & State_AutoRaise)) { + QPen oldPen = painter->pen(); + + if (widget && widget->inherits("QDockWidgetTitleButton")) { + if (option->state & State_MouseOver) + proxy()->drawPrimitive(PE_PanelButtonCommand, option, painter, widget); + } else { + proxy()->drawPrimitive(PE_PanelButtonCommand, option, painter, widget); + } + } + painter->restore(); + break; + case PE_IndicatorDockWidgetResizeHandle: + { + QStyleOption dockWidgetHandle = *option; + bool horizontal = option->state & State_Horizontal; + if (horizontal) + dockWidgetHandle.state &= ~State_Horizontal; + else + dockWidgetHandle.state |= State_Horizontal; + proxy()->drawControl(CE_Splitter, &dockWidgetHandle, painter, widget); + } + break; + case PE_FrameWindow: + painter->save(); + { + QRect rect= option->rect; + painter->setPen(QPen(dark.darker(150), 0)); + painter->drawRect(option->rect.adjusted(0, 0, -1, -1)); + painter->setPen(QPen(option->palette.light(), 0)); + painter->drawLine(QPoint(rect.left() + 1, rect.top() + 1), + QPoint(rect.left() + 1, rect.bottom() - 1)); + painter->setPen(QPen(option->palette.background().color().darker(120), 0)); + painter->drawLine(QPoint(rect.left() + 1, rect.bottom() - 1), + QPoint(rect.right() - 2, rect.bottom() - 1)); + painter->drawLine(QPoint(rect.right() - 1, rect.top() + 1), + QPoint(rect.right() - 1, rect.bottom() - 1)); + } + painter->restore(); + break; +#ifndef QT_NO_LINEEDIT + case PE_FrameLineEdit: + // fall through +#endif // QT_NO_LINEEDIT + { + QPen oldPen = painter->pen(); + if (option->state & State_Enabled) { + painter->setPen(QPen(option->palette.background(), 0)); + painter->drawRect(rect.adjusted(0, 0, 0, 0)); + painter->drawRect(rect.adjusted(1, 1, -1, -1)); + } else { + painter->fillRect(rect, option->palette.background()); + } + QRect r = rect.adjusted(0, 1, 0, -1); + painter->setPen(buttonShadowAlpha); + painter->drawLine(QPoint(r.left() + 2, r.top() - 1), QPoint(r.right() - 2, r.top() - 1)); + const QPoint points[8] = { + QPoint(r.right() - 1, r.top()), + QPoint(r.right(), r.top() + 1), + QPoint(r.right() - 1, r.bottom()), + QPoint(r.right(), r.bottom() - 1), + QPoint(r.left() + 1, r.top() ), + QPoint(r.left(), r.top() + 1), + QPoint(r.left() + 1, r.bottom() ), + QPoint(r.left(), r.bottom() - 1) + }; + painter->drawPoints(points, 8); + painter->setPen(QPen(option->palette.background().color(), 1)); + painter->drawLine(QPoint(r.left() + 2, r.top() + 1), QPoint(r.right() - 2, r.top() + 1)); + + if (option->state & State_HasFocus) { + QColor darkoutline = option->palette.highlight().color().darker(150); + QColor innerline = mergedColors(option->palette.highlight().color(), Qt::white); + painter->setPen(QPen(innerline, 0)); + painter->drawRect(rect.adjusted(1, 2, -2, -3)); + painter->setPen(QPen(darkoutline, 0)); + } + else { + QColor highlight = Qt::white; + highlight.setAlpha(130); + painter->setPen(option->palette.base().color().darker(120)); + painter->drawLine(QPoint(r.left() + 1, r.top() + 1), + QPoint(r.right() - 1, r.top() + 1)); + painter->drawLine(QPoint(r.left() + 1, r.top() + 1), + QPoint(r.left() + 1, r.bottom() - 1)); + painter->setPen(option->palette.base().color()); + painter->drawLine(QPoint(r.right() - 1, r.top() + 1), + QPoint(r.right() - 1, r.bottom() - 1)); + painter->setPen(highlight); + painter->drawLine(QPoint(r.left() + 1, r.bottom() + 1), + QPoint(r.right() - 1, r.bottom() + 1)); + painter->drawPoint(QPoint(r.left(), r.bottom())); + painter->drawPoint(QPoint(r.right(), r.bottom() )); + painter->setPen(QPen(darkOutline.lighter(115), 1)); + } + painter->drawLine(QPoint(r.left(), r.top() + 2), QPoint(r.left(), r.bottom() - 2)); + painter->drawLine(QPoint(r.right(), r.top() + 2), QPoint(r.right(), r.bottom() - 2)); + painter->drawLine(QPoint(r.left() + 2, r.bottom()), QPoint(r.right() - 2, r.bottom())); + const QPoint points2[4] = { + QPoint(r.right() - 1, r.bottom() - 1), + QPoint(r.right() - 1, r.top() + 1), + QPoint(r.left() + 1, r.bottom() - 1), + QPoint(r.left() + 1, r.top() + 1) + }; + painter->drawPoints(points2, 4); + painter->drawLine(QPoint(r.left() + 2, r.top()), QPoint(r.right() - 2, r.top())); + painter->setPen(oldPen); + } + break; + case PE_IndicatorCheckBox: + painter->save(); + if (const QStyleOptionButton *checkbox = qstyleoption_cast(option)) { + QRect checkRect; + checkRect.setX(rect.left() ); + checkRect.setY(rect.top() ); + checkRect.setWidth(rect.width() - 1); + checkRect.setHeight(rect.height() - 1); + if (state & State_Sunken) + painter->setBrush(dark.lighter(130)); + else + painter->setBrush(option->palette.base()); + painter->setPen(QPen(dark.lighter(110), 0)); + painter->drawRect(checkRect); + if (checkbox->state & (State_On | State_Sunken | State_NoChange)) { + QImage image(qt_cleanlooks_checkbox_checked); + QColor fillColor = option->palette.text().color(); + image.setColor(1, fillColor.rgba()); + fillColor.setAlpha(100); + image.setColor(2, fillColor.rgba()); + painter->drawImage(rect, image); + if (checkbox->state & State_NoChange) { + QColor bgc = option->palette.background().color(); + bgc.setAlpha(127); + painter->fillRect(checkRect.adjusted(1, 1, -1, -1), bgc); + } + } + } + painter->restore(); + break; + case PE_IndicatorRadioButton: + painter->save(); + { + painter->setRenderHint(QPainter::SmoothPixmapTransform); + QRect checkRect = rect.adjusted(0, 0, 0, 0); + if (state & (State_On )) { + painter->drawImage(rect, QImage(qt_cleanlooks_radiobutton)); + painter->drawImage(checkRect, QImage(qt_cleanlooks_radiobutton_checked)); + } + else if (state & State_Sunken) { + painter->drawImage(rect, QImage(qt_cleanlooks_radiobutton)); + QColor bgc = buttonShadow; + painter->setRenderHint(QPainter::Antialiasing); + painter->setBrush(bgc); + painter->setPen(Qt::NoPen); + painter->drawEllipse(rect.adjusted(1, 1, -1, -1)); } + else { + painter->drawImage(rect, QImage(qt_cleanlooks_radiobutton)); + } + } + painter->restore(); + break; + case PE_IndicatorToolBarHandle: + painter->save(); + if (option->state & State_Horizontal) { + for (int i = rect.height()/5; i <= 4*(rect.height()/5) ; ++i) { + int y = rect.topLeft().y() + i + 1; + int x1 = rect.topLeft().x() + 3; + int x2 = rect.topRight().x() - 2; + + if (i % 2 == 0) + painter->setPen(QPen(option->palette.light(), 0)); + else + painter->setPen(QPen(dark.lighter(110), 0)); + painter->drawLine(x1, y, x2, y); + } + } + else { //vertical toolbar + for (int i = rect.width()/5; i <= 4*(rect.width()/5) ; ++i) { + int x = rect.topLeft().x() + i + 1; + int y1 = rect.topLeft().y() + 3; + int y2 = rect.topLeft().y() + 5; + + if (i % 2 == 0) + painter->setPen(QPen(option->palette.light(), 0)); + else + painter->setPen(QPen(dark.lighter(110), 0)); + painter->drawLine(x, y1, x, y2); + } + } + painter->restore(); + break; + case PE_FrameDefaultButton: + case PE_FrameFocusRect: + if (const QStyleOptionFocusRect *focusFrame = qstyleoption_cast(option)) { + if (!(focusFrame->state & State_KeyboardFocusChange)) + return; + QRect rect = focusFrame->rect; + painter->save(); + painter->setBackgroundMode(Qt::TransparentMode); + painter->setBrush(QBrush(dark.darker(120), Qt::Dense4Pattern)); + painter->setBrushOrigin(rect.topLeft()); + painter->setPen(Qt::NoPen); + const QRect rects[4] = { + QRect(rect.left(), rect.top(), rect.width(), 1), // Top + QRect(rect.left(), rect.bottom(), rect.width(), 1), // Bottom + QRect(rect.left(), rect.top(), 1, rect.height()), // Left + QRect(rect.right(), rect.top(), 1, rect.height()) // Right + }; + painter->drawRects(rects, 4); + painter->restore(); + } + break; + case PE_PanelButtonCommand: + { + bool isDefault = false; + bool isFlat = false; + bool isDown = (option->state & State_Sunken) || (option->state & State_On); + QPen oldPen = painter->pen(); + QBrush oldBrush = painter->brush(); + QRect r; + + if (const QStyleOptionButton *button = qstyleoption_cast(option)) { + isDefault = (button->features & QStyleOptionButton::DefaultButton) && (button->state & State_Enabled); + isFlat = (button->features & QStyleOptionButton::Flat); + } + + if (isFlat && !isDown) { + if (isDefault) { + r = option->rect.adjusted(0, 1, 0, -1); + painter->setPen(QPen(Qt::black, 0)); + const QLine lines[4] = { + QLine(QPoint(r.left() + 2, r.top()), + QPoint(r.right() - 2, r.top())), + QLine(QPoint(r.left(), r.top() + 2), + QPoint(r.left(), r.bottom() - 2)), + QLine(QPoint(r.right(), r.top() + 2), + QPoint(r.right(), r.bottom() - 2)), + QLine(QPoint(r.left() + 2, r.bottom()), + QPoint(r.right() - 2, r.bottom())) + }; + painter->drawLines(lines, 4); + const QPoint points[4] = { + QPoint(r.right() - 1, r.bottom() - 1), + QPoint(r.right() - 1, r.top() + 1), + QPoint(r.left() + 1, r.bottom() - 1), + QPoint(r.left() + 1, r.top() + 1) + }; + painter->drawPoints(points, 4); + painter->setPen(oldPen); + } + return; + } + + BEGIN_STYLE_PIXMAPCACHE(QString::fromLatin1("pushbutton-%1").arg(isDefault)) + r = rect.adjusted(0, 1, 0, -1); + + bool isEnabled = (option->state & State_Enabled); + + QColor highlightedGradientStartColor = option->palette.button().color().lighter(107); + QColor highlightedGradientMidColor = option->palette.button().color().lighter(105); + QColor highlightedGradientStopColor = buttonShadow.lighter(107); + QColor gradientStartColor = option->palette.button().color().lighter(108); + + QColor buttonColor = option->palette.button().color(); + QColor gradientMidColor = option->palette.button().color(); + QColor gradientStopColor; + gradientStopColor.setHsv(buttonColor.hue(), + qMin(255, (int)(buttonColor.saturation()*1.9)), + qMin(255, (int)(buttonColor.value()*0.96))); + + QRect gradRect = rect.adjusted(1, 2, -1, -2); + // gradient fill + QRect innerBorder = r.adjusted(1, 1, -1, 0); + + if (isDown) { + QBrush fillColor = gradientStopColor.darker(110); + if (option->palette.button().gradient()) + fillColor = option->palette.button(); + p->fillRect(gradRect, fillColor); + p->setPen(gradientStopColor.darker(125)); + p->drawLine(innerBorder.topLeft(), innerBorder.topRight()); + p->drawLine(innerBorder.topLeft(), innerBorder.bottomLeft()); + } else { + if (isEnabled && option->state & State_MouseOver ) { + qt_cleanlooks_draw_buttongradient(p, gradRect, + highlightedGradientStartColor, + highlightedGradientMidColor, + highlightedGradientStopColor, TopDown, option->palette.button()); + } else { + qt_cleanlooks_draw_buttongradient(p, gradRect, + gradientStartColor, + gradientMidColor, + gradientStopColor, TopDown, option->palette.button()); + } + } + + bool hasFocus = option->state & State_HasFocus; + + if (!isEnabled) + p->setPen(QPen(dark.lighter(115))); + else if (isDefault) + p->setPen(QPen(Qt::black, 1)); + else + p->setPen(QPen(darkOutline, 1)); + + p->drawLine(QPoint(r.left(), r.top() + 2), + QPoint(r.left(), r.bottom() - 2)); + p->drawLine(QPoint(r.right(), r.top() + 2), + QPoint(r.right(), r.bottom() - 2)); + p->drawLine(QPoint(r.left() + 2, r.bottom()), + QPoint(r.right() - 2, r.bottom())); + const QPoint points[4] = { + QPoint(r.right() - 1, r.bottom() - 1), + QPoint(r.right() - 1, r.top() + 1), + QPoint(r.left() + 1, r.bottom() - 1), + QPoint(r.left() + 1, r.top() + 1) + }; + p->drawPoints(points, 4); + + if (!isDefault && !hasFocus && isEnabled) + p->setPen(QPen(darkOutline.darker(110), 0)); + + p->drawLine(QPoint(r.left() + 2, r.top()), + QPoint(r.right() - 2, r.top())); + + QColor highlight = Qt::white; + highlight.setAlpha(110); + p->setPen(highlight); + p->drawLine(QPoint(r.left() + 1, r.top() + 2), + QPoint(r.left() + 1, r.bottom() - 2)); + p->drawLine(QPoint(r.left() + 3, r.bottom() + 1), + QPoint(r.right() - 3, r.bottom() + 1)); + + QColor topShadow = darkOutline; + topShadow.setAlpha(60); + + p->setPen(topShadow); + const QPoint points2[8] = { + QPoint(r.right(), r.top() + 1), + QPoint(r.right() - 1, r.top() ), + QPoint(r.right(), r.bottom() - 1), + QPoint(r.right() - 1, r.bottom() ), + QPoint(r.left() + 1, r.bottom()), + QPoint(r.left(), r.bottom() - 1), + QPoint(r.left() + 1, r.top()), + QPoint(r.left(), r.top() + 1) + }; + p->drawPoints(points2, 8); + + topShadow.setAlpha(30); + p->setPen(topShadow); + + p->drawLine(QPoint(r.right() - 1, r.top() + 2), + QPoint(r.right() - 1, r.bottom() - 2)); + p->drawLine(QPoint(r.left() + 2, r.top() - 1), + QPoint(r.right() - 2, r.top() - 1)); + + if (isDefault) { + r.adjust(-1, -1, 1, 1); + p->setPen(buttonShadowAlpha.darker(120)); + const QLine lines[4] = { + QLine(r.topLeft() + QPoint(3, 0), r.topRight() - QPoint(3, 0)), + QLine(r.bottomLeft() + QPoint(3, 0), r.bottomRight() - QPoint(3, 0)), + QLine(r.topLeft() + QPoint(0, 3), r.bottomLeft() - QPoint(0, 3)), + QLine(r.topRight() + QPoint(0, 3), r.bottomRight() - QPoint(0, 3)) + }; + p->drawLines(lines, 4); + const QPoint points3[8] = { + r.topRight() + QPoint(-2, 1), + r.topRight() + QPoint(-1, 2), + r.bottomRight() + QPoint(-1, -2), + r.bottomRight() + QPoint(-2, -1), + r.topLeft() + QPoint(1, 2), + r.topLeft() + QPoint(2, 1), + r.bottomLeft() + QPoint(1, -2), + r.bottomLeft() + QPoint(2, -1) + }; + p->drawPoints(points3, 8); + } + painter->setPen(oldPen); + painter->setBrush(oldBrush); + END_STYLE_PIXMAPCACHE + } + break; +#ifndef QT_NO_TABBAR + case PE_FrameTabWidget: + painter->save(); + { + painter->fillRect(option->rect, tabFrameColor); + } +#ifndef QT_NO_TABWIDGET + if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast(option)) { + QColor borderColor = darkOutline.lighter(110); + QColor alphaCornerColor = mergedColors(borderColor, option->palette.background().color()); + + int borderThickness = proxy()->pixelMetric(PM_TabBarBaseOverlap, twf, widget); + bool reverse = (twf->direction == Qt::RightToLeft); + QRect tabBarRect; + + switch (twf->shape) { + case QTabBar::RoundedNorth: + if (reverse) { + tabBarRect = QRect(twf->rect.right() - twf->leftCornerWidgetSize.width() + - twf->tabBarSize.width() + 1, + twf->rect.top(), + twf->tabBarSize.width(), borderThickness); + } else { + tabBarRect = QRect(twf->rect.left() + twf->leftCornerWidgetSize.width(), + twf->rect.top(), + twf->tabBarSize.width(), borderThickness); + } + break ; + case QTabBar::RoundedWest: + tabBarRect = QRect(twf->rect.left(), + twf->rect.top() + twf->leftCornerWidgetSize.height(), + borderThickness, + twf->tabBarSize.height()); + tabBarRect = tabBarRect; //adjust + break ; + case QTabBar::RoundedEast: + tabBarRect = QRect(twf->rect.right() - borderThickness + 1, + twf->rect.top() + twf->leftCornerWidgetSize.height(), + 0, + twf->tabBarSize.height()); + break ; + case QTabBar::RoundedSouth: + if (reverse) { + tabBarRect = QRect(twf->rect.right() - twf->leftCornerWidgetSize.width() - twf->tabBarSize.width() + 1, + twf->rect.bottom() + 1, + twf->tabBarSize.width(), + borderThickness); + } else { + tabBarRect = QRect(twf->rect.left() + twf->leftCornerWidgetSize.width(), + twf->rect.bottom() + 1, + twf->tabBarSize.width(), + borderThickness); + } + break; + default: + break; + } + + QRegion region(twf->rect); + region -= tabBarRect; + painter->setClipRegion(region); + + // Outer border + QLine leftLine = QLine(twf->rect.topLeft() + QPoint(0, 2), twf->rect.bottomLeft() - QPoint(0, 2)); + QLine rightLine = QLine(twf->rect.topRight(), twf->rect.bottomRight() - QPoint(0, 2)); + QLine bottomLine = QLine(twf->rect.bottomLeft() + QPoint(2, 0), twf->rect.bottomRight() - QPoint(2, 0)); + QLine topLine = QLine(twf->rect.topLeft(), twf->rect.topRight()); + + painter->setPen(borderColor); + painter->drawLine(topLine); + + // Inner border + QLine innerLeftLine = QLine(leftLine.p1() + QPoint(1, 0), leftLine.p2() + QPoint(1, 0)); + QLine innerRightLine = QLine(rightLine.p1() - QPoint(1, -1), rightLine.p2() - QPoint(1, 0)); + QLine innerBottomLine = QLine(bottomLine.p1() - QPoint(0, 1), bottomLine.p2() - QPoint(0, 1)); + QLine innerTopLine = QLine(topLine.p1() + QPoint(0, 1), topLine.p2() + QPoint(-1, 1)); + + // Rounded Corner + QPoint leftBottomOuterCorner = QPoint(innerLeftLine.p2() + QPoint(0, 1)); + QPoint leftBottomInnerCorner1 = QPoint(leftLine.p2() + QPoint(0, 1)); + QPoint leftBottomInnerCorner2 = QPoint(bottomLine.p1() - QPoint(1, 0)); + QPoint rightBottomOuterCorner = QPoint(innerRightLine.p2() + QPoint(0, 1)); + QPoint rightBottomInnerCorner1 = QPoint(rightLine.p2() + QPoint(0, 1)); + QPoint rightBottomInnerCorner2 = QPoint(bottomLine.p2() + QPoint(1, 0)); + QPoint leftTopOuterCorner = QPoint(innerLeftLine.p1() - QPoint(0, 1)); + QPoint leftTopInnerCorner1 = QPoint(leftLine.p1() - QPoint(0, 1)); + QPoint leftTopInnerCorner2 = QPoint(topLine.p1() - QPoint(1, 0)); + + painter->setPen(borderColor); + painter->drawLine(leftLine); + painter->drawLine(rightLine); + painter->drawLine(bottomLine); + painter->drawPoint(leftBottomOuterCorner); + painter->drawPoint(rightBottomOuterCorner); + painter->drawPoint(leftTopOuterCorner); + + painter->setPen(option->palette.light().color()); + painter->drawLine(innerLeftLine); + painter->drawLine(innerTopLine); + + painter->setPen(buttonShadowAlpha); + painter->drawLine(innerRightLine); + painter->drawLine(innerBottomLine); + + painter->setPen(alphaCornerColor); + const QPoint points[6] = { + leftBottomInnerCorner1, + leftBottomInnerCorner2, + rightBottomInnerCorner1, + rightBottomInnerCorner2, + leftTopInnerCorner1, + leftTopInnerCorner2 + }; + painter->drawPoints(points, 6); + } +#endif // QT_NO_TABWIDGET + painter->restore(); + break ; + + case PE_FrameStatusBarItem: + break; + case PE_IndicatorTabClose: + { + static QIcon tabBarcloseButtonIcon; + if (tabBarcloseButtonIcon.isNull()) + tabBarcloseButtonIcon = standardIcon(SP_DialogCloseButton, option, widget); + if ((option->state & State_Enabled) && (option->state & State_MouseOver)) + proxy()->drawPrimitive(PE_PanelButtonCommand, option, painter, widget); + QPixmap pixmap = tabBarcloseButtonIcon.pixmap(QSize(16, 16), QIcon::Normal, QIcon::On); + proxy()->drawItemPixmap(painter, option->rect, Qt::AlignCenter, pixmap); + } + break; + +#endif // QT_NO_TABBAR + default: + QProxyStyle::drawPrimitive(elem, option, painter, widget); + break; + } +} + +/*! + \reimp +*/ +void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, + const QWidget *widget) const +{ + QColor button = option->palette.button().color(); + QColor dark; + dark.setHsv(button.hue(), + qMin(255, (int)(button.saturation()*1.9)), + qMin(255, (int)(button.value()*0.7))); + QColor darkOutline; + darkOutline.setHsv(button.hue(), + qMin(255, (int)(button.saturation()*2.0)), + qMin(255, (int)(button.value()*0.6))); + QRect rect = option->rect; + QColor shadow = mergedColors(option->palette.background().color().darker(120), + dark.lighter(130), 60); + QColor tabFrameColor = mergedColors(option->palette.background().color(), + dark.lighter(135), 60); + + QColor highlight = option->palette.highlight().color(); + + switch (element) { + case CE_RadioButton: //fall through + case CE_CheckBox: + if (const QStyleOptionButton *btn = qstyleoption_cast(option)) { + bool hover = (btn->state & State_MouseOver && btn->state & State_Enabled); + if (hover) + painter->fillRect(rect, btn->palette.background().color().lighter(104)); + QStyleOptionButton copy = *btn; + copy.rect.adjust(2, 0, -2, 0); + QProxyStyle::drawControl(element, ©, painter, widget); + } + break; + case CE_Splitter: + painter->save(); + { + // hover appearance + QBrush fillColor = option->palette.background().color(); + if (option->state & State_MouseOver && option->state & State_Enabled) + fillColor = fillColor.color().lighter(106); + + painter->fillRect(option->rect, fillColor); + + QColor grooveColor = mergedColors(dark.lighter(110), option->palette.button().color(),40); + QColor gripShadow = grooveColor.darker(110); + QPalette palette = option->palette; + bool vertical = !(option->state & State_Horizontal); + QRect scrollBarSlider = option->rect; + int gripMargin = 4; + //draw grips + if (vertical) { + for (int i = -20; i< 20 ; i += 2) { + painter->setPen(QPen(gripShadow, 1)); + painter->drawLine( + QPoint(scrollBarSlider.center().x() + i , + scrollBarSlider.top() + gripMargin), + QPoint(scrollBarSlider.center().x() + i, + scrollBarSlider.bottom() - gripMargin)); + painter->setPen(QPen(palette.light(), 1)); + painter->drawLine( + QPoint(scrollBarSlider.center().x() + i + 1, + scrollBarSlider.top() + gripMargin ), + QPoint(scrollBarSlider.center().x() + i + 1, + scrollBarSlider.bottom() - gripMargin)); + } + } else { + for (int i = -20; i < 20 ; i += 2) { + painter->setPen(QPen(gripShadow, 1)); + painter->drawLine( + QPoint(scrollBarSlider.left() + gripMargin , + scrollBarSlider.center().y()+ i), + QPoint(scrollBarSlider.right() - gripMargin, + scrollBarSlider.center().y()+ i)); + painter->setPen(QPen(palette.light(), 1)); + painter->drawLine( + QPoint(scrollBarSlider.left() + gripMargin, + scrollBarSlider.center().y() + 1 + i), + QPoint(scrollBarSlider.right() - gripMargin, + scrollBarSlider.center().y() + 1 + i)); + + } + } + } + painter->restore(); + break; +#ifndef QT_NO_SIZEGRIP + case CE_SizeGrip: + painter->save(); + { + int x, y, w, h; + option->rect.getRect(&x, &y, &w, &h); + int sw = qMin(h, w); + if (h > w) + painter->translate(0, h - w); + else + painter->translate(w - h, 0); + + int sx = x; + int sy = y; + int s = 4; + if (option->direction == Qt::RightToLeft) { + sx = x + sw; + for (int i = 0; i < 4; ++i) { + painter->setPen(QPen(option->palette.light().color(), 1)); + painter->drawLine(x, sy - 1 , sx + 1, sw); + painter->setPen(QPen(dark.lighter(120), 1)); + painter->drawLine(x, sy, sx, sw); + sx -= s; + sy += s; + } + } else { + for (int i = 0; i < 4; ++i) { + painter->setPen(QPen(option->palette.light().color(), 1)); + painter->drawLine(sx - 1, sw, sw, sy - 1); + painter->setPen(QPen(dark.lighter(120), 1)); + painter->drawLine(sx, sw, sw, sy); + sx += s; + sy += s; + } + } + } + painter->restore(); + break; +#endif // QT_NO_SIZEGRIP +#ifndef QT_NO_TOOLBAR + case CE_ToolBar: + // Reserve the beveled appearance only for mainwindow toolbars + if (!(widget && qobject_cast (widget->parentWidget()))) + break; + + painter->save(); + if (const QStyleOptionToolBar *toolbar = qstyleoption_cast(option)) { + QRect rect = option->rect; + + bool paintLeftBorder = true; + bool paintRightBorder = true; + bool paintBottomBorder = true; + + switch (toolbar->toolBarArea) { + case Qt::BottomToolBarArea: + switch (toolbar->positionOfLine) { + case QStyleOptionToolBar::Beginning: + case QStyleOptionToolBar::OnlyOne: + paintBottomBorder = false; + default: + break; + } + case Qt::TopToolBarArea: + switch (toolbar->positionWithinLine) { + case QStyleOptionToolBar::Beginning: + paintLeftBorder = false; + break; + case QStyleOptionToolBar::End: + paintRightBorder = false; + break; + case QStyleOptionToolBar::OnlyOne: + paintRightBorder = false; + paintLeftBorder = false; + default: + break; + } + if (toolbar->direction == Qt::RightToLeft) { //reverse layout changes the order of Beginning/end + bool tmp = paintLeftBorder; + paintRightBorder=paintLeftBorder; + paintLeftBorder=tmp; + } + break; + case Qt::RightToolBarArea: + switch (toolbar->positionOfLine) { + case QStyleOptionToolBar::Beginning: + case QStyleOptionToolBar::OnlyOne: + paintRightBorder = false; + break; + default: + break; + } + break; + case Qt::LeftToolBarArea: + switch (toolbar->positionOfLine) { + case QStyleOptionToolBar::Beginning: + case QStyleOptionToolBar::OnlyOne: + paintLeftBorder = false; + break; + default: + break; + } + break; + default: + break; + } + + QColor light = option->palette.background().color().lighter(110); + + //draw top border + painter->setPen(QPen(light)); + painter->drawLine(rect.topLeft().x(), + rect.topLeft().y(), + rect.topRight().x(), + rect.topRight().y()); + + if (paintLeftBorder) { + painter->setPen(QPen(light)); + painter->drawLine(rect.topLeft().x(), + rect.topLeft().y(), + rect.bottomLeft().x(), + rect.bottomLeft().y()); + } + + if (paintRightBorder) { + painter->setPen(QPen(shadow)); + painter->drawLine(rect.topRight().x(), + rect.topRight().y(), + rect.bottomRight().x(), + rect.bottomRight().y()); + } + + if (paintBottomBorder) { + painter->setPen(QPen(shadow)); + painter->drawLine(rect.bottomLeft().x(), + rect.bottomLeft().y(), + rect.bottomRight().x(), + rect.bottomRight().y()); + } + } + painter->restore(); + break; +#endif // QT_NO_TOOLBAR +#ifndef QT_NO_DOCKWIDGET + case CE_DockWidgetTitle: + painter->save(); + if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast(option)) { + bool verticalTitleBar = dwOpt->verticalTitleBar; + + QRect titleRect = subElementRect(SE_DockWidgetTitleBarText, option, widget); + if (verticalTitleBar) { + QRect rect = dwOpt->rect; + QRect r = rect; + QSize s = r.size(); + s.transpose(); + r.setSize(s); + titleRect = QRect(r.left() + rect.bottom() + - titleRect.bottom(), + r.top() + titleRect.left() - rect.left(), + titleRect.height(), titleRect.width()); + } + + if (!dwOpt->title.isEmpty()) { + QString titleText + = painter->fontMetrics().elidedText(dwOpt->title, + Qt::ElideRight, titleRect.width()); + proxy()->drawItemText(painter, + titleRect, + Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, dwOpt->palette, + dwOpt->state & State_Enabled, titleText, + QPalette::WindowText); + } + } + painter->restore(); + break; +#endif // QT_NO_DOCKWIDGET + case CE_HeaderSection: + painter->save(); + // Draws the header in tables. + if (const QStyleOptionHeader *header = qstyleoption_cast(option)) { + QPixmap cache; + QString pixmapName = QStyleHelper::uniqueName(QLatin1String("headersection"), option, option->rect.size()); + pixmapName += QString::number(- int(header->position)); + pixmapName += QString::number(- int(header->orientation)); + QRect r = option->rect; + QColor gradientStopColor; + QColor gradientStartColor = option->palette.button().color(); + gradientStopColor.setHsv(gradientStartColor.hue(), + qMin(255, (int)(gradientStartColor.saturation()*2)), + qMin(255, (int)(gradientStartColor.value()*0.96))); + QLinearGradient gradient(rect.topLeft(), rect.bottomLeft()); + if (option->palette.background().gradient()) { + gradient.setStops(option->palette.background().gradient()->stops()); + } else { + gradient.setColorAt(0, gradientStartColor); + gradient.setColorAt(0.8, gradientStartColor); + gradient.setColorAt(1, gradientStopColor); + } + painter->fillRect(r, gradient); + + if (!QPixmapCache::find(pixmapName, cache)) { + cache = QPixmap(r.size()); + cache.fill(Qt::transparent); + QRect pixmapRect(0, 0, r.width(), r.height()); + QPainter cachePainter(&cache); + if (header->orientation == Qt::Vertical) { + cachePainter.setPen(QPen(dark)); + cachePainter.drawLine(pixmapRect.topRight(), pixmapRect.bottomRight()); + if (header->position != QStyleOptionHeader::End) { + cachePainter.setPen(QPen(shadow)); + cachePainter.drawLine(pixmapRect.bottomLeft() + QPoint(3, -1), pixmapRect.bottomRight() + QPoint(-3, -1)); cachePainter.setPen(QPen(option->palette.light().color())); + cachePainter.drawLine(pixmapRect.bottomLeft() + QPoint(3, 0), pixmapRect.bottomRight() + QPoint(-3, 0)); } + } else { + cachePainter.setPen(QPen(dark)); + cachePainter.drawLine(pixmapRect.bottomLeft(), pixmapRect.bottomRight()); + cachePainter.setPen(QPen(shadow)); + cachePainter.drawLine(pixmapRect.topRight() + QPoint(-1, 3), pixmapRect.bottomRight() + QPoint(-1, -3)); cachePainter.setPen(QPen(option->palette.light().color())); + cachePainter.drawLine(pixmapRect.topRight() + QPoint(0, 3), pixmapRect.bottomRight() + QPoint(0, -3)); } + cachePainter.end(); + QPixmapCache::insert(pixmapName, cache); + } + painter->drawPixmap(r.topLeft(), cache); + } + painter->restore(); + break; + case CE_ProgressBarGroove: + painter->save(); + { + painter->fillRect(rect, option->palette.base()); + QColor borderColor = dark.lighter(110); + painter->setPen(QPen(borderColor, 0)); + const QLine lines[4] = { + QLine(QPoint(rect.left() + 1, rect.top()), QPoint(rect.right() - 1, rect.top())), + QLine(QPoint(rect.left() + 1, rect.bottom()), QPoint(rect.right() - 1, rect.bottom())), + QLine(QPoint(rect.left(), rect.top() + 1), QPoint(rect.left(), rect.bottom() - 1)), + QLine(QPoint(rect.right(), rect.top() + 1), QPoint(rect.right(), rect.bottom() - 1)) + }; + painter->drawLines(lines, 4); + QColor alphaCorner = mergedColors(borderColor, option->palette.background().color()); + QColor innerShadow = mergedColors(borderColor, option->palette.base().color()); + + //corner smoothing + painter->setPen(alphaCorner); + const QPoint points[4] = { + rect.topRight(), + rect.topLeft(), + rect.bottomRight(), + rect.bottomLeft() + }; + painter->drawPoints(points, 4); + + //inner shadow + painter->setPen(innerShadow); + painter->drawLine(QPoint(rect.left() + 1, rect.top() + 1), + QPoint(rect.right() - 1, rect.top() + 1)); + painter->drawLine(QPoint(rect.left() + 1, rect.top() + 1), + QPoint(rect.left() + 1, rect.bottom() + 1)); + + } + painter->restore(); + break; + case CE_ProgressBarContents: + painter->save(); + if (const QStyleOptionProgressBar *bar = qstyleoption_cast(option)) { + QRect rect = bar->rect; + bool vertical = (bar->orientation == Qt::Vertical); + bool inverted = bar->invertedAppearance; + bool indeterminate = (bar->minimum == 0 && bar->maximum == 0); + + // If the orientation is vertical, we use a transform to rotate + // the progress bar 90 degrees clockwise. This way we can use the + // same rendering code for both orientations. + if (vertical) { + rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height + QTransform m = QTransform::fromTranslate(rect.height()-1, -1.0); + m.rotate(90.0); + painter->setTransform(m, true); + } + + int maxWidth = rect.width() - 4; + int minWidth = 4; + qreal progress = qMax(bar->progress, bar->minimum); // workaround for bug in QProgressBar + int progressBarWidth = (progress - bar->minimum) * qreal(maxWidth) / qMax(qreal(1.0), qreal(bar->maximum) - bar->minimum); + int width = indeterminate ? maxWidth : qMax(minWidth, progressBarWidth); + + bool reverse = (!vertical && (bar->direction == Qt::RightToLeft)) || vertical; + if (inverted) + reverse = !reverse; + + QRect progressBar; + if (!indeterminate) { + if (!reverse) { + progressBar.setRect(rect.left() + 1, rect.top() + 1, width + 1, rect.height() - 3); + } else { + progressBar.setRect(rect.right() - 1 - width, rect.top() + 1, width + 1, rect.height() - 3); + } + } else { + int slideWidth = (qMax(rect.width() - 4, minWidth) * 2) / 3; + int step = ((animateStep * slideWidth) / progressAnimationFps) % slideWidth; + if ((((animateStep * slideWidth) / progressAnimationFps) % (2 * slideWidth)) >= slideWidth) + step = slideWidth - step; + progressBar.setRect(rect.left() + 1 + step, rect.top() + 1, + slideWidth / 2, rect.height() - 3); + } + QColor highlight = option->palette.color(QPalette::Normal, QPalette::Highlight); + painter->setPen(QPen(highlight.darker(140), 0)); + + QColor highlightedGradientStartColor = highlight.lighter(100); + QColor highlightedGradientStopColor = highlight.lighter(130); + + QLinearGradient gradient(rect.topLeft(), QPoint(rect.bottomLeft().x(), + rect.bottomLeft().y()*2)); + + gradient.setColorAt(0, highlightedGradientStartColor); + gradient.setColorAt(1, highlightedGradientStopColor); + + painter->setBrush(gradient); + painter->drawRect(progressBar); + + painter->setPen(QPen(highlight.lighter(120), 0)); + painter->drawLine(QPoint(progressBar.left() + 1, progressBar.top() + 1), + QPoint(progressBar.right(), progressBar.top() + 1)); + painter->drawLine(QPoint(progressBar.left() + 1, progressBar.top() + 1), + QPoint(progressBar.left() + 1, progressBar.bottom() - 1)); + + painter->setPen(QPen(highlightedGradientStartColor, 7.0));//QPen(option->palette.highlight(), 3)); + + painter->save(); + painter->setClipRect(progressBar.adjusted(2, 2, -1, -1)); + for (int x = progressBar.left() - 32; x < rect.right() ; x+=18) { + painter->drawLine(x, progressBar.bottom() + 1, x + 23, progressBar.top() - 2); + } + painter->restore(); + + } + painter->restore(); + break; + case CE_MenuBarItem: + painter->save(); + if (const QStyleOptionMenuItem *mbi = qstyleoption_cast(option)) + { + QStyleOptionMenuItem item = *mbi; + item.rect = mbi->rect.adjusted(0, 3, 0, -1); + QColor highlightOutline = highlight.darker(125); + QLinearGradient gradient(rect.topLeft(), QPoint(rect.bottomLeft().x(), rect.bottomLeft().y()*2)); + + if (option->palette.button().gradient()) { + gradient.setStops(option->palette.button().gradient()->stops()); + } else { + gradient.setColorAt(0, option->palette.button().color()); + gradient.setColorAt(1, option->palette.button().color().darker(110)); + } + painter->fillRect(rect, gradient); + + QCommonStyle::drawControl(element, &item, painter, widget); + + bool act = mbi->state & State_Selected && mbi->state & State_Sunken; + bool dis = !(mbi->state & State_Enabled); + + QRect r = option->rect; + if (act) { + qt_cleanlooks_draw_gradient(painter, r.adjusted(1, 1, -1, -1), + highlight, + highlightOutline, TopDown, + option->palette.highlight()); + + painter->setPen(QPen(highlightOutline, 0)); + const QLine lines[4] = { + QLine(QPoint(r.left(), r.top() + 1), QPoint(r.left(), r.bottom())), + QLine(QPoint(r.right(), r.top() + 1), QPoint(r.right(), r.bottom())), + QLine(QPoint(r.left() + 1, r.bottom()), QPoint(r.right() - 1, r.bottom())), + QLine(QPoint(r.left() + 1, r.top()), QPoint(r.right() - 1, r.top())) + }; + painter->drawLines(lines, 4); + + //draw text + QPalette::ColorRole textRole = dis ? QPalette::Text : QPalette::HighlightedText; + uint alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine; + if (!styleHint(SH_UnderlineShortcut, mbi, widget)) + alignment |= Qt::TextHideMnemonic; + proxy()->drawItemText(painter, item.rect, alignment, mbi->palette, mbi->state & State_Enabled, mbi->text, textRole); + } + + } + painter->restore(); + break; + case CE_MenuItem: + painter->save(); + // Draws one item in a popup menu. + if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast(option)) { + QColor highlightOutline = highlight.darker(125); + QColor menuBackground = option->palette.background().color().lighter(104); + QColor borderColor = option->palette.background().color().darker(160); + QColor alphaCornerColor; + + if (widget) { + // ### backgroundrole/foregroundrole should be part of the style option + alphaCornerColor = mergedColors(option->palette.color(widget->backgroundRole()), borderColor); + } else { + alphaCornerColor = mergedColors(option->palette.background().color(), borderColor); + } + if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { + painter->fillRect(menuItem->rect, menuBackground); + int w = 0; + if (!menuItem->text.isEmpty()) { + painter->setFont(menuItem->font); + proxy()->drawItemText(painter, menuItem->rect.adjusted(5, 0, -5, 0), Qt::AlignLeft | Qt::AlignVCenter, + menuItem->palette, menuItem->state & State_Enabled, menuItem->text, + QPalette::Text); + w = menuItem->fontMetrics.width(menuItem->text) + 5; + } + painter->setPen(shadow.lighter(106)); + bool reverse = menuItem->direction == Qt::RightToLeft; + painter->drawLine(menuItem->rect.left() + 5 + (reverse ? 0 : w), menuItem->rect.center().y(), + menuItem->rect.right() - 5 - (reverse ? w : 0), menuItem->rect.center().y()); + painter->restore(); + break; + } + bool selected = menuItem->state & State_Selected && menuItem->state & State_Enabled; + if (selected) { + QRect r = option->rect.adjusted(1, 0, -2, -1); + qt_cleanlooks_draw_gradient(painter, r, highlight, + highlightOutline, TopDown, + highlight); + r = r.adjusted(-1, 0, 1, 0); + painter->setPen(QPen(highlightOutline, 0)); + const QLine lines[4] = { + QLine(QPoint(r.left(), r.top() + 1), QPoint(r.left(), r.bottom() - 1)), + QLine(QPoint(r.right(), r.top() + 1), QPoint(r.right(), r.bottom() - 1)), + QLine(QPoint(r.left() + 1, r.bottom()), QPoint(r.right() - 1, r.bottom())), + QLine(QPoint(r.left() + 1, r.top()), QPoint(r.right() - 1, r.top())) + }; + painter->drawLines(lines, 4); + } else { + painter->fillRect(option->rect, menuBackground); + } + + bool checkable = menuItem->checkType != QStyleOptionMenuItem::NotCheckable; + bool checked = menuItem->checked; + bool sunken = menuItem->state & State_Sunken; + bool enabled = menuItem->state & State_Enabled; + + bool ignoreCheckMark = false; + int checkcol = qMax(menuItem->maxIconWidth, 20); + +#ifndef QT_NO_COMBOBOX + if (qobject_cast(widget)) + ignoreCheckMark = true; //ignore the checkmarks provided by the QComboMenuDelegate +#endif + + if (!ignoreCheckMark) { + // Check + QRect checkRect(option->rect.left() + 7, option->rect.center().y() - 6, 13, 13); + checkRect = visualRect(menuItem->direction, menuItem->rect, checkRect); + if (checkable) { + if (menuItem->checkType & QStyleOptionMenuItem::Exclusive) { + // Radio button + if (checked || sunken) { + painter->setRenderHint(QPainter::Antialiasing); + painter->setPen(Qt::NoPen); + + QPalette::ColorRole textRole = !enabled ? QPalette::Text: + selected ? QPalette::HighlightedText : QPalette::ButtonText; + painter->setBrush(option->palette.brush( option->palette.currentColorGroup(), textRole)); + painter->drawEllipse(checkRect.adjusted(4, 4, -4, -4)); + } + } else { + // Check box + if (menuItem->icon.isNull()) { + if (checked || sunken) { + QImage image(qt_cleanlooks_menuitem_checkbox_checked); + if (enabled && (menuItem->state & State_Selected)) { + image.setColor(1, 0x55ffffff); + image.setColor(2, 0xAAffffff); + image.setColor(3, 0xBBffffff); + image.setColor(4, 0xFFffffff); + image.setColor(5, 0x33ffffff); + } else { + image.setColor(1, 0x55000000); + image.setColor(2, 0xAA000000); + image.setColor(3, 0xBB000000); + image.setColor(4, 0xFF000000); + image.setColor(5, 0x33000000); + } + painter->drawImage(QPoint(checkRect.center().x() - image.width() / 2, + checkRect.center().y() - image.height() / 2), image); + } + } + } + } + } else { //ignore checkmark + if (menuItem->icon.isNull()) + checkcol = 0; + else + checkcol = menuItem->maxIconWidth; + } + + // Text and icon, ripped from windows style + bool dis = !(menuItem->state & State_Enabled); + bool act = menuItem->state & State_Selected; + const QStyleOption *opt = option; + const QStyleOptionMenuItem *menuitem = menuItem; + + QPainter *p = painter; + QRect vCheckRect = visualRect(opt->direction, menuitem->rect, + QRect(menuitem->rect.x(), menuitem->rect.y(), + checkcol, menuitem->rect.height())); + if (!menuItem->icon.isNull()) { + QIcon::Mode mode = dis ? QIcon::Disabled : QIcon::Normal; + if (act && !dis) + mode = QIcon::Active; + QPixmap pixmap; + + int smallIconSize = proxy()->pixelMetric(PM_SmallIconSize, option, widget); + QSize iconSize(smallIconSize, smallIconSize); +#ifndef QT_NO_COMBOBOX + if (const QComboBox *combo = qobject_cast(widget)) + iconSize = combo->iconSize(); +#endif // QT_NO_COMBOBOX + if (checked) + pixmap = menuItem->icon.pixmap(iconSize, mode, QIcon::On); + else + pixmap = menuItem->icon.pixmap(iconSize, mode); + + int pixw = pixmap.width(); + int pixh = pixmap.height(); + + QRect pmr(0, 0, pixw, pixh); + pmr.moveCenter(vCheckRect.center()); + painter->setPen(menuItem->palette.text().color()); + if (checkable && checked) { + QStyleOption opt = *option; + if (act) { + QColor activeColor = mergedColors(option->palette.background().color(), + option->palette.highlight().color()); + opt.palette.setBrush(QPalette::Button, activeColor); + } + opt.state |= State_Sunken; + opt.rect = vCheckRect; + proxy()->drawPrimitive(PE_PanelButtonCommand, &opt, painter, widget); + } + painter->drawPixmap(pmr.topLeft(), pixmap); + } + if (selected) { + painter->setPen(menuItem->palette.highlightedText().color()); + } else { + painter->setPen(menuItem->palette.text().color()); + } + int x, y, w, h; + menuitem->rect.getRect(&x, &y, &w, &h); + int tab = menuitem->tabWidth; + QColor discol; + if (dis) { + discol = menuitem->palette.text().color(); + p->setPen(discol); + } + int xm = windowsItemFrame + checkcol + windowsItemHMargin; + int xpos = menuitem->rect.x() + xm; + + QRect textRect(xpos, y + windowsItemVMargin, w - xm - windowsRightBorder - tab + 1, h - 2 * windowsItemVMargin); + QRect vTextRect = visualRect(opt->direction, menuitem->rect, textRect); + QString s = menuitem->text; + if (!s.isEmpty()) { // draw text + p->save(); + int t = s.indexOf(QLatin1Char('\t')); + int text_flags = Qt::AlignVCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine; + if (!styleHint(SH_UnderlineShortcut, menuitem, widget)) + text_flags |= Qt::TextHideMnemonic; + text_flags |= Qt::AlignLeft; + if (t >= 0) { + QRect vShortcutRect = visualRect(opt->direction, menuitem->rect, + QRect(textRect.topRight(), QPoint(menuitem->rect.right(), textRect.bottom()))); + if (dis && !act && proxy()->styleHint(SH_EtchDisabledText, option, widget)) { + p->setPen(menuitem->palette.light().color()); + p->drawText(vShortcutRect.adjusted(1, 1, 1, 1), text_flags, s.mid(t + 1)); + p->setPen(discol); + } + p->drawText(vShortcutRect, text_flags, s.mid(t + 1)); + s = s.left(t); + } + QFont font = menuitem->font; + // font may not have any "hard" flags set. We override + // the point size so that when it is resolved against the device, this font will win. + // This is mainly to handle cases where someone sets the font on the window + // and then the combo inherits it and passes it onward. At that point the resolve mask + // is very, very weak. This makes it stonger. + font.setPointSizeF(QFontInfo(menuItem->font).pointSizeF()); + + if (menuitem->menuItemType == QStyleOptionMenuItem::DefaultItem) + font.setBold(true); + + p->setFont(font); + if (dis && !act && proxy()->styleHint(SH_EtchDisabledText, option, widget)) { + p->setPen(menuitem->palette.light().color()); + p->drawText(vTextRect.adjusted(1, 1, 1, 1), text_flags, s.left(t)); + p->setPen(discol); + } + p->drawText(vTextRect, text_flags, s.left(t)); + p->restore(); + } + + // Arrow + if (menuItem->menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow + int dim = (menuItem->rect.height() - 4) / 2; + PrimitiveElement arrow; + arrow = QApplication::isRightToLeft() ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight; + int xpos = menuItem->rect.left() + menuItem->rect.width() - 3 - dim; + QRect vSubMenuRect = visualRect(option->direction, menuItem->rect, + QRect(xpos, menuItem->rect.top() + menuItem->rect.height() / 2 - dim / 2, dim, dim)); + QStyleOptionMenuItem newMI = *menuItem; + newMI.rect = vSubMenuRect; + newMI.state = !enabled ? State_None : State_Enabled; + if (selected) + newMI.palette.setColor(QPalette::ButtonText, + newMI.palette.highlightedText().color()); + proxy()->drawPrimitive(arrow, &newMI, painter, widget); + } + } + painter->restore(); + break; + case CE_MenuHMargin: + case CE_MenuVMargin: + break; + case CE_MenuEmptyArea: + break; + case CE_PushButtonLabel: + if (const QStyleOptionButton *button = qstyleoption_cast(option)) { + QRect ir = button->rect; + uint tf = Qt::AlignVCenter; + if (styleHint(SH_UnderlineShortcut, button, widget)) + tf |= Qt::TextShowMnemonic; + else + tf |= Qt::TextHideMnemonic; + + if (!button->icon.isNull()) { + //Center both icon and text + QPoint point; + + QIcon::Mode mode = button->state & State_Enabled ? QIcon::Normal + : QIcon::Disabled; + if (mode == QIcon::Normal && button->state & State_HasFocus) + mode = QIcon::Active; + QIcon::State state = QIcon::Off; + if (button->state & State_On) + state = QIcon::On; + + QPixmap pixmap = button->icon.pixmap(button->iconSize, mode, state); + int w = pixmap.width(); + int h = pixmap.height(); + + if (!button->text.isEmpty()) + w += button->fontMetrics.boundingRect(option->rect, tf, button->text).width() + 2; + + point = QPoint(ir.x() + ir.width() / 2 - w / 2, + ir.y() + ir.height() / 2 - h / 2); + + if (button->direction == Qt::RightToLeft) + point.rx() += pixmap.width(); + + painter->drawPixmap(visualPos(button->direction, button->rect, point), pixmap); + + if (button->direction == Qt::RightToLeft) + ir.translate(-point.x() - 2, 0); + else + ir.translate(point.x() + pixmap.width(), 0); + + // left-align text if there is + if (!button->text.isEmpty()) + tf |= Qt::AlignLeft; + + } else { + tf |= Qt::AlignHCenter; + } + + if (button->features & QStyleOptionButton::HasMenu) + ir = ir.adjusted(0, 0, -proxy()->pixelMetric(PM_MenuButtonIndicator, button, widget), 0); + proxy()->drawItemText(painter, ir, tf, button->palette, (button->state & State_Enabled), + button->text, QPalette::ButtonText); + } + break; + case CE_MenuBarEmptyArea: + painter->save(); + { + QColor shadow = mergedColors(option->palette.background().color().darker(120), + dark.lighter(140), 60); + + QLinearGradient gradient(rect.topLeft(), QPoint(rect.bottomLeft().x(), rect.bottomLeft().y()*2)); + gradient.setColorAt(0, option->palette.button().color()); + gradient.setColorAt(1, option->palette.button().color().darker(110)); + painter->fillRect(rect, gradient); + +#ifndef QT_NO_MAINWINDOW + if (widget && qobject_cast(widget->parentWidget())) { + QPen oldPen = painter->pen(); + painter->setPen(QPen(shadow)); + painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight()); + } +#endif // QT_NO_MAINWINDOW + } + painter->restore(); + break; +#ifndef QT_NO_TABBAR + case CE_TabBarTabShape: + painter->save(); + if (const QStyleOptionTab *tab = qstyleoption_cast(option)) { + + bool rtlHorTabs = (tab->direction == Qt::RightToLeft + && (tab->shape == QTabBar::RoundedNorth + || tab->shape == QTabBar::RoundedSouth)); + bool selected = tab->state & State_Selected; + bool lastTab = ((!rtlHorTabs && tab->position == QStyleOptionTab::End) + || (rtlHorTabs + && tab->position == QStyleOptionTab::Beginning)); + bool onlyTab = tab->position == QStyleOptionTab::OnlyOneTab; + bool leftCornerWidget = (tab->cornerWidgets & QStyleOptionTab::LeftCornerWidget); + + bool atBeginning = ((tab->position == (tab->direction == Qt::LeftToRight ? + QStyleOptionTab::Beginning : QStyleOptionTab::End)) || onlyTab); + + bool onlyOne = tab->position == QStyleOptionTab::OnlyOneTab; + bool previousSelected = + ((!rtlHorTabs + && tab->selectedPosition == QStyleOptionTab::PreviousIsSelected) + || (rtlHorTabs + && tab->selectedPosition == QStyleOptionTab::NextIsSelected)); + bool nextSelected = + ((!rtlHorTabs + && tab->selectedPosition == QStyleOptionTab::NextIsSelected) + || (rtlHorTabs + && tab->selectedPosition + == QStyleOptionTab::PreviousIsSelected)); + int tabBarAlignment = proxy()->styleHint(SH_TabBar_Alignment, tab, widget); + bool leftAligned = (!rtlHorTabs && tabBarAlignment == Qt::AlignLeft) + || (rtlHorTabs + && tabBarAlignment == Qt::AlignRight); + + bool rightAligned = (!rtlHorTabs && tabBarAlignment == Qt::AlignRight) + || (rtlHorTabs + && tabBarAlignment == Qt::AlignLeft); + + QColor light = tab->palette.light().color(); + + QColor background = tab->palette.background().color(); + int borderThinkness = proxy()->pixelMetric(PM_TabBarBaseOverlap, tab, widget); + if (selected) + borderThinkness /= 2; + QRect r2(option->rect); + int x1 = r2.left(); + int x2 = r2.right(); + int y1 = r2.top(); + int y2 = r2.bottom(); + + QTransform rotMatrix; + bool flip = false; + painter->setPen(shadow); + QColor activeHighlight = option->palette.color(QPalette::Normal, QPalette::Highlight); + switch (tab->shape) { + case QTabBar::RoundedNorth: + break; + case QTabBar::RoundedSouth: + rotMatrix.rotate(180); + rotMatrix.translate(0, -rect.height() + 1); + rotMatrix.scale(-1, 1); + painter->setTransform(rotMatrix, true); + break; + case QTabBar::RoundedWest: + rotMatrix.rotate(180 + 90); + rotMatrix.scale(-1, 1); + flip = true; + painter->setTransform(rotMatrix, true); + break; + case QTabBar::RoundedEast: + rotMatrix.rotate(90); + rotMatrix.translate(0, - rect.width() + 1); + flip = true; + painter->setTransform(rotMatrix, true); + break; + default: + painter->restore(); + QProxyStyle::drawControl(element, tab, painter, widget); + return; + } + + if (flip) { + QRect tmp = rect; + rect = QRect(tmp.y(), tmp.x(), tmp.height(), tmp.width()); + int temp = x1; + x1 = y1; + y1 = temp; + temp = x2; + x2 = y2; + y2 = temp; + } + + QLinearGradient gradient(rect.topLeft(), rect.bottomLeft()); + if (option->palette.button().gradient()) { + if (selected) + gradient.setStops(option->palette.background().gradient()->stops()); + else + gradient.setStops(option->palette.background().gradient()->stops()); + } + else if (selected) { + gradient.setColorAt(0, option->palette.background().color().lighter(104)); + gradient.setColorAt(1, tabFrameColor); + painter->fillRect(rect.adjusted(0, 2, 0, -1), gradient); + } else { + y1 += 2; + gradient.setColorAt(0, option->palette.background().color()); + gradient.setColorAt(1, dark.lighter(120)); + painter->fillRect(rect.adjusted(0, 2, 0, -2), gradient); + } + + // Delete border + if (selected) { + painter->setPen(QPen(activeHighlight, 0)); + painter->drawLine(x1 + 1, y1 + 1, x2 - 1, y1 + 1); + painter->drawLine(x1 , y1 + 2, x2 , y1 + 2); + } else { + painter->setPen(dark); + painter->drawLine(x1, y2 - 1, x2 + 2, y2 - 1 ); + if (tab->shape == QTabBar::RoundedNorth || tab->shape == QTabBar::RoundedWest) { + painter->setPen(light); + painter->drawLine(x1, y2 , x2, y2 ); + } + } + // Left + if (atBeginning || selected ) { + painter->setPen(light); + painter->drawLine(x1 + 1, y1 + 2 + 1, x1 + 1, y2 - ((onlyOne || atBeginning) && selected && leftAligned ? 0 : borderThinkness) - (atBeginning && leftCornerWidget ? 1 : 0)); + painter->drawPoint(x1 + 1, y1 + 1); + painter->setPen(dark); + painter->drawLine(x1, y1 + 2, x1, y2 - ((onlyOne || atBeginning) && leftAligned ? 0 : borderThinkness) - (atBeginning && leftCornerWidget ? 1 : 0)); + } + // Top + { + int beg = x1 + (previousSelected ? 0 : 2); + int end = x2 - (nextSelected ? 0 : 2); + painter->setPen(light); + + if (!selected)painter->drawLine(beg - 2, y1 + 1, end, y1 + 1); + + if (selected) + painter->setPen(QPen(activeHighlight.darker(150), 0)); + else + painter->setPen(darkOutline); + painter->drawLine(beg, y1 , end, y1); + + if (atBeginning|| selected) { + painter->drawPoint(beg - 1, y1 + 1); + } else if (!atBeginning) { + painter->drawPoint(beg - 1, y1); + painter->drawPoint(beg - 2, y1); + if (!lastTab) { + painter->setPen(dark.lighter(130)); + painter->drawPoint(end + 1, y1); + painter->drawPoint(end + 2 , y1); + painter->drawPoint(end + 2, y1 + 1); + } + } + } + // Right + if (lastTab || selected || onlyOne || !nextSelected) { + painter->setPen(darkOutline); + painter->drawLine(x2, y1 + 2, x2, y2 - ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness)); + if (selected) + painter->setPen(QPen(activeHighlight.darker(150), 0)); + else + painter->setPen(darkOutline); + painter->drawPoint(x2 - 1, y1 + 1); + + if (selected) { + painter->setPen(background.darker(110)); + painter->drawLine(x2 - 1, y1 + 3, x2 - 1, y2 - ((onlyOne || lastTab) && selected && rightAligned ? 0 : borderThinkness)); + } + } + } + painter->restore(); + break; + +#endif // QT_NO_TABBAR + default: + QCommonStyle::drawControl(element,option,painter,widget); + break; + } +} + +/*! + \reimp +*/ +QPalette QCleanlooksStyle::standardPalette () const +{ + QPalette palette = QProxyStyle::standardPalette(); + palette.setBrush(QPalette::Active, QPalette::Highlight, QColor(98, 140, 178)); + palette.setBrush(QPalette::Inactive, QPalette::Highlight, QColor(145, 141, 126)); + palette.setBrush(QPalette::Disabled, QPalette::Highlight, QColor(145, 141, 126)); + + QColor backGround(239, 235, 231); + + QColor light = backGround.lighter(150); + QColor base = Qt::white; + QColor dark = QColor(170, 156, 143).darker(110); + dark = backGround.darker(150); + QColor darkDisabled = QColor(209, 200, 191).darker(110); + + //### Find the correct disabled text color + palette.setBrush(QPalette::Disabled, QPalette::Text, QColor(190, 190, 190)); + + palette.setBrush(QPalette::Window, backGround); + palette.setBrush(QPalette::Mid, backGround.darker(130)); + palette.setBrush(QPalette::Light, light); + + palette.setBrush(QPalette::Active, QPalette::Base, base); + palette.setBrush(QPalette::Inactive, QPalette::Base, base); + palette.setBrush(QPalette::Disabled, QPalette::Base, backGround); + + palette.setBrush(QPalette::Midlight, palette.mid().color().lighter(110)); + + palette.setBrush(QPalette::All, QPalette::Dark, dark); + palette.setBrush(QPalette::Disabled, QPalette::Dark, darkDisabled); + + QColor button = backGround; + + palette.setBrush(QPalette::Button, button); + + QColor shadow = dark.darker(135); + palette.setBrush(QPalette::Shadow, shadow); + palette.setBrush(QPalette::Disabled, QPalette::Shadow, shadow.lighter(150)); + palette.setBrush(QPalette::HighlightedText, QColor(QRgb(0xffffffff))); + return palette; +} + +/*! + \reimp +*/ +void QCleanlooksStyle::drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, + QPainter *painter, const QWidget *widget) const +{ + QColor button = option->palette.button().color(); + QColor dark; + QColor grooveColor; + QColor darkOutline; + dark.setHsv(button.hue(), + qMin(255, (int)(button.saturation()*1.9)), + qMin(255, (int)(button.value()*0.7))); + grooveColor.setHsv(button.hue(), + qMin(255, (int)(button.saturation()*2.6)), + qMin(255, (int)(button.value()*0.9))); + darkOutline.setHsv(button.hue(), + qMin(255, (int)(button.saturation()*3.0)), + qMin(255, (int)(button.value()*0.6))); + + QColor alphaCornerColor; + if (widget) { + // ### backgroundrole/foregroundrole should be part of the style option + alphaCornerColor = mergedColors(option->palette.color(widget->backgroundRole()), darkOutline); + } else { + alphaCornerColor = mergedColors(option->palette.background().color(), darkOutline); + } + QColor gripShadow = grooveColor.darker(110); + QColor buttonShadow = option->palette.button().color().darker(110); + + QColor gradientStartColor = option->palette.button().color().lighter(108); + QColor gradientStopColor = mergedColors(option->palette.button().color().darker(108), dark.lighter(150), 70); + + QPalette palette = option->palette; + + switch (control) { +#ifndef QT_NO_SPINBOX + case CC_SpinBox: + if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast(option)) { + QPixmap cache; + QString pixmapName = QStyleHelper::uniqueName(QLatin1String("spinbox"), spinBox, spinBox->rect.size()); + if (!QPixmapCache::find(pixmapName, cache)) { + cache = QPixmap(spinBox->rect.size()); + cache.fill(Qt::transparent); + QRect pixmapRect(0, 0, spinBox->rect.width(), spinBox->rect.height()); + QPainter cachePainter(&cache); + + bool isEnabled = (spinBox->state & State_Enabled); + //bool focus = isEnabled && (spinBox->state & State_HasFocus); + bool hover = isEnabled && (spinBox->state & State_MouseOver); + bool sunken = (spinBox->state & State_Sunken); + bool upIsActive = (spinBox->activeSubControls == SC_SpinBoxUp); + bool downIsActive = (spinBox->activeSubControls == SC_SpinBoxDown); + + QRect rect = pixmapRect; + QStyleOptionSpinBox spinBoxCopy = *spinBox; + spinBoxCopy.rect = pixmapRect; + QRect upRect = proxy()->subControlRect(CC_SpinBox, &spinBoxCopy, SC_SpinBoxUp, widget); + QRect downRect = proxy()->subControlRect(CC_SpinBox, &spinBoxCopy, SC_SpinBoxDown, widget); + + int fw = spinBoxCopy.frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, &spinBoxCopy, widget) : 0; + cachePainter.fillRect(rect.adjusted(1, qMax(fw - 1, 0), -1, -fw), + option->palette.base()); + + QRect r = rect.adjusted(0, 1, 0, -1); + if (spinBox->frame) { + + QColor topShadow = darkOutline; + topShadow.setAlpha(60); + cachePainter.setPen(topShadow); + + // antialias corners + const QPoint points[8] = { + QPoint(r.right(), r.top() + 1), + QPoint(r.right() - 1, r.top() ), + QPoint(r.right(), r.bottom() - 1), + QPoint(r.right() - 1, r.bottom() ), + QPoint(r.left() + 1, r.bottom()), + QPoint(r.left(), r.bottom() - 1), + QPoint(r.left() + 1, r.top()), + QPoint(r.left(), r.top() + 1) + }; + cachePainter.drawPoints(points, 8); + + // draw frame + topShadow.setAlpha(30); + cachePainter.setPen(topShadow); + cachePainter.drawLine(QPoint(r.left() + 2, r.top() - 1), QPoint(r.right() - 2, r.top() - 1)); + + cachePainter.setPen(QPen(option->palette.background().color(), 1)); + cachePainter.drawLine(QPoint(r.left() + 2, r.top() + 1), QPoint(r.right() - 2, r.top() + 1)); + QColor highlight = Qt::white; + highlight.setAlpha(130); + cachePainter.setPen(option->palette.base().color().darker(120)); + cachePainter.drawLine(QPoint(r.left() + 1, r.top() + 1), + QPoint(r.right() - 1, r.top() + 1)); + cachePainter.drawLine(QPoint(r.left() + 1, r.top() + 1), + QPoint(r.left() + 1, r.bottom() - 1)); + cachePainter.setPen(option->palette.base().color()); + cachePainter.drawLine(QPoint(r.right() - 1, r.top() + 1), + QPoint(r.right() - 1, r.bottom() - 1)); + cachePainter.drawLine(QPoint(r.left() + 1, r.bottom() - 1), + QPoint(r.right() - 1, r.bottom() - 1)); + cachePainter.setPen(highlight); + cachePainter.drawLine(QPoint(r.left() + 3, r.bottom() + 1), + QPoint(r.right() - 3, r.bottom() + 1)); + + cachePainter.setPen(QPen(darkOutline, 1)); + + // top and bottom lines + const QLine lines[4] = { + QLine(QPoint(r.left() + 2, r.bottom()), QPoint(r.right()- 2, r.bottom())), + QLine(QPoint(r.left() + 2, r.top()), QPoint(r.right() - 2, r.top())), + QLine(QPoint(r.right(), r.top() + 2), QPoint(r.right(), r.bottom() - 2)), + QLine(QPoint(r.left(), r.top() + 2), QPoint(r.left(), r.bottom() - 2)) + }; + cachePainter.drawLines(lines, 4); + } + + // gradients + qt_cleanlooks_draw_gradient(&cachePainter, upRect, + gradientStartColor.darker(106), + gradientStopColor, TopDown, option->palette.button()); + qt_cleanlooks_draw_gradient(&cachePainter, downRect.adjusted(0, 0, 0, 1), + gradientStartColor.darker(106), + gradientStopColor, TopDown, option->palette.button()); + if (isEnabled) { + if (upIsActive) { + if (sunken) { + cachePainter.fillRect(upRect.adjusted(1, 0, 0, 0), gradientStopColor.darker(110)); + } else if (hover) { + qt_cleanlooks_draw_gradient(&cachePainter, upRect.adjusted(1, 0, 0, 0), + gradientStartColor.lighter(110), + gradientStopColor.lighter(110), TopDown, option->palette.button()); + } + } + if (downIsActive) { + if (sunken) { + cachePainter.fillRect(downRect.adjusted(1, 0, 0, 1), gradientStopColor.darker(110)); + + } else if (hover) { + qt_cleanlooks_draw_gradient(&cachePainter, downRect.adjusted(1, 0, 0, 1), + gradientStartColor.lighter(110), + gradientStopColor.lighter(110), TopDown, option->palette.button()); + } + } + } + + if (spinBox->frame) { + // rounded corners + const QPoint points[4] = { + QPoint(r.left() + 1, r.bottom() - 1), + QPoint(r.left() + 1, r.top() + 1), + QPoint(r.right() - 1, r.bottom() - 1), + QPoint(r.right() - 1, r.top() + 1) + }; + cachePainter.drawPoints(points, 4); + + if (option->state & State_HasFocus) { + QColor darkoutline = option->palette.highlight().color().darker(150); + QColor innerline = mergedColors(option->palette.highlight().color(), Qt::white); + cachePainter.setPen(QPen(innerline, 0)); + if (spinBox->direction == Qt::LeftToRight) { + cachePainter.drawRect(rect.adjusted(1, 2, -3 -downRect.width(), -3)); + cachePainter.setPen(QPen(darkoutline, 0)); + const QLine lines[4] = { + QLine(QPoint(r.left() + 2, r.bottom()), QPoint(r.right()- downRect.width() - 1, r.bottom())), + QLine(QPoint(r.left() + 2, r.top()), QPoint(r.right() - downRect.width() - 1, r.top())), + QLine(QPoint(r.right() - downRect.width() - 1, r.top() + 1), QPoint(r.right()- downRect.width() - 1, r.bottom() - 1)), + QLine(QPoint(r.left(), r.top() + 2), QPoint(r.left(), r.bottom() - 2)) + }; + cachePainter.drawLines(lines, 4); + cachePainter.drawPoint(QPoint(r.left() + 1, r.bottom() - 1)); + cachePainter.drawPoint(QPoint(r.left() + 1, r.top() + 1)); + cachePainter.drawLine(QPoint(r.left(), r.top() + 2), QPoint(r.left(), r.bottom() - 2)); + } else { + cachePainter.drawRect(rect.adjusted(downRect.width() + 2, 2, -2, -3)); + cachePainter.setPen(QPen(darkoutline, 0)); + cachePainter.drawLine(QPoint(r.left() + downRect.width(), r.bottom()), QPoint(r.right()- 2 - 1, r.bottom())); + cachePainter.drawLine(QPoint(r.left() + downRect.width(), r.top()), QPoint(r.right() - 2 - 1, r.top())); + + cachePainter.drawLine(QPoint(r.right(), r.top() + 2), QPoint(r.right(), r.bottom() - 2)); + cachePainter.drawPoint(QPoint(r.right() - 1, r.bottom() - 1)); + cachePainter.drawPoint(QPoint(r.right() - 1, r.top() + 1)); + cachePainter.drawLine(QPoint(r.left() + downRect.width() + 1, r.top()), + QPoint(r.left() + downRect.width() + 1, r.bottom())); + } + } + } + + // outline the up/down buttons + cachePainter.setPen(darkOutline); + QColor light = option->palette.light().color().lighter(); + + if (spinBox->direction == Qt::RightToLeft) { + cachePainter.drawLine(upRect.right(), upRect.top() - 1, upRect.right(), downRect.bottom() + 1); + cachePainter.setPen(light); + cachePainter.drawLine(upRect.right() - 1, upRect.top() + 3, upRect.right() - 1, downRect.bottom() ); + } else { + cachePainter.drawLine(upRect.left(), upRect.top() - 1, upRect.left(), downRect.bottom() + 1); + cachePainter.setPen(light); + cachePainter.drawLine(upRect.left() + 1, upRect.top() , upRect.left() + 1, downRect.bottom() ); + } + if (upIsActive && sunken) { + cachePainter.setPen(gradientStopColor.darker(130)); + cachePainter.drawLine(upRect.left() + 1, upRect.top(), upRect.left() + 1, upRect.bottom()); + cachePainter.drawLine(upRect.left(), upRect.top() - 1, upRect.right(), upRect.top() - 1); + } else { + cachePainter.setPen(light); + cachePainter.drawLine(upRect.topLeft() + QPoint(1, -1), upRect.topRight() + QPoint(-1, -1)); + cachePainter.setPen(darkOutline); + cachePainter.drawLine(upRect.bottomLeft(), upRect.bottomRight()); + } + if (downIsActive && sunken) { + cachePainter.setPen(gradientStopColor.darker(130)); + cachePainter.drawLine(downRect.left() + 1, downRect.top(), downRect.left() + 1, downRect.bottom() + 1); + cachePainter.drawLine(downRect.left(), downRect.top(), downRect.right(), downRect.top()); + cachePainter.setPen(gradientStopColor.darker(110)); + cachePainter.drawLine(downRect.left(), downRect.bottom() + 1, downRect.right(), downRect.bottom() + 1); + } else { + cachePainter.setPen(light); + cachePainter.drawLine(downRect.topLeft() + QPoint(2,0), downRect.topRight()); + } + + if (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) { + int centerX = upRect.center().x(); + int centerY = upRect.center().y(); + cachePainter.setPen(spinBox->palette.foreground().color()); + + // plus/minus + if (spinBox->activeSubControls == SC_SpinBoxUp && sunken) { + cachePainter.drawLine(1 + centerX - 2, 1 + centerY, 1 + centerX + 2, 1 + centerY); + cachePainter.drawLine(1 + centerX, 1 + centerY - 2, 1 + centerX, 1 + centerY + 2); + } else { + cachePainter.drawLine(centerX - 2, centerY, centerX + 2, centerY); + cachePainter.drawLine(centerX, centerY - 2, centerX, centerY + 2); + } + + centerX = downRect.center().x(); + centerY = downRect.center().y(); + if (spinBox->activeSubControls == SC_SpinBoxDown && sunken) { + cachePainter.drawLine(1 + centerX - 2, 1 + centerY, 1 + centerX + 2, 1 + centerY); + } else { + cachePainter.drawLine(centerX - 2, centerY, centerX + 2, centerY); + } + } else if (spinBox->buttonSymbols == QAbstractSpinBox::UpDownArrows){ + // arrows + QImage upArrow(qt_spinbox_button_arrow_up); + upArrow.setColor(1, spinBox->palette.foreground().color().rgba()); + + cachePainter.drawImage(upRect.center().x() - upArrow.width() / 2, + upRect.center().y() - upArrow.height() / 2, + upArrow); + + QImage downArrow(qt_spinbox_button_arrow_down); + downArrow.setColor(1, spinBox->palette.foreground().color().rgba()); + + cachePainter.drawImage(downRect.center().x() - downArrow.width() / 2, + downRect.center().y() - downArrow.height() / 2 + 1, + downArrow); + } + + QColor disabledColor = option->palette.background().color(); + disabledColor.setAlpha(150); + if (!(spinBox->stepEnabled & QAbstractSpinBox::StepUpEnabled)) + cachePainter.fillRect(upRect.adjusted(1, 0, 0, 0), disabledColor); + if (!(spinBox->stepEnabled & QAbstractSpinBox::StepDownEnabled)) { + cachePainter.fillRect(downRect.adjusted(1, 0, 0, 0), disabledColor); + } + cachePainter.end(); + QPixmapCache::insert(pixmapName, cache); + } + painter->drawPixmap(spinBox->rect.topLeft(), cache); + } + break; +#endif // QT_NO_SPINBOX + case CC_TitleBar: + painter->save(); + if (const QStyleOptionTitleBar *titleBar = qstyleoption_cast(option)) { + const int buttonMargin = 5; + bool active = (titleBar->titleBarState & State_Active); + QRect fullRect = titleBar->rect; + QPalette palette = option->palette; + QColor highlight = option->palette.highlight().color(); + + QColor titleBarFrameBorder(active ? highlight.darker(180): dark.darker(110)); + QColor titleBarHighlight(active ? highlight.lighter(120): palette.background().color().lighter(120)); + QColor textColor(active ? 0xffffff : 0xff000000); + QColor textAlphaColor(active ? 0xffffff : 0xff000000 ); + + { + // Fill title bar gradient + QColor titlebarColor = QColor(active ? highlight: palette.background().color()); + QLinearGradient gradient(option->rect.center().x(), option->rect.top(), + option->rect.center().x(), option->rect.bottom()); + + gradient.setColorAt(0, titlebarColor.lighter(114)); + gradient.setColorAt(0.5, titlebarColor.lighter(102)); + gradient.setColorAt(0.51, titlebarColor.darker(104)); + gradient.setColorAt(1, titlebarColor); + painter->fillRect(option->rect.adjusted(1, 1, -1, 0), gradient); + + // Frame and rounded corners + painter->setPen(titleBarFrameBorder); + + // top outline + painter->drawLine(fullRect.left() + 5, fullRect.top(), fullRect.right() - 5, fullRect.top()); + painter->drawLine(fullRect.left(), fullRect.top() + 4, fullRect.left(), fullRect.bottom()); + const QPoint points[5] = { + QPoint(fullRect.left() + 4, fullRect.top() + 1), + QPoint(fullRect.left() + 3, fullRect.top() + 1), + QPoint(fullRect.left() + 2, fullRect.top() + 2), + QPoint(fullRect.left() + 1, fullRect.top() + 3), + QPoint(fullRect.left() + 1, fullRect.top() + 4) + }; + painter->drawPoints(points, 5); + + painter->drawLine(fullRect.right(), fullRect.top() + 4, fullRect.right(), fullRect.bottom()); + const QPoint points2[5] = { + QPoint(fullRect.right() - 3, fullRect.top() + 1), + QPoint(fullRect.right() - 4, fullRect.top() + 1), + QPoint(fullRect.right() - 2, fullRect.top() + 2), + QPoint(fullRect.right() - 1, fullRect.top() + 3), + QPoint(fullRect.right() - 1, fullRect.top() + 4) + }; + painter->drawPoints(points2, 5); + + // draw bottomline + painter->drawLine(fullRect.right(), fullRect.bottom(), fullRect.left(), fullRect.bottom()); + + // top highlight + painter->setPen(titleBarHighlight); + painter->drawLine(fullRect.left() + 6, fullRect.top() + 1, fullRect.right() - 6, fullRect.top() + 1); + } + // draw title + QRect textRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarLabel, widget); + QFont font = painter->font(); + font.setBold(true); + painter->setFont(font); + painter->setPen(active? (titleBar->palette.text().color().lighter(120)) : + titleBar->palette.text().color() ); + // Note workspace also does elliding but it does not use the correct font + QString title = QFontMetrics(font).elidedText(titleBar->text, Qt::ElideRight, textRect.width() - 14); + painter->drawText(textRect.adjusted(1, 1, 1, 1), title, QTextOption(Qt::AlignHCenter | Qt::AlignVCenter)); + painter->setPen(Qt::white); + if (active) + painter->drawText(textRect, title, QTextOption(Qt::AlignHCenter | Qt::AlignVCenter)); + // min button + if ((titleBar->subControls & SC_TitleBarMinButton) && (titleBar->titleBarFlags & Qt::WindowMinimizeButtonHint) && + !(titleBar->titleBarState& Qt::WindowMinimized)) { + QRect minButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarMinButton, widget); + if (minButtonRect.isValid()) { + bool hover = (titleBar->activeSubControls & SC_TitleBarMinButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarMinButton) && (titleBar->state & State_Sunken); + qt_cleanlooks_draw_mdibutton(painter, titleBar, minButtonRect, hover, sunken); + QRect minButtonIconRect = minButtonRect.adjusted(buttonMargin ,buttonMargin , -buttonMargin, -buttonMargin); + painter->setPen(textColor); + painter->drawLine(minButtonIconRect.center().x() - 2, minButtonIconRect.center().y() + 3, + minButtonIconRect.center().x() + 3, minButtonIconRect.center().y() + 3); + painter->drawLine(minButtonIconRect.center().x() - 2, minButtonIconRect.center().y() + 4, + minButtonIconRect.center().x() + 3, minButtonIconRect.center().y() + 4); + painter->setPen(textAlphaColor); + painter->drawLine(minButtonIconRect.center().x() - 3, minButtonIconRect.center().y() + 3, + minButtonIconRect.center().x() - 3, minButtonIconRect.center().y() + 4); + painter->drawLine(minButtonIconRect.center().x() + 4, minButtonIconRect.center().y() + 3, + minButtonIconRect.center().x() + 4, minButtonIconRect.center().y() + 4); + } + } + // max button + if ((titleBar->subControls & SC_TitleBarMaxButton) && (titleBar->titleBarFlags & Qt::WindowMaximizeButtonHint) && + !(titleBar->titleBarState & Qt::WindowMaximized)) { + QRect maxButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarMaxButton, widget); + if (maxButtonRect.isValid()) { + bool hover = (titleBar->activeSubControls & SC_TitleBarMaxButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarMaxButton) && (titleBar->state & State_Sunken); + qt_cleanlooks_draw_mdibutton(painter, titleBar, maxButtonRect, hover, sunken); + + QRect maxButtonIconRect = maxButtonRect.adjusted(buttonMargin, buttonMargin, -buttonMargin, -buttonMargin); + + painter->setPen(textColor); + painter->drawRect(maxButtonIconRect.adjusted(0, 0, -1, -1)); + painter->drawLine(maxButtonIconRect.left() + 1, maxButtonIconRect.top() + 1, + maxButtonIconRect.right() - 1, maxButtonIconRect.top() + 1); + painter->setPen(textAlphaColor); + const QPoint points[4] = { + maxButtonIconRect.topLeft(), + maxButtonIconRect.topRight(), + maxButtonIconRect.bottomLeft(), + maxButtonIconRect.bottomRight() + }; + painter->drawPoints(points, 4); + } + } + + // close button + if ((titleBar->subControls & SC_TitleBarCloseButton) && (titleBar->titleBarFlags & Qt::WindowSystemMenuHint)) { + QRect closeButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarCloseButton, widget); + if (closeButtonRect.isValid()) { + bool hover = (titleBar->activeSubControls & SC_TitleBarCloseButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarCloseButton) && (titleBar->state & State_Sunken); + qt_cleanlooks_draw_mdibutton(painter, titleBar, closeButtonRect, hover, sunken); + QRect closeIconRect = closeButtonRect.adjusted(buttonMargin, buttonMargin, -buttonMargin, -buttonMargin); + painter->setPen(textAlphaColor); + const QLine lines[4] = { + QLine(closeIconRect.left() + 1, closeIconRect.top(), + closeIconRect.right(), closeIconRect.bottom() - 1), + QLine(closeIconRect.left(), closeIconRect.top() + 1, + closeIconRect.right() - 1, closeIconRect.bottom()), + QLine(closeIconRect.right() - 1, closeIconRect.top(), + closeIconRect.left(), closeIconRect.bottom() - 1), + QLine(closeIconRect.right(), closeIconRect.top() + 1, + closeIconRect.left() + 1, closeIconRect.bottom()) + }; + painter->drawLines(lines, 4); + const QPoint points[4] = { + closeIconRect.topLeft(), + closeIconRect.topRight(), + closeIconRect.bottomLeft(), + closeIconRect.bottomRight() + }; + painter->drawPoints(points, 4); + + painter->setPen(textColor); + painter->drawLine(closeIconRect.left() + 1, closeIconRect.top() + 1, + closeIconRect.right() - 1, closeIconRect.bottom() - 1); + painter->drawLine(closeIconRect.left() + 1, closeIconRect.bottom() - 1, + closeIconRect.right() - 1, closeIconRect.top() + 1); + } + } + + // normalize button + if ((titleBar->subControls & SC_TitleBarNormalButton) && + (((titleBar->titleBarFlags & Qt::WindowMinimizeButtonHint) && + (titleBar->titleBarState & Qt::WindowMinimized)) || + ((titleBar->titleBarFlags & Qt::WindowMaximizeButtonHint) && + (titleBar->titleBarState & Qt::WindowMaximized)))) { + QRect normalButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarNormalButton, widget); + if (normalButtonRect.isValid()) { + + bool hover = (titleBar->activeSubControls & SC_TitleBarNormalButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarNormalButton) && (titleBar->state & State_Sunken); + QRect normalButtonIconRect = normalButtonRect.adjusted(buttonMargin, buttonMargin, -buttonMargin, -buttonMargin); + qt_cleanlooks_draw_mdibutton(painter, titleBar, normalButtonRect, hover, sunken); + + QRect frontWindowRect = normalButtonIconRect.adjusted(0, 3, -3, 0); + painter->setPen(textColor); + painter->drawRect(frontWindowRect.adjusted(0, 0, -1, -1)); + painter->drawLine(frontWindowRect.left() + 1, frontWindowRect.top() + 1, + frontWindowRect.right() - 1, frontWindowRect.top() + 1); + painter->setPen(textAlphaColor); + const QPoint points[4] = { + frontWindowRect.topLeft(), + frontWindowRect.topRight(), + frontWindowRect.bottomLeft(), + frontWindowRect.bottomRight() + }; + painter->drawPoints(points, 4); + + QRect backWindowRect = normalButtonIconRect.adjusted(3, 0, 0, -3); + QRegion clipRegion = backWindowRect; + clipRegion -= frontWindowRect; + painter->save(); + painter->setClipRegion(clipRegion); + painter->setPen(textColor); + painter->drawRect(backWindowRect.adjusted(0, 0, -1, -1)); + painter->drawLine(backWindowRect.left() + 1, backWindowRect.top() + 1, + backWindowRect.right() - 1, backWindowRect.top() + 1); + painter->setPen(textAlphaColor); + const QPoint points2[4] = { + backWindowRect.topLeft(), + backWindowRect.topRight(), + backWindowRect.bottomLeft(), + backWindowRect.bottomRight() + }; + painter->drawPoints(points2, 4); + painter->restore(); + } + } + + // context help button + if (titleBar->subControls & SC_TitleBarContextHelpButton + && (titleBar->titleBarFlags & Qt::WindowContextHelpButtonHint)) { + QRect contextHelpButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarContextHelpButton, widget); + if (contextHelpButtonRect.isValid()) { + bool hover = (titleBar->activeSubControls & SC_TitleBarContextHelpButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarContextHelpButton) && (titleBar->state & State_Sunken); + qt_cleanlooks_draw_mdibutton(painter, titleBar, contextHelpButtonRect, hover, sunken); + + QColor blend; + QImage image(qt_titlebar_context_help); + QColor alpha = textColor; + alpha.setAlpha(128); + image.setColor(1, textColor.rgba()); + image.setColor(2, alpha.rgba()); + painter->setRenderHint(QPainter::SmoothPixmapTransform); + painter->drawImage(contextHelpButtonRect.adjusted(4, 4, -4, -4), image); + } + } + + // shade button + if (titleBar->subControls & SC_TitleBarShadeButton && (titleBar->titleBarFlags & Qt::WindowShadeButtonHint)) { + QRect shadeButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarShadeButton, widget); + if (shadeButtonRect.isValid()) { + bool hover = (titleBar->activeSubControls & SC_TitleBarShadeButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarShadeButton) && (titleBar->state & State_Sunken); + qt_cleanlooks_draw_mdibutton(painter, titleBar, shadeButtonRect, hover, sunken); + QImage image(qt_scrollbar_button_arrow_up); + image.setColor(1, textColor.rgba()); + painter->drawImage(shadeButtonRect.adjusted(5, 7, -5, -7), image); + } + } + + // unshade button + if (titleBar->subControls & SC_TitleBarUnshadeButton && (titleBar->titleBarFlags & Qt::WindowShadeButtonHint)) { + QRect unshadeButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarUnshadeButton, widget); + if (unshadeButtonRect.isValid()) { + bool hover = (titleBar->activeSubControls & SC_TitleBarUnshadeButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarUnshadeButton) && (titleBar->state & State_Sunken); + qt_cleanlooks_draw_mdibutton(painter, titleBar, unshadeButtonRect, hover, sunken); + QImage image(qt_scrollbar_button_arrow_down); + image.setColor(1, textColor.rgba()); + painter->drawImage(unshadeButtonRect.adjusted(5, 7, -5, -7), image); + } + } + + if ((titleBar->subControls & SC_TitleBarSysMenu) && (titleBar->titleBarFlags & Qt::WindowSystemMenuHint)) { + QRect iconRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarSysMenu, widget); + if (iconRect.isValid()) { + if (!titleBar->icon.isNull()) { + titleBar->icon.paint(painter, iconRect); + } else { + QStyleOption tool(0); + tool.palette = titleBar->palette; + QPixmap pm = standardIcon(SP_TitleBarMenuButton, &tool, widget).pixmap(16, 16); + tool.rect = iconRect; + painter->save(); + proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pm); + painter->restore(); + } + } + } + } + painter->restore(); + break; +#ifndef QT_NO_SCROLLBAR + case CC_ScrollBar: + painter->save(); + if (const QStyleOptionSlider *scrollBar = qstyleoption_cast(option)) { + bool isEnabled = scrollBar->state & State_Enabled; + bool reverse = scrollBar->direction == Qt::RightToLeft; + bool horizontal = scrollBar->orientation == Qt::Horizontal; + bool sunken = scrollBar->state & State_Sunken; + + painter->fillRect(option->rect, option->palette.background()); + + QRect scrollBarSubLine = proxy()->subControlRect(control, scrollBar, SC_ScrollBarSubLine, widget); + QRect scrollBarAddLine = proxy()->subControlRect(control, scrollBar, SC_ScrollBarAddLine, widget); + QRect scrollBarSlider = proxy()->subControlRect(control, scrollBar, SC_ScrollBarSlider, widget); + QRect grooveRect = proxy()->subControlRect(control, scrollBar, SC_ScrollBarGroove, widget); + + // paint groove + if (scrollBar->subControls & SC_ScrollBarGroove) { + painter->setBrush(grooveColor); + painter->setPen(Qt::NoPen); + if (horizontal) { + painter->drawRect(grooveRect); + painter->setPen(darkOutline); + painter->drawLine(grooveRect.topLeft(), grooveRect.topRight()); + painter->drawLine(grooveRect.bottomLeft(), grooveRect.bottomRight()); + } else { + painter->drawRect(grooveRect); + painter->setPen(darkOutline); + painter->drawLine(grooveRect.topLeft(), grooveRect.bottomLeft()); + painter->drawLine(grooveRect.topRight(), grooveRect.bottomRight()); + } + } + //paint slider + if (scrollBar->subControls & SC_ScrollBarSlider) { + QRect pixmapRect = scrollBarSlider; + if (horizontal) + pixmapRect.adjust(-1, 0, 0, -1); + else + pixmapRect.adjust(0, -1, -1, 0); + + if (isEnabled) { + QLinearGradient gradient(pixmapRect.center().x(), pixmapRect.top(), + pixmapRect.center().x(), pixmapRect.bottom()); + if (!horizontal) + gradient = QLinearGradient(pixmapRect.left(), pixmapRect.center().y(), + pixmapRect.right(), pixmapRect.center().y()); + + if (option->palette.button().gradient()) { + gradient.setStops(option->palette.button().gradient()->stops()); + } else { + if (sunken || (option->state & State_MouseOver && + (scrollBar->activeSubControls & SC_ScrollBarSlider))) { + gradient.setColorAt(0, gradientStartColor.lighter(110)); + gradient.setColorAt(1, gradientStopColor.lighter(110)); + } else { + gradient.setColorAt(0, gradientStartColor); + gradient.setColorAt(1, gradientStopColor); + } + } + painter->setPen(QPen(darkOutline, 0)); + painter->setBrush(gradient); + painter->drawRect(pixmapRect); + + + //calculate offsets used by highlight and shadow + int yoffset, xoffset; + if (option->state & State_Horizontal) { + xoffset = 0; + yoffset = 1; + } else { + xoffset = 1; + yoffset = 0; + } + //draw slider highlights + painter->setPen(QPen(gradientStopColor, 0)); + painter->drawLine(scrollBarSlider.left() + xoffset, + scrollBarSlider.bottom() - yoffset, + scrollBarSlider.right() - xoffset, + scrollBarSlider.bottom() - yoffset); + painter->drawLine(scrollBarSlider.right() - xoffset, + scrollBarSlider.top() + yoffset, + scrollBarSlider.right() - xoffset, + scrollBarSlider.bottom() - yoffset); + + //draw slider shadow + painter->setPen(QPen(gradientStartColor, 0)); + painter->drawLine(scrollBarSlider.left() + xoffset, + scrollBarSlider.top() + yoffset, + scrollBarSlider.right() - xoffset, + scrollBarSlider.top() + yoffset); + painter->drawLine(scrollBarSlider.left() + xoffset, + scrollBarSlider.top() + yoffset, + scrollBarSlider.left() + xoffset, + scrollBarSlider.bottom() - yoffset); + } else { + QLinearGradient gradient(pixmapRect.center().x(), pixmapRect.top(), + pixmapRect.center().x(), pixmapRect.bottom()); + if (!horizontal) { + gradient = QLinearGradient(pixmapRect.left(), pixmapRect.center().y(), + pixmapRect.right(), pixmapRect.center().y()); + } + if (sunken) { + gradient.setColorAt(0, gradientStartColor.lighter(110)); + gradient.setColorAt(1, gradientStopColor.lighter(110)); + } else { + gradient.setColorAt(0, gradientStartColor); + gradient.setColorAt(1, gradientStopColor); + } + painter->setPen(darkOutline); + painter->setBrush(gradient); + painter->drawRect(pixmapRect); + } + int gripMargin = 4; + //draw grips + if (horizontal) { + for (int i = -3; i< 6 ; i += 3) { + painter->setPen(QPen(gripShadow, 1)); + painter->drawLine( + QPoint(scrollBarSlider.center().x() + i , + scrollBarSlider.top() + gripMargin), + QPoint(scrollBarSlider.center().x() + i, + scrollBarSlider.bottom() - gripMargin)); + painter->setPen(QPen(palette.light(), 1)); + painter->drawLine( + QPoint(scrollBarSlider.center().x() + i + 1, + scrollBarSlider.top() + gripMargin ), + QPoint(scrollBarSlider.center().x() + i + 1, + scrollBarSlider.bottom() - gripMargin)); + } + } else { + for (int i = -3; i < 6 ; i += 3) { + painter->setPen(QPen(gripShadow, 1)); + painter->drawLine( + QPoint(scrollBarSlider.left() + gripMargin , + scrollBarSlider.center().y()+ i), + QPoint(scrollBarSlider.right() - gripMargin, + scrollBarSlider.center().y()+ i)); + painter->setPen(QPen(palette.light(), 1)); + painter->drawLine( + QPoint(scrollBarSlider.left() + gripMargin, + scrollBarSlider.center().y() + 1 + i), + QPoint(scrollBarSlider.right() - gripMargin, + scrollBarSlider.center().y() + 1 + i)); + } + } + } + + // The SubLine (up/left) buttons + if (scrollBar->subControls & SC_ScrollBarSubLine) { + //int scrollBarExtent = proxy()->pixelMetric(PM_ScrollBarExtent, option, widget); + QRect pixmapRect = scrollBarSubLine; + if (isEnabled ) { + QRect fillRect = pixmapRect.adjusted(1, 1, -1, -1); + // Gradients + if ((scrollBar->activeSubControls & SC_ScrollBarSubLine) && sunken) { + qt_cleanlooks_draw_gradient(painter, + QRect(fillRect), + gradientStopColor.darker(120), + gradientStopColor.darker(120), + horizontal ? TopDown : FromLeft, option->palette.button()); + } else { + qt_cleanlooks_draw_gradient(painter, + QRect(fillRect), + gradientStartColor.lighter(105), + gradientStopColor, + horizontal ? TopDown : FromLeft, option->palette.button()); + } + } + // Details + QImage subButton; + if (horizontal) { + subButton = QImage(reverse ? qt_scrollbar_button_right : qt_scrollbar_button_left); + } else { + subButton = QImage(qt_scrollbar_button_up); + } + subButton.setColor(1, alphaCornerColor.rgba()); + subButton.setColor(2, darkOutline.rgba()); + if ((scrollBar->activeSubControls & SC_ScrollBarSubLine) && sunken) { + subButton.setColor(3, gradientStopColor.darker(140).rgba()); + subButton.setColor(4, gradientStopColor.darker(120).rgba()); + } else { + subButton.setColor(3, gradientStartColor.lighter(105).rgba()); + subButton.setColor(4, gradientStopColor.rgba()); + } + subButton.setColor(5, scrollBar->palette.text().color().rgba()); + painter->drawImage(pixmapRect, subButton); + + // Arrows + PrimitiveElement arrow; + if (option->state & State_Horizontal) + arrow = option->direction == Qt::LeftToRight ? PE_IndicatorArrowLeft: PE_IndicatorArrowRight; + else + arrow = PE_IndicatorArrowUp; + QStyleOption arrowOpt = *option; + arrowOpt.rect = scrollBarSubLine.adjusted(3, 3, -2, -2); + proxy()->drawPrimitive(arrow, &arrowOpt, painter, widget); + + + // The AddLine (down/right) button + if (scrollBar->subControls & SC_ScrollBarAddLine) { + QString addLinePixmapName = QStyleHelper::uniqueName(QLatin1String("scrollbar_addline"), option, QSize(16, 16)); + QRect pixmapRect = scrollBarAddLine; + if (isEnabled) { + QRect fillRect = pixmapRect.adjusted(1, 1, -1, -1); + // Gradients + if ((scrollBar->activeSubControls & SC_ScrollBarAddLine) && sunken) { + qt_cleanlooks_draw_gradient(painter, + fillRect, + gradientStopColor.darker(120), + gradientStopColor.darker(120), + horizontal ? TopDown: FromLeft, option->palette.button()); + } else { + qt_cleanlooks_draw_gradient(painter, + fillRect, + gradientStartColor.lighter(105), + gradientStopColor, + horizontal ? TopDown : FromLeft, option->palette.button()); + } + } + // Details + QImage addButton; + if (horizontal) { + addButton = QImage(reverse ? qt_scrollbar_button_left : qt_scrollbar_button_right); + } else { + addButton = QImage(qt_scrollbar_button_down); + } + addButton.setColor(1, alphaCornerColor.rgba()); + addButton.setColor(2, darkOutline.rgba()); + if ((scrollBar->activeSubControls & SC_ScrollBarAddLine) && sunken) { + addButton.setColor(3, gradientStopColor.darker(140).rgba()); + addButton.setColor(4, gradientStopColor.darker(120).rgba()); + } else { + addButton.setColor(3, gradientStartColor.lighter(105).rgba()); + addButton.setColor(4, gradientStopColor.rgba()); + } + addButton.setColor(5, scrollBar->palette.text().color().rgba()); + painter->drawImage(pixmapRect, addButton); + + PrimitiveElement arrow; + if (option->state & State_Horizontal) + arrow = option->direction == Qt::LeftToRight ? PE_IndicatorArrowRight : PE_IndicatorArrowLeft; + else + arrow = PE_IndicatorArrowDown; + + QStyleOption arrowOpt = *option; + arrowOpt.rect = scrollBarAddLine.adjusted(3, 3, -2, -2); + proxy()->drawPrimitive(arrow, &arrowOpt, painter, widget); + } + } + } + painter->restore(); + break;; +#endif // QT_NO_SCROLLBAR +#ifndef QT_NO_COMBOBOX + case CC_ComboBox: + painter->save(); + if (const QStyleOptionComboBox *comboBox = qstyleoption_cast(option)) { + bool sunken = comboBox->state & State_On; // play dead, if combobox has no items + bool isEnabled = (comboBox->state & State_Enabled); + bool focus = isEnabled && (comboBox->state & State_HasFocus); + QPixmap cache; + QString pixmapName = QStyleHelper::uniqueName(QLatin1String("combobox"), option, comboBox->rect.size()); + if (sunken) + pixmapName += QLatin1String("-sunken"); + if (comboBox->editable) + pixmapName += QLatin1String("-editable"); + if (isEnabled) + pixmapName += QLatin1String("-enabled"); + + if (!QPixmapCache::find(pixmapName, cache)) { + cache = QPixmap(comboBox->rect.size()); + cache.fill(Qt::transparent); + QPainter cachePainter(&cache); + QRect pixmapRect(0, 0, comboBox->rect.width(), comboBox->rect.height()); + QStyleOptionComboBox comboBoxCopy = *comboBox; + comboBoxCopy.rect = pixmapRect; + + QRect rect = pixmapRect; + QRect downArrowRect = proxy()->subControlRect(CC_ComboBox, &comboBoxCopy, + SC_ComboBoxArrow, widget); + QRect editRect = proxy()->subControlRect(CC_ComboBox, &comboBoxCopy, + SC_ComboBoxEditField, widget); + // Draw a push button + if (comboBox->editable) { + QStyleOptionFrame buttonOption; + buttonOption.QStyleOption::operator=(*comboBox); + buttonOption.rect = rect; + buttonOption.state = comboBox->state & (State_Enabled | State_MouseOver); + + if (sunken) { + buttonOption.state |= State_Sunken; + buttonOption.state &= ~State_MouseOver; + } + + proxy()->drawPrimitive(PE_PanelButtonCommand, &buttonOption, &cachePainter, widget); + + //remove shadow from left side of edit field when pressed: + if (comboBox->direction != Qt::RightToLeft) + cachePainter.fillRect(editRect.left() - 1, editRect.top() + 1, editRect.left(), + editRect.bottom() - 3, option->palette.base()); + + cachePainter.setPen(dark.lighter(110)); + if (!sunken) { + int borderSize = 2; + if (comboBox->direction == Qt::RightToLeft) { + cachePainter.drawLine(QPoint(downArrowRect.right() - 1, downArrowRect.top() + borderSize ), + QPoint(downArrowRect.right() - 1, downArrowRect.bottom() - borderSize)); + cachePainter.setPen(option->palette.light().color()); + cachePainter.drawLine(QPoint(downArrowRect.right(), downArrowRect.top() + borderSize), + QPoint(downArrowRect.right(), downArrowRect.bottom() - borderSize)); + } else { + cachePainter.drawLine(QPoint(downArrowRect.left() , downArrowRect.top() + borderSize), + QPoint(downArrowRect.left() , downArrowRect.bottom() - borderSize)); + cachePainter.setPen(option->palette.light().color()); + cachePainter.drawLine(QPoint(downArrowRect.left() + 1, downArrowRect.top() + borderSize), + QPoint(downArrowRect.left() + 1, downArrowRect.bottom() - borderSize)); + } + } else { + if (comboBox->direction == Qt::RightToLeft) { + cachePainter.drawLine(QPoint(downArrowRect.right(), downArrowRect.top() + 2), + QPoint(downArrowRect.right(), downArrowRect.bottom() - 2)); + + } else { + cachePainter.drawLine(QPoint(downArrowRect.left(), downArrowRect.top() + 2), + QPoint(downArrowRect.left(), downArrowRect.bottom() - 2)); + } + } + } else { + QStyleOptionButton buttonOption; + buttonOption.QStyleOption::operator=(*comboBox); + buttonOption.rect = rect; + buttonOption.state = comboBox->state & (State_Enabled | State_MouseOver); + if (sunken) { + buttonOption.state |= State_Sunken; + buttonOption.state &= ~State_MouseOver; + } + proxy()->drawPrimitive(PE_PanelButtonCommand, &buttonOption, &cachePainter, widget); + + cachePainter.setPen(buttonShadow.darker(102)); + int borderSize = 4; + + if (!sunken) { + if (comboBox->direction == Qt::RightToLeft) { + cachePainter.drawLine(QPoint(downArrowRect.right() + 1, downArrowRect.top() + borderSize), + QPoint(downArrowRect.right() + 1, downArrowRect.bottom() - borderSize)); + cachePainter.setPen(option->palette.light().color()); + cachePainter.drawLine(QPoint(downArrowRect.right(), downArrowRect.top() + borderSize), + QPoint(downArrowRect.right(), downArrowRect.bottom() - borderSize)); + } else { + cachePainter.drawLine(QPoint(downArrowRect.left() - 1, downArrowRect.top() + borderSize), + QPoint(downArrowRect.left() - 1, downArrowRect.bottom() - borderSize)); + cachePainter.setPen(option->palette.light().color()); + cachePainter.drawLine(QPoint(downArrowRect.left() , downArrowRect.top() + borderSize), + QPoint(downArrowRect.left() , downArrowRect.bottom() - borderSize)); + } + } else { + cachePainter.setPen(dark.lighter(110)); + if (comboBox->direction == Qt::RightToLeft) { + cachePainter.drawLine(QPoint(downArrowRect.right() + 1, downArrowRect.top() + borderSize), + QPoint(downArrowRect.right() + 1, downArrowRect.bottom() - borderSize)); + + } else { + cachePainter.drawLine(QPoint(downArrowRect.left() - 1, downArrowRect.top() + borderSize), + QPoint(downArrowRect.left() - 1, downArrowRect.bottom() - borderSize)); + } + } + } + + + if (comboBox->subControls & SC_ComboBoxArrow) { + if (comboBox->editable) { + // Draw the down arrow + QImage downArrow(qt_cleanlooks_arrow_down_xpm); + downArrow.setColor(1, comboBox->palette.foreground().color().rgba()); + cachePainter.drawImage(downArrowRect.center().x() - downArrow.width() / 2, + downArrowRect.center().y() - downArrow.height() / 2 + 1, downArrow); + } else { + // Draw the up/down arrow + QImage upArrow(qt_scrollbar_button_arrow_up); + upArrow.setColor(1, comboBox->palette.foreground().color().rgba()); + QImage downArrow(qt_scrollbar_button_arrow_down); + downArrow.setColor(1, comboBox->palette.foreground().color().rgba()); + cachePainter.drawImage(downArrowRect.center().x() - downArrow.width() / 2, + downArrowRect.center().y() - upArrow.height() - 1 , upArrow); + cachePainter.drawImage(downArrowRect.center().x() - downArrow.width() / 2, + downArrowRect.center().y() + 2, downArrow); + } + } + // Draw the focus rect + if (focus && !comboBox->editable + && ((option->state & State_KeyboardFocusChange) || styleHint(SH_UnderlineShortcut, option, widget))) { + QStyleOptionFocusRect focus; + focus.rect = proxy()->subControlRect(CC_ComboBox, &comboBoxCopy, SC_ComboBoxEditField, widget) + .adjusted(0, 2, option->direction == Qt::RightToLeft ? 1 : -1, -2); + proxy()->drawPrimitive(PE_FrameFocusRect, &focus, &cachePainter, widget); + } + cachePainter.end(); + QPixmapCache::insert(pixmapName, cache); + } + painter->drawPixmap(comboBox->rect.topLeft(), cache); + } + painter->restore(); + break; +#endif // QT_NO_COMBOBOX +#ifndef QT_NO_GROUPBOX + case CC_GroupBox: + painter->save(); + if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast(option)) { + QRect textRect = proxy()->subControlRect(CC_GroupBox, groupBox, SC_GroupBoxLabel, widget); + QRect checkBoxRect = proxy()->subControlRect(CC_GroupBox, groupBox, SC_GroupBoxCheckBox, widget); + bool flat = groupBox->features & QStyleOptionFrame::Flat; + + if (!flat) { + if (groupBox->subControls & QStyle::SC_GroupBoxFrame) { + QStyleOptionFrame frame; + frame.QStyleOption::operator=(*groupBox); + frame.features = groupBox->features; + frame.lineWidth = groupBox->lineWidth; + frame.midLineWidth = groupBox->midLineWidth; + frame.rect = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxFrame, widget); + + painter->save(); + QRegion region(groupBox->rect); + bool ltr = groupBox->direction == Qt::LeftToRight; + region -= checkBoxRect.united(textRect).adjusted(ltr ? -4 : 0, 0, ltr ? 0 : 4, 0); + if (!groupBox->text.isEmpty() || groupBox->subControls & SC_GroupBoxCheckBox) + painter->setClipRegion(region); + frame.palette.setBrush(QPalette::Dark, option->palette.mid().color().lighter(110)); + proxy()->drawPrimitive(PE_FrameGroupBox, &frame, painter); + painter->restore(); + } + } + // Draw title + if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) { + if (!groupBox->text.isEmpty()) { + QColor textColor = groupBox->textColor; + if (textColor.isValid()) + painter->setPen(textColor); + int alignment = int(groupBox->textAlignment); + if (!styleHint(QStyle::SH_UnderlineShortcut, option, widget)) + alignment |= Qt::TextHideMnemonic; + if (flat) { + QFont font = painter->font(); + font.setBold(true); + painter->setFont(font); + if (groupBox->subControls & SC_GroupBoxCheckBox) { + textRect.adjust(checkBoxRect.right() + 4, 0, checkBoxRect.right() + 4, 0); + } + } + painter->drawText(textRect, Qt::TextShowMnemonic | Qt::AlignLeft| alignment, groupBox->text); + } + } + if (groupBox->subControls & SC_GroupBoxCheckBox) { + QStyleOptionButton box; + box.QStyleOption::operator=(*groupBox); + box.rect = checkBoxRect; + proxy()->drawPrimitive(PE_IndicatorCheckBox, &box, painter, widget); + } + } + painter->restore(); + break; +#endif // QT_NO_GROUPBOX +#ifndef QT_NO_SLIDER + case CC_Slider: + if (const QStyleOptionSlider *slider = qstyleoption_cast(option)) { + QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget); + QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget); + + bool horizontal = slider->orientation == Qt::Horizontal; + bool ticksAbove = slider->tickPosition & QSlider::TicksAbove; + bool ticksBelow = slider->tickPosition & QSlider::TicksBelow; + QColor activeHighlight = option->palette.color(QPalette::Normal, QPalette::Highlight); + QPixmap cache; + + QBrush oldBrush = painter->brush(); + QPen oldPen = painter->pen(); + + QColor shadowAlpha(Qt::black); + shadowAlpha.setAlpha(10); + QColor highlightAlpha(Qt::white); + highlightAlpha.setAlpha(80); + + if ((option->subControls & SC_SliderGroove) && groove.isValid()) { + QString groovePixmapName = QStyleHelper::uniqueName(QLatin1String("slider_groove"), option, groove.size()); + QRect pixmapRect(0, 0, groove.width(), groove.height()); + + // draw background groove + if (!QPixmapCache::find(groovePixmapName, cache)) { + cache = QPixmap(pixmapRect.size()); + cache.fill(Qt::transparent); + QPainter groovePainter(&cache); + + groovePainter.setPen(shadowAlpha); + groovePainter.drawLine(1, 0, groove.width(), 0); + groovePainter.drawLine(0, 0, 0, groove.height() - 1); + + groovePainter.setPen(highlightAlpha); + groovePainter.drawLine(1, groove.height() - 1, groove.width() - 1, groove.height() - 1); + groovePainter.drawLine(groove.width() - 1, 1, groove.width() - 1, groove.height() - 1); + QLinearGradient gradient; + if (horizontal) { + gradient.setStart(pixmapRect.center().x(), pixmapRect.top()); + gradient.setFinalStop(pixmapRect.center().x(), pixmapRect.bottom()); + } + else { + gradient.setStart(pixmapRect.left(), pixmapRect.center().y()); + gradient.setFinalStop(pixmapRect.right(), pixmapRect.center().y()); + } + groovePainter.setPen(QPen(darkOutline.darker(110), 0)); + gradient.setColorAt(0, grooveColor.darker(110));//dark.lighter(120)); + gradient.setColorAt(1, grooveColor.lighter(110));//palette.button().color().darker(115)); + groovePainter.setBrush(gradient); + groovePainter.drawRect(pixmapRect.adjusted(1, 1, -2, -2)); + groovePainter.end(); + QPixmapCache::insert(groovePixmapName, cache); + } + painter->drawPixmap(groove.topLeft(), cache); + + // draw blue groove highlight + QRect clipRect; + groovePixmapName += QLatin1String("_blue"); + if (!QPixmapCache::find(groovePixmapName, cache)) { + cache = QPixmap(pixmapRect.size()); + cache.fill(Qt::transparent); + QPainter groovePainter(&cache); + QLinearGradient gradient; + if (horizontal) { + gradient.setStart(pixmapRect.center().x(), pixmapRect.top()); + gradient.setFinalStop(pixmapRect.center().x(), pixmapRect.bottom()); + } + else { + gradient.setStart(pixmapRect.left(), pixmapRect.center().y()); + gradient.setFinalStop(pixmapRect.right(), pixmapRect.center().y()); + } + groovePainter.setPen(QPen(activeHighlight.darker(150), 0)); + gradient.setColorAt(0, activeHighlight.darker(120)); + gradient.setColorAt(1, activeHighlight.lighter(160)); + groovePainter.setBrush(gradient); + groovePainter.drawRect(pixmapRect.adjusted(1, 1, -2, -2)); + groovePainter.end(); + QPixmapCache::insert(groovePixmapName, cache); + } + if (horizontal) { + if (slider->upsideDown) + clipRect = QRect(handle.right(), groove.top(), groove.right() - handle.right(), groove.height()); + else + clipRect = QRect(groove.left(), groove.top(), handle.left(), groove.height()); + } else { + if (slider->upsideDown) + clipRect = QRect(groove.left(), handle.bottom(), groove.width(), groove.height() - handle.bottom()); + else + clipRect = QRect(groove.left(), groove.top(), groove.width(), handle.top() - groove.top()); + } + painter->save(); + painter->setClipRect(clipRect.adjusted(0, 0, 1, 1)); + painter->drawPixmap(groove.topLeft(), cache); + painter->restore(); + } + + // draw handle + if ((option->subControls & SC_SliderHandle) ) { + QString handlePixmapName = QStyleHelper::uniqueName(QLatin1String("slider_handle"), option, handle.size()); + if (!QPixmapCache::find(handlePixmapName, cache)) { + cache = QPixmap(handle.size()); + cache.fill(Qt::transparent); + QRect pixmapRect(0, 0, handle.width(), handle.height()); + QPainter handlePainter(&cache); + + QColor gradientStartColor = mergedColors(option->palette.button().color().lighter(155), + dark.lighter(155), 50); + QColor gradientStopColor = gradientStartColor.darker(108); + QRect gradRect = pixmapRect.adjusted(2, 2, -2, -2); + + QColor gradientBgStartColor = gradientStartColor; + QColor gradientBgStopColor = gradientStopColor; + + QColor outline = option->state & State_Enabled ? dark : dark.lighter(130); + if (option->state & State_Enabled && option->activeSubControls & SC_SliderHandle) { + gradientBgStartColor = option->palette.highlight().color().lighter(180); + gradientBgStopColor = option->palette.highlight().color().lighter(110); + outline = option->palette.highlight().color().darker(130); + } + + // gradient fill + QRect r = pixmapRect.adjusted(1, 1, -1, -1); + + qt_cleanlooks_draw_gradient(&handlePainter, gradRect, + gradientBgStartColor, + gradientBgStopColor, + horizontal ? TopDown : FromLeft, option->palette.button()); + + handlePainter.setPen(QPen(outline.darker(110), 1)); + handlePainter.drawLine(QPoint(r.left(), r.top() + 3), QPoint(r.left(), r.bottom() - 3)); + handlePainter.drawLine(QPoint(r.right(), r.top() + 3), QPoint(r.right(), r.bottom() - 3)); + handlePainter.drawLine(QPoint(r.left() + 3, r.bottom()), QPoint(r.right() - 3, r.bottom())); + + handlePainter.save(); + handlePainter.setRenderHint(QPainter::Antialiasing); + handlePainter.translate(0.5, 0.5); + const QLine lines[4] = { + QLine(QPoint(r.left(), r.bottom() - 2), QPoint(r.left() + 2, r.bottom())), + QLine(QPoint(r.left(), r.top() + 2), QPoint(r.left() + 2, r.top())), + QLine(QPoint(r.right(), r.bottom() - 2), QPoint(r.right() - 2, r.bottom())), + QLine(QPoint(r.right(), r.top() + 2), QPoint(r.right() - 2, r.top())) + }; + handlePainter.drawLines(lines, 4); + handlePainter.restore();; + handlePainter.setPen(QPen(outline.darker(130), 1)); + handlePainter.drawLine(QPoint(r.left() + 3, r.top()), QPoint(r.right() - 3, r.top())); + QColor cornerAlpha = outline.darker(120); + cornerAlpha.setAlpha(80); + + handlePainter.setPen(cornerAlpha); + if (horizontal) { + handlePainter.drawLine(QPoint(r.left() + 6, r.top()), QPoint(r.left() + 6, r.bottom())); + handlePainter.drawLine(QPoint(r.right() - 6, r.top()), QPoint(r.right() - 6, r.bottom())); + } else { + handlePainter.drawLine(QPoint(r.left(), r.top() + 6), QPoint(r.right(), r.top() + 6)); + handlePainter.drawLine(QPoint(r.left(), r.bottom() - 6), QPoint(r.right(), r.bottom() - 6)); + } + + //handle shadow + handlePainter.setPen(shadowAlpha); + handlePainter.drawLine(QPoint(r.left() + 2, r.bottom() + 1), QPoint(r.right() - 2, r.bottom() + 1)); + handlePainter.drawLine(QPoint(r.right() + 1, r.bottom() - 3), QPoint(r.right() + 1, r.top() + 4)); + handlePainter.drawLine(QPoint(r.right() - 1, r.bottom()), QPoint(r.right() + 1, r.bottom() - 2)); + + qt_cleanlooks_draw_gradient(&handlePainter, horizontal ? + gradRect.adjusted(6, 0, -6, 0) : gradRect.adjusted(0, 6, 0, -6), + gradientStartColor, + gradientStopColor.darker(106), + horizontal ? TopDown : FromLeft, + option->palette.button()); + + //draw grips + for (int i = -3; i< 6 ; i += 3) { + for (int j = -3; j< 6 ; j += 3) { + handlePainter.fillRect(r.center().x() + i, r.center().y() + j, 2, 2, highlightAlpha); + handlePainter.setPen(gripShadow); + handlePainter.drawPoint(r.center().x() + i, r.center().y() + j ); + } + } + handlePainter.end(); + QPixmapCache::insert(handlePixmapName, cache); + } + + painter->drawPixmap(handle.topLeft(), cache); + + if (slider->state & State_HasFocus) { + QStyleOptionFocusRect fropt; + fropt.QStyleOption::operator=(*slider); + fropt.rect = slider->rect; + proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); + } + } + if (option->subControls & SC_SliderTickmarks) { + painter->setPen(darkOutline); + int tickSize = proxy()->pixelMetric(PM_SliderTickmarkOffset, option, widget); + int available = proxy()->pixelMetric(PM_SliderSpaceAvailable, slider, widget); + int interval = slider->tickInterval; + if (interval <= 0) { + interval = slider->singleStep; + if (QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, interval, + available) + - QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, + 0, available) < 3) + interval = slider->pageStep; + } + if (interval <= 0) + interval = 1; + + int v = slider->minimum; + int len = proxy()->pixelMetric(PM_SliderLength, slider, widget); + while (v <= slider->maximum + 1) { + if (v == slider->maximum + 1 && interval == 1) + break; + const int v_ = qMin(v, slider->maximum); + int pos = sliderPositionFromValue(slider->minimum, slider->maximum, + v_, (horizontal + ? slider->rect.width() + : slider->rect.height()) - len, + slider->upsideDown) + len / 2; + int extra = 2 - ((v_ == slider->minimum || v_ == slider->maximum) ? 1 : 0); + + if (horizontal) { + if (ticksAbove) { + painter->drawLine(pos, slider->rect.top() + extra, + pos, slider->rect.top() + tickSize); + } + if (ticksBelow) { + painter->drawLine(pos, slider->rect.bottom() - extra, + pos, slider->rect.bottom() - tickSize); + } + } else { + if (ticksAbove) { + painter->drawLine(slider->rect.left() + extra, pos, + slider->rect.left() + tickSize, pos); + } + if (ticksBelow) { + painter->drawLine(slider->rect.right() - extra, pos, + slider->rect.right() - tickSize, pos); + } + } + // in the case where maximum is max int + int nextInterval = v + interval; + if (nextInterval < v) + break; + v = nextInterval; + } + } + painter->setBrush(oldBrush); + painter->setPen(oldPen); + } + break; +#endif // QT_NO_SLIDER +#ifndef QT_NO_DIAL + case CC_Dial: + if (const QStyleOptionSlider *dial = qstyleoption_cast(option)) + QStyleHelper::drawDial(dial, painter); + break; +#endif // QT_NO_DIAL + default: + QProxyStyle::drawComplexControl(control, option, painter, widget); + break; + } +} + +/*! + \reimp +*/ +int QCleanlooksStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const +{ + int ret = -1; + switch (metric) { + case PM_ToolTipLabelFrameWidth: + ret = 2; + break; + case PM_ButtonDefaultIndicator: + ret = 0; + break; + case PM_ButtonShiftHorizontal: + case PM_ButtonShiftVertical: + ret = 0; + break; + case PM_MessageBoxIconSize: + ret = 48; + break; + case PM_ListViewIconSize: + ret = 24; + break; + case PM_DialogButtonsSeparator: + case PM_SplitterWidth: + ret = 6; + break; + case PM_ScrollBarSliderMin: + ret = 26; + break; + case PM_MenuPanelWidth: //menu framewidth + ret = 2; + break; + case PM_TitleBarHeight: + ret = 24; + break; + case PM_ScrollBarExtent: + ret = 15; + break; + case PM_SliderThickness: + ret = 15; + break; + case PM_SliderLength: + ret = 27; + break; + case PM_DockWidgetTitleMargin: + ret = 1; + break; + case PM_MenuBarVMargin: + ret = 1; + break; + case PM_DefaultFrameWidth: + ret = 2; + break; + case PM_SpinBoxFrameWidth: + ret = 3; + break; + case PM_MenuBarItemSpacing: + ret = 6; + break; + case PM_MenuBarHMargin: + ret = 0; + break; + case PM_ToolBarHandleExtent: + ret = 9; + break; + case PM_ToolBarItemSpacing: + ret = 2; + break; + case PM_ToolBarFrameWidth: + ret = 0; + break; + case PM_ToolBarItemMargin: + ret = 1; + break; + case PM_SmallIconSize: + ret = 16; + break; + case PM_ButtonIconSize: + ret = 24; + break; + case PM_MenuVMargin: + case PM_MenuHMargin: + ret = 0; + break; + case PM_DockWidgetTitleBarButtonMargin: + ret = 4; + break; + case PM_MaximumDragDistance: + return -1; + case PM_TabCloseIndicatorWidth: + case PM_TabCloseIndicatorHeight: + return 20; + default: + break; + } + + return ret != -1 ? ret : QProxyStyle::pixelMetric(metric, option, widget); +} + +/*! + \reimp +*/ +QSize QCleanlooksStyle::sizeFromContents(ContentsType type, const QStyleOption *option, + const QSize &size, const QWidget *widget) const +{ + QSize newSize = QProxyStyle::sizeFromContents(type, option, size, widget); + switch (type) { + case CT_PushButton: + if (const QStyleOptionButton *btn = qstyleoption_cast(option)) { + if (!btn->text.isEmpty() && newSize.width() < 80) + newSize.setWidth(80); + if (!btn->icon.isNull() && btn->iconSize.height() > 16) + newSize -= QSize(0, 2); + newSize += QSize(0, 1); + } + break; +#ifndef QT_NO_GROUPBOX + case CT_GroupBox: + // Since we use a bold font we have to recalculate base width + if (const QGroupBox *gb = qobject_cast(widget)) { + QFont font = gb->font(); + font.setBold(true); + QFontMetrics metrics(font); + int baseWidth = metrics.width(gb->title()) + metrics.width(QLatin1Char(' ')); + if (gb->isCheckable()) { + baseWidth += proxy()->pixelMetric(QStyle::PM_IndicatorWidth, option, widget); + baseWidth += proxy()->pixelMetric(QStyle::PM_CheckBoxLabelSpacing, option, widget); + } + newSize.setWidth(qMax(baseWidth, newSize.width())); + } + newSize += QSize(0, 1); + break; +#endif //QT_NO_GROUPBOX + case CT_RadioButton: + case CT_CheckBox: + newSize += QSize(0, 1); + break; + case CT_ToolButton: +#ifndef QT_NO_TOOLBAR + if (widget && qobject_cast(widget->parentWidget())) + newSize += QSize(4, 6); +#endif // QT_NO_TOOLBAR + break; + case CT_SpinBox: + newSize += QSize(0, -2); + break; + case CT_ComboBox: + newSize += QSize(2, 4); + break; + case CT_LineEdit: + newSize += QSize(0, 4); + break; + case CT_MenuBarItem: + newSize += QSize(0, 2); + break; + case CT_MenuItem: + if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast(option)) { + if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { + if (!menuItem->text.isEmpty()) { + newSize.setHeight(menuItem->fontMetrics.height()); + } + } +#ifndef QT_NO_COMBOBOX + else if (!menuItem->icon.isNull()) { + if (const QComboBox *combo = qobject_cast(widget)) { + newSize.setHeight(qMax(combo->iconSize().height() + 2, newSize.height())); + } + } +#endif // QT_NO_COMBOBOX + } + break; + case CT_SizeGrip: + newSize += QSize(4, 4); + break; + case CT_MdiControls: + if (const QStyleOptionComplex *styleOpt = qstyleoption_cast(option)) { + int width = 0; + if (styleOpt->subControls & SC_MdiMinButton) + width += 19 + 1; + if (styleOpt->subControls & SC_MdiNormalButton) + width += 19 + 1; + if (styleOpt->subControls & SC_MdiCloseButton) + width += 19 + 1; + newSize = QSize(width, 19); + } else { + newSize = QSize(60, 19); + } + break; + default: + break; + } + return newSize; +} + +/*! + \reimp +*/ +void QCleanlooksStyle::polish(QApplication *app) +{ + QProxyStyle::polish(app); +} + +/*! + \reimp +*/ +void QCleanlooksStyle::polish(QWidget *widget) +{ + QProxyStyle::polish(widget); + if (qobject_cast(widget) +#ifndef QT_NO_COMBOBOX + || qobject_cast(widget) +#endif +#ifndef QT_NO_PROGRESSBAR + || qobject_cast(widget) +#endif +#ifndef QT_NO_SCROLLBAR + || qobject_cast(widget) +#endif +#ifndef QT_NO_SPLITTER + || qobject_cast(widget) +#endif + || qobject_cast(widget) +#ifndef QT_NO_SPINBOX + || qobject_cast(widget) +#endif + || (widget->inherits("QDockSeparator")) + || (widget->inherits("QDockWidgetSeparator")) + ) { + widget->setAttribute(Qt::WA_Hover, true); + } +#ifndef QT_NO_PROGRESSBAR + if (qobject_cast(widget)) + widget->installEventFilter(this); +#endif + +} + +/*! + \reimp +*/ +void QCleanlooksStyle::polish(QPalette &pal) +{ + QProxyStyle::polish(pal); + //this is a workaround for some themes such as Human, where the contrast + //between text and background is too low. + QColor highlight = pal.highlight().color(); + QColor highlightText = pal.highlightedText().color(); + if (qAbs(qGray(highlight.rgb()) - qGray(highlightText.rgb())) < 150) { + if (qGray(highlightText.rgb()) < 128) + pal.setBrush(QPalette::Highlight, highlight.lighter(145)); + } +} + +/*! + \reimp +*/ +void QCleanlooksStyle::unpolish(QWidget *widget) +{ + QProxyStyle::unpolish(widget); + if (qobject_cast(widget) +#ifndef QT_NO_COMBOBOX + || qobject_cast(widget) +#endif +#ifndef QT_NO_PROGRESSBAR + || qobject_cast(widget) +#endif +#ifndef QT_NO_SCROLLBAR + || qobject_cast(widget) +#endif +#ifndef QT_NO_SPLITTER + || qobject_cast(widget) +#endif + || qobject_cast(widget) +#ifndef QT_NO_SPINBOX + || qobject_cast(widget) +#endif + || (widget->inherits("QDockSeparator")) + || (widget->inherits("QDockWidgetSeparator")) + ) { + widget->setAttribute(Qt::WA_Hover, false); + } +#ifndef QT_NO_PROGRESSBAR + if (qobject_cast(widget)) + widget->removeEventFilter(this); +#endif +} + +/*! + \reimp +*/ +void QCleanlooksStyle::unpolish(QApplication *app) +{ + QProxyStyle::unpolish(app); +} + +/*! + \reimp +*/ +bool QCleanlooksStyle::event(QEvent *event) +{ + switch (event->type()) { + case QEvent::Timer: { +#ifndef QT_NO_PROGRESSBAR + QTimerEvent *timerEvent = reinterpret_cast(event); + if (timerEvent->timerId() == animateTimer) { + Q_ASSERT(progressAnimationFps > 0); + animateStep = startTime.elapsed() / (1000 / progressAnimationFps); + foreach (QProgressBar *bar, animatedProgressBars) + bar->update(); + } +#endif // QT_NO_PROGRESSBAR + event->ignore(); + } + default: + break; + } + + return QProxyStyle::event(event); +} + +/*! + \reimp +*/ +bool QCleanlooksStyle::eventFilter(QObject *o, QEvent *e) +{ + switch (e->type()) + { +#ifndef QT_NO_PROGRESSBAR + case QEvent::StyleChange: + case QEvent::Paint: + case QEvent::Show: + if (QProgressBar *bar = qobject_cast(o)) { + // Animation by timer for progress bars that have their min and + // max values the same + if (bar->minimum() == bar->maximum()) + startProgressAnimation(this, bar); + else + stopProgressAnimation(this, bar); + } + break; + case QEvent::Destroy: + case QEvent::Hide: + // Do static_cast because there is no type info when getting + // the destroy event. We know that it is a QProgressBar, since + // we only install a widget event filter for QScrollBars. + stopProgressAnimation(this, static_cast(o)); + break; +#endif // QT_NO_PROGRESSBAR + default: + break; + } + return QProxyStyle::eventFilter(o, e); +} + +void QCleanlooksStyle::startProgressAnimation(QObject *o, QProgressBar *bar) +{ + if (!animatedProgressBars.contains(bar)) { + animatedProgressBars << bar; + if (!animateTimer) { + Q_ASSERT(progressAnimationFps > 0); + animateStep = 0; + startTime.start(); + animateTimer = o->startTimer(1000 / progressAnimationFps); + } + } +} + +void QCleanlooksStyle::stopProgressAnimation(QObject *o, QProgressBar *bar) +{ + if (!animatedProgressBars.isEmpty()) { + animatedProgressBars.removeOne(bar); + if (animatedProgressBars.isEmpty() && animateTimer) { + o->killTimer(animateTimer); + animateTimer = 0; + } + } +} + +/*! + \reimp +*/ +QRect QCleanlooksStyle::subControlRect(ComplexControl control, const QStyleOptionComplex *option, + SubControl subControl, const QWidget *widget) const +{ + QRect rect = QProxyStyle::subControlRect(control, option, subControl, widget); + + switch (control) { +#ifndef QT_NO_SLIDER + case CC_Slider: + if (const QStyleOptionSlider *slider = qstyleoption_cast(option)) { + int tickSize = proxy()->pixelMetric(PM_SliderTickmarkOffset, option, widget); + switch (subControl) { + case SC_SliderHandle: { + if (slider->orientation == Qt::Horizontal) { + rect.setHeight(proxy()->pixelMetric(PM_SliderThickness)); + rect.setWidth(proxy()->pixelMetric(PM_SliderLength)); + int centerY = slider->rect.center().y() - rect.height() / 2; + if (slider->tickPosition & QSlider::TicksAbove) + centerY += tickSize; + if (slider->tickPosition & QSlider::TicksBelow) + centerY -= tickSize; + rect.moveTop(centerY); + } else { + rect.setWidth(proxy()->pixelMetric(PM_SliderThickness)); + rect.setHeight(proxy()->pixelMetric(PM_SliderLength)); + int centerX = slider->rect.center().x() - rect.width() / 2; + if (slider->tickPosition & QSlider::TicksAbove) + centerX += tickSize; + if (slider->tickPosition & QSlider::TicksBelow) + centerX -= tickSize; + rect.moveLeft(centerX); + } + } + break; + case SC_SliderGroove: { + QPoint grooveCenter = slider->rect.center(); + if (slider->orientation == Qt::Horizontal) { + rect.setHeight(7); + if (slider->tickPosition & QSlider::TicksAbove) + grooveCenter.ry() += tickSize; + if (slider->tickPosition & QSlider::TicksBelow) + grooveCenter.ry() -= tickSize; + } else { + rect.setWidth(7); + if (slider->tickPosition & QSlider::TicksAbove) + grooveCenter.rx() += tickSize; + if (slider->tickPosition & QSlider::TicksBelow) + grooveCenter.rx() -= tickSize; + } + rect.moveCenter(grooveCenter); + break; + } + default: + break; + } + } + break; +#endif // QT_NO_SLIDER + case CC_ScrollBar: + break; +#ifndef QT_NO_SPINBOX + case CC_SpinBox: + if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast(option)) { + QSize bs; + int center = spinbox->rect.height() / 2; + int fw = spinbox->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, spinbox, widget) : 0; + int y = fw; + bs.setHeight(qMax(8, spinbox->rect.height()/2 - y)); + bs.setWidth(15); + int x, lx, rx; + x = spinbox->rect.width() - y - bs.width() + 2; + lx = fw; + rx = x - fw; + switch (subControl) { + case SC_SpinBoxUp: + if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) + return QRect(); + rect = QRect(x, fw, bs.width(), center - fw); + break; + case SC_SpinBoxDown: + if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) + return QRect(); + + rect = QRect(x, center, bs.width(), spinbox->rect.bottom() - center - fw + 1); + break; + case SC_SpinBoxEditField: + if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) { + rect = QRect(lx, fw, spinbox->rect.width() - 2*fw, spinbox->rect.height() - 2*fw); + } else { + rect = QRect(lx, fw, rx - qMax(fw - 1, 0), spinbox->rect.height() - 2*fw); + } + break; + case SC_SpinBoxFrame: + rect = spinbox->rect; + default: + break; + } + rect = visualRect(spinbox->direction, spinbox->rect, rect); + } + break; +#endif // Qt_NO_SPINBOX +#ifndef QT_NO_GROUPBOX + case CC_GroupBox: + if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast(option)) { + int topMargin = 0; + int topHeight = 0; + int verticalAlignment = proxy()->styleHint(SH_GroupBox_TextLabelVerticalAlignment, groupBox, widget); + bool flat = groupBox->features & QStyleOptionFrame::Flat; + if (!groupBox->text.isEmpty()) { + topHeight = groupBox->fontMetrics.height(); + if (verticalAlignment & Qt::AlignVCenter) + topMargin = topHeight / 2; + else if (verticalAlignment & Qt::AlignTop) + topMargin = topHeight; + } + QRect frameRect = groupBox->rect; + frameRect.setTop(topMargin); + if (subControl == SC_GroupBoxFrame) { + return rect; + } + else if (subControl == SC_GroupBoxContents) { + if (flat) { + int margin = 0; + int leftMarginExtension = 16; + rect = frameRect.adjusted(leftMarginExtension + margin, margin + topHeight, -margin, -margin); + } + break; + } + if (flat) { + if (const QGroupBox *groupBoxWidget = qobject_cast(widget)) { + //Prepare metrics for a bold font + QFont font = widget->font(); + font.setBold(true); + QFontMetrics fontMetrics(font); + + QSize textRect = fontMetrics.boundingRect(groupBoxWidget->title()).size() + QSize(2, 2); + if (subControl == SC_GroupBoxCheckBox) { + int indicatorWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); + int indicatorHeight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); + rect.setWidth(indicatorWidth); + rect.setHeight(indicatorHeight); + rect.moveTop((fontMetrics.height() - indicatorHeight) / 2 + 2); + } else if (subControl == SC_GroupBoxLabel) { + rect.setSize(textRect); + } + } + } + } + return rect; +#ifndef QT_NO_COMBOBOX + case CC_ComboBox: + switch (subControl) { + case SC_ComboBoxArrow: + rect = visualRect(option->direction, option->rect, rect); + rect.setRect(rect.right() - 18, rect.top() - 2, + 19, rect.height() + 4); + rect = visualRect(option->direction, option->rect, rect); + break; + case SC_ComboBoxEditField: { + int frameWidth = proxy()->pixelMetric(PM_DefaultFrameWidth); + rect = visualRect(option->direction, option->rect, rect); + rect.setRect(option->rect.left() + frameWidth, option->rect.top() + frameWidth, + option->rect.width() - 19 - 2 * frameWidth, + option->rect.height() - 2 * frameWidth); + if (const QStyleOptionComboBox *box = qstyleoption_cast(option)) { + if (!box->editable) { + rect.adjust(2, 0, 0, 0); + if (box->state & (State_Sunken | State_On)) + rect.translate(1, 1); + } + } + rect = visualRect(option->direction, option->rect, rect); + break; + } + default: + break; + } + break; +#endif // QT_NO_COMBOBOX +#endif //QT_NO_GROUPBOX + case CC_TitleBar: + if (const QStyleOptionTitleBar *tb = qstyleoption_cast(option)) { + SubControl sc = subControl; + QRect &ret = rect; + const int indent = 3; + const int controlTopMargin = 3; + const int controlBottomMargin = 3; + const int controlWidthMargin = 2; + const int controlHeight = tb->rect.height() - controlTopMargin - controlBottomMargin ; + const int delta = controlHeight + controlWidthMargin; + int offset = 0; + + bool isMinimized = tb->titleBarState & Qt::WindowMinimized; + bool isMaximized = tb->titleBarState & Qt::WindowMaximized; + + switch (sc) { + case SC_TitleBarLabel: + if (tb->titleBarFlags & (Qt::WindowTitleHint | Qt::WindowSystemMenuHint)) { + ret = tb->rect; + if (tb->titleBarFlags & Qt::WindowSystemMenuHint) + ret.adjust(delta, 0, -delta, 0); + if (tb->titleBarFlags & Qt::WindowMinimizeButtonHint) + ret.adjust(0, 0, -delta, 0); + if (tb->titleBarFlags & Qt::WindowMaximizeButtonHint) + ret.adjust(0, 0, -delta, 0); + if (tb->titleBarFlags & Qt::WindowShadeButtonHint) + ret.adjust(0, 0, -delta, 0); + if (tb->titleBarFlags & Qt::WindowContextHelpButtonHint) + ret.adjust(0, 0, -delta, 0); + } + break; + case SC_TitleBarContextHelpButton: + if (tb->titleBarFlags & Qt::WindowContextHelpButtonHint) + offset += delta; + case SC_TitleBarMinButton: + if (!isMinimized && (tb->titleBarFlags & Qt::WindowMinimizeButtonHint)) + offset += delta; + else if (sc == SC_TitleBarMinButton) + break; + case SC_TitleBarNormalButton: + if (isMinimized && (tb->titleBarFlags & Qt::WindowMinimizeButtonHint)) + offset += delta; + else if (isMaximized && (tb->titleBarFlags & Qt::WindowMaximizeButtonHint)) + offset += delta; + else if (sc == SC_TitleBarNormalButton) + break; + case SC_TitleBarMaxButton: + if (!isMaximized && (tb->titleBarFlags & Qt::WindowMaximizeButtonHint)) + offset += delta; + else if (sc == SC_TitleBarMaxButton) + break; + case SC_TitleBarShadeButton: + if (!isMinimized && (tb->titleBarFlags & Qt::WindowShadeButtonHint)) + offset += delta; + else if (sc == SC_TitleBarShadeButton) + break; + case SC_TitleBarUnshadeButton: + if (isMinimized && (tb->titleBarFlags & Qt::WindowShadeButtonHint)) + offset += delta; + else if (sc == SC_TitleBarUnshadeButton) + break; + case SC_TitleBarCloseButton: + if (tb->titleBarFlags & Qt::WindowSystemMenuHint) + offset += delta; + else if (sc == SC_TitleBarCloseButton) + break; + ret.setRect(tb->rect.right() - indent - offset, tb->rect.top() + controlTopMargin, + controlHeight, controlHeight); + break; + case SC_TitleBarSysMenu: + if (tb->titleBarFlags & Qt::WindowSystemMenuHint) { + ret.setRect(tb->rect.left() + controlWidthMargin + indent, tb->rect.top() + controlTopMargin, + controlHeight, controlHeight); + } + break; + default: + break; + } + ret = visualRect(tb->direction, tb->rect, ret); + } + break; + default: + break; + } + + return rect; +} + + +/*! + \reimp +*/ +QRect QCleanlooksStyle::itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const +{ + return QProxyStyle::itemPixmapRect(r, flags, pixmap); +} + +/*! + \reimp +*/ +void QCleanlooksStyle::drawItemPixmap(QPainter *painter, const QRect &rect, + int alignment, const QPixmap &pixmap) const +{ + QProxyStyle::drawItemPixmap(painter, rect, alignment, pixmap); +} + +/*! + \reimp +*/ +QStyle::SubControl QCleanlooksStyle::hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, + const QPoint &pt, const QWidget *w) const +{ + return QProxyStyle::hitTestComplexControl(cc, opt, pt, w); +} + +/*! + \reimp +*/ +QPixmap QCleanlooksStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, + const QStyleOption *opt) const +{ + return QProxyStyle::generatedIconPixmap(iconMode, pixmap, opt); +} + +/*! + \reimp +*/ +int QCleanlooksStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, + QStyleHintReturn *returnData) const +{ + int ret = 0; + switch (hint) { + case SH_ScrollBar_MiddleClickAbsolutePosition: + ret = true; + break; + case SH_EtchDisabledText: + ret = 1; + break; + case SH_Menu_AllowActiveAndDisabled: + ret = false; + break; + case SH_MainWindow_SpaceBelowMenuBar: + ret = 0; + break; + case SH_MenuBar_MouseTracking: + ret = 1; + break; + case SH_TitleBar_AutoRaise: + ret = 1; + break; + case SH_TitleBar_NoBorder: + ret = 1; + break; + case SH_ItemView_ShowDecorationSelected: + ret = true; + break; + case SH_Table_GridLineColor: + if (option) { + ret = option->palette.background().color().darker(120).rgb(); + break; + } + case SH_ComboBox_Popup: + if (const QStyleOptionComboBox *cmb = qstyleoption_cast(option)) + ret = !cmb->editable; + else + ret = 0; + break; + case SH_WindowFrame_Mask: + ret = 1; + if (QStyleHintReturnMask *mask = qstyleoption_cast(returnData)) { + //left rounded corner + mask->region = option->rect; + mask->region -= QRect(option->rect.left(), option->rect.top(), 5, 1); + mask->region -= QRect(option->rect.left(), option->rect.top() + 1, 3, 1); + mask->region -= QRect(option->rect.left(), option->rect.top() + 2, 2, 1); + mask->region -= QRect(option->rect.left(), option->rect.top() + 3, 1, 2); + + //right rounded corner + mask->region -= QRect(option->rect.right() - 4, option->rect.top(), 5, 1); + mask->region -= QRect(option->rect.right() - 2, option->rect.top() + 1, 3, 1); + mask->region -= QRect(option->rect.right() - 1, option->rect.top() + 2, 2, 1); + mask->region -= QRect(option->rect.right() , option->rect.top() + 3, 1, 2); + } + break; + case SH_MessageBox_TextInteractionFlags: + ret = Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse; + break; + case SH_DialogButtonBox_ButtonsHaveIcons: + ret = false; + break; + case SH_MessageBox_CenterButtons: + ret = false; + break; +#ifndef QT_NO_WIZARD + case SH_WizardStyle: + ret = QWizard::ClassicStyle; + break; +#endif + case SH_ItemView_ArrowKeysNavigateIntoChildren: + ret = false; + break; + case SH_Menu_SubMenuPopupDelay: + ret = 225; // default from GtkMenu + break; + default: + ret = QProxyStyle::styleHint(hint, option, widget, returnData); + break; + } + return ret; +} + +/*! \reimp */ +QRect QCleanlooksStyle::subElementRect(SubElement sr, const QStyleOption *opt, const QWidget *w) const +{ + QRect r = QProxyStyle::subElementRect(sr, opt, w); + switch (sr) { + case SE_PushButtonFocusRect: + r.adjust(0, 1, 0, -1); + break; + case SE_DockWidgetTitleBarText: { + const QStyleOptionDockWidget *dwOpt + = qstyleoption_cast(opt); + bool verticalTitleBar = dwOpt && dwOpt->verticalTitleBar; + if (verticalTitleBar) { + r.adjust(0, 0, 0, -4); + } else { + if (opt->direction == Qt::LeftToRight) + r.adjust(4, 0, 0, 0); + else + r.adjust(0, 0, -4, 0); + } + + break; + } + case SE_ProgressBarContents: + r = subElementRect(SE_ProgressBarGroove, opt, w); + break; + default: + break; + } + return r; +} + +/*! + \reimp +*/ +QIcon QCleanlooksStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, + const QWidget *widget) const +{ + return QProxyStyle::standardIcon(standardIcon, option, widget); +} + +/*! + \reimp + */ +QPixmap QCleanlooksStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, + const QWidget *widget) const +{ + QPixmap pixmap; + +#ifndef QT_NO_IMAGEFORMAT_XPM + switch (standardPixmap) { + case SP_TitleBarNormalButton: + return QPixmap((const char **)dock_widget_restore_xpm); + case SP_TitleBarMinButton: + return QPixmap((const char **)workspace_minimize); + case SP_TitleBarCloseButton: + case SP_DockWidgetCloseButton: + return QPixmap((const char **)dock_widget_close_xpm); + + default: + break; + } +#endif //QT_NO_IMAGEFORMAT_XPM + + return QProxyStyle::standardPixmap(standardPixmap, opt, widget); +} + +QStyle *CreateCleanlooksStyle() +{ + return(new QCleanlooksStyle); +} + +QT_END_NAMESPACE diff --git a/src/style/cleanlooks/qcleanlooksstyle.h b/src/style/cleanlooks/qcleanlooksstyle.h new file mode 100644 index 0000000..39720e1 --- /dev/null +++ b/src/style/cleanlooks/qcleanlooksstyle.h @@ -0,0 +1,116 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QCLEANLOOKSSTYLE_H +#define QCLEANLOOKSSTYLE_H + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QProgressBar; + +class QCleanlooksStyle : public QProxyStyle +{ + Q_OBJECT + +public: + QCleanlooksStyle(); + ~QCleanlooksStyle(); + + QPalette standardPalette () const Q_DECL_OVERRIDE; + void drawPrimitive(PrimitiveElement elem, + const QStyleOption *option, + QPainter *painter, const QWidget *widget = 0) const Q_DECL_OVERRIDE; + void drawControl(ControlElement ce, const QStyleOption *option, QPainter *painter, + const QWidget *widget) const Q_DECL_OVERRIDE; + int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const Q_DECL_OVERRIDE; + void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, + QPainter *painter, const QWidget *widget) const Q_DECL_OVERRIDE; + QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = 0) const Q_DECL_OVERRIDE; + QSize sizeFromContents(ContentsType type, const QStyleOption *option, + const QSize &size, const QWidget *widget) const Q_DECL_OVERRIDE; + SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, + const QPoint &pt, const QWidget *w = 0) const Q_DECL_OVERRIDE; + QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, + SubControl sc, const QWidget *widget) const Q_DECL_OVERRIDE; + QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, + const QStyleOption *opt) const Q_DECL_OVERRIDE; + int styleHint(StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0, + QStyleHintReturn *returnData = 0) const Q_DECL_OVERRIDE; + QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const Q_DECL_OVERRIDE; + QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = 0, + const QWidget *widget = 0) const Q_DECL_OVERRIDE; + QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, + const QWidget *widget = 0) const Q_DECL_OVERRIDE; + void drawItemPixmap(QPainter *painter, const QRect &rect, + int alignment, const QPixmap &pixmap) const Q_DECL_OVERRIDE; + void drawItemText(QPainter *painter, const QRect &rect, + int flags, const QPalette &pal, bool enabled, + const QString &text, QPalette::ColorRole textRole = QPalette::NoRole) const Q_DECL_OVERRIDE; + void polish(QWidget *widget) Q_DECL_OVERRIDE; + void polish(QApplication *app) Q_DECL_OVERRIDE; + void polish(QPalette &pal) Q_DECL_OVERRIDE; + void unpolish(QWidget *widget) Q_DECL_OVERRIDE; + void unpolish(QApplication *app) Q_DECL_OVERRIDE; + + +protected: + bool event(QEvent *event) Q_DECL_OVERRIDE; + bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE; + void startProgressAnimation(QObject *o, QProgressBar *bar); + void stopProgressAnimation(QObject *o, QProgressBar *bar); + +private: + int animateStep; + int animateTimer; + QElapsedTimer startTime; + QList animatedProgressBars; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QCLEANLOOKSSTYLE_H diff --git a/src/style/motif/qcdestyle.cpp b/src/style/motif/qcdestyle.cpp new file mode 100644 index 0000000..7ad5ce4 --- /dev/null +++ b/src/style/motif/qcdestyle.cpp @@ -0,0 +1,308 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qcdestyle.h" + +#include "qmenu.h" +#include "qapplication.h" +#include "qpainter.h" +#include "qdrawutil.h" +#include "qpixmap.h" +#include "qpalette.h" +#include "qwidget.h" +#include "qpushbutton.h" +#include "qscrollbar.h" +#include "qtabbar.h" +#include "qtabwidget.h" +#include "qlistview.h" +#include "qsplitter.h" +#include "qslider.h" +#include "qcombobox.h" +#include "qlineedit.h" +#include "qprogressbar.h" +#include "qimage.h" +#include "qfocusframe.h" +#include "qpainterpath.h" +#include "qdebug.h" +#include + +QT_BEGIN_NAMESPACE + +/*! + \class QCDEStyle + \brief The QCDEStyle class provides a CDE look and feel. + + \ingroup appearance + \inmodule QtWidgets + + This style provides a slightly improved Motif look similar to some + versions of the Common Desktop Environment (CDE). The main + differences are thinner frames and more modern radio buttons and + checkboxes. Together with a dark background and a bright + text/foreground color, the style looks quite attractive (at least + for Motif fans). + + Note that most of the functions provided by QCDEStyle are + reimplementations of QStyle functions; see QStyle for their + documentation. QCDEStyle provides overloads for drawControl() and + drawPrimitive() which are documented here. + + \image qcdestyle.png + \sa QWindowsXPStyle, QMacStyle, QWindowsStyle, QPlastiqueStyle, QMotifStyle +*/ + +/*! + Constructs a QCDEStyle. + + If \a useHighlightCols is false (the default), then the style will + polish the application's color palette to emulate the Motif way of + highlighting, which is a simple inversion between the base and the + text color. +*/ +QCDEStyle::QCDEStyle(bool useHighlightCols) + : QMotifStyle(useHighlightCols) +{ + spinboxHCoeff = 10; +} + +/*! + Destroys the style. +*/ +QCDEStyle::~QCDEStyle() +{ +} + + +/*!\reimp +*/ +int QCDEStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, + const QWidget *widget) const +/* +int QCDEStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, + const QWidget *widget) const + */ +{ + int ret = 0; + + switch (metric) { + case PM_MenuBarPanelWidth: + case PM_DefaultFrameWidth: + case PM_FocusFrameVMargin: + case PM_FocusFrameHMargin: + case PM_MenuPanelWidth: + case PM_SpinBoxFrameWidth: + case PM_MenuBarVMargin: + case PM_MenuBarHMargin: + case PM_DockWidgetFrameWidth: + ret = 1; + break; + case PM_ScrollBarExtent: + ret = 13; + break; + default: + ret = QMotifStyle::pixelMetric(metric, option, widget); + break; + } + return ret; +} + +/*! + \reimp +*/ +void QCDEStyle::drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, + const QWidget *widget) const +{ + + switch (element) { + case CE_MenuBarItem: { + if (opt->state & State_Selected) // active item + qDrawShadePanel(p, opt->rect, opt->palette, true, 1, + &opt->palette.brush(QPalette::Button)); + else // other item + p->fillRect(opt->rect, opt->palette.brush(QPalette::Button)); + QCommonStyle::drawControl(element, opt, p, widget); + break; } + case CE_RubberBand: { + p->save(); + p->setClipping(false); + QPainterPath path; + path.addRect(opt->rect); + path.addRect(opt->rect.adjusted(2, 2, -2, -2)); + p->fillPath(path, opt->palette.color(QPalette::Active, QPalette::Text)); + p->restore(); + break; } + default: + QMotifStyle::drawControl(element, opt, p, widget); + break; + } +} + +/*! + \reimp +*/ +void QCDEStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, + const QWidget *widget) const +{ + switch (pe) { + case PE_IndicatorCheckBox: { + bool down = opt->state & State_Sunken; + bool on = opt->state & State_On; + bool showUp = !(down ^ on); + QBrush fill = (showUp || (opt->state & State_NoChange)) ? opt->palette.brush(QPalette::Button) : opt->palette.brush(QPalette::Mid); + qDrawShadePanel(p, opt->rect, opt->palette, !showUp, pixelMetric(PM_DefaultFrameWidth), &opt->palette.brush(QPalette::Button)); + + if (on || (opt->state & State_NoChange)) { + QRect r = opt->rect; + QPolygon a(7 * 2); + int i, xx, yy; + xx = r.x() + 3; + yy = r.y() + 5; + if (opt->rect.width() <= 9) { + // When called from CE_MenuItem in QMotifStyle + xx -= 2; + yy -= 2; + } + + for (i = 0; i < 3; i++) { + a.setPoint(2 * i, xx, yy); + a.setPoint(2 * i + 1, xx, yy + 2); + xx++; yy++; + } + yy -= 2; + for (i = 3; i < 7; i++) { + a.setPoint(2 * i, xx, yy); + a.setPoint(2 * i + 1, xx, yy + 2); + xx++; yy--; + } + if (opt->state & State_NoChange) + p->setPen(opt->palette.dark().color()); + else + p->setPen(opt->palette.foreground().color()); + p->drawPolyline(a); + } + if (!(opt->state & State_Enabled) && styleHint(SH_DitherDisabledText)) + p->fillRect(opt->rect, QBrush(p->background().color(), Qt::Dense5Pattern)); + } break; + case PE_IndicatorRadioButton: + { + QRect r = opt->rect; +#define INTARRLEN(x) sizeof(x)/(sizeof(int)*2) + static const int pts1[] = { // up left lines + 1,9, 1,8, 0,7, 0,4, 1,3, 1,2, 2,1, 3,1, 4,0, 7,0, 8,1, 9,1 }; + static const int pts4[] = { // bottom right lines + 2,10, 3,10, 4,11, 7,11, 8,10, 9,10, 10,9, 10,8, 11,7, + 11,4, 10,3, 10,2 }; + static const int pts5[] = { // inner fill + 4,2, 7,2, 9,4, 9,7, 7,9, 4,9, 2,7, 2,4 }; + bool down = opt->state & State_Sunken; + bool on = opt->state & State_On; + QPolygon a(INTARRLEN(pts1), pts1); + + //center when rect is larger than indicator size + int xOffset = 0; + int yOffset = 0; + int indicatorWidth = pixelMetric(PM_ExclusiveIndicatorWidth); + int indicatorHeight = pixelMetric(PM_ExclusiveIndicatorWidth); + if (r.width() > indicatorWidth) + xOffset += (r.width() - indicatorWidth)/2; + if (r.height() > indicatorHeight) + yOffset += (r.height() - indicatorHeight)/2; + p->translate(xOffset, yOffset); + + a.translate(r.x(), r.y()); + QPen oldPen = p->pen(); + QBrush oldBrush = p->brush(); + p->setPen((down || on) ? opt->palette.dark().color() : opt->palette.light().color()); + p->drawPolyline(a); + a.setPoints(INTARRLEN(pts4), pts4); + a.translate(r.x(), r.y()); + p->setPen((down || on) ? opt->palette.light().color() : opt->palette.dark().color()); + p->drawPolyline(a); + a.setPoints(INTARRLEN(pts5), pts5); + a.translate(r.x(), r.y()); + QColor fillColor = on ? opt->palette.dark().color() : opt->palette.background().color(); + p->setPen(fillColor); + p->setBrush(on ? opt->palette.brush(QPalette::Dark) : + opt->palette.brush(QPalette::Window)); + p->drawPolygon(a); + if (!(opt->state & State_Enabled) && styleHint(SH_DitherDisabledText)) + p->fillRect(opt->rect, QBrush(p->background().color(), Qt::Dense5Pattern)); + p->setPen(oldPen); + p->setBrush(oldBrush); + + p->translate(-xOffset, -yOffset); + + } break; + default: + QMotifStyle::drawPrimitive(pe, opt, p, widget); + } +} + +/*!\reimp*/ +QPalette QCDEStyle::standardPalette() const +{ + QColor background(0xb6, 0xb6, 0xcf); + QColor light = background.lighter(); + QColor mid = background.darker(150); + QColor dark = background.darker(); + QPalette palette(Qt::black, background, light, dark, mid, Qt::black, Qt::white); + palette.setBrush(QPalette::Disabled, QPalette::WindowText, dark); + palette.setBrush(QPalette::Disabled, QPalette::Text, dark); + palette.setBrush(QPalette::Disabled, QPalette::ButtonText, dark); + palette.setBrush(QPalette::Disabled, QPalette::Base, background); + return palette; +} + +/*! + \reimp +*/ +QIcon QCDEStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *opt, + const QWidget *widget) const +{ + return QMotifStyle::standardIcon(standardIcon, opt, widget); +} + +QStyle *CreateCDEStyle() +{ + return(new QCDEStyle); +} + +QT_END_NAMESPACE diff --git a/src/style/motif/qcdestyle.h b/src/style/motif/qcdestyle.h new file mode 100644 index 0000000..19d1f35 --- /dev/null +++ b/src/style/motif/qcdestyle.h @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QCDESTYLE_H +#define QCDESTYLE_H + +#include "qmotifstyle.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QCDEStyle : public QMotifStyle +{ + Q_OBJECT +public: + explicit QCDEStyle(bool useHighlightCols = false); + virtual ~QCDEStyle(); + + int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, + const QWidget *widget = 0) const Q_DECL_OVERRIDE; + void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, + const QWidget *w = 0) const Q_DECL_OVERRIDE; + void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, + const QWidget *w = 0) const Q_DECL_OVERRIDE; + QPalette standardPalette() const Q_DECL_OVERRIDE; + QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *opt = 0, + const QWidget *widget = 0) const Q_DECL_OVERRIDE; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QCDESTYLE_H diff --git a/src/style/motif/qmotifstyle.cpp b/src/style/motif/qmotifstyle.cpp new file mode 100644 index 0000000..c53adcb --- /dev/null +++ b/src/style/motif/qmotifstyle.cpp @@ -0,0 +1,2533 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmotifstyle.h" + +#include "qmenu.h" +#include "qapplication.h" +#include "qpainter.h" +#include "qdrawutil.h" +#include "qpixmap.h" +#include "qpalette.h" +#include "qwidget.h" +#include "qpushbutton.h" +#include "qscrollbar.h" +#include "qtabbar.h" +#include "qtabwidget.h" +#include "qlistview.h" +#include "qsplitter.h" +#include "qslider.h" +#include "qcombobox.h" +#include "qlineedit.h" +#include "qprogressbar.h" +#include "qimage.h" +#include "qfocusframe.h" +#include "qdebug.h" +#include "qpainterpath.h" +#include "qdialogbuttonbox.h" +#include "qformlayout.h" +#include "qgraphicsproxywidget.h" +#include "qgraphicsview.h" +#include + +QT_BEGIN_NAMESPACE + +// old constants that might still be useful... +static const int motifItemFrame = 2; // menu item frame width +static const int motifSepHeight = 2; // separator item height +static const int motifItemHMargin = 3; // menu item hor text margin +static const int motifItemVMargin = 2; // menu item ver text margin +static const int motifArrowHMargin = 6; // arrow horizontal margin +static const int motifTabSpacing = 12; // space between text and tab +static const int motifCheckMarkHMargin = 2; // horiz. margins of check mark +static const int motifCheckMarkSpace = 16; + + +/*! + \class QMotifStyle + \brief The QMotifStyle class provides Motif look and feel. + + \ingroup appearance + \inmodule QtWidgets + + This class implements the Motif look and feel. It closely + resembles the original Motif look as defined by the Open Group, + but with some minor improvements. The Motif style is Qt's default + GUI style on Unix platforms. + + \image qmotifstyle.png + \sa QWindowsXPStyle, QMacStyle, QWindowsStyle, QPlastiqueStyle, QCDEStyle +*/ + +/*! + \variable QMotifStyle::focus + \internal +*/ + +/*! + Constructs a QMotifStyle. + + If \a useHighlightCols is false (the default), the style will + polish the application's color palette to emulate the Motif way of + highlighting, which is a simple inversion between the base and the + text color. +*/ +QMotifStyle::QMotifStyle(bool useHighlightCols) : QCommonStyle(), focus(0), + highlightCols(useHighlightCols), animationFps(25), animateTimer(0), animateStep(0), + spinboxHCoeff(6) +{ +} + +/*! + \overload + + Destroys the style. +*/ +QMotifStyle::~QMotifStyle() +{ + delete focus; +} + +/*! + \internal + Animate indeterminate progress bars only when visible +*/ +bool QMotifStyle::eventFilter(QObject *o, QEvent *e) +{ +#ifndef QT_NO_PROGRESSBAR + switch (e->type()) { + case QEvent::StyleChange: + case QEvent::Paint: + case QEvent::Show: + if (QProgressBar *bar = qobject_cast(o)) { + // Animation by timer for progress bars that have their min and + // max values the same + if (bar->minimum() == bar->maximum()) + startProgressAnimation(bar); + else + stopProgressAnimation(bar); + } + break; + case QEvent::Destroy: + case QEvent::Hide: + // reinterpret_cast because there is no type info when getting + // the destroy event. We know that it is a QProgressBar. + stopProgressAnimation(reinterpret_cast(o)); + default: + break; + } +#endif // QT_NO_PROGRESSBAR + return QStyle::eventFilter(o, e); +} + +void QMotifStyle::startProgressAnimation(QProgressBar *bar) +{ + if (!bars.contains(bar)) { + bars << bar; + if (bars.size() == 1) { + Q_ASSERT(animationFps > 0); + animateStep = 0; + startTime.start(); + animateTimer = startTimer(1000 / animationFps); + } + } +} + +void QMotifStyle::stopProgressAnimation(QProgressBar *bar) +{ + if (!bars.isEmpty()) { + bars.removeOne(bar); + if (bars.isEmpty() && animateTimer) { + killTimer(animateTimer); + animateTimer = 0; + } + } +} + +/*! + \reimp +*/ +QIcon QMotifStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *opt, + const QWidget *widget) const +{ + return QCommonStyle::standardIcon(standardIcon, opt, widget); +} + +/*! + \reimp +*/ +void QMotifStyle::timerEvent(QTimerEvent *event) +{ +#ifndef QT_NO_PROGRESSBAR + if (event->timerId() == animateTimer) { + Q_ASSERT(animationFps > 0); + animateStep = startTime.elapsed() / (1000 / animationFps); + foreach (QProgressBar *bar, bars) { + if ((bar->minimum() == 0 && bar->maximum() == 0)) + bar->update(); + } + } +#endif // QT_NO_PROGRESSBAR + event->ignore(); +} + +/*! + If \a arg is false, the style will polish the application's color + palette to emulate the Motif way of highlighting, which is a + simple inversion between the base and the text color. + + The effect will show up the next time an application palette is + set via QApplication::setPalette(). The current color palette of + the application remains unchanged. + + \sa QStyle::polish() +*/ +void QMotifStyle::setUseHighlightColors(bool arg) +{ + highlightCols = arg; +} + +/*! + Returns true if the style treats the highlight colors of the + palette in a Motif-like manner, which is a simple inversion + between the base and the text color; otherwise returns false. The + default is false. +*/ +bool QMotifStyle::useHighlightColors() const +{ + return highlightCols; +} + +/*! \reimp */ + +void QMotifStyle::polish(QPalette& pal) +{ + if (pal.brush(QPalette::Active, QPalette::Light) == pal.brush(QPalette::Active, QPalette::Base)) { + QColor nlight = pal.color(QPalette::Active, QPalette::Light).darker(108); + pal.setColor(QPalette::Active, QPalette::Light, nlight) ; + pal.setColor(QPalette::Disabled, QPalette::Light, nlight) ; + pal.setColor(QPalette::Inactive, QPalette::Light, nlight) ; + } + + if (highlightCols) + return; + + // force the ugly motif way of highlighting *sigh* + pal.setColor(QPalette::Active, QPalette::Highlight, + pal.color(QPalette::Active, QPalette::Text)); + pal.setColor(QPalette::Active, QPalette::HighlightedText, + pal.color(QPalette::Active, QPalette::Base)); + pal.setColor(QPalette::Disabled, QPalette::Highlight, + pal.color(QPalette::Disabled, QPalette::Text)); + pal.setColor(QPalette::Disabled, QPalette::HighlightedText, + pal.color(QPalette::Disabled, QPalette::Base)); + pal.setColor(QPalette::Inactive, QPalette::Highlight, + pal.color(QPalette::Active, QPalette::Text)); + pal.setColor(QPalette::Inactive, QPalette::HighlightedText, + pal.color(QPalette::Active, QPalette::Base)); +} + +/*! + \reimp + \internal + Keep QStyle::polish() visible. +*/ +void QMotifStyle::polish(QWidget* widget) +{ + QStyle::polish(widget); +#ifndef QT_NO_PROGRESSBAR + if (qobject_cast(widget)) + widget->installEventFilter(this); +#endif +} + +/*! + \reimp + \internal + Keep QStyle::polish() visible. +*/ +void QMotifStyle::unpolish(QWidget* widget) +{ + QCommonStyle::unpolish(widget); +#ifndef QT_NO_PROGRESSBAR + if (qobject_cast(widget)) { + widget->removeEventFilter(this); + bars.removeOne(static_cast(widget)); + } +#endif +} + + +/*! + \reimp + \internal + Keep QStyle::polish() visible. +*/ +void QMotifStyle::polish(QApplication* a) +{ + QCommonStyle::polish(a); +} + + +/*! + \reimp + \internal + Keep QStyle::polish() visible. +*/ +void QMotifStyle::unpolish(QApplication* a) +{ + QCommonStyle::unpolish(a); +} + +static void rot(QPolygon& a, int n) +{ + QPolygon r(a.size()); + for (int i = 0; i < (int)a.size(); i++) { + switch (n) { + case 1: r.setPoint(i,-a[i].y(),a[i].x()); break; + case 2: r.setPoint(i,-a[i].x(),-a[i].y()); break; + case 3: r.setPoint(i,a[i].y(),-a[i].x()); break; + } + } + a = r; +} + + +/*! + \reimp +*/ +void QMotifStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, + const QWidget *w) const +{ + switch (pe) { + case PE_FrameTabWidget: + case PE_FrameWindow: + qDrawShadePanel(p, opt->rect, opt->palette, QStyle::State_None, proxy()->pixelMetric(PM_DefaultFrameWidth)); + break; + case PE_FrameFocusRect: + if (const QStyleOptionFocusRect *fropt = qstyleoption_cast(opt)) { + if ((fropt->state & State_HasFocus) && focus && focus->isVisible() + && !(fropt->state & QStyle::State_Item)) + break; + QCommonStyle::drawPrimitive(pe, opt, p, w); + } + break; + + case PE_IndicatorToolBarHandle: { + p->save(); + p->translate(opt->rect.x(), opt->rect.y()); + + QColor dark(opt->palette.dark().color()); + QColor light(opt->palette.light().color()); + int i; + if (opt->state & State_Horizontal) { + int h = opt->rect.height(); + if (h > 6) { + if (opt->state & State_On) + p->fillRect(1, 1, 8, h - 2, opt->palette.highlight()); + QPolygon a(2 * ((h-6)/3)); + int y = 3 + (h%3)/2; + p->setPen(dark); + p->drawLine(8, 1, 8, h-2); + for (i=0; 2*i < a.size(); ++i) { + a.setPoint(2*i, 5, y+1+3*i); + a.setPoint(2*i+1, 2, y+2+3*i); + } + p->drawPoints(a); + p->setPen(light); + p->drawLine(9, 1, 9, h-2); + for (i=0; 2*i < a.size(); i++) { + a.setPoint(2*i, 4, y+3*i); + a.setPoint(2*i+1, 1, y+1+3*i); + } + p->drawPoints(a); + // if (drawBorder) { + // p->setPen(QPen(Qt::darkGray)); + // p->drawLine(0, opt->rect.height() - 1, + // tbExtent, opt->rect.height() - 1); + // } + } + } else { + int w = opt->rect.width(); + if (w > 6) { + if (opt->state & State_On) + p->fillRect(1, 1, w - 2, 9, opt->palette.highlight()); + QPolygon a(2 * ((w-6)/3)); + + int x = 3 + (w%3)/2; + p->setPen(dark); + p->drawLine(1, 8, w-2, 8); + for (i=0; 2*i < a.size(); ++i) { + a.setPoint(2*i, x+1+3*i, 6); + a.setPoint(2*i+1, x+2+3*i, 3); + } + p->drawPoints(a); + p->setPen(light); + p->drawLine(1, 9, w-2, 9); + for (i=0; 2*i < a.size(); ++i) { + a.setPoint(2*i, x+3*i, 5); + a.setPoint(2*i+1, x+1+3*i, 2); + } + p->drawPoints(a); + // if (drawBorder) { + // p->setPen(QPen(Qt::darkGray)); + // p->drawLine(opt->rect.width() - 1, 0, + // opt->rect.width() - 1, tbExtent); + // } + } + } + p->restore(); + break; } + + case PE_PanelButtonCommand: + case PE_PanelButtonBevel: + case PE_PanelButtonTool: { + QBrush fill; + if (opt->state & State_Sunken) + fill = opt->palette.brush(QPalette::Mid); + else if ((opt->state & State_On) && (opt->state & State_Enabled)) + fill = QBrush(opt->palette.mid().color(), Qt::Dense4Pattern); + else + fill = opt->palette.brush(QPalette::Button); + if ((opt->state & State_Enabled || opt->state & State_On) || !(opt->state & State_AutoRaise)) + qDrawShadePanel(p, opt->rect, opt->palette, bool(opt->state & (State_Sunken | State_On)), + proxy()->pixelMetric(PM_DefaultFrameWidth), &fill); + break; } + + case PE_IndicatorCheckBox: { + bool on = opt->state & State_On; + bool down = opt->state & State_Sunken; + bool showUp = !(down ^ on); + QBrush fill = opt->palette.brush((showUp || opt->state & State_NoChange) ?QPalette::Button : QPalette::Mid); + if (opt->state & State_NoChange) { + qDrawPlainRect(p, opt->rect, opt->palette.text().color(), + 1, &fill); + p->drawLine(opt->rect.x() + opt->rect.width() - 1, opt->rect.y(), + opt->rect.x(), opt->rect.y() + opt->rect.height() - 1); + } else { + qDrawShadePanel(p, opt->rect, opt->palette, !showUp, + proxy()->pixelMetric(PM_DefaultFrameWidth), &fill); + } + if (!(opt->state & State_Enabled) && proxy()->styleHint(SH_DitherDisabledText)) + p->fillRect(opt->rect, QBrush(p->background().color(), Qt::Dense5Pattern)); + break; } + + case PE_IndicatorRadioButton: { +#define INTARRLEN(x) sizeof(x)/(sizeof(int)*2) + int inner_pts[] = { // used for filling diamond + 2,opt->rect.height()/2, + opt->rect.width()/2,2, + opt->rect.width()-3,opt->rect.height()/2, + opt->rect.width()/2,opt->rect.height()-3 + }; + int top_pts[] = { // top (^) of diamond + 0,opt->rect.height()/2, + opt->rect.width()/2,0, + opt->rect.width()-2,opt->rect.height()/2-1, + opt->rect.width()-3,opt->rect.height()/2-1, + opt->rect.width()/2,1, + 1,opt->rect.height()/2, + 2,opt->rect.height()/2, + opt->rect.width()/2,2, + opt->rect.width()-4,opt->rect.height()/2-1 + }; + int bottom_pts[] = { // bottom (v) of diamond + 1,opt->rect.height()/2+1, + opt->rect.width()/2,opt->rect.height()-1, + opt->rect.width()-1,opt->rect.height()/2, + opt->rect.width()-2,opt->rect.height()/2, + opt->rect.width()/2,opt->rect.height()-2, + 2,opt->rect.height()/2+1, + 3,opt->rect.height()/2+1, + opt->rect.width()/2,opt->rect.height()-3, + opt->rect.width()-3,opt->rect.height()/2 + }; + bool on = opt->state & State_On; + bool down = opt->state & State_Sunken; + bool showUp = !(down ^ on); + QPen oldPen = p->pen(); + QBrush oldBrush = p->brush(); + QPolygon a(INTARRLEN(inner_pts), inner_pts); + p->setPen(Qt::NoPen); + p->setBrush(opt->palette.brush(showUp ? QPalette::Button : QPalette::Mid)); + a.translate(opt->rect.x(), opt->rect.y()); + p->drawPolygon(a); + p->setPen(showUp ? opt->palette.light().color() : opt->palette.dark().color()); + p->setBrush(Qt::NoBrush); + a.setPoints(INTARRLEN(top_pts), top_pts); + a.translate(opt->rect.x(), opt->rect.y()); + p->drawPolyline(a); + p->setPen(showUp ? opt->palette.dark().color() : opt->palette.light().color()); + a.setPoints(INTARRLEN(bottom_pts), bottom_pts); + a.translate(opt->rect.x(), opt->rect.y()); + p->drawPolyline(a); + if (!(opt->state & State_Enabled) && proxy()->styleHint(SH_DitherDisabledText)) + p->fillRect(opt->rect, QBrush(p->background().color(), Qt::Dense5Pattern)); + p->setPen(oldPen); + p->setBrush(oldBrush); + break; } + + case PE_IndicatorSpinUp: + case PE_IndicatorSpinPlus: + case PE_IndicatorSpinDown: + case PE_IndicatorSpinMinus: + case PE_IndicatorArrowUp: + case PE_IndicatorArrowDown: + case PE_IndicatorArrowRight: + case PE_IndicatorArrowLeft: { + QRect rect = opt->rect; + QPolygon bFill; + QPolygon bTop; + QPolygon bBot; + QPolygon bLeft; + if (pe == PE_IndicatorSpinPlus || pe == PE_IndicatorSpinUp) + pe = PE_IndicatorArrowUp; + else if (pe == PE_IndicatorSpinMinus || pe == PE_IndicatorSpinDown) + pe = PE_IndicatorArrowDown; + bool vertical = pe == PE_IndicatorArrowUp || pe == PE_IndicatorArrowDown; + bool horizontal = !vertical; + int dim = rect.width() < rect.height() ? rect.width() : rect.height(); + int colspec = 0x0000; + + if (!(opt->state & State_Enabled)) + dim -= 2; + if (dim < 2) + break; + + // adjust size and center (to fix rotation below) + if (rect.width() > dim) { + rect.setX(rect.x() + ((rect.width() - dim) / 2)); + rect.setWidth(dim); + } + if (rect.height() > dim) { + rect.setY(rect.y() + ((rect.height() - dim) / 2)); + rect.setHeight(dim); + } + + if (dim > 3) { + if (pixelMetric(PM_DefaultFrameWidth) < 2) { // thin style + bFill.resize( dim & 1 ? 3 : 4 ); + bTop.resize( 2 ); + bBot.resize( 2 ); + bLeft.resize( 2 ); + bLeft.putPoints( 0, 2, 0, 0, 0, dim-1 ); + bTop.putPoints( 0, 2, 1, 0, dim-1, dim/2 ); + bBot.putPoints( 0, 2, 1, dim-1, dim-1, dim/2 ); + + if ( dim > 6 ) { // dim>6: must fill interior + bFill.putPoints( 0, 2, 0, dim-1, 0, 0 ); + if ( dim & 1 ) // if size is an odd number + bFill.setPoint( 2, dim - 1, dim / 2 ); + else + bFill.putPoints( 2, 2, dim-1, dim/2-1, dim-1, dim/2 ); + } + } else { + if (dim > 6) + bFill.resize(dim & 1 ? 3 : 4); + bTop.resize((dim/2)*2); + bBot.resize(dim & 1 ? dim + 1 : dim); + bLeft.resize(dim > 4 ? 4 : 2); + bLeft.putPoints(0, 2, 0,0, 0,dim-1); + if (dim > 4) + bLeft.putPoints(2, 2, 1,2, 1,dim-3); + bTop.putPoints(0, 4, 1,0, 1,1, 2,1, 3,1); + bBot.putPoints(0, 4, 1,dim-1, 1,dim-2, 2,dim-2, 3,dim-2); + + for (int i=0; i 6) { // dim>6: must fill interior + bFill.putPoints(0, 2, 1,dim-3, 1,2); + if (dim & 1) // if size is an odd number + bFill.setPoint(2, dim - 3, dim / 2); + else + bFill.putPoints(2, 2, dim-4,dim/2-1, dim-4,dim/2); + } + } + } else { + if (dim == 3) { // 3x3 arrow pattern + bLeft.setPoints(4, 0,0, 0,2, 1,1, 1,1); + bTop .setPoints(2, 1,0, 1,0); + bBot .setPoints(2, 1,2, 2,1); + } + else { // 2x2 arrow pattern + bLeft.setPoints(2, 0,0, 0,1); + bTop .setPoints(2, 1,0, 1,0); + bBot .setPoints(2, 1,1, 1,1); + } + } + + // We use rot() and translate() as it is more efficient that + // matrix transformations on the painter, and because it still + // works with QT_NO_TRANSFORMATIONS defined. + + if (pe == PE_IndicatorArrowUp || pe == PE_IndicatorArrowLeft) { + if (vertical) { + rot(bFill,3); + rot(bLeft,3); + rot(bTop,3); + rot(bBot,3); + bFill.translate(0, rect.height() - 1); + bLeft.translate(0, rect.height() - 1); + bTop.translate(0, rect.height() - 1); + bBot.translate(0, rect.height() - 1); + } else { + rot(bFill,2); + rot(bLeft,2); + rot(bTop,2); + rot(bBot,2); + bFill.translate(rect.width() - 1, rect.height() - 1); + bLeft.translate(rect.width() - 1, rect.height() - 1); + bTop.translate(rect.width() - 1, rect.height() - 1); + bBot.translate(rect.width() - 1, rect.height() - 1); + } + if (opt->state & State_Sunken) + colspec = horizontal ? 0x2334 : 0x2343; + else + colspec = horizontal ? 0x1443 : 0x1434; + } else { + if (vertical) { + rot(bFill,1); + rot(bLeft,1); + rot(bTop,1); + rot(bBot,1); + bFill.translate(rect.width() - 1, 0); + bLeft.translate(rect.width() - 1, 0); + bTop.translate(rect.width() - 1, 0); + bBot.translate(rect.width() - 1, 0); + } + if (opt->state & State_Sunken) + colspec = horizontal ? 0x2443 : 0x2434; + else + colspec = horizontal ? 0x1334 : 0x1343; + } + bFill.translate(rect.x(), rect.y()); + bLeft.translate(rect.x(), rect.y()); + bTop.translate(rect.x(), rect.y()); + bBot.translate(rect.x(), rect.y()); + + const QColor *cols[5]; + if (opt->state & State_Enabled) { + cols[0] = 0; + cols[1] = &opt->palette.button().color(); + cols[2] = &opt->palette.mid().color(); + cols[3] = &opt->palette.light().color(); + cols[4] = &opt->palette.dark().color(); + } else { + cols[0] = 0; + cols[1] = &opt->palette.mid().color(); + cols[2] = &opt->palette.mid().color(); + cols[3] = &opt->palette.mid().color(); + cols[4] = &opt->palette.mid().color(); + } + +#define CMID *cols[(colspec>>12) & 0xf] +#define CLEFT *cols[(colspec>>8) & 0xf] +#define CTOP *cols[(colspec>>4) & 0xf] +#define CBOT *cols[colspec & 0xf] + + QPen savePen = p->pen(); + QBrush saveBrush = p->brush(); + QPen pen(Qt::NoPen); + QBrush brush = opt->palette.brush((opt->state & State_Enabled) ? + QPalette::Button : QPalette::Mid); + p->setPen(pen); + p->setBrush(brush); + p->drawPolygon(bFill); + p->setBrush(Qt::NoBrush); + + p->setPen(CLEFT); + p->drawPolyline(bLeft); + p->setPen(CTOP); + p->drawPolyline(bTop); + p->setPen(CBOT); + p->drawPolyline(bBot); + + p->setBrush(saveBrush); + p->setPen(savePen); +#undef CMID +#undef CLEFT +#undef CTOP +#undef CBOT + if (!(opt->state & State_Enabled) && proxy()->styleHint(SH_DitherDisabledText)) + p->fillRect(opt->rect, QBrush(p->background().color(), Qt::Dense5Pattern)); + break; } + + case PE_IndicatorDockWidgetResizeHandle: { + const int motifOffset = 10; + int sw = proxy()->pixelMetric(PM_SplitterWidth); + if (opt->state & State_Horizontal) { + int yPos = opt->rect.y() + opt->rect.height() / 2; + int kPos = opt->rect.right() - motifOffset - sw; + int kSize = sw - 2; + + qDrawShadeLine(p, opt->rect.left(), yPos, kPos, yPos, opt->palette); + qDrawShadePanel(p, kPos, yPos - sw / 2 + 1, kSize, kSize, + opt->palette, false, 1, &opt->palette.brush(QPalette::Button)); + qDrawShadeLine(p, kPos + kSize - 1, yPos, opt->rect.right(), yPos, opt->palette); + } else { + int xPos = opt->rect.x() + opt->rect.width() / 2; + int kPos = motifOffset; + int kSize = sw - 2; + + qDrawShadeLine(p, xPos, opt->rect.top() + kPos + kSize - 1, xPos, opt->rect.bottom(), opt->palette); + qDrawShadePanel(p, xPos - sw / 2 + 1, opt->rect.top() + kPos, kSize, kSize, opt->palette, + false, 1, &opt->palette.brush(QPalette::Button)); + qDrawShadeLine(p, xPos, opt->rect.top(), xPos, opt->rect.top() + kPos, opt->palette); + } + break; } + + case PE_IndicatorMenuCheckMark: { + const int markW = 6; + const int markH = 6; + int posX = opt->rect.x() + (opt->rect.width() - markW) / 2 - 1; + int posY = opt->rect.y() + (opt->rect.height() - markH) / 2; + int dfw = proxy()->pixelMetric(PM_DefaultFrameWidth); + + if (dfw < 2) { + // Could do with some optimizing/caching... + QPolygon a(7*2); + int i, xx, yy; + xx = posX; + yy = 3 + posY; + for (i=0; i<3; i++) { + a.setPoint(2*i, xx, yy); + a.setPoint(2*i+1, xx, yy+2); + xx++; yy++; + } + yy -= 2; + for (i=3; i<7; i++) { + a.setPoint(2*i, xx, yy); + a.setPoint(2*i+1, xx, yy+2); + xx++; yy--; + } + if (! (opt->state & State_Enabled) && ! (opt->state & State_On)) { + int pnt; + p->setPen(opt->palette.highlightedText().color()); + QPoint offset(1,1); + for (pnt = 0; pnt < (int)a.size(); pnt++) + a[pnt] += offset; + p->drawPolyline(a); + for (pnt = 0; pnt < (int)a.size(); pnt++) + a[pnt] -= offset; + } + p->setPen(opt->palette.text().color()); + p->drawPolyline(a); + + qDrawShadePanel(p, posX-2, posY-2, markW+4, markH+6, opt->palette, true, dfw); + } else + qDrawShadePanel(p, posX, posY, markW, markH, opt->palette, true, dfw, + &opt->palette.brush(QPalette::Mid)); + + break; } + + case PE_IndicatorProgressChunk: + { + const QStyleOptionProgressBar *pb = qstyleoption_cast(opt); + bool vertical = pb && (pb->orientation == Qt::Vertical); + if (!vertical) { + p->fillRect(opt->rect.x(), opt->rect.y(), opt->rect.width(), + opt->rect.height(), opt->palette.brush(QPalette::Highlight)); + } else { + p->fillRect(opt->rect.x(), opt->rect.y(), opt->rect.width(), opt->rect.height(), + opt->palette.brush(QPalette::Highlight)); + } + } + break; + + default: + QCommonStyle::drawPrimitive(pe, opt, p, w); + break; + } +} + + +/*! + \reimp +*/ +void QMotifStyle::drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, + const QWidget *widget) const +{ + switch (element) { + case CE_Splitter: { + QStyleOption handleOpt = *opt; + if (handleOpt.state & State_Horizontal) + handleOpt.state &= ~State_Horizontal; + else + handleOpt.state |= State_Horizontal; + proxy()->drawPrimitive(PE_IndicatorDockWidgetResizeHandle, &handleOpt, p, widget); + break; } + + case CE_ScrollBarSubLine: + case CE_ScrollBarAddLine:{ + PrimitiveElement pe; + if (element == CE_ScrollBarAddLine) + pe = (opt->state & State_Horizontal) ? (opt->direction == Qt::LeftToRight ? PE_IndicatorArrowRight : PE_IndicatorArrowLeft) : PE_IndicatorArrowDown; + else + pe = (opt->state & State_Horizontal) ? (opt->direction == Qt::LeftToRight ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight) : PE_IndicatorArrowUp; + QStyleOption arrowOpt = *opt; + arrowOpt.state |= State_Enabled; + proxy()->drawPrimitive(pe, &arrowOpt, p, widget); + if (!(opt->state & State_Enabled) && proxy()->styleHint(SH_DitherDisabledText)) { + int fw = proxy()->pixelMetric(PM_DefaultFrameWidth); + p->fillRect(opt->rect.adjusted(fw, fw, -fw, -fw), QBrush(p->background().color(), Qt::Dense5Pattern)); + } + }break; + + case CE_ScrollBarSubPage: + case CE_ScrollBarAddPage: + p->fillRect(opt->rect, opt->palette.brush((opt->state & State_Enabled) ? QPalette::Mid : QPalette::Window)); + break; + + case CE_ScrollBarSlider: { + QStyleOption bevelOpt = *opt; + bevelOpt.state |= State_Raised; + bevelOpt.state &= ~(State_Sunken | State_On); + p->save(); + p->setBrushOrigin(bevelOpt.rect.topLeft()); + proxy()->drawPrimitive(PE_PanelButtonBevel, &bevelOpt, p, widget); + p->restore(); + if (!(opt->state & State_Enabled) && proxy()->styleHint(SH_DitherDisabledText)) + p->fillRect(opt->rect, QBrush(p->background().color(), Qt::Dense5Pattern)); + break; } + + case CE_RadioButton: + case CE_CheckBox: + if (const QStyleOptionButton *btn = qstyleoption_cast(opt)) { + bool isRadio = (element == CE_RadioButton); + QStyleOptionButton subopt = *btn; + subopt.rect = subElementRect(isRadio ? SE_RadioButtonIndicator + : SE_CheckBoxIndicator, btn, widget); + proxy()->drawPrimitive(isRadio ? PE_IndicatorRadioButton : PE_IndicatorCheckBox, + &subopt, p, widget); + subopt.rect = subElementRect(isRadio ? SE_RadioButtonContents + : SE_CheckBoxContents, btn, widget); + proxy()->drawControl(isRadio ? CE_RadioButtonLabel : CE_CheckBoxLabel, &subopt, p, widget); + if ((btn->state & State_HasFocus) && (!focus || !focus->isVisible())) { + QStyleOptionFocusRect fropt; + fropt.QStyleOption::operator=(*btn); + fropt.rect = subElementRect(isRadio ? SE_RadioButtonFocusRect + : SE_CheckBoxFocusRect, btn, widget); + proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); + } + } + break; + case CE_PushButton: + if (const QStyleOptionButton *btn = qstyleoption_cast(opt)) { + proxy()->drawControl(CE_PushButtonBevel, btn, p, widget); + QStyleOptionButton subopt = *btn; + subopt.rect = subElementRect(SE_PushButtonContents, btn, widget); + proxy()->drawControl(CE_PushButtonLabel, &subopt, p, widget); + if ((btn->state & State_HasFocus) && (!focus || !focus->isVisible())) { + QStyleOptionFocusRect fropt; + fropt.QStyleOption::operator=(*btn); + fropt.rect = subElementRect(SE_PushButtonFocusRect, btn, widget); + proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, p, widget); + } + } + break; + case CE_PushButtonBevel: + if (const QStyleOptionButton *btn = qstyleoption_cast(opt)) { + int diw, x1, y1, x2, y2; + p->setPen(opt->palette.foreground().color()); + p->setBrush(QBrush(opt->palette.button().color(), Qt::NoBrush)); + diw = proxy()->pixelMetric(PM_ButtonDefaultIndicator); + opt->rect.getCoords(&x1, &y1, &x2, &y2); + if (btn->features & (QStyleOptionButton::AutoDefaultButton|QStyleOptionButton::DefaultButton)) { + x1 += diw; + y1 += diw; + x2 -= diw; + y2 -= diw; + } + if (btn->features & QStyleOptionButton::DefaultButton) { + if (diw == 0) { + QPolygon a; + a.setPoints(9, + x1, y1, x2, y1, x2, y2, x1, y2, x1, y1+1, + x2-1, y1+1, x2-1, y2-1, x1+1, y2-1, x1+1, y1+1); + p->setPen(opt->palette.shadow().color()); + p->drawPolygon(a); + x1 += 2; + y1 += 2; + x2 -= 2; + y2 -= 2; + } else { + qDrawShadePanel(p, opt->rect.adjusted(1, 1, -1, -1), opt->palette, true); + } + } + if (!(btn->features & QStyleOptionButton::Flat) || + (btn->state & (State_Sunken | State_On))) { + QStyleOptionButton newOpt = *btn; + newOpt.rect = QRect(x1, y1, x2 - x1 + 1, y2 - y1 + 1); + p->setBrushOrigin(p->brushOrigin()); + proxy()->drawPrimitive(PE_PanelButtonCommand, &newOpt, p, widget); + } + if (btn->features & QStyleOptionButton::HasMenu) { + int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, btn, widget); + QRect ir = btn->rect; + QStyleOptionButton newBtn = *btn; + newBtn.rect = QRect(ir.right() - mbi - 3, ir.y() + 4, mbi, ir.height() - 8); + proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, p, widget); + } + break; + } + +#ifndef QT_NO_TABBAR + case CE_TabBarTabShape: + if (const QStyleOptionTab *tab = qstyleoption_cast(opt)) { + const int default_frame = proxy()->pixelMetric(PM_DefaultFrameWidth, tab, widget); + const int frame_offset = (default_frame > 1) ? 1 : 0; + + if (tab->shape == QTabBar::RoundedNorth || tab->shape == QTabBar::RoundedEast || + tab->shape == QTabBar::RoundedSouth || tab->shape == QTabBar::RoundedWest) { + p->save(); + QRect tabRect = opt->rect; + QColor tabLight = opt->palette.light().color(); + QColor tabDark = opt->palette.dark().color(); + + p->fillRect(opt->rect.adjusted(default_frame, default_frame, + -default_frame, -default_frame), + tab->palette.background()); + + if (tab->shape == QTabBar::RoundedWest) { + tabDark = opt->palette.light().color(); + tabLight = opt->palette.dark().color(); + tabRect = QRect(0, 0, tabRect.height(), tabRect.width()); + p->translate(opt->rect.left(), opt->rect.bottom()); + p->rotate(-90); + } else if (tab->shape == QTabBar::RoundedSouth) { + tabDark = opt->palette.light().color(); + tabLight = opt->palette.dark().color(); + tabRect = QRect(0, 0, tabRect.width(), tabRect.height()); + p->translate(opt->rect.right(), opt->rect.bottom()); + p->rotate(180); + } else if (tab->shape == QTabBar::RoundedEast) { + tabRect = QRect(0, 0, tabRect.height(), tabRect.width()); + p->translate(opt->rect.right(), opt->rect.top()); + p->rotate(90); + } + + if (default_frame > 1) { + p->setPen(tabLight); + p->drawLine(tabRect.left(), tabRect.bottom(), + tabRect.right(), tabRect.bottom()); + p->setPen(tabLight); + p->drawLine(tabRect.left(), tabRect.bottom()-1, + tabRect.right(), tabRect.bottom()-1); + if (tabRect.left() == 0) + p->drawPoint(tabRect.bottomLeft()); + } else { + p->setPen(tabLight); + p->drawLine(tabRect.left(), tabRect.bottom(), + tabRect.right(), tabRect.bottom()); + } + + if (opt->state & State_Selected) { + p->fillRect(QRect(tabRect.left()+1, tabRect.bottom()-frame_offset, + tabRect.width()-3, 2), + tab->palette.brush(QPalette::Active, QPalette::Background)); + p->setPen(tab->palette.background().color()); + p->drawLine(tabRect.left()+1, tabRect.bottom(), + tabRect.left()+1, tabRect.top()+2); + p->setPen(tabLight); + } else { + p->setPen(tabLight); + } + p->drawLine(tabRect.left(), tabRect.bottom()-1, + tabRect.left(), tabRect.top() + 2); + p->drawPoint(tabRect.left()+1, tabRect.top() + 1); + p->drawLine(tabRect.left()+2, tabRect.top(), + tabRect.right() - 2, tabRect.top()); + p->drawPoint(tabRect.left(), tabRect.bottom()); + + if (default_frame > 1) { + p->drawLine(tabRect.left()+1, tabRect.bottom(), + tabRect.left()+1, tabRect.top() + 2); + p->drawLine(tabRect.left()+2, tabRect.top()+1, + tabRect.right() - 2, tabRect.top()+1); + } + + p->setPen(tabDark); + p->drawLine(tabRect.right() - 1, tabRect.top() + 2, + tabRect.right() - 1, tabRect.bottom() - 1 + + ((opt->state & State_Selected) ? frame_offset : -frame_offset)); + if (default_frame > 1) { + p->drawPoint(tabRect.right() - 1, tabRect.top() + 1); + p->drawLine(tabRect.right(), tabRect.top() + 2, tabRect.right(), + tabRect.bottom() - + ((opt->state & State_Selected) ? + ((tab->position == QStyleOptionTab::End) ? 0:1):1+frame_offset)); + p->drawPoint(tabRect.right() - 1, tabRect.top() + 1); + } + p->restore(); + } else { + QCommonStyle::drawControl(element, opt, p, widget); + } + break; } +#endif // QT_NO_TABBAR + case CE_ProgressBarGroove: + qDrawShadePanel(p, opt->rect, opt->palette, true, 2); + break; + + case CE_ProgressBarLabel: + if (const QStyleOptionProgressBar *pb = qstyleoption_cast(opt)) { + QTransform oldMatrix = p->transform(); + QRect rect = pb->rect; + bool vertical = (pb->orientation == Qt::Vertical); + bool invert = pb->invertedAppearance; + bool bottomToTop = pb->bottomToTop; + if (vertical) { + QTransform m; + rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height + if (bottomToTop) { + m.translate(0.0, rect.width()); + m.rotate(-90); + } else { + m.translate(rect.height(), 0.0); + m.rotate(90); + } + p->setTransform(m, true); + } + const int unit_width = proxy()->pixelMetric(PM_ProgressBarChunkWidth, opt, widget); + int u = rect.width() / unit_width; + int p_v = pb->progress - pb->minimum; + int t_s = qMax(0, pb->maximum - pb->minimum); + if (u > 0 && pb->progress >= INT_MAX / u && t_s >= u) { + // scale down to something usable. + p_v /= u; + t_s /= u; + } + if (pb->textVisible && t_s) { + int nu = (u * p_v + t_s/2) / t_s; + int x = unit_width * nu; + QRect left(rect.x(), rect.y(), x, rect.height()); + QRect right(rect.x() + x, rect.y(), rect.width() - x, rect.height()); + Qt::LayoutDirection dir; + dir = vertical ? (bottomToTop ? Qt::LeftToRight : Qt::RightToLeft) : pb->direction; + if (invert) + dir = (dir == Qt::LeftToRight) ? Qt::RightToLeft : Qt::LeftToRight; + const QRect highlighted = visualRect(dir, rect, left); + const QRect background = visualRect(dir, rect, right); + p->setPen(opt->palette.highlightedText().color()); + p->setClipRect(highlighted); + p->drawText(rect, Qt::AlignCenter | Qt::TextSingleLine, pb->text); + + if (pb->progress != pb->maximum) { + p->setClipRect(background); + p->setPen(opt->palette.highlight().color()); + p->drawText(rect, Qt::AlignCenter | Qt::TextSingleLine, pb->text); + } + } + p->setTransform(oldMatrix, false); + break; + } + + case CE_MenuTearoff: { + if (opt->state & State_Selected) { + if (pixelMetric(PM_MenuPanelWidth, opt, widget) > 1) + qDrawShadePanel(p, opt->rect.x(), opt->rect.y(), opt->rect.width(), + opt->rect.height(), opt->palette, false, motifItemFrame, + &opt->palette.brush(QPalette::Button)); + else + qDrawShadePanel(p, opt->rect.x()+1, opt->rect.y()+1, opt->rect.width()-2, + opt->rect.height()-2, opt->palette, true, 1, &opt->palette.brush(QPalette::Button)); + } else { + p->fillRect(opt->rect, opt->palette.brush(QPalette::Button)); + } + p->setPen(QPen(opt->palette.dark().color(), 1, Qt::DashLine)); + p->drawLine(opt->rect.x()+2, opt->rect.y()+opt->rect.height()/2-1, opt->rect.x()+opt->rect.width()-4, + opt->rect.y()+opt->rect.height()/2-1); + p->setPen(QPen(opt->palette.light().color(), 1, Qt::DashLine)); + p->drawLine(opt->rect.x()+2, opt->rect.y()+opt->rect.height()/2, opt->rect.x()+opt->rect.width()-4, + opt->rect.y()+opt->rect.height()/2); + break; } + + case CE_MenuItem: + if (const QStyleOptionMenuItem *menuitem = qstyleoption_cast(opt)) { + int maxpmw = menuitem->maxIconWidth; + if (menuitem->menuHasCheckableItems) + maxpmw = qMax(maxpmw, motifCheckMarkSpace); + + int x, y, w, h; + opt->rect.getRect(&x, &y, &w, &h); + + if (menuitem->menuItemType == QStyleOptionMenuItem::Separator) { // draw separator + int textWidth = 0; + if (!menuitem->text.isEmpty()) { + QFont oldFont = p->font(); + p->setFont(menuitem->font); + p->fillRect(x, y, w, h, opt->palette.brush(QPalette::Button)); + proxy()->drawItemText(p, menuitem->rect.adjusted(10, 0, -5, 0), Qt::AlignLeft | Qt::AlignVCenter, + menuitem->palette, menuitem->state & State_Enabled, menuitem->text, + QPalette::Text); + textWidth = menuitem->fontMetrics.width(menuitem->text) + 10; + y += menuitem->fontMetrics.height() / 2; + p->setFont(oldFont); + } + p->setPen(opt->palette.dark().color()); + p->drawLine(x, y, x + 5, y); + p->drawLine(x + 5 + textWidth, y, x+w, y); + p->setPen(opt->palette.light().color()); + p->drawLine(x, y + 1, x + 5, y + 1); + p->drawLine(x + 5 + textWidth, y + 1, x+w, y + 1); + return; + } + + int pw = motifItemFrame; + if ((opt->state & State_Selected) && (opt->state & State_Enabled)) { // active item frame + if (pixelMetric(PM_MenuPanelWidth, opt) > 1) + qDrawShadePanel(p, x, y, w, h, opt->palette, false, pw, + &opt->palette.brush(QPalette::Button)); + else + qDrawShadePanel(p, x+1, y+1, w-2, h-2, opt->palette, true, 1, + &opt->palette.brush(QPalette::Button)); + } else { // incognito frame + p->fillRect(x, y, w, h, opt->palette.brush(QPalette::Button)); + } + + QRect vrect = visualRect(opt->direction, opt->rect, + QRect(x+motifItemFrame, y+motifItemFrame, maxpmw, + h-2*motifItemFrame)); + int xvis = vrect.x(); + if (menuitem->checked) { + if (!menuitem->icon.isNull()) + qDrawShadePanel(p, xvis, y+motifItemFrame, maxpmw, h-2*motifItemFrame, + opt->palette, true, 1, &opt->palette.brush(QPalette::Midlight)); + } else if (!(opt->state & State_Selected)) { + p->fillRect(xvis, y+motifItemFrame, maxpmw, h-2*motifItemFrame, + opt->palette.brush(QPalette::Button)); + } + + if (!menuitem->icon.isNull()) { // draw icon + QIcon::Mode mode = QIcon::Normal; // no disabled icons in Motif + if ((opt->state & State_Selected) && !!(opt->state & State_Enabled)) + mode = QIcon::Active; + QPixmap pixmap; + if (menuitem->checkType != QStyleOptionMenuItem::NotCheckable && menuitem->checked) + pixmap = menuitem->icon.pixmap(pixelMetric(PM_SmallIconSize, opt, widget), mode, QIcon::On); + else + pixmap = menuitem->icon.pixmap(pixelMetric(PM_SmallIconSize, opt, widget), mode); + + int pixw = pixmap.width(); + int pixh = pixmap.height(); + QRect pmr(0, 0, pixw, pixh); + pmr.moveCenter(vrect.center()); + p->setPen(opt->palette.text().color()); + p->drawPixmap(pmr.topLeft(), pixmap); + + } else if (menuitem->checkType != QStyleOptionMenuItem::NotCheckable) { // just "checking"... + int mh = h - 2*motifItemFrame; + + QStyleOptionButton newMenuItem; + newMenuItem.state = menuitem->checked ? State_On : State_None; + if (opt->state & State_Enabled) { + newMenuItem.state |= State_Enabled; + if (menuitem->state & State_Sunken) + newMenuItem.state |= State_Sunken; + } + if (menuitem->checkType & QStyleOptionMenuItem::Exclusive) { + newMenuItem.rect.setRect(xvis + 2, y + motifItemFrame + mh / 4, 11, 11); + proxy()->drawPrimitive(PE_IndicatorRadioButton, &newMenuItem, p, widget); + } else { + newMenuItem.rect.setRect(xvis + 5, y + motifItemFrame + mh / 4, 9, 9); + proxy()->drawPrimitive(PE_IndicatorCheckBox, &newMenuItem, p, widget); + } + } + + p->setPen(opt->palette.buttonText().color()); + + QColor discol; + if (!(opt->state & State_Enabled)) { + discol = opt->palette.text().color(); + p->setPen(discol); + } + + int xm = motifItemFrame + maxpmw + motifItemHMargin; + + vrect = visualRect(opt->direction, opt->rect, + QRect(x+xm, y+motifItemVMargin, w-xm-menuitem->tabWidth, + h-2*motifItemVMargin)); + xvis = vrect.x(); + + QString s = menuitem->text; + if (!s.isNull()) { // draw text + int t = s.indexOf(QLatin1Char('\t')); + int m = motifItemVMargin; + int text_flags = Qt::AlignVCenter|Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine; + text_flags |= Qt::AlignLeft; + QFont oldFont = p->font(); + p->setFont(menuitem->font); + if (t >= 0) { // draw tab text + QRect vr = visualRect(opt->direction, opt->rect, + QRect(x+w-menuitem->tabWidth-motifItemHMargin-motifItemFrame, + y+motifItemVMargin, menuitem->tabWidth, + h-2*motifItemVMargin)); + int xv = vr.x(); + QRect tr(xv, y+m, menuitem->tabWidth, h-2*m); + p->drawText(tr, text_flags, s.mid(t+1)); + if (!(opt->state & State_Enabled) && proxy()->styleHint(SH_DitherDisabledText)) + p->fillRect(tr, QBrush(p->background().color(), Qt::Dense5Pattern)); + s = s.left(t); + } + QRect tr(xvis, y+m, w - xm - menuitem->tabWidth + 1, h-2*m); + p->drawText(tr, text_flags, s.left(t)); + p->setFont(oldFont); + if (!(opt->state & State_Enabled) && proxy()->styleHint(SH_DitherDisabledText)) + p->fillRect(tr, QBrush(p->background().color(), Qt::Dense5Pattern)); + } + if (menuitem->menuItemType == QStyleOptionMenuItem::SubMenu) { // draw sub menu arrow + int dim = (h-2*motifItemFrame) / 2; + QStyle::PrimitiveElement arrow = (opt->direction == Qt::RightToLeft ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight); + QStyleOption arrowOpt = *opt; + arrowOpt.rect = visualRect(opt->direction, opt->rect, + QRect(x+w - motifArrowHMargin - motifItemFrame - dim, + y+h/2-dim/2, dim, dim)); + if ((opt->state & State_Selected)) + arrowOpt.state = (State_Sunken | ((opt->state & State_Enabled) ? State_Enabled : State_None)); + else + arrowOpt.state = ((opt->state & State_Enabled) ? State_Enabled : State_None); + proxy()->drawPrimitive(arrow, &arrowOpt, p, widget); + } + break; } + + case CE_MenuBarItem: + if (opt->state & State_Selected) // active item + qDrawShadePanel(p, opt->rect, opt->palette, false, motifItemFrame, + &opt->palette.brush(QPalette::Button)); + else // other item + p->fillRect(opt->rect, opt->palette.brush(QPalette::Button)); + QCommonStyle::drawControl(element, opt, p, widget); + break; + + case CE_HeaderSection: + p->save(); + p->setBrushOrigin(opt->rect.topLeft()); + qDrawShadePanel(p, opt->rect, opt->palette, bool(opt->state & (State_Sunken|State_On)), + proxy()->pixelMetric(PM_DefaultFrameWidth), + &opt->palette.brush((opt->state & State_Sunken) ? QPalette::Mid : QPalette::Button)); + p->restore(); + break; + case CE_RubberBand: { + QPixmap tiledPixmap(16, 16); + QPainter pixmapPainter(&tiledPixmap); + pixmapPainter.setPen(Qt::NoPen); + pixmapPainter.setBrush(Qt::Dense4Pattern); + pixmapPainter.setBackground(QBrush(opt->palette.base())); + pixmapPainter.setBackgroundMode(Qt::OpaqueMode); + pixmapPainter.drawRect(0, 0, tiledPixmap.width(), tiledPixmap.height()); + pixmapPainter.end(); + // ### workaround for borked XRENDER + tiledPixmap = QPixmap::fromImage(tiledPixmap.toImage()); + + p->save(); + QRect r = opt->rect; + QStyleHintReturnMask mask; + if (styleHint(QStyle::SH_RubberBand_Mask, opt, widget, &mask)) + p->setClipRegion(mask.region); + p->drawTiledPixmap(r.x(), r.y(), r.width(), r.height(), tiledPixmap); + p->restore(); + } + break; +#ifndef QT_NO_PROGRESSBAR + case CE_ProgressBarContents: + if (const QStyleOptionProgressBar *pb = qstyleoption_cast(opt)) { + QRect rect = pb->rect; + bool vertical = (pb->orientation == Qt::Vertical); + bool inverted = pb->invertedAppearance; + + QTransform m; + if (vertical) { + rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height + m.rotate(90); + m.translate(0, -(rect.height() + rect.y()*2)); + } + + QPalette pal2 = pb->palette; + // Correct the highlight color if it is the same as the background + if (pal2.highlight() == pal2.background()) + pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active, + QPalette::Highlight)); + bool reverse = ((!vertical && (pb->direction == Qt::RightToLeft)) || vertical); + if (inverted) + reverse = !reverse; + int w = rect.width(); + if (pb->minimum == 0 && pb->maximum == 0) { + QRect progressBar; + // draw busy indicator + int x = (animateStep*8)% (w * 2); + if (x > w) + x = 2 * w - x; + x = reverse ? rect.right() - x : x + rect.x(); + p->setTransform(m, true); + p->setPen(QPen(pal2.highlight().color(), 4)); + p->drawLine(x, rect.y(), x, rect.height()); + + } else + QCommonStyle::drawControl(element, opt, p, widget); + } + break; +#endif // QT_NO_PROGRESSBAR + default: + QCommonStyle::drawControl(element, opt, p, widget); + break; } +} + +static int get_combo_extra_width(int h, int w, int *return_awh=0) +{ + int awh, + tmp; + if (h < 8) { + awh = 6; + } else if (h < 14) { + awh = h - 2; + } else { + awh = h/2; + } + tmp = (awh * 3) / 2; + if (tmp > w / 2) { + awh = w / 2 - 3; + tmp = w / 2 + 3; + } + + if (return_awh) + *return_awh = awh; + + return tmp; +} + +static void get_combo_parameters(const QRect &r, + int &ew, int &awh, int &ax, + int &ay, int &sh, int &dh, + int &sy) +{ + ew = get_combo_extra_width(r.height(), r.width(), &awh); + + sh = (awh+3)/4; + if (sh < 3) + sh = 3; + dh = sh/2 + 1; + + ay = r.y() + (r.height()-awh-sh-dh)/2; + if (ay < 0) { + //panic mode + ay = 0; + sy = r.height(); + } else { + sy = ay+awh+dh; + } + ax = r.x() + r.width() - ew; + ax += (ew-awh)/2; +} + +/*! + \reimp +*/ +void QMotifStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, + const QWidget *widget) const +{ + switch (cc) { + case CC_ToolButton: + if (const QStyleOptionToolButton *toolbutton + = qstyleoption_cast(opt)) { + QRect button, menuarea; + button = proxy()->subControlRect(cc, toolbutton, SC_ToolButton, widget); + menuarea = proxy()->subControlRect(cc, toolbutton, SC_ToolButtonMenu, widget); + + State bflags = toolbutton->state & ~State_Sunken; + if (bflags & State_AutoRaise) { + if (!(bflags & State_MouseOver) || !(bflags & State_Enabled)) { + bflags &= ~State_Raised; + } + } + State mflags = bflags; + if (toolbutton->state & State_Sunken) { + if (toolbutton->activeSubControls & SC_ToolButton) + bflags |= State_Sunken; + mflags |= State_Sunken; + } + + QStyleOption tool(0); + tool.palette = toolbutton->palette; + if (toolbutton->subControls & SC_ToolButton) { + if (bflags & (State_Sunken | State_On | State_Raised)) { + tool.rect = button; + tool.state = bflags; + proxy()->drawPrimitive(PE_PanelButtonTool, &tool, p, widget); + } + } + + if ((toolbutton->state & State_HasFocus) && (!focus || !focus->isVisible())) { + QStyleOptionFocusRect fr; + fr.QStyleOption::operator=(*toolbutton); + fr.rect = toolbutton->rect.adjusted(3, 3, -3, -3); + proxy()->drawPrimitive(PE_FrameFocusRect, &fr, p, widget); + } + QStyleOptionToolButton label = *toolbutton; + label.state = bflags; + int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); + label.rect = button.adjusted(fw, fw, -fw, -fw); + proxy()->drawControl(CE_ToolButtonLabel, &label, p, widget); + + if (toolbutton->subControls & SC_ToolButtonMenu) { + tool.rect = menuarea; + tool.state = mflags; + if (mflags & (State_Sunken | State_On | State_Raised)) + proxy()->drawPrimitive(PE_IndicatorButtonDropDown, &tool, p, widget); + proxy()->drawPrimitive(PE_IndicatorArrowDown, &tool, p, widget); + } else if (toolbutton->features & QStyleOptionToolButton::HasMenu) { + int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, toolbutton, widget); + QRect ir = toolbutton->rect; + QStyleOptionToolButton newBtn = *toolbutton; + newBtn.rect = QRect(ir.right() + 5 - mbi, ir.height() - mbi + 4, mbi - 6, mbi - 6); + proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, p, widget); + } + } + break; +#ifndef QT_NO_SPINBOX + case CC_SpinBox: + if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast(opt)) { + QStyleOptionSpinBox copy = *spinbox; + PrimitiveElement pe; + + if (spinbox->frame && (spinbox->subControls & SC_SpinBoxFrame)) { + QRect r = proxy()->subControlRect(CC_SpinBox, spinbox, SC_SpinBoxFrame, widget); + qDrawShadePanel(p, r, opt->palette, false, proxy()->pixelMetric(PM_SpinBoxFrameWidth)); + + int fw = proxy()->pixelMetric(QStyle::PM_DefaultFrameWidth); + r = proxy()->subControlRect(CC_SpinBox, spinbox, SC_SpinBoxEditField, widget).adjusted(-fw,-fw,fw,fw); + QStyleOptionFrame lineOpt; + lineOpt.QStyleOption::operator=(*opt); + lineOpt.rect = r; + lineOpt.lineWidth = fw; + lineOpt.midLineWidth = 0; + lineOpt.state |= QStyle::State_Sunken; + proxy()->drawPrimitive(QStyle::PE_FrameLineEdit, &lineOpt, p, widget); + } + + if (spinbox->subControls & SC_SpinBoxUp) { + copy.subControls = SC_SpinBoxUp; + QPalette pal2 = spinbox->palette; + if (!(spinbox->stepEnabled & QAbstractSpinBox::StepUpEnabled)) { + pal2.setCurrentColorGroup(QPalette::Disabled); + copy.state &= ~State_Enabled; + } + + copy.palette = pal2; + + if (spinbox->activeSubControls == SC_SpinBoxUp && (spinbox->state & State_Sunken)) { + copy.state |= State_On; + copy.state |= State_Sunken; + } else { + copy.state |= State_Raised; + copy.state &= ~State_Sunken; + } + pe = (spinbox->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorSpinPlus + : PE_IndicatorSpinUp); + + copy.rect = proxy()->subControlRect(CC_SpinBox, spinbox, SC_SpinBoxUp, widget); + proxy()->drawPrimitive(pe, ©, p, widget); + } + + if (spinbox->subControls & SC_SpinBoxDown) { + copy.subControls = SC_SpinBoxDown; + copy.state = spinbox->state; + QPalette pal2 = spinbox->palette; + if (!(spinbox->stepEnabled & QAbstractSpinBox::StepDownEnabled)) { + pal2.setCurrentColorGroup(QPalette::Disabled); + copy.state &= ~State_Enabled; + } + copy.palette = pal2; + + if (spinbox->activeSubControls == SC_SpinBoxDown && (spinbox->state & State_Sunken)) { + copy.state |= State_On; + copy.state |= State_Sunken; + } else { + copy.state |= State_Raised; + copy.state &= ~State_Sunken; + } + pe = (spinbox->buttonSymbols == QAbstractSpinBox::PlusMinus ? PE_IndicatorSpinMinus + : PE_IndicatorSpinDown); + + copy.rect = proxy()->subControlRect(CC_SpinBox, spinbox, SC_SpinBoxDown, widget); + proxy()->drawPrimitive(pe, ©, p, widget); + } + } + break; +#endif // QT_NO_SPINBOX +#ifndef QT_NO_SLIDER + case CC_Slider: + if (const QStyleOptionSlider *slider = qstyleoption_cast(opt)) { + QRect groove = proxy()->subControlRect(CC_Slider, opt, SC_SliderGroove, widget), + handle = proxy()->subControlRect(CC_Slider, opt, SC_SliderHandle, widget); + + if ((opt->subControls & SC_SliderGroove) && groove.isValid()) { + qDrawShadePanel(p, groove, opt->palette, true, proxy()->pixelMetric(PM_DefaultFrameWidth), + &opt->palette.brush((opt->state & State_Enabled) ? QPalette::Mid : QPalette::Window)); + if ((opt->state & State_HasFocus) && (!focus || !focus->isVisible())) { + QStyleOption focusOpt = *opt; + focusOpt.rect = subElementRect(SE_SliderFocusRect, opt, widget); + proxy()->drawPrimitive(PE_FrameFocusRect, &focusOpt, p, widget); + } + } + + if ((opt->subControls & SC_SliderHandle) && handle.isValid()) { + QStyleOption bevelOpt = *opt; + bevelOpt.state = (opt->state | State_Raised) & ~State_Sunken; + bevelOpt.rect = handle; + p->save(); + p->setBrushOrigin(bevelOpt.rect.topLeft()); + proxy()->drawPrimitive(PE_PanelButtonBevel, &bevelOpt, p, widget); + p->restore(); + + if (slider->orientation == Qt::Horizontal) { + int mid = handle.x() + handle.width() / 2; + qDrawShadeLine(p, mid, handle.y(), mid, handle.y() + handle.height() - 2, + opt->palette, true, 1); + } else { + int mid = handle.y() + handle.height() / 2; + qDrawShadeLine(p, handle.x(), mid, handle.x() + handle.width() - 2, mid, opt->palette, + true, 1); + } + if (!(opt->state & State_Enabled) && proxy()->styleHint(SH_DitherDisabledText)) + p->fillRect(handle, QBrush(p->background().color(), Qt::Dense5Pattern)); + } + + if (slider->subControls & SC_SliderTickmarks) { + QStyleOptionSlider tmpSlider = *slider; + tmpSlider.subControls = SC_SliderTickmarks; + int frameWidth = proxy()->pixelMetric(PM_DefaultFrameWidth); + tmpSlider.rect.translate(frameWidth - 1, 0); + QCommonStyle::drawComplexControl(cc, &tmpSlider, p, widget); + } + } + break; +#endif // QT_NO_SLIDER + case CC_ComboBox: + if (const QStyleOptionComboBox *cb = qstyleoption_cast(opt)) { + if (opt->subControls & SC_ComboBoxArrow) { + int awh, ax, ay, sh, sy, dh, ew; + int fw = cb->frame ? proxy()->pixelMetric(PM_ComboBoxFrameWidth, opt, widget) : 0; + + if (cb->frame) { + QStyleOptionButton btn; + btn.QStyleOption::operator=(*cb); + btn.state |= QStyle::State_Raised; + proxy()->drawPrimitive(PE_PanelButtonCommand, &btn, p, widget); + } else { + p->fillRect(opt->rect, opt->palette.brush(QPalette::Button)); + } + + QRect tr = opt->rect; + tr.adjust(fw, fw, -fw, -fw); + get_combo_parameters(tr, ew, awh, ax, ay, sh, dh, sy); + + QRect ar = QStyle::visualRect(opt->direction, opt->rect, QRect(ax,ay,awh,awh)); + + QStyleOption arrowOpt = *opt; + arrowOpt.rect = ar; + arrowOpt.state |= State_Enabled; + proxy()->drawPrimitive(PE_IndicatorArrowDown, &arrowOpt, p, widget); + + + // draws the shaded line under the arrow + p->setPen(opt->palette.light().color()); + p->drawLine(ar.x(), sy, ar.x()+awh-1, sy); + p->drawLine(ar.x(), sy, ar.x(), sy+sh-1); + p->setPen(opt->palette.dark().color()); + p->drawLine(ar.x()+1, sy+sh-1, ar.x()+awh-1, sy+sh-1); + p->drawLine(ar.x()+awh-1, sy+1, ar.x()+awh-1, sy+sh-1); + + if ((cb->state & State_HasFocus) && (!focus || !focus->isVisible())) { + QStyleOptionFocusRect focus; + focus.QStyleOption::operator=(*opt); + focus.rect = subElementRect(SE_ComboBoxFocusRect, opt, widget); + focus.backgroundColor = opt->palette.button().color(); + proxy()->drawPrimitive(PE_FrameFocusRect, &focus, p, widget); + } + } + + if (opt->subControls & SC_ComboBoxEditField) { + if (cb->editable) { + QRect er = proxy()->subControlRect(CC_ComboBox, opt, SC_ComboBoxEditField, widget); + er.adjust(-1, -1, 1, 1); + qDrawShadePanel(p, er, opt->palette, true, 1, + &opt->palette.brush(QPalette::Base)); + } + } + p->setPen(opt->palette.buttonText().color()); + } + break; + +#ifndef QT_NO_SCROLLBAR + case CC_ScrollBar: { + if (opt->subControls & SC_ScrollBarGroove) + qDrawShadePanel(p, opt->rect, opt->palette, true, + proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget), + &opt->palette.brush((opt->state & State_Enabled) ? QPalette::Mid : QPalette::Window)); + + if (const QStyleOptionSlider *scrollbar = qstyleoption_cast(opt)) { + QStyleOptionSlider newScrollbar = *scrollbar; + if (scrollbar->minimum == scrollbar->maximum) + newScrollbar.state |= State_Enabled; // make sure that the slider is drawn. + QCommonStyle::drawComplexControl(cc, &newScrollbar, p, widget); + } + break; } +#endif + + default: + QCommonStyle::drawComplexControl(cc, opt, p, widget); + break; + } +} + + +/*! \reimp */ +int QMotifStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, + const QWidget *widget) const +{ + int ret = 0; + + switch (pm) { + case PM_ButtonDefaultIndicator: + ret = 5; + break; + + case PM_CheckBoxLabelSpacing: + case PM_RadioButtonLabelSpacing: + ret = 10; + break; + + case PM_ToolBarFrameWidth: + ret = proxy()->pixelMetric(PM_DefaultFrameWidth); + break; + + case PM_ToolBarItemMargin: + ret = 1; + break; + + case PM_ButtonShiftHorizontal: + case PM_ButtonShiftVertical: + ret = 0; + break; + + case PM_SplitterWidth: + ret = qMax(10, QApplication::globalStrut().width()); + break; + + case PM_SliderLength: + ret = 30; + break; + + case PM_SliderThickness: + ret = 16 + 4 * proxy()->pixelMetric(PM_DefaultFrameWidth); + break; +#ifndef QT_NO_SLIDER + case PM_SliderControlThickness: + if (const QStyleOptionSlider *sl = qstyleoption_cast(opt)) { + int space = (sl->orientation == Qt::Horizontal) ? sl->rect.height() : sl->rect.width(); + int ticks = sl->tickPosition; + int n = 0; + if (ticks & QSlider::TicksAbove) + n++; + if (ticks & QSlider::TicksBelow) + n++; + if (!n) { + ret = space; + break; + } + + int thick = 6; // Magic constant to get 5 + 16 + 5 + + space -= thick; + //### the two sides may be unequal in size + if (space > 0) + thick += (space * 2) / (n + 2); + ret = thick; + } + break; + + case PM_SliderSpaceAvailable: + if (const QStyleOptionSlider *sl = qstyleoption_cast(opt)) { + if (sl->orientation == Qt::Horizontal) + ret = sl->rect.width() - proxy()->pixelMetric(PM_SliderLength, opt, widget) - 2 * proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); + else + ret = sl->rect.height() - proxy()->pixelMetric(PM_SliderLength, opt, widget) - 2 * proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); + } + break; +#endif // QT_NO_SLIDER + case PM_DockWidgetFrameWidth: + ret = 2; + break; + + case PM_DockWidgetHandleExtent: + ret = 9; + break; + + case PM_ProgressBarChunkWidth: + ret = 1; + break; + + case PM_ExclusiveIndicatorWidth: + case PM_ExclusiveIndicatorHeight: + ret = 13; + break; + + case PM_MenuBarHMargin: + ret = 2; // really ugly, but Motif + break; + + case PM_MenuButtonIndicator: + if (!opt) + ret = 12; + else + ret = qMax(12, (opt->rect.height() - 4) / 3); + break; + default: + ret = QCommonStyle::pixelMetric(pm, opt, widget); + break; + } + return ret; +} + + +/*! + \reimp +*/ +QRect +QMotifStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, + SubControl sc, const QWidget *widget) const +{ + switch (cc) { +#ifndef QT_NO_SPINBOX + case CC_SpinBox: + if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast(opt)) { + int fw = spinbox->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, spinbox, widget) : 0; + QSize bs; + bs.setHeight(opt->rect.height()/2 - fw); + bs.setWidth(qMin(bs.height() * 8 / 5, opt->rect.width() / 4)); // 1.6 -approximate golden mean + bs = bs.expandedTo(QApplication::globalStrut()); + int y = fw + spinbox->rect.y(); + int x, lx, rx; + x = spinbox->rect.x() + opt->rect.width() - fw - bs.width(); + lx = fw; + rx = x - fw * 2; + const int margin = spinbox->frame ? 4 : 0; + switch (sc) { + case SC_SpinBoxUp: + if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) + return QRect(); + return visualRect(spinbox->direction, spinbox->rect, + QRect(x, y, bs.width(), bs.height() - 1)); + case SC_SpinBoxDown: + if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) + return QRect(); + return visualRect(spinbox->direction, spinbox->rect, + QRect(x, y + bs.height() + 1, bs.width(), bs.height() - 1)); + case SC_SpinBoxEditField: + if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) + return visualRect(spinbox->direction, spinbox->rect, + QRect(lx + margin, y + margin, + spinbox->rect.width() - 2*fw - 2*margin, + spinbox->rect.height() - 2*fw - 2*margin)); + + return visualRect(spinbox->direction, spinbox->rect, + QRect(lx + margin, y + margin, rx - margin, + spinbox->rect.height() - 2*fw - 2 * margin)); + case SC_SpinBoxFrame: + return visualRect(spinbox->direction, spinbox->rect, spinbox->rect); + default: + break; + } + break; } +#endif // QT_NO_SPINBOX +#ifndef QT_NO_SLIDER + case CC_Slider: + if (const QStyleOptionSlider *slider = qstyleoption_cast(opt)) { + if (sc == SC_SliderHandle) { + int tickOffset = proxy()->pixelMetric(PM_SliderTickmarkOffset, opt, widget); + int thickness = proxy()->pixelMetric(PM_SliderControlThickness, opt, widget); + bool horizontal = slider->orientation == Qt::Horizontal; + int len = proxy()->pixelMetric(PM_SliderLength, opt, widget); + int motifBorder = proxy()->pixelMetric(PM_DefaultFrameWidth); + int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderPosition, + horizontal ? slider->rect.width() - len - 2 * motifBorder + : slider->rect.height() - len - 2 * motifBorder, + slider->upsideDown); + if (horizontal) + return visualRect(slider->direction, slider->rect, + QRect(sliderPos + motifBorder + slider->rect.left() + , tickOffset + motifBorder + slider->rect.top() + , len, thickness - 2 * motifBorder)); + return visualRect(slider->direction, slider->rect, + QRect(tickOffset + motifBorder + slider->rect.left() + , sliderPos + motifBorder + slider->rect.top() + , thickness - 2 * motifBorder, len)); + } + } + break; +#endif // QT_NO_SLIDER +#ifndef QT_NO_SCROLLBAR + case CC_ScrollBar: + if (const QStyleOptionSlider *scrollbar = qstyleoption_cast(opt)) { + int dfw = proxy()->pixelMetric(PM_DefaultFrameWidth); + QRect rect = visualRect(scrollbar->direction, scrollbar->rect, + QCommonStyle::subControlRect(cc, scrollbar, sc, widget)); + if (sc == SC_ScrollBarSlider) { + if (scrollbar->orientation == Qt::Horizontal) + rect.adjust(-dfw, dfw, dfw, -dfw); + else + rect.adjust(dfw, -dfw, -dfw, dfw); + } else if (sc != SC_ScrollBarGroove) { + if (scrollbar->orientation == Qt::Horizontal) + rect.adjust(0, dfw, 0, -dfw); + else + rect.adjust(dfw, 0, -dfw, 0); + } + return visualRect(scrollbar->direction, scrollbar->rect, rect); + } + break; +#endif // QT_NO_SCROLLBAR +#ifndef QT_NO_COMBOBOX + case CC_ComboBox: + if (const QStyleOptionComboBox *cb = qstyleoption_cast(opt)) { + switch (sc) { + case SC_ComboBoxArrow: { + int ew, awh, sh, dh, ax, ay, sy; + int fw = cb->frame ? proxy()->pixelMetric(PM_ComboBoxFrameWidth, opt, widget) : 0; + QRect cr = opt->rect; + cr.adjust(fw, fw, -fw, -fw); + get_combo_parameters(cr, ew, awh, ax, ay, sh, dh, sy); + return visualRect(cb->direction, cb->rect, QRect(QPoint(ax, ay), cr.bottomRight())); + } + + case SC_ComboBoxEditField: { + int fw = cb->frame ? proxy()->pixelMetric(PM_ComboBoxFrameWidth, opt, widget) : 0; + QRect rect = opt->rect; + rect.adjust(fw, fw, -fw, -fw); + int ew = get_combo_extra_width(rect.height(), rect.width()); + rect.adjust(1, 1, -1-ew, -1); + return visualRect(cb->direction, cb->rect, rect); + } + + default: + break; + } + } + break; +#endif // QT_NO_SCROLLBAR + default: + break; + } + return QCommonStyle::subControlRect(cc, opt, sc, widget); +} + +/*! + \reimp +*/ +QSize +QMotifStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, + const QSize &contentsSize, const QWidget *widget) const +{ + QSize sz(contentsSize); + + switch (ct) { + case CT_RadioButton: + case CT_CheckBox: + sz = QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget); + sz.rwidth() += motifItemFrame; + break; + + case CT_PushButton: + if (const QStyleOptionButton *btn = qstyleoption_cast(opt)) { + sz = QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget); + if (!btn->text.isEmpty() && (btn->features & (QStyleOptionButton::AutoDefaultButton|QStyleOptionButton::DefaultButton))) + sz.setWidth(qMax(75, sz.width())); + sz += QSize(0, 1); // magical extra pixel + } + break; + + case CT_MenuBarItem: { + if (!sz.isEmpty()) + sz += QSize(5*motifItemHMargin+1, 2*motifItemVMargin + motifItemFrame); + break; } + + case CT_MenuItem: + if (const QStyleOptionMenuItem *mi = qstyleoption_cast(opt)) { + sz = QCommonStyle::sizeFromContents(ct, opt, sz, widget); + int w = sz.width(), h = sz.height(); + + if (mi->menuItemType == QStyleOptionMenuItem::Separator) { + w = 10; + h = (mi->text.isEmpty()) ? motifSepHeight : mi->fontMetrics.height(); + } + + // a little bit of border can never harm + w += 2*motifItemHMargin + 2*motifItemFrame; + + if (!mi->text.isNull() && mi->text.indexOf(QLatin1Char('\t')) >= 0) + // string contains tab + w += motifTabSpacing; + else if (mi->menuItemType == QStyleOptionMenuItem::SubMenu) + // submenu indicator needs some room if we don't have a tab column + w += motifArrowHMargin + 4*motifItemFrame; + + int checkColumn = mi->maxIconWidth; + if (mi->menuHasCheckableItems) + checkColumn = qMax(checkColumn, motifCheckMarkSpace); + if (checkColumn > 0) + w += checkColumn + motifCheckMarkHMargin; + + sz = QSize(w, h); + } + break; + +#ifndef QT_NO_SPINBOX + case CT_SpinBox: + if (const QStyleOptionSpinBox *vopt = qstyleoption_cast(opt)) { + if (vopt->frame) + sz.rheight() += spinboxHCoeff * proxy()->pixelMetric(PM_SpinBoxFrameWidth, vopt, widget); + } + break; +#endif + + default: + sz = QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget); + break; + } + + return sz; +} + +/*! + \reimp +*/ +QRect +QMotifStyle::subElementRect(SubElement sr, const QStyleOption *opt, const QWidget *widget) const +{ + QRect rect; + + switch (sr) { + case SE_SliderFocusRect: + rect = QCommonStyle::subElementRect(sr, opt, widget); + rect.adjust(2, 2, -2, -2); + break; + + case SE_CheckBoxIndicator: + case SE_RadioButtonIndicator: + { + rect = visualRect(opt->direction, opt->rect, + QCommonStyle::subElementRect(sr, opt, widget)); + rect.adjust(motifItemFrame,0, motifItemFrame,0); + rect = visualRect(opt->direction, opt->rect, rect); + } + break; + + case SE_ComboBoxFocusRect: + { + int awh, ax, ay, sh, sy, dh, ew; + int fw = proxy()->pixelMetric(PM_DefaultFrameWidth, opt, widget); + QRect tr = opt->rect; + + tr.adjust(fw, fw, -fw, -fw); + get_combo_parameters(tr, ew, awh, ax, ay, sh, dh, sy); + rect.setRect(ax-2, ay-2, awh+4, awh+sh+dh+4); + break; + } + + case SE_ProgressBarLabel: + case SE_ProgressBarGroove: + case SE_ProgressBarContents: + if (const QStyleOptionProgressBar *pb = qstyleoption_cast(opt)) { + int textw = 0; + if (pb->textVisible) + textw = pb->fontMetrics.width(QLatin1String("100%")) + 6; + + if (pb->textAlignment == Qt::AlignLeft || pb->textAlignment == Qt::AlignCenter) { + rect = opt->rect; + } else { + if (sr == SE_ProgressBarLabel) + rect.setCoords(opt->rect.right() - textw, opt->rect.top(), + opt->rect.right(), opt->rect.bottom()); + else + rect.setCoords(opt->rect.left(), opt->rect.top(), + opt->rect.right() - textw, opt->rect.bottom()); + } + if (sr == SE_ProgressBarContents) + rect.adjust(2, 2, -2, -2); + rect = visualRect(pb->direction, pb->rect, rect); + } + break; + case SE_CheckBoxClickRect: + case SE_RadioButtonClickRect: + rect = visualRect(opt->direction, opt->rect, opt->rect); + break; + + default: + rect = QCommonStyle::subElementRect(sr, opt, widget); + } + return rect; +} + +#ifndef QT_NO_IMAGEFORMAT_XPM +static const char * const qt_menu_xpm[] = { +"16 16 11 1", +" c #000000", +", c #336600", +". c #99CC00", +"X c #666600", +"o c #999933", +"+ c #333300", +"@ c #669900", +"# c #999900", +"$ c #336633", +"% c #666633", +"& c #99CC33", +"................", +"................", +".....#,++X#.....", +"....X X....", +"...X Xo#% X&..", +"..# o..&@o o..", +".., X..#+ @X X..", +"..+ o.o+ +o# +..", +"..+ #o+ +## +..", +".., %@ ++ +, X..", +"..# o@oo+ #..", +"...X X##$ o..", +"....X X..", +"....&oX++X#oX...", +"................", +"................"}; + + +static const char * const qt_close_xpm[] = { + "12 12 2 1", + " s None c None", + ". c black", + " ", + " ", + " . . ", + " ... ... ", + " ...... ", + " .... ", + " .... ", + " ...... ", + " ... ... ", + " . . ", + " ", + " "}; + +static const char * const qt_maximize_xpm[] = { + "12 12 2 1", + " s None c None", + ". c black", + " ", + " ", + " ", + " . ", + " ... ", + " ..... ", + " ....... ", + " ......... ", + " ", + " ", + " ", + " "}; + +static const char * const qt_minimize_xpm[] = { + "12 12 2 1", + " s None c None", + ". c black", + " ", + " ", + " ", + " ", + " ......... ", + " ....... ", + " ..... ", + " ... ", + " . ", + " ", + " ", + " "}; + +static const char * const qt_normalizeup_xpm[] = { + "12 12 2 1", + " s None c None", + ". c black", + " ", + " ", + " ", + " ....... ", + " ...... ", + " ..... ", + " .... ", + " ... ", + " .. ", + " . ", + " ", + " "}; + +static const char * const qt_shade_xpm[] = { + "12 12 2 1", "# c #000000", + ". c None", + "............", + "............", + ".#########..", + ".#########..", + "............", + "............", + "............", + "............", + "............", + "............", + "............", + "............"}; + + +static const char * const qt_unshade_xpm[] = { + "12 12 2 1", + "# c #000000", + ". c None", + "............", + "............", + ".#########..", + ".#########..", + ".#.......#..", + ".#.......#..", + ".#.......#..", + ".#.......#..", + ".#.......#..", + ".#########..", + "............", + "............"}; + + +static const char * dock_window_close_xpm[] = { + "8 8 2 1", + "# c #000000", + ". c None", + "##....##", + ".##..##.", + "..####..", + "...##...", + "..####..", + ".##..##.", + "##....##", + "........"}; + +// Message box icons, from page 210 of the Windows style guide. + +// Hand-drawn to resemble Microsoft's icons, but in the Mac/Netscape palette. +// Thanks to TrueColor displays, it is slightly more efficient to have +// them duplicated. +/* XPM */ +static const char * const information_xpm[]={ + "32 32 5 1", + ". c None", + "c c #000000", + "* c #999999", + "a c #ffffff", + "b c #0000ff", + "...........********.............", + "........***aaaaaaaa***..........", + "......**aaaaaaaaaaaaaa**........", + ".....*aaaaaaaaaaaaaaaaaa*.......", + "....*aaaaaaaabbbbaaaaaaaac......", + "...*aaaaaaaabbbbbbaaaaaaaac.....", + "..*aaaaaaaaabbbbbbaaaaaaaaac....", + ".*aaaaaaaaaaabbbbaaaaaaaaaaac...", + ".*aaaaaaaaaaaaaaaaaaaaaaaaaac*..", + "*aaaaaaaaaaaaaaaaaaaaaaaaaaaac*.", + "*aaaaaaaaaabbbbbbbaaaaaaaaaaac*.", + "*aaaaaaaaaaaabbbbbaaaaaaaaaaac**", + "*aaaaaaaaaaaabbbbbaaaaaaaaaaac**", + "*aaaaaaaaaaaabbbbbaaaaaaaaaaac**", + "*aaaaaaaaaaaabbbbbaaaaaaaaaaac**", + "*aaaaaaaaaaaabbbbbaaaaaaaaaaac**", + ".*aaaaaaaaaaabbbbbaaaaaaaaaac***", + ".*aaaaaaaaaaabbbbbaaaaaaaaaac***", + "..*aaaaaaaaaabbbbbaaaaaaaaac***.", + "...caaaaaaabbbbbbbbbaaaaaac****.", + "....caaaaaaaaaaaaaaaaaaaac****..", + ".....caaaaaaaaaaaaaaaaaac****...", + "......ccaaaaaaaaaaaaaacc****....", + ".......*cccaaaaaaaaccc*****.....", + "........***cccaaaac*******......", + "..........****caaac*****........", + ".............*caaac**...........", + "...............caac**...........", + "................cac**...........", + ".................cc**...........", + "..................***...........", + "...................**..........."}; +/* XPM */ +static const char* const warning_xpm[]={ + "32 32 4 1", + ". c None", + "a c #ffff00", + "* c #000000", + "b c #999999", + ".............***................", + "............*aaa*...............", + "...........*aaaaa*b.............", + "...........*aaaaa*bb............", + "..........*aaaaaaa*bb...........", + "..........*aaaaaaa*bb...........", + ".........*aaaaaaaaa*bb..........", + ".........*aaaaaaaaa*bb..........", + "........*aaaaaaaaaaa*bb.........", + "........*aaaa***aaaa*bb.........", + ".......*aaaa*****aaaa*bb........", + ".......*aaaa*****aaaa*bb........", + "......*aaaaa*****aaaaa*bb.......", + "......*aaaaa*****aaaaa*bb.......", + ".....*aaaaaa*****aaaaaa*bb......", + ".....*aaaaaa*****aaaaaa*bb......", + "....*aaaaaaaa***aaaaaaaa*bb.....", + "....*aaaaaaaa***aaaaaaaa*bb.....", + "...*aaaaaaaaa***aaaaaaaaa*bb....", + "...*aaaaaaaaaa*aaaaaaaaaa*bb....", + "..*aaaaaaaaaaa*aaaaaaaaaaa*bb...", + "..*aaaaaaaaaaaaaaaaaaaaaaa*bb...", + ".*aaaaaaaaaaaa**aaaaaaaaaaa*bb..", + ".*aaaaaaaaaaa****aaaaaaaaaa*bb..", + "*aaaaaaaaaaaa****aaaaaaaaaaa*bb.", + "*aaaaaaaaaaaaa**aaaaaaaaaaaa*bb.", + "*aaaaaaaaaaaaaaaaaaaaaaaaaaa*bbb", + "*aaaaaaaaaaaaaaaaaaaaaaaaaaa*bbb", + ".*aaaaaaaaaaaaaaaaaaaaaaaaa*bbbb", + "..*************************bbbbb", + "....bbbbbbbbbbbbbbbbbbbbbbbbbbb.", + ".....bbbbbbbbbbbbbbbbbbbbbbbbb.."}; +/* XPM */ +static const char* const critical_xpm[]={ + "32 32 4 1", + ". c None", + "a c #999999", + "* c #ff0000", + "b c #ffffff", + "...........********.............", + ".........************...........", + ".......****************.........", + "......******************........", + ".....********************a......", + "....**********************a.....", + "...************************a....", + "..*******b**********b*******a...", + "..******bbb********bbb******a...", + ".******bbbbb******bbbbb******a..", + ".*******bbbbb****bbbbb*******a..", + "*********bbbbb**bbbbb*********a.", + "**********bbbbbbbbbb**********a.", + "***********bbbbbbbb***********aa", + "************bbbbbb************aa", + "************bbbbbb************aa", + "***********bbbbbbbb***********aa", + "**********bbbbbbbbbb**********aa", + "*********bbbbb**bbbbb*********aa", + ".*******bbbbb****bbbbb*******aa.", + ".******bbbbb******bbbbb******aa.", + "..******bbb********bbb******aaa.", + "..*******b**********b*******aa..", + "...************************aaa..", + "....**********************aaa...", + "....a********************aaa....", + ".....a******************aaa.....", + "......a****************aaa......", + ".......aa************aaaa.......", + ".........aa********aaaaa........", + "...........aaaaaaaaaaa..........", + ".............aaaaaaa............"}; +/* XPM */ +static const char *const question_xpm[] = { + "32 32 5 1", + ". c None", + "c c #000000", + "* c #999999", + "a c #ffffff", + "b c #0000ff", + "...........********.............", + "........***aaaaaaaa***..........", + "......**aaaaaaaaaaaaaa**........", + ".....*aaaaaaaaaaaaaaaaaa*.......", + "....*aaaaaaaaaaaaaaaaaaaac......", + "...*aaaaaaaabbbbbbaaaaaaaac.....", + "..*aaaaaaaabaaabbbbaaaaaaaac....", + ".*aaaaaaaabbaaaabbbbaaaaaaaac...", + ".*aaaaaaaabbbbaabbbbaaaaaaaac*..", + "*aaaaaaaaabbbbaabbbbaaaaaaaaac*.", + "*aaaaaaaaaabbaabbbbaaaaaaaaaac*.", + "*aaaaaaaaaaaaabbbbaaaaaaaaaaac**", + "*aaaaaaaaaaaaabbbaaaaaaaaaaaac**", + "*aaaaaaaaaaaaabbaaaaaaaaaaaaac**", + "*aaaaaaaaaaaaabbaaaaaaaaaaaaac**", + "*aaaaaaaaaaaaaaaaaaaaaaaaaaaac**", + ".*aaaaaaaaaaaabbaaaaaaaaaaaac***", + ".*aaaaaaaaaaabbbbaaaaaaaaaaac***", + "..*aaaaaaaaaabbbbaaaaaaaaaac***.", + "...caaaaaaaaaabbaaaaaaaaaac****.", + "....caaaaaaaaaaaaaaaaaaaac****..", + ".....caaaaaaaaaaaaaaaaaac****...", + "......ccaaaaaaaaaaaaaacc****....", + ".......*cccaaaaaaaaccc*****.....", + "........***cccaaaac*******......", + "..........****caaac*****........", + ".............*caaac**...........", + "...............caac**...........", + "................cac**...........", + ".................cc**...........", + "..................***...........", + "...................**...........", +}; +#endif + +/*! + \reimp +*/ +QPixmap +QMotifStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, + const QWidget *widget) const +{ +#ifndef QT_NO_IMAGEFORMAT_XPM + switch (standardPixmap) { + case SP_TitleBarMenuButton: + return QPixmap(qt_menu_xpm); + case SP_TitleBarShadeButton: + return QPixmap(qt_shade_xpm); + case SP_TitleBarUnshadeButton: + return QPixmap(qt_unshade_xpm); + case SP_TitleBarNormalButton: + return QPixmap(qt_normalizeup_xpm); + case SP_TitleBarMinButton: + return QPixmap(qt_minimize_xpm); + case SP_TitleBarMaxButton: + return QPixmap(qt_maximize_xpm); + case SP_TitleBarCloseButton: + return QPixmap(qt_close_xpm); + case SP_DockWidgetCloseButton: + return QPixmap(dock_window_close_xpm); + + case SP_MessageBoxInformation: + case SP_MessageBoxWarning: + case SP_MessageBoxCritical: + case SP_MessageBoxQuestion: + { + const char * const * xpm_data; + switch (standardPixmap) { + case SP_MessageBoxInformation: + xpm_data = information_xpm; + break; + case SP_MessageBoxWarning: + xpm_data = warning_xpm; + break; + case SP_MessageBoxCritical: + xpm_data = critical_xpm; + break; + case SP_MessageBoxQuestion: + xpm_data = question_xpm; + break; + default: + xpm_data = 0; + break; + } + QPixmap pm; + if (xpm_data) { + QImage image((const char **) xpm_data); + // All that color looks ugly in Motif + const QPalette &pal = QApplication::palette(); + switch (standardPixmap) { + case SP_MessageBoxInformation: + case SP_MessageBoxQuestion: + image.setColor(2, 0xff000000 | + pal.color(QPalette::Active, QPalette::Dark).rgb()); + image.setColor(3, 0xff000000 | + pal.color(QPalette::Active, QPalette::Base).rgb()); + image.setColor(4, 0xff000000 | + pal.color(QPalette::Active, QPalette::Text).rgb()); + break; + case SP_MessageBoxWarning: + image.setColor(1, 0xff000000 | + pal.color(QPalette::Active, QPalette::Base).rgb()); + image.setColor(2, 0xff000000 | + pal.color(QPalette::Active, QPalette::Text).rgb()); + image.setColor(3, 0xff000000 | + pal.color(QPalette::Active, QPalette::Dark).rgb()); + break; + case SP_MessageBoxCritical: + image.setColor(1, 0xff000000 | + pal.color(QPalette::Active, QPalette::Dark).rgb()); + image.setColor(2, 0xff000000 | + pal.color(QPalette::Active, QPalette::Text).rgb()); + image.setColor(3, 0xff000000 | + pal.color(QPalette::Active, QPalette::Base).rgb()); + break; + default: + break; + } + pm = QPixmap::fromImage(image); + } + return pm; + } + + default: + break; + } +#endif + + return QCommonStyle::standardPixmap(standardPixmap, opt, widget); +} + +/*! \reimp */ +bool QMotifStyle::event(QEvent *e) +{ + if (e->type() == QEvent::FocusIn) { + if (QWidget *focusWidget = QApplication::focusWidget()) { +#ifndef QT_NO_GRAPHICSVIEW + if (QGraphicsView *graphicsView = qobject_cast(focusWidget)) { + QGraphicsItem *focusItem = graphicsView->scene() ? graphicsView->scene()->focusItem() : 0; + if (focusItem && focusItem->type() == QGraphicsProxyWidget::Type) { + QGraphicsProxyWidget *proxy = static_cast(focusItem); + if (proxy->widget()) + focusWidget = proxy->widget()->focusWidget(); + } + } +#endif + if (!focus) + focus = new QFocusFrame(focusWidget); + focus->setWidget(focusWidget); + } else { + if (focus) + focus->setWidget(0); + } + } else if (e->type() == QEvent::FocusOut) { + if (focus) + focus->setWidget(0); + } + return QCommonStyle::event(e); +} + + +/*! \reimp */ +int +QMotifStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWidget *widget, + QStyleHintReturn *returnData) const +{ + int ret; + + switch (hint) { + case SH_DrawMenuBarSeparator: + ret = true; + break; + + case SH_ScrollBar_MiddleClickAbsolutePosition: + case SH_Slider_SloppyKeyEvents: + case SH_ProgressDialog_CenterCancelButton: + case SH_Menu_SpaceActivatesItem: + case SH_ScrollView_FrameOnlyAroundContents: + case SH_DitherDisabledText: + ret = 1; + break; + + case SH_Menu_SubMenuPopupDelay: + ret = 96; + break; + + case SH_ProgressDialog_TextLabelAlignment: + ret = Qt::AlignLeft | Qt::AlignVCenter; + break; + + case SH_ItemView_ChangeHighlightOnFocus: + ret = 0; + break; + + case SH_MessageBox_UseBorderForButtonSpacing: + ret = 1; + break; + + case SH_Dial_BackgroundRole: + ret = QPalette::Mid; + break; + + case SH_DialogButtonLayout: + ret = QDialogButtonBox::KdeLayout; + break; + case SH_LineEdit_PasswordCharacter: + ret = '*'; + break; + case SH_DialogButtonBox_ButtonsHaveIcons: + ret = 0; + break; + default: + ret = QCommonStyle::styleHint(hint, opt, widget, returnData); + break; + } + + return ret; +} + +/*! \reimp */ +QPalette QMotifStyle::standardPalette() const +{ + QColor background(0xcf, 0xcf, 0xcf); + if (QPixmap::defaultDepth() <= 8) + background = QColor(0xc0, 0xc0, 0xc0); + + QColor light = background.lighter(); + QColor mid = QColor(0xa6, 0xa6, 0xa6); + QColor dark = QColor(0x79, 0x7d, 0x79); + QPalette palette(Qt::black, background, light, dark, mid, Qt::black, Qt::white); + palette.setBrush(QPalette::Disabled, QPalette::WindowText, dark); + palette.setBrush(QPalette::Disabled, QPalette::Text, dark); + palette.setBrush(QPalette::Disabled, QPalette::ButtonText, dark); + palette.setBrush(QPalette::Disabled, QPalette::Base, background); + return palette; +} + +QStyle *CreateMotifStyle() +{ + return(new QMotifStyle); +} + +QT_END_NAMESPACE diff --git a/src/style/motif/qmotifstyle.h b/src/style/motif/qmotifstyle.h new file mode 100644 index 0000000..96de559 --- /dev/null +++ b/src/style/motif/qmotifstyle.h @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMOTIFSTYLE_H +#define QMOTIFSTYLE_H + +#include +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QPalette; +class QFocusFrame; +class QProgressBar; + +class QMotifStyle : public QCommonStyle +{ + Q_OBJECT + +public: + explicit QMotifStyle(bool useHighlightCols=false); + virtual ~QMotifStyle(); + + void setUseHighlightColors(bool); + bool useHighlightColors() const; + + void polish(QPalette&) Q_DECL_OVERRIDE; + void polish(QWidget*) Q_DECL_OVERRIDE; + void unpolish(QWidget*) Q_DECL_OVERRIDE; + void polish(QApplication*) Q_DECL_OVERRIDE; + void unpolish(QApplication*) Q_DECL_OVERRIDE; + + void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, + const QWidget *w = 0) const Q_DECL_OVERRIDE; + + void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, + const QWidget *w = 0) const Q_DECL_OVERRIDE; + + void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, + const QWidget *w = 0) const Q_DECL_OVERRIDE; + + QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, + SubControl sc, const QWidget *widget = 0) const Q_DECL_OVERRIDE; + + int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, + const QWidget *widget = 0) const Q_DECL_OVERRIDE; + + QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, + const QSize &contentsSize, const QWidget *widget = 0) const Q_DECL_OVERRIDE; + + QRect subElementRect(SubElement r, const QStyleOption *opt,const QWidget *widget = 0) const Q_DECL_OVERRIDE; + + QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, + const QWidget *widget = 0) const Q_DECL_OVERRIDE; + + int styleHint(StyleHint hint, const QStyleOption *opt = 0, const QWidget *widget = 0, + QStyleHintReturn *returnData = 0) const Q_DECL_OVERRIDE; + + bool event(QEvent *) Q_DECL_OVERRIDE; + QPalette standardPalette() const Q_DECL_OVERRIDE; + QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *opt = 0, + const QWidget *widget = 0) const Q_DECL_OVERRIDE; + +protected: + QPointer focus; + void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE; + bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE; + void startProgressAnimation(QProgressBar *bar); + void stopProgressAnimation(QProgressBar *bar); + +private: + bool highlightCols; + QList bars; + int animationFps; + int animateTimer; + QTime startTime; + int animateStep; + +protected: + int spinboxHCoeff; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QMOTIFSTYLE_H diff --git a/src/style/plastique/qplastiquestyle.cpp b/src/style/plastique/qplastiquestyle.cpp new file mode 100644 index 0000000..8908f0d --- /dev/null +++ b/src/style/plastique/qplastiquestyle.cpp @@ -0,0 +1,5880 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qplastiquestyle.h" + +static const bool AnimateBusyProgressBar = true; +static const bool AnimateProgressBar = false; +// #define QPlastique_MaskButtons +static const int ProgressBarFps = 25; +static const int blueFrameWidth = 2; // with of line edit focus frame + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qstylehelper_p.h" +#include "qstylecache_p.h" + +QT_BEGIN_NAMESPACE + +// from windows style +static const int windowsItemFrame = 2; // menu item frame width +static const int windowsSepHeight = 2; // separator item height +static const int windowsItemHMargin = 3; // menu item hor text margin +static const int windowsItemVMargin = 2; // menu item ver text margin +static const int windowsArrowHMargin = 6; // arrow horizontal margin +static const int windowsTabSpacing = 12; // space between text and tab +static const int windowsRightBorder = 15; // right border on windows +static const int windowsCheckMarkWidth = 12; // checkmarks width on windows + +static const char * const qt_plastique_slider_verticalhandle[] = { + "15 11 6 1", + " c None", + "+ c #979797", + "@ c #C9C9C9", + "$ c #C1C1C1", + "b c None", + "d c None", + " $++++++++$ ", + "$+bbbbbbbb+$ ", + "+b $$ +$ ", + "+b $@ +$ ", + "+b +$", + "+b d+", + "+b d+$", + "+b $$ d+$ ", + "+b $@ d+$ ", + "$+dddddddd+$ ", + " $++++++++$ "}; + +static const char * const qt_plastique_slider_verticalhandle_left[] = { + "15 11 6 1", + " c None", + "+ c #979797", + "@ c #C9C9C9", + "$ c #C1C1C1", + "b c None", + "d c None", + " $++++++++$ ", + " $+bbbbbbbb+$", + " $+b $$ d+", + " $+b $@ d+", + "$+b d+", + "+b d+", + "$+ d+", + " $+ $$ d+", + " $+ $@ d+", + " $+dddddddd+$", + " $++++++++$ "}; + +static const char * const qt_plastique_slider_horizontalhandle[] = { + "11 15 6 1", + " c None", + "+ c #979797", + "@ c #C9C9C9", + "$ c #C1C1C1", + "b c None", + "d c None", + " $+++++++$ ", + "$+bbbbbbb+$", + "+b d+", + "+b$$ $$d+", + "+b$@ $@d+", + "+b d+", + "+b d+", + "+b d+", + "+b d+", + "+b d+", + "$+ d+$", + " $+ d+$ ", + " $+ d+$ ", + " $+d+$ ", + " $+$ "}; + +static const char * const qt_plastique_slider_horizontalhandle_up[] = { + "11 15 6 1", + " c None", + "+ c #979797", + "@ c #C9C9C9", + "$ c #C1C1C1", + "b c None", + "d c None", + " $+$ ", + " $+b+$ ", + " $+b +$ ", + " $+b +$ ", + "$+b +$", + "+b d+", + "+b d+", + "+b d+", + "+b d+", + "+b d+", + "+b$$ $$d+", + "+b$@ $@d+", + "+b d+", + "$+ddddddd+$", + " $+++++++$ "}; + +static const char * const qt_scrollbar_button_arrow_left[] = { + "4 7 2 1", + " c None", + "* c #BFBFBF", + " *", + " **", + " ***", + "****", + " ***", + " **", + " *"}; + +static const char * const qt_scrollbar_button_arrow_right[] = { + "4 7 2 1", + " c None", + "* c #BFBFBF", + "* ", + "** ", + "*** ", + "****", + "*** ", + "** ", + "* "}; + +static const char * const qt_scrollbar_button_arrow_up[] = { + "7 4 2 1", + " c None", + "* c #BFBFBF", + " * ", + " *** ", + " ***** ", + "*******"}; + +static const char * const qt_scrollbar_button_arrow_down[] = { + "7 4 2 1", + " c None", + "* c #BFBFBF", + "*******", + " ***** ", + " *** ", + " * "}; + +static const char * const qt_scrollbar_button_left[] = { + "16 16 6 1", + " c None", + ". c #BFBFBF", + "+ c #979797", + "# c #FAFAFA", + "< c #FAFAFA", + "* c #FAFAFA", + " .+++++++++++++.", + ".+#############+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + ".+<<<<<<<<<<<<<+", + " .+++++++++++++."}; + +static const char * const qt_scrollbar_button_right[] = { + "16 16 6 1", + " c None", + ". c #BFBFBF", + "+ c #979797", + "# c #FAFAFA", + "< c #FAFAFA", + "* c #FAFAFA", + ".+++++++++++++. ", + "+#############+.", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+<<<<<<<<<<<<<+.", + ".+++++++++++++. "}; + +static const char * const qt_scrollbar_button_up[] = { + "16 16 6 1", + " c None", + ". c #BFBFBF", + "+ c #979797", + "# c #FAFAFA", + "< c #FAFAFA", + "* c #FAFAFA", + " .++++++++++++. ", + ".+############+.", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+<<<<<<<<<<<<<<+", + ".++++++++++++++."}; + +static const char * const qt_scrollbar_button_down[] = { + "16 16 6 1", + " c None", + ". c #BFBFBF", + "+ c #979797", + "# c #FAFAFA", + "< c #FAFAFA", + "* c #FAFAFA", + "++++++++++++++++", + "+##############+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + "+# <+", + ".+<<<<<<<<<<<<+.", + " .++++++++++++. "}; + +static const char * const qt_scrollbar_slider_pattern_vertical[] = { + "10 18 3 1", + " c None", + ". c #BFBFBF", + "+ c #979797", + ".. .. ..", + ".+ .+ .+", + " ", + " ", + ".. .. ..", + ".+ .+ .+", + " ", + " ", + ".. .. ..", + ".+ .+ .+", + " ", + " ", + ".. .. ..", + ".+ .+ .+", + " ", + " ", + ".. .. ..", + ".+ .+ .+"}; + +static const char * const qt_scrollbar_slider_pattern_horizontal[] = { + "18 10 3 1", + " c None", + ". c #BFBFBF", + "+ c #979797", + ".. .. .. .. ..", + ".+ .+ .+ .+ .+", + " ", + " ", + ".. .. .. .. ..", + ".+ .+ .+ .+ .+", + " ", + " ", + ".. .. .. .. ..", + ".+ .+ .+ .+ .+"}; + +static const char * const qt_toolbarhandle[] = { + "6 6 4 1", + " c None", + ". c #C5C5C5", + "+ c #EEEEEE", + "@ c #FAFAFA", + ".. ", + ".+@ ", + " @@ ", + " .. ", + " .+@", + " @@"}; + +static const char * const qt_simple_toolbarhandle[] = { + "3 3 4 1", + " c None", + ". c #C5C5C5", + "+ c #EEEEEE", + "@ c #FAFAFA", + ".. ", + ".+@", + " @@"}; + +static const char * const qt_titlebar_context_help[] = { +"27 27 5 1", +" c None", +". c #0A0C12", +"+ c #1B202D", +"@ c #293144", +"# c #3C435D", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" +@##@+ ", +" .@@@.+@@.. ", +" .##+ +@@+. ", +" .##@ @#@+. ", +" .... +@+.. ", +" .@+@@.. ", +" +#@@+ ", +" .##. ", +" .++. ", +" .++. ", +" +##+ ", +" .@@. ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; + +static QLinearGradient qMapGradientToRect(const QLinearGradient &gradient, const QRectF &rect) +{ + QLinearGradient tmpGrad(rect.center().x(), rect.top(), + rect.center().x(), rect.bottom()); + tmpGrad.setStops(gradient.stops()); + return tmpGrad; +} + +static QBrush qMapBrushToRect(const QBrush &brush, const QRectF &rect) +{ + if (!brush.gradient()) + return brush; + + // ### Ugly assumption that it's a linear gradient + QBrush tmp(qMapGradientToRect(*static_cast(brush.gradient()), rect)); + return tmp; +} + +static void qBrushSetAlphaF(QBrush *brush, qreal alpha) +{ + if (const QGradient *gradient = brush->gradient()) { + // Use the gradient. Call QColor::setAlphaF() on all color stops. + QGradientStops stops = gradient->stops(); + QMutableVectorIterator it(stops); + QColor tmpColor; + while (it.hasNext()) { + it.next(); + tmpColor = it.value().second; + tmpColor.setAlphaF(alpha * tmpColor.alphaF()); + it.setValue(QPair(it.value().first, tmpColor)); + } + + switch (gradient->type()) { + case QGradient::RadialGradient: { + QRadialGradient grad = *static_cast(gradient); + grad.setStops(stops); + *brush = QBrush(grad); + break; + } + case QGradient::ConicalGradient: { + QConicalGradient grad = *static_cast(gradient); + grad.setStops(stops); + *brush = QBrush(grad); + break; + } + default: + qWarning("QPlastiqueStyle::qBrushLight() - unknown gradient type" + " - falling back to QLinearGradient"); + case QGradient::LinearGradient: { + QLinearGradient grad = *static_cast(gradient); + grad.setStops(stops); + *brush = QBrush(grad); + break; + } + } + } else if (!brush->texture().isNull()) { + // Modify the texture - ridiculously expensive. + QPixmap texture = brush->texture(); + QPixmap pixmap; + QString name = QLatin1String("qbrushtexture-alpha") + % HexString(alpha) + % HexString(texture.cacheKey()); + if (!QPixmapCache::find(name, pixmap)) { + QImage image = texture.toImage(); + QRgb *rgb = reinterpret_cast(image.bits()); + int pixels = image.width() * image.height(); + QColor tmpColor; + while (pixels--) { + tmpColor.setRgb(*rgb); + tmpColor.setAlphaF(alpha * tmpColor.alphaF()); + *rgb++ = tmpColor.rgba(); + } + pixmap = QPixmap::fromImage(image); + QPixmapCache::insert(name, pixmap); + } + brush->setTexture(pixmap); + } else { + // Use the color + QColor tmpColor = brush->color(); + tmpColor.setAlphaF(alpha * tmpColor.alphaF()); + brush->setColor(tmpColor); + } +} + +static QBrush qBrushLight(QBrush brush, int light) +{ + if (const QGradient *gradient = brush.gradient()) { + // Use the gradient. Call QColor::lighter() on all color stops. + QGradientStops stops = gradient->stops(); + QMutableVectorIterator it(stops); + while (it.hasNext()) { + it.next(); + it.setValue(QPair(it.value().first, it.value().second.lighter(light))); + } + + switch (gradient->type()) { + case QGradient::RadialGradient: { + QRadialGradient grad = *static_cast(gradient); + grad.setStops(stops); + brush = QBrush(grad); + break; + } + case QGradient::ConicalGradient: { + QConicalGradient grad = *static_cast(gradient); + grad.setStops(stops); + brush = QBrush(grad); + break; + } + default: + qWarning("QPlastiqueStyle::qBrushLight() - unknown gradient type" + " - falling back to QLinearGradient"); + case QGradient::LinearGradient: { + QLinearGradient grad = *static_cast(gradient); + grad.setStops(stops); + brush = QBrush(grad); + break; + } + } + } else if (!brush.texture().isNull()) { + // Modify the texture - ridiculously expensive. + QPixmap texture = brush.texture(); + QPixmap pixmap; + QString name = QLatin1String("qbrushtexture-light") + % HexString(light) + % HexString(texture.cacheKey()); + + if (!QPixmapCache::find(name, pixmap)) { + QImage image = texture.toImage(); + QRgb *rgb = reinterpret_cast(image.bits()); + int pixels = image.width() * image.height(); + QColor tmpColor; + while (pixels--) { + tmpColor.setRgb(*rgb); + *rgb++ = tmpColor.lighter(light).rgba(); + } + pixmap = QPixmap::fromImage(image); + QPixmapCache::insert(name, pixmap); + } + brush.setTexture(pixmap); + } else { + // Use the color + brush.setColor(brush.color().lighter(light)); + } + return brush; +} + +static QBrush qBrushDark(QBrush brush, int dark) +{ + if (const QGradient *gradient = brush.gradient()) { + // Use the gradient. Call QColor::darker() on all color stops. + QGradientStops stops = gradient->stops(); + QMutableVectorIterator it(stops); + while (it.hasNext()) { + it.next(); + it.setValue(QPair(it.value().first, it.value().second.darker(dark))); + } + + switch (gradient->type()) { + case QGradient::RadialGradient: { + QRadialGradient grad = *static_cast(gradient); + grad.setStops(stops); + brush = QBrush(grad); + break; + } + case QGradient::ConicalGradient: { + QConicalGradient grad = *static_cast(gradient); + grad.setStops(stops); + brush = QBrush(grad); + break; + } + default: + qWarning("QPlastiqueStyle::qBrushDark() - unknown gradient type" + " - falling back to QLinearGradient"); + case QGradient::LinearGradient: { + QLinearGradient grad = *static_cast(gradient); + grad.setStops(stops); + brush = QBrush(grad); + break; + } + } + } else if (!brush.texture().isNull()) { + // Modify the texture - ridiculously expensive. + QPixmap texture = brush.texture(); + QPixmap pixmap; + QString name = QLatin1String("qbrushtexture-dark") + % HexString(dark) + % HexString(texture.cacheKey()); + + if (!QPixmapCache::find(name, pixmap)) { + QImage image = texture.toImage(); + QRgb *rgb = reinterpret_cast(image.bits()); + int pixels = image.width() * image.height(); + QColor tmpColor; + while (pixels--) { + tmpColor.setRgb(*rgb); + *rgb++ = tmpColor.darker(dark).rgba(); + } + pixmap = QPixmap::fromImage(image); + QPixmapCache::insert(name, pixmap); + } + brush.setTexture(pixmap); + } else { + // Use the color + brush.setColor(brush.color().darker(dark)); + } + return brush; +} + +/* + Draws a rounded frame using the provided brush for 1, and adds 0.5 alpha + for 0. + + 0111111110 + 01 10 + 1 1 + 1 1 + 1 1 + 01 10 + 0111111110 +*/ +static void qt_plastique_draw_frame(QPainter *painter, const QRect &rect, const QStyleOption *option, + QFrame::Shadow shadow = QFrame::Plain) +{ + QPen oldPen = painter->pen(); + QBrush border; + QBrush corner; + QBrush innerTopLeft; + QBrush innerBottomRight; + + if (shadow != QFrame::Plain && (option->state & QStyle::State_HasFocus)) { + border = option->palette.highlight(); + qBrushSetAlphaF(&border, qreal(0.8)); + corner = option->palette.highlight(); + qBrushSetAlphaF(&corner, 0.5); + innerTopLeft = qBrushDark(option->palette.highlight(), 125); + innerBottomRight = option->palette.highlight(); + qBrushSetAlphaF(&innerBottomRight, qreal(0.65)); + } else { + border = option->palette.shadow(); + qBrushSetAlphaF(&border, qreal(0.4)); + corner = option->palette.shadow(); + qBrushSetAlphaF(&corner, 0.25); + innerTopLeft = option->palette.shadow(); + innerBottomRight = option->palette.shadow(); + if (shadow == QFrame::Sunken) { + qBrushSetAlphaF(&innerTopLeft, qreal(0.23)); + qBrushSetAlphaF(&innerBottomRight, qreal(0.075)); + } else { + qBrushSetAlphaF(&innerTopLeft, qreal(0.075)); + qBrushSetAlphaF(&innerBottomRight, qreal(0.23)); + } + } + + QLine lines[4]; + QPoint points[8]; + + // Opaque corner lines + painter->setPen(QPen(border, 0)); + lines[0] = QLine(rect.left() + 2, rect.top(), rect.right() - 2, rect.top()); + lines[1] = QLine(rect.left() + 2, rect.bottom(), rect.right() - 2, rect.bottom()); + lines[2] = QLine(rect.left(), rect.top() + 2, rect.left(), rect.bottom() - 2); + lines[3] = QLine(rect.right(), rect.top() + 2, rect.right(), rect.bottom() - 2); + painter->drawLines(lines, 4); + + // Opaque corner dots + points[0] = QPoint(rect.left() + 1, rect.top() + 1); + points[1] = QPoint(rect.left() + 1, rect.bottom() - 1); + points[2] = QPoint(rect.right() - 1, rect.top() + 1); + points[3] = QPoint(rect.right() - 1, rect.bottom() - 1); + painter->drawPoints(points, 4); + + // Shaded corner dots + painter->setPen(QPen(corner, 0)); + points[0] = QPoint(rect.left(), rect.top() + 1); + points[1] = QPoint(rect.left(), rect.bottom() - 1); + points[2] = QPoint(rect.left() + 1, rect.top()); + points[3] = QPoint(rect.left() + 1, rect.bottom()); + points[4] = QPoint(rect.right(), rect.top() + 1); + points[5] = QPoint(rect.right(), rect.bottom() - 1); + points[6] = QPoint(rect.right() - 1, rect.top()); + points[7] = QPoint(rect.right() - 1, rect.bottom()); + painter->drawPoints(points, 8); + + // Shadows + if (shadow != QFrame::Plain) { + painter->setPen(QPen(innerTopLeft, 0)); + lines[0] = QLine(rect.left() + 2, rect.top() + 1, rect.right() - 2, rect.top() + 1); + lines[1] = QLine(rect.left() + 1, rect.top() + 2, rect.left() + 1, rect.bottom() - 2); + painter->drawLines(lines, 2); + painter->setPen(QPen(innerBottomRight, 0)); + lines[0] = QLine(rect.left() + 2, rect.bottom() - 1, rect.right() - 2, rect.bottom() - 1); + lines[1] = QLine(rect.right() - 1, rect.top() + 2, rect.right() - 1, rect.bottom() - 2); + painter->drawLines(lines, 2); + } + + painter->setPen(oldPen); +} + +static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50) +{ + const int maxFactor = 100; + QColor tmp = colorA; + tmp.setRed((tmp.red() * factor) / maxFactor + (colorB.red() * (maxFactor - factor)) / maxFactor); + tmp.setGreen((tmp.green() * factor) / maxFactor + (colorB.green() * (maxFactor - factor)) / maxFactor); + tmp.setBlue((tmp.blue() * factor) / maxFactor + (colorB.blue() * (maxFactor - factor)) / maxFactor); + return tmp; +} + +static void qt_plastique_draw_gradient(QPainter *painter, const QRect &rect, const QColor &gradientStart, + const QColor &gradientStop) +{ + QString gradientName = QLatin1String("qplastique-g") + % HexString(rect.width()) + % HexString(rect.height()) + % HexString(gradientStart.rgba()) + % HexString(gradientStop.rgba()); + + QPixmap cache; + QPainter *p = painter; + QRect r = rect; + + bool doPixmapCache = painter->deviceTransform().isIdentity() + && painter->worldMatrix().isIdentity(); + if (doPixmapCache && QPixmapCache::find(gradientName, cache)) { + painter->drawPixmap(rect, cache); + } else { + if (doPixmapCache) { + cache = QPixmap(rect.size()); + cache.fill(Qt::transparent); + p = new QPainter(&cache); + r = QRect(0, 0, rect.width(), rect.height()); + } + + int x = r.center().x(); + QLinearGradient gradient(x, r.top(), x, r.bottom()); + gradient.setColorAt(0, gradientStart); + gradient.setColorAt(1, gradientStop); + p->fillRect(r, gradient); + + if (doPixmapCache) { + p->end(); + delete p; + painter->drawPixmap(rect, cache); + QPixmapCache::insert(gradientName, cache); + } + } +} + +static void qt_plastique_drawFrame(QPainter *painter, const QStyleOption *option, const QWidget *widget) +{ + QRect rect = option->rect; + QPen oldPen = painter->pen(); + + QColor borderColor = option->palette.background().color().darker(178); + QColor gradientStartColor = option->palette.button().color().lighter(104); + QColor gradientStopColor = option->palette.button().color().darker(105); + QColor alphaCornerColor; + if (widget) { + // ### backgroundrole/foregroundrole should be part of the style option + alphaCornerColor = mergedColors(option->palette.color(widget->backgroundRole()), borderColor); + } else { + alphaCornerColor = mergedColors(option->palette.background().color(), borderColor); + } + + QLine lines[4]; + QPoint points[8]; + + // outline / border + painter->setPen(borderColor); + lines[0] = QLine(rect.left() + 2, rect.top(), rect.right() - 2, rect.top()); + lines[1] = QLine(rect.left() + 2, rect.bottom(), rect.right() - 2, rect.bottom()); + lines[2] = QLine(rect.left(), rect.top() + 2, rect.left(), rect.bottom() - 2); + lines[3] = QLine(rect.right(), rect.top() + 2, rect.right(), rect.bottom() - 2); + painter->drawLines(lines, 4); + + points[0] = QPoint(rect.left() + 1, rect.top() + 1); + points[1] = QPoint(rect.right() - 1, rect.top() + 1); + points[2] = QPoint(rect.left() + 1, rect.bottom() - 1); + points[3] = QPoint(rect.right() - 1, rect.bottom() - 1); + painter->drawPoints(points, 4); + + painter->setPen(alphaCornerColor); + + points[0] = QPoint(rect.left() + 1, rect.top()); + points[1] = QPoint(rect.right() - 1, rect.top()); + points[2] = QPoint(rect.left() + 1, rect.bottom()); + points[3] = QPoint(rect.right() - 1, rect.bottom()); + points[4] = QPoint(rect.left(), rect.top() + 1); + points[5] = QPoint(rect.right(), rect.top() + 1); + points[6] = QPoint(rect.left(), rect.bottom() - 1); + points[7] = QPoint(rect.right(), rect.bottom() - 1); + painter->drawPoints(points, 8); + + // inner border + if ((option->state & QStyle::State_Sunken) || (option->state & QStyle::State_On)) + painter->setPen(option->palette.button().color().darker(118)); + else + painter->setPen(gradientStartColor); + + lines[0] = QLine(rect.left() + 2, rect.top() + 1, rect.right() - 2, option->rect.top() + 1); + lines[1] = QLine(rect.left() + 1, rect.top() + 2, rect.left() + 1, option->rect.bottom() - 2); + painter->drawLines(lines, 2); + + if ((option->state & QStyle::State_Sunken) || (option->state & QStyle::State_On)) + painter->setPen(option->palette.button().color().darker(110)); + else + painter->setPen(gradientStopColor.darker(102)); + + lines[0] = QLine(rect.left() + 2, rect.bottom() - 1, rect.right() - 2, rect.bottom() - 1); + lines[1] = QLine(rect.right() - 1, rect.top() + 2, rect.right() - 1, rect.bottom() - 2); + painter->drawLines(lines, 2); + + painter->setPen(oldPen); +} + +static void qt_plastique_drawShadedPanel(QPainter *painter, const QStyleOption *option, bool base, + const QWidget *widget) +{ + QRect rect = option->rect; + QPen oldPen = painter->pen(); + + QColor gradientStartColor = option->palette.button().color().lighter(104); + QColor gradientStopColor = option->palette.button().color().darker(105); + + // gradient fill + if ((option->state & QStyle::State_Enabled) || !(option->state & QStyle::State_AutoRaise)) { + if ((option->state & QStyle::State_Sunken) || (option->state & QStyle::State_On)) { + qt_plastique_draw_gradient(painter, rect.adjusted(1, 1, -1, -1), + option->palette.button().color().darker(114), + option->palette.button().color().darker(106)); + } else { + qt_plastique_draw_gradient(painter, rect.adjusted(1, 1, -1, -1), + base ? option->palette.background().color().lighter(105) : gradientStartColor, + base ? option->palette.background().color().darker(102) : gradientStopColor); + } + } + + qt_plastique_drawFrame(painter, option, widget); + + painter->setPen(oldPen); +} + +static void qt_plastique_draw_mdibutton(QPainter *painter, const QStyleOptionTitleBar *option, const QRect &tmp, bool hover, bool sunken) +{ + if (tmp.isNull()) + return; + bool active = (option->titleBarState & QStyle::State_Active); + + // ### use palette colors instead + QColor mdiButtonGradientStartColor; + QColor mdiButtonGradientStopColor; + if (active) { + mdiButtonGradientStartColor = QColor((hover || sunken) ? 0x7d8bb1 : 0x55689a); + mdiButtonGradientStopColor = QColor((hover || sunken) ? 0x939ebe : 0x7381ab); + } else { + mdiButtonGradientStartColor = QColor((hover || sunken) ? 0x9e9e9e : 0x818181); + mdiButtonGradientStopColor = QColor((hover || sunken) ? 0xababab : 0x929292); + } + + qt_plastique_draw_gradient(painter, tmp.adjusted(1, 1, -1, -1), + mdiButtonGradientStartColor, mdiButtonGradientStopColor); + + QColor mdiButtonBorderColor; + if (active) { + mdiButtonBorderColor = (hover || sunken) ? QColor(0x627097) : QColor(0x324577); + } else { + mdiButtonBorderColor = (hover || sunken) ? QColor(0x838383) : QColor(0x5e5e5e); + } + painter->setPen(QPen(mdiButtonBorderColor, 1)); + + const QLine lines[4] = { + QLine(tmp.left() + 2, tmp.top(), tmp.right() - 2, tmp.top()), + QLine(tmp.left() + 2, tmp.bottom(), tmp.right() - 2, tmp.bottom()), + QLine(tmp.left(), tmp.top() + 2, tmp.left(), tmp.bottom() - 2), + QLine(tmp.right(), tmp.top() + 2, tmp.right(), tmp.bottom() - 2) }; + painter->drawLines(lines, 4); + + const QPoint points[4] = { + QPoint(tmp.left() + 1, tmp.top() + 1), + QPoint(tmp.right() - 1, tmp.top() + 1), + QPoint(tmp.left() + 1, tmp.bottom() - 1), + QPoint(tmp.right() - 1, tmp.bottom() - 1) }; + painter->drawPoints(points, 4); +} + +#ifndef QT_NO_DOCKWIDGET +static QString elliditide(const QString &text, const QFontMetrics &fontMetrics, const QRect &rect, int *textWidth = 0) +{ + // Chop and insert ellide into title if text is too wide + QString title = text; + int width = textWidth ? *textWidth : fontMetrics.width(text); + QString ellipsis = QLatin1String("..."); + if (width > rect.width()) { + QString leftHalf = title.left(title.size() / 2); + QString rightHalf = title.mid(leftHalf.size() + 1); + while (!leftHalf.isEmpty() && !rightHalf.isEmpty()) { + leftHalf.chop(1); + int width = fontMetrics.width(leftHalf + ellipsis + rightHalf); + if (width < rect.width()) { + title = leftHalf + ellipsis + rightHalf; + break; + } + rightHalf.remove(0, 1); + width = fontMetrics.width(leftHalf + ellipsis + rightHalf); + if (width < rect.width()) { + title = leftHalf + ellipsis + rightHalf; + break; + } + } + } + if (textWidth) + *textWidth = width; + return title; +} +#endif + +#if !defined(QT_NO_DOCKWIDGET) || !defined(QT_NO_SPLITTER) +static void qt_plastique_draw_handle(QPainter *painter, const QStyleOption *option, + const QRect &rect, Qt::Orientation orientation, + const QWidget *widget) +{ + QColor borderColor = option->palette.background().color().darker(178); + QColor alphaCornerColor; + if (widget) { + // ### backgroundrole/foregroundrole should be part of the style option + alphaCornerColor = mergedColors(option->palette.color(widget->backgroundRole()), borderColor); + } else { + alphaCornerColor = mergedColors(option->palette.background().color(), borderColor); + } + QImage handle(qt_simple_toolbarhandle); + alphaCornerColor.setAlpha(170); + handle.setColor(1, alphaCornerColor.rgba()); + handle.setColor(2, mergedColors(alphaCornerColor, option->palette.light().color()).rgba()); + handle.setColor(3, option->palette.light().color().rgba()); + + const int spacing = 2; + + if (orientation == Qt::Vertical) { + int nchunks = rect.width() / (handle.width() + spacing); + for (int i = 0; i < nchunks; ++i) + painter->drawImage(QPoint(rect.left() + i * (handle.width() + spacing), rect.top()), handle); + } else { + int nchunks = rect.height() / (handle.height() + spacing); + for (int i = 0; i < nchunks; ++i) + painter->drawImage(QPoint(rect.left(), rect.top() + i * (handle.height() + spacing)), handle); + } +} +#endif + +/*! + \class QPlastiqueStyle + \brief The QPlastiqueStyle class provides a widget style similar to the + Plastik style available in KDE. + + \inmodule QtWidgets + + The Plastique style provides a default look and feel for widgets on X11 + that closely resembles the Plastik style, introduced by Sandro Giessl in + KDE 3.2. + + \image qplastiquestyle.png + \sa QWindowsXPStyle, QMacStyle, QWindowsStyle +*/ + +/*! + Constructs a QPlastiqueStyle object. +*/ +QPlastiqueStyle::QPlastiqueStyle() + : QProxyStyle(QStyleFactory::create(QLatin1String("Windows"))), animateStep(0), progressBarAnimateTimer(0) +{ + setObjectName(QLatin1String("Plastique")); +} + +/*! + Destructs the QPlastiqueStyle object. +*/ +QPlastiqueStyle::~QPlastiqueStyle() +{ +} + +/* + Used by spin- and combo box. + Draws a rounded frame around rect but omits the right hand edge +*/ +static void qt_draw_partial_frame(QPainter *painter, const QStyleOptionComplex *option, + const QRect &rect, const QWidget *widget, const QStyle *style) +{ + bool reverse = option->direction == Qt::RightToLeft; + QStyleOptionFrame frameOpt; +#ifndef QT_NO_LINEEDIT + if (QLineEdit *lineedit = widget->findChild()) + frameOpt.initFrom(lineedit); +#else + Q_UNUSED(widget) +#endif // QT_NO_LINEEDIT + + frameOpt.rect = rect; + painter->save(); + frameOpt.rect.adjust(-blueFrameWidth + (reverse ? 1 : 0), -blueFrameWidth, + blueFrameWidth + (reverse ? 0 : -1), blueFrameWidth); + painter->setClipRect(frameOpt.rect); + frameOpt.rect.adjust(reverse ? -2 : 0, 0, reverse ? 0 : 2, 0); + frameOpt.lineWidth = style->pixelMetric(QStyle::PM_DefaultFrameWidth); + frameOpt.midLineWidth = 0; + frameOpt.state = option->state | QStyle::State_Sunken; + frameOpt.palette = option->palette; + style->drawPrimitive(QStyle::PE_PanelLineEdit, &frameOpt, painter, widget); + painter->restore(); + + // Draw a two pixel highlight on the flat edge + if (option->state & QStyle::State_HasFocus) { + painter->setPen(QPen(option->palette.highlight(), 0)); + QBrush focusBorder = option->palette.highlight(); + qBrushSetAlphaF(&focusBorder, qreal(0.65)); + if (!reverse) { + painter->drawLine(rect.topRight() + QPoint(1, -1), + rect.bottomRight() + QPoint(1, 1)); + painter->setPen(QPen(focusBorder, 0)); + painter->drawLine(rect.topRight(), + rect.bottomRight()); + } + else { + painter->drawLine(rect.topLeft() + QPoint(-1, -1), + rect.bottomLeft() + QPoint(-1, 1)); + painter->setPen(QPen(focusBorder, 0)); + painter->drawLine(rect.topLeft(), + rect.bottomLeft()); + } + } +} + +/*! + \reimp +*/ +void QPlastiqueStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const +{ + Q_ASSERT(option); + + QColor borderColor = option->palette.background().color().darker(178); + QColor alphaCornerColor; + if (widget) { + // ### backgroundrole/foregroundrole should be part of the style option + alphaCornerColor = mergedColors(option->palette.color(widget->backgroundRole()), borderColor); + } else { + alphaCornerColor = mergedColors(option->palette.background().color(), borderColor); + } + QColor alphaTextColor = mergedColors(option->palette.background().color(), option->palette.text().color()); + + switch (element) { + case PE_IndicatorButtonDropDown: + proxy()->drawPrimitive(PE_PanelButtonTool, option, painter, widget); + break; + case PE_FrameDefaultButton: { + if (!(option->state & QStyle::State_Enabled)) + break; + painter->setPen(QPen(QColor(0, 0, 0, 127), 0)); + const QLine lines[4] = { + QLine(option->rect.left() + 2, option->rect.top(), + option->rect.right() - 2, option->rect.top()), + QLine(option->rect.left() + 2, option->rect.bottom(), + option->rect.right() - 2, option->rect.bottom()), + QLine(option->rect.left(), option->rect.top() + 2, + option->rect.left(), option->rect.bottom() - 2), + QLine(option->rect.right(), option->rect.top() + 2, + option->rect.right(), option->rect.bottom() - 2) }; + painter->drawLines(lines, 4); + + QPoint points[8]; + points[0] = QPoint(option->rect.left() + 1, option->rect.top() + 1); + points[1] = QPoint(option->rect.right() - 1, option->rect.top() + 1); + points[2] = QPoint(option->rect.left() + 1, option->rect.bottom() - 1); + points[3] = QPoint(option->rect.right() - 1, option->rect.bottom() - 1); + painter->drawPoints(points, 4); + + painter->setPen(QPen(QColor(0, 0, 0, 63), 0)); + points[0] = QPoint(option->rect.left() + 1, option->rect.top()); + points[1] = QPoint(option->rect.right() - 1, option->rect.top()); + points[2] = QPoint(option->rect.left(), option->rect.top() + 1); + points[3] = QPoint(option->rect.right(), option->rect.top() + 1); + points[4] = QPoint(option->rect.left() + 1, option->rect.bottom()); + points[5] = QPoint(option->rect.right() - 1, option->rect.bottom()); + points[6] = QPoint(option->rect.left(), option->rect.bottom() - 1); + points[7] = QPoint(option->rect.right(), option->rect.bottom() - 1); + painter->drawPoints(points, 8); + + break; + } +#ifndef QT_NO_TABWIDGET + case PE_FrameTabWidget: + if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast(option)) { + if (twf->shape != QTabBar::RoundedNorth && twf->shape != QTabBar::RoundedWest && + twf->shape != QTabBar::RoundedSouth && twf->shape != QTabBar::RoundedEast) { + QProxyStyle::drawPrimitive(element, option, painter, widget); + break; + } + + int borderThickness = proxy()->pixelMetric(PM_TabBarBaseOverlap, twf, widget); + bool reverse = (twf->direction == Qt::RightToLeft); + + painter->save(); + + // Start by filling the contents of the tab widget frame (which is + // actually a panel). + painter->fillRect(option->rect.adjusted(1, 1, -1, -1), option->palette.window()); + + QRect tabBarRect; + switch (twf->shape) { + case QTabBar::RoundedNorth: + if (reverse) + tabBarRect = QRect(twf->rect.right() - twf->leftCornerWidgetSize.width() - twf->tabBarSize.width() + 1, twf->rect.top(), twf->tabBarSize.width(), borderThickness); + else + tabBarRect = QRect(twf->rect.left() + twf->leftCornerWidgetSize.width(), twf->rect.top(), twf->tabBarSize.width(), borderThickness); + break ; + case QTabBar::RoundedWest: + tabBarRect = QRect(twf->rect.left(), twf->rect.top() + twf->leftCornerWidgetSize.height(), borderThickness, twf->tabBarSize.height()); + break ; + case QTabBar::RoundedEast: + tabBarRect = QRect(twf->rect.right() - borderThickness + 1, twf->rect.top() + twf->leftCornerWidgetSize.height(), + borderThickness, twf->tabBarSize.height()); + break ; + case QTabBar::RoundedSouth: + if (reverse) + tabBarRect = QRect(twf->rect.right() - twf->leftCornerWidgetSize.width() - twf->tabBarSize.width() + 1, + twf->rect.bottom() - borderThickness + 1, twf->tabBarSize.width(), borderThickness); + else + tabBarRect = QRect(twf->rect.left() + twf->leftCornerWidgetSize.width(), + twf->rect.bottom() - borderThickness + 1, twf->tabBarSize.width(), borderThickness); + break ; + default: + break; + } + + QRegion region(twf->rect); + region -= tabBarRect; + painter->setClipRegion(region); + + // Outer border + QLine leftLine = QLine(twf->rect.topLeft() + QPoint(0, 2), twf->rect.bottomLeft() - QPoint(0, 2)); + QLine rightLine = QLine(twf->rect.topRight() + QPoint(0, 2), twf->rect.bottomRight() - QPoint(0, 2)); + QLine bottomLine = QLine(twf->rect.bottomLeft() + QPoint(2, 0), twf->rect.bottomRight() - QPoint(2, 0)); + QLine topLine = QLine(twf->rect.topLeft() + QPoint(2, 0), twf->rect.topRight() - QPoint(2, 0)); + + QBrush border = option->palette.shadow(); + qBrushSetAlphaF(&border, qreal(0.4)); + painter->setPen(QPen(border, 0)); + + QVarLengthArray lines; + QVarLengthArray points; + + lines.append(topLine); + + // Inner border + QLine innerLeftLine = QLine(leftLine.p1() + QPoint(1, 0), leftLine.p2() + QPoint(1, 0)); + QLine innerRightLine = QLine(rightLine.p1() - QPoint(1, 0), rightLine.p2() - QPoint(1, 0)); + QLine innerBottomLine = QLine(bottomLine.p1() - QPoint(0, 1), bottomLine.p2() - QPoint(0, 1)); + QLine innerTopLine = QLine(topLine.p1() + QPoint(0, 1), topLine.p2() + QPoint(0, 1)); + + // Rounded Corner + QPoint leftBottomOuterCorner = QPoint(innerLeftLine.p2() + QPoint(0, 1)); + QPoint leftBottomInnerCorner1 = QPoint(leftLine.p2() + QPoint(0, 1)); + QPoint leftBottomInnerCorner2 = QPoint(bottomLine.p1() - QPoint(1, 0)); + QPoint rightBottomOuterCorner = QPoint(innerRightLine.p2() + QPoint(0, 1)); + QPoint rightBottomInnerCorner1 = QPoint(rightLine.p2() + QPoint(0, 1)); + QPoint rightBottomInnerCorner2 = QPoint(bottomLine.p2() + QPoint(1, 0)); + QPoint rightTopOuterCorner = QPoint(innerRightLine.p1() - QPoint(0, 1)); + QPoint rightTopInnerCorner1 = QPoint(rightLine.p1() - QPoint(0, 1)); + QPoint rightTopInnerCorner2 = QPoint(topLine.p2() + QPoint(1, 0)); + QPoint leftTopOuterCorner = QPoint(innerLeftLine.p1() - QPoint(0, 1)); + QPoint leftTopInnerCorner1 = QPoint(leftLine.p1() - QPoint(0, 1)); + QPoint leftTopInnerCorner2 = QPoint(topLine.p1() - QPoint(1, 0)); + + lines.append(leftLine); + lines.append(rightLine); + lines.append(bottomLine); + + painter->drawLines(lines.constData(), lines.size()); + lines.clear(); + + points.append(leftBottomOuterCorner); + points.append(rightBottomOuterCorner); + points.append(rightTopOuterCorner); + points.append(leftTopOuterCorner); + + painter->drawPoints(points.constData(), points.size()); + points.clear(); + + QBrush innerTopLeft = option->palette.shadow(); + qBrushSetAlphaF(&innerTopLeft, qreal(0.075)); + painter->setPen(QPen(innerTopLeft, 0)); + + lines.append(innerLeftLine); + lines.append(innerTopLine); + painter->drawLines(lines.constData(), lines.size()); + lines.clear(); + + QBrush innerBottomRight = option->palette.shadow(); + qBrushSetAlphaF(&innerBottomRight, qreal(0.23)); + painter->setPen(QPen(innerBottomRight, 0)); + lines.append(innerRightLine); + lines.append(innerBottomLine); + painter->drawLines(lines.constData(), lines.size()); + lines.clear(); + + QBrush corner = option->palette.shadow(); + qBrushSetAlphaF(&corner, 0.25); + painter->setPen(QPen(corner, 0)); + points.append(leftBottomInnerCorner1); + points.append(leftBottomInnerCorner2); + points.append(rightBottomInnerCorner1); + points.append(rightBottomInnerCorner2); + points.append(rightTopInnerCorner1); + points.append(rightTopInnerCorner2); + points.append(leftTopInnerCorner1); + points.append(leftTopInnerCorner2); + painter->drawPoints(points.constData(), points.size()); + points.clear(); + + painter->restore(); + } + break ; +#endif // QT_NO_TABWIDGET +#ifndef QT_NO_TABBAR + case PE_FrameTabBarBase: + if (const QStyleOptionTabBarBase *tbb = qstyleoption_cast(option)) { + if (tbb->shape != QTabBar::RoundedNorth && tbb->shape != QTabBar::RoundedWest && + tbb->shape != QTabBar::RoundedSouth && tbb->shape != QTabBar::RoundedEast) { + QProxyStyle::drawPrimitive(element, option, painter, widget); + break; + } + + painter->save(); + + QRegion region(tbb->rect); + region -= tbb->tabBarRect; + painter->setClipRegion(region); + + QLine topLine = QLine(tbb->rect.bottomLeft() - QPoint(0, 1), tbb->rect.bottomRight() - QPoint(0, 1)); + QLine bottomLine = QLine(tbb->rect.bottomLeft(), tbb->rect.bottomRight()); + + QBrush border = option->palette.shadow(); + qBrushSetAlphaF(&border, qreal(0.4)); + QBrush innerTopLeft = option->palette.shadow(); + qBrushSetAlphaF(&innerTopLeft, qreal(0.075)); + QBrush innerBottomRight = option->palette.shadow(); + qBrushSetAlphaF(&innerBottomRight, qreal(0.23)); + QBrush corner = option->palette.shadow(); + qBrushSetAlphaF(&corner, 0.25); + + if (tbb->shape == QTabBar::RoundedSouth) + painter->setPen(QPen(corner, 0)); + else + painter->setPen(QPen(border, 0)); + painter->drawLine(topLine); + + if (tbb->shape != QTabBar::RoundedSouth) + painter->setPen(QPen(innerTopLeft, 0)); + else + painter->setPen(QPen(border, 0)); + painter->drawLine(bottomLine); + + painter->restore(); + } + break ; +#endif // QT_NO_TABBAR +#ifndef QT_NO_GROUPBOX + case PE_FrameGroupBox: + if (const QStyleOptionFrame *frame = qstyleoption_cast(option)) { + if (frame->features & QStyleOptionFrame::Flat) { + QPen oldPen = painter->pen(); + painter->setPen(borderColor); + painter->drawLine(frame->rect.topLeft(), frame->rect.topRight()); + painter->setPen(oldPen); + } else { + QStyleOptionFrame frame2(*frame); + frame2.state &= ~(State_Sunken | State_HasFocus); + proxy()->drawPrimitive(PE_Frame, &frame2, painter, widget); + } + } + break; +#endif // QT_NO_GROUPBOX + case PE_Frame: { + QFrame::Shadow shadow = QFrame::Plain; + if (option->state & State_Sunken) + shadow = QFrame::Sunken; + else if (option->state & State_Raised) + shadow = QFrame::Raised; + qt_plastique_draw_frame(painter, option->rect, option, shadow); + break; + } +#ifndef QT_NO_LINEEDIT + case PE_FrameLineEdit: + qt_plastique_draw_frame(painter, option->rect, option, QFrame::Sunken); + break; + case PE_PanelLineEdit: + if (const QStyleOptionFrame *lineEdit = qstyleoption_cast(option)) { + // Panel of a line edit inside combo box or spin box is drawn in CC_ComboBox and CC_SpinBox + if (widget) { +#ifndef QT_NO_SPINBOX + // Spinbox doesn't need a separate palette for the lineedit + if (qobject_cast(widget->parentWidget())) + break; +#endif + } + + painter->save(); + + // Fill the line edit insides + QRect filledRect = lineEdit->rect.adjusted(1, 1, -1, -1); + QBrush baseBrush = qMapBrushToRect(lineEdit->palette.base(), filledRect); + painter->setBrushOrigin(filledRect.topLeft()); + painter->fillRect(filledRect.adjusted(1, 1, -1, -1), baseBrush); + + painter->setPen(QPen(baseBrush, 0)); + const QLine lines[4] = { + QLine(filledRect.left(), filledRect.top() + 1, + filledRect.left(), filledRect.bottom() - 1), + QLine(filledRect.right(), filledRect.top() + 1, + filledRect.right(), filledRect.bottom() - 1), + QLine(filledRect.left() + 1, filledRect.top(), + filledRect.right() - 1, filledRect.top()), + QLine(filledRect.left() + 1, filledRect.bottom(), + filledRect.right() - 1, filledRect.bottom()) }; + painter->drawLines(lines, 4); + + if (lineEdit->lineWidth != 0) + qt_plastique_draw_frame(painter, option->rect, option, QFrame::Sunken); + + painter->restore(); + break; + } +#endif // QT_NO_LINEEDIT + case PE_FrameDockWidget: + case PE_FrameMenu: + case PE_FrameStatusBarItem: { + // Draws the frame around a popup menu. + QPen oldPen = painter->pen(); + painter->setPen(borderColor); + painter->drawRect(option->rect.adjusted(0, 0, -1, -1)); + painter->setPen(alphaCornerColor); + const QPoint points[4] = { + QPoint(option->rect.topLeft()), + QPoint(option->rect.topRight()), + QPoint(option->rect.bottomLeft()), + QPoint(option->rect.bottomRight()) }; + painter->drawPoints(points, 4); + painter->setPen(oldPen); + break; + } +#ifndef QT_NO_MAINWINDOW + case PE_PanelMenuBar: + if ((widget && qobject_cast(widget->parentWidget())) + ) { + // Draws the light line above and the dark line below menu bars and + // tool bars. + QPen oldPen = painter->pen(); + if (element == PE_PanelMenuBar || (option->state & State_Horizontal)) { + painter->setPen(alphaCornerColor); + painter->drawLine(option->rect.left(), option->rect.bottom(), + option->rect.right(), option->rect.bottom()); + painter->setPen(option->palette.background().color().lighter(104)); + painter->drawLine(option->rect.left(), option->rect.top(), + option->rect.right(), option->rect.top()); + } else { + painter->setPen(option->palette.background().color().lighter(104)); + painter->drawLine(option->rect.left(), option->rect.top(), + option->rect.left(), option->rect.bottom()); + painter->setPen(alphaCornerColor); + painter->drawLine(option->rect.right(), option->rect.top(), + option->rect.right(), option->rect.bottom()); + } + painter->setPen(oldPen); + } + break; +#endif // QT_NO_MAINWINDOW + case PE_IndicatorHeaderArrow: { + bool usedAntialiasing = painter->renderHints() & QPainter::Antialiasing; + if (!usedAntialiasing) + painter->setRenderHint(QPainter::Antialiasing); + QProxyStyle::drawPrimitive(element, option, painter, widget); + if (!usedAntialiasing) + painter->setRenderHint(QPainter::Antialiasing, false); + break; + } + case PE_PanelButtonTool: + // Draws a tool button (f.ex., in QToolBar and QTabBar) + if ((option->state & State_Enabled || option->state & State_On) || !(option->state & State_AutoRaise)) + qt_plastique_drawShadedPanel(painter, option, true, widget); + break; +#ifndef QT_NO_TOOLBAR + case PE_IndicatorToolBarHandle: { + QPixmap cache; + QRect rect = option->rect; + QString pixmapName = QStyleHelper::uniqueName(QLatin1String("toolbarhandle"), option, rect.size()); + if (!QPixmapCache::find(pixmapName, cache)) { + cache = QPixmap(rect.size()); + cache.fill(Qt::transparent); + QPainter cachePainter(&cache); + QRect cacheRect(QPoint(0, 0), rect.size()); + if (widget) + cachePainter.fillRect(cacheRect, option->palette.brush(widget->backgroundRole())); + else + cachePainter.fillRect(cacheRect, option->palette.background()); + + QImage handle(qt_toolbarhandle); + alphaCornerColor.setAlpha(170); + handle.setColor(1, alphaCornerColor.rgba()); + handle.setColor(2, mergedColors(alphaCornerColor, option->palette.light().color()).rgba()); + handle.setColor(3, option->palette.light().color().rgba()); + + if (option->state & State_Horizontal) { + int nchunks = cacheRect.height() / handle.height(); + int indent = (cacheRect.height() - (nchunks * handle.height())) / 2; + for (int i = 0; i < nchunks; ++i) + cachePainter.drawImage(QPoint(cacheRect.left() + 3, cacheRect.top() + indent + i * handle.height()), + handle); + } else { + int nchunks = cacheRect.width() / handle.width(); + int indent = (cacheRect.width() - (nchunks * handle.width())) / 2; + for (int i = 0; i < nchunks; ++i) + cachePainter.drawImage(QPoint(cacheRect.left() + indent + i * handle.width(), cacheRect.top() + 3), + handle); + } + cachePainter.end(); + QPixmapCache::insert(pixmapName, cache); + } + painter->drawPixmap(rect.topLeft(), cache); + break; + } + case PE_IndicatorToolBarSeparator: { + QPen oldPen = painter->pen(); + painter->setPen(alphaCornerColor); + if (option->state & State_Horizontal) { + painter->drawLine(option->rect.left(), option->rect.top() + 1, option->rect.left(), option->rect.bottom() - 2); + painter->setPen(option->palette.base().color()); + painter->drawLine(option->rect.right(), option->rect.top() + 1, option->rect.right(), option->rect.bottom() - 2); + } else { + painter->drawLine(option->rect.left() + 1, option->rect.top(), option->rect.right() - 2, option->rect.top()); + painter->setPen(option->palette.base().color()); + painter->drawLine(option->rect.left() + 1, option->rect.bottom(), option->rect.right() - 2, option->rect.bottom()); + } + painter->setPen(oldPen); + break; + } +#endif // QT_NO_TOOLBAR + case PE_PanelButtonCommand: + if (const QStyleOptionButton *button = qstyleoption_cast(option)) { + bool sunken = (button->state & State_Sunken) || (button->state & State_On); + if ((button->features & QStyleOptionButton::Flat) && !sunken) + break; + + bool defaultButton = (button->features & (QStyleOptionButton::DefaultButton + | QStyleOptionButton::AutoDefaultButton)); + + BEGIN_STYLE_PIXMAPCACHE(QString::fromLatin1("pushbutton-%1").arg(defaultButton)) + + QPen oldPen = p->pen(); + bool hover = (button->state & State_Enabled) && (button->state & State_MouseOver); + + // Give the painter a different brush origin for sunken buttons + if (sunken) { + // ### No such function + // p->setPenOrigin(rect.left() + 1, rect.top() + 1); + p->setBrushOrigin(rect.left() + 1, rect.top() + 1); + } + + // Draw border + qt_plastique_draw_frame(p, rect, option); + + // Fill the panel + QRectF fillRect = rect.adjusted(2, 2, -2, -2); + + // Button colors + QBrush alphaCornerBrush = qMapBrushToRect(qBrushDark(option->palette.button(), 165), rect); + qBrushSetAlphaF(&alphaCornerBrush, 0.5); + QBrush buttonGradientBrush; + QBrush leftLineGradientBrush; + QBrush rightLineGradientBrush; + QBrush sunkenButtonGradientBrush; + QBrush sunkenLeftLineGradientBrush; + QBrush sunkenRightLineGradientBrush; + QBrush buttonBrush = qMapBrushToRect(option->palette.button(), rect); + if (buttonBrush.gradient() || !buttonBrush.texture().isNull()) { + buttonGradientBrush = buttonBrush; + sunkenButtonGradientBrush = qBrushDark(buttonBrush, 108); + leftLineGradientBrush = qBrushLight(buttonBrush, 105); + rightLineGradientBrush = qBrushDark(buttonBrush, 105); + sunkenLeftLineGradientBrush = qBrushDark(buttonBrush, 110); + sunkenRightLineGradientBrush = qBrushDark(buttonBrush, 106); + } else { + // Generate gradients + QLinearGradient buttonGradient(rect.topLeft(), rect.bottomLeft()); + if (hover) { + buttonGradient.setColorAt(0.0, mergedColors(option->palette.highlight().color(), + buttonBrush.color().lighter(104), 6)); + buttonGradient.setColorAt(1.0, mergedColors(option->palette.highlight().color(), + buttonBrush.color().darker(110), 6)); + } else { + buttonGradient.setColorAt(0.0, buttonBrush.color().lighter(104)); + buttonGradient.setColorAt(1.0, buttonBrush.color().darker(110)); + } + buttonGradientBrush = QBrush(buttonGradient); + + QLinearGradient buttonGradient2(rect.topLeft(), rect.bottomLeft()); + buttonGradient2.setColorAt(0.0, buttonBrush.color().darker(113)); + buttonGradient2.setColorAt(1.0, buttonBrush.color().darker(103)); + sunkenButtonGradientBrush = QBrush(buttonGradient2); + + QLinearGradient buttonGradient3(rect.topLeft(), rect.bottomLeft()); + buttonGradient3.setColorAt(0.0, buttonBrush.color().lighter(105)); + buttonGradient3.setColorAt(1.0, buttonBrush.color()); + leftLineGradientBrush = QBrush(buttonGradient3); + + QLinearGradient buttonGradient4(rect.topLeft(), rect.bottomLeft()); + buttonGradient4.setColorAt(0.0, buttonBrush.color()); + buttonGradient4.setColorAt(1.0, buttonBrush.color().darker(110)); + rightLineGradientBrush = QBrush(buttonGradient4); + + QLinearGradient buttonGradient5(rect.topLeft(), rect.bottomLeft()); + buttonGradient5.setColorAt(0.0, buttonBrush.color().darker(113)); + buttonGradient5.setColorAt(1.0, buttonBrush.color().darker(107)); + sunkenLeftLineGradientBrush = QBrush(buttonGradient5); + + QLinearGradient buttonGradient6(rect.topLeft(), rect.bottomLeft()); + buttonGradient6.setColorAt(0.0, buttonBrush.color().darker(108)); + buttonGradient6.setColorAt(1.0, buttonBrush.color().darker(103)); + sunkenRightLineGradientBrush = QBrush(buttonGradient6); + } + + // Main fill + p->fillRect(fillRect, + qMapBrushToRect(sunken ? sunkenButtonGradientBrush + : buttonGradientBrush, rect)); + + // Top line + p->setPen(QPen(qBrushLight(qMapBrushToRect(sunken ? sunkenButtonGradientBrush + : buttonGradientBrush, rect), 105), 0)); + p->drawLine(QPointF(rect.left() + 2, rect.top() + 1), + QPointF(rect.right() - 2, rect.top() + 1)); + + // Bottom line + p->setPen(QPen(qBrushDark(qMapBrushToRect(sunken ? sunkenButtonGradientBrush + : buttonGradientBrush, rect), 105), 0)); + p->drawLine(QPointF(rect.left() + 2, rect.bottom() - 1), + QPointF(rect.right() - 2, rect.bottom() - 1)); + + // Left line + p->setPen(QPen(qMapBrushToRect(sunken ? sunkenLeftLineGradientBrush + : leftLineGradientBrush, rect), 1)); + p->drawLine(QPointF(rect.left() + 1, rect.top() + 2), + QPointF(rect.left() + 1, rect.bottom() - 2)); + + // Right line + p->setPen(QPen(qMapBrushToRect(sunken ? sunkenRightLineGradientBrush + : rightLineGradientBrush, rect), 1)); + p->drawLine(QPointF(rect.right() - 1, rect.top() + 2), + QPointF(rect.right() - 1, rect.bottom() - 2)); + + // Hovering + if (hover && !sunken) { + QBrush hover = qMapBrushToRect(option->palette.highlight(), rect); + QBrush hoverOuter = hover; + qBrushSetAlphaF(&hoverOuter, qreal(0.7)); + + QLine lines[2]; + + p->setPen(QPen(hoverOuter, 0)); + lines[0] = QLine(rect.left() + 1, rect.top() + 1, rect.right() - 1, rect.top() + 1); + lines[1] = QLine(rect.left() + 1, rect.bottom() - 1, rect.right() - 1, rect.bottom() - 1); + p->drawLines(lines, 2); + + QBrush hoverInner = hover; + qBrushSetAlphaF(&hoverInner, qreal(0.45)); + p->setPen(QPen(hoverInner, 0)); + lines[0] = QLine(rect.left() + 1, rect.top() + 2, rect.right() - 1, rect.top() + 2); + lines[1] = QLine(rect.left() + 1, rect.bottom() - 2, rect.right() - 1, rect.bottom() - 2); + p->drawLines(lines, 2); + + QBrush hoverSide = hover; + qBrushSetAlphaF(&hoverSide, qreal(0.075)); + p->setPen(QPen(hoverSide, 0)); + lines[0] = QLine(rect.left() + 1, rect.top() + 2, rect.left() + 1, rect.bottom() - 2); + lines[1] = QLine(rect.right() - 1, rect.top() + 2, rect.right() - 1, rect.bottom() - 2); + p->drawLines(lines, 2); + } + + p->setPen(oldPen); + + END_STYLE_PIXMAPCACHE + } + break; + case PE_IndicatorCheckBox: + if (const QStyleOptionButton *button = qstyleoption_cast(option)) { + BEGIN_STYLE_PIXMAPCACHE(QLatin1String("checkbox")) + + p->save(); + + // Outline + QBrush border = option->palette.shadow(); + qBrushSetAlphaF(&border, qreal(0.4)); + p->setPen(QPen(border, 0)); + const QLine lines[4] = { + QLine(rect.left() + 1, rect.top(), rect.right() - 1, rect.top()), + QLine(rect.left() + 1, rect.bottom(), rect.right() - 1, rect.bottom()), + QLine(rect.left(), rect.top() + 1, rect.left(), rect.bottom() - 1), + QLine(rect.right(), rect.top() + 1, rect.right(), rect.bottom() - 1) }; + p->drawLines(lines, 4); + + QBrush corner = option->palette.shadow(); + qBrushSetAlphaF(&corner, qreal(0.2)); + p->setPen(QPen(corner, 0)); + const QPoint points[4] = { + rect.topLeft(), rect.topRight(), + rect.bottomLeft(), rect.bottomRight() }; + p->drawPoints(points, 4); + + // Fill + QBrush baseBrush = qMapBrushToRect(button->palette.base(), rect); + if (!baseBrush.gradient() && baseBrush.texture().isNull()) { + QLinearGradient gradient(rect.center().x(), rect.top(), rect.center().x(), rect.bottom()); + gradient.setColorAt(0, baseBrush.color()); + gradient.setColorAt(1, baseBrush.color().darker(105)); + baseBrush = gradient; + } + p->fillRect(rect.adjusted(1, 1, -1, -1), baseBrush); + + // Hover + if ((button->state & State_Enabled) && (button->state & State_MouseOver)) { + QBrush pen = qMapBrushToRect(button->palette.highlight(), rect); + qBrushSetAlphaF(&pen, qreal(0.8)); + p->setPen(QPen(pen, 0)); + p->drawRect(rect.adjusted(1, 1, -2, -2)); + qBrushSetAlphaF(&pen, 0.5); + p->setPen(QPen(pen, 0)); + p->drawRect(rect.adjusted(2, 2, -3, -3)); + + qBrushSetAlphaF(&pen, qreal(0.2)); + p->setBrush(pen); + p->drawRect(rect.adjusted(2, 2, -3, -3)); + } + + // Indicator + bool on = button->state & State_On; + bool sunken = button->state & State_Sunken; + bool unchanged = button->state & State_NoChange; + bool enabled = button->state & State_Enabled; + if (on || (enabled && sunken) || unchanged) { + p->setRenderHint(QPainter::Antialiasing); + QBrush pointBrush = qMapBrushToRect(button->palette.text(), rect); + if (sunken) + qBrushSetAlphaF(&pointBrush, qreal(0.5)); + else if (unchanged) + qBrushSetAlphaF(&pointBrush, qreal(0.3)); + p->setPen(QPen(pointBrush, 3)); + const QLine lines[2] = { + QLine(rect.left() + 4, rect.top() + 4, rect.right() - 3, rect.bottom() - 3), + QLine(rect.right() - 3, rect.top() + 4, rect.left() + 4, rect.bottom() - 3) }; + p->drawLines(lines, 2); + } + + p->restore(); + END_STYLE_PIXMAPCACHE + } + break; + case PE_IndicatorRadioButton: + if (const QStyleOptionButton *button = qstyleoption_cast(option)) { + BEGIN_STYLE_PIXMAPCACHE(QLatin1String("radiobutton")) + + p->save(); + p->setRenderHint(QPainter::Antialiasing); + + // The the filled ellipse + QBrush border = qMapBrushToRect(option->palette.shadow(), rect); + qBrushSetAlphaF(&border, qreal(0.51)); + p->setPen(QPen(border, 0)); + + QBrush baseBrush = qMapBrushToRect(button->palette.base(), rect); + if (!baseBrush.gradient() && baseBrush.texture().isNull()) { + QLinearGradient gradient(rect.center().x(), rect.top(), rect.center().x(), rect.bottom()); + gradient.setColorAt(0, baseBrush.color()); + gradient.setColorAt(1, baseBrush.color().darker(105)); + baseBrush = gradient; + } + p->setBrush(baseBrush); + p->drawEllipse(QRectF(rect).adjusted(1, 1, -1, -1)); + + // Hover + if ((button->state & State_Enabled) && (button->state & State_MouseOver)) { + QBrush pen = qMapBrushToRect(button->palette.highlight(), rect); + qBrushSetAlphaF(&pen, qreal(0.8)); + p->setPen(QPen(pen, 0)); + qBrushSetAlphaF(&pen, qreal(0.2)); + p->setBrush(pen); + p->drawEllipse(QRectF(rect).adjusted(2, 2, -2, -2)); + } + + // Indicator + bool on = button->state & State_On; + bool sunken = button->state & State_Sunken; + bool enabled = button->state & State_Enabled; + if (on || (enabled && sunken)) { + p->setPen(Qt::NoPen); + QBrush pointBrush = qMapBrushToRect(button->palette.text(), rect); + if (sunken) + qBrushSetAlphaF(&pointBrush, 0.5); + p->setBrush(pointBrush); + p->drawEllipse(QRectF(rect).adjusted(3, 3, -3, -3)); + } + + p->restore(); + END_STYLE_PIXMAPCACHE + } + break; +#ifndef QT_NO_DOCKWIDGET + case PE_IndicatorDockWidgetResizeHandle: + if ((option->state & State_Enabled) && (option->state & State_MouseOver)) + painter->fillRect(option->rect, QColor(255, 255, 255, 128)); + if (option->state & State_Horizontal) { + int width = option->rect.width() / 3; + QRect rect(option->rect.center().x() - width / 2, + option->rect.top() + (option->rect.height() / 2) - 1, width, 3); + qt_plastique_draw_handle(painter, option, rect, Qt::Vertical, widget); + } else { + int height = option->rect.height() / 3; + QRect rect(option->rect.left() + (option->rect.width() / 2 - 1), + option->rect.center().y() - height / 2, 3, height); + qt_plastique_draw_handle(painter, option, rect, Qt::Horizontal, widget); + } + break; +#endif // QT_NO_DOCKWIDGET + case PE_IndicatorViewItemCheck: { + QStyleOptionButton button; + button.QStyleOption::operator=(*option); + button.state &= ~State_MouseOver; + proxy()->drawPrimitive(PE_IndicatorCheckBox, &button, painter, widget); + break; + } + case PE_FrameWindow: { + painter->save(); + bool active = (option->state & State_Active); + int titleBarStop = option->rect.top() + proxy()->pixelMetric(PM_TitleBarHeight, option, widget); + + QPalette palette = option->palette; + if (!active) + palette.setCurrentColorGroup(QPalette::Disabled); + + // Frame and rounded corners + painter->setPen(mergedColors(palette.highlight().color(), Qt::black, 50)); + + QLine lines[3]; + QPoint points[4]; + + // bottom border line + lines[0] = QLine(option->rect.left() + 1, option->rect.bottom(), option->rect.right() - 1, option->rect.bottom()); + + // bottom left and right side border lines + lines[1] = QLine(option->rect.left(), titleBarStop, option->rect.left(), option->rect.bottom() - 1); + lines[2] = QLine(option->rect.right(), titleBarStop, option->rect.right(), option->rect.bottom() - 1); + painter->drawLines(lines, 3); + points[0] = QPoint(option->rect.left() + 1, option->rect.bottom() - 1); + points[1] = QPoint(option->rect.right() - 1, option->rect.bottom() - 1); + painter->drawPoints(points, 2); + + + // alpha corners + painter->setPen(mergedColors(palette.highlight().color(), palette.background().color(), 55)); + points[0] = QPoint(option->rect.left() + 2, option->rect.bottom() - 1); + points[1] = QPoint(option->rect.left() + 1, option->rect.bottom() - 2); + points[2] = QPoint(option->rect.right() - 2, option->rect.bottom() - 1); + points[3] = QPoint(option->rect.right() - 1, option->rect.bottom() - 2); + painter->drawPoints(points, 4); + + + // upper and lower left inner + painter->setPen(active ? mergedColors(palette.highlight().color(), palette.background().color()) : palette.background().color().darker(120)); + painter->drawLine(option->rect.left() + 1, titleBarStop, option->rect.left() + 1, option->rect.bottom() - 2); + + + painter->setPen(active ? mergedColors(palette.highlight().color(), palette.background().color(), 57) : palette.background().color().darker(130)); + lines[0] = QLine(option->rect.right() - 1, titleBarStop, option->rect.right() - 1, option->rect.bottom() - 2); + lines[1] = QLine(option->rect.left() + 1, option->rect.bottom() - 1, option->rect.right() - 1, option->rect.bottom() - 1); + painter->drawLines(lines, 2); + + painter->restore(); + } + break; + case PE_IndicatorBranch: { + int mid_h = option->rect.x() + option->rect.width() / 2; + int mid_v = option->rect.y() + option->rect.height() / 2; + int bef_h = mid_h; + int bef_v = mid_v; + int aft_h = mid_h; + int aft_v = mid_v; + QBrush brush(option->palette.dark().color(), Qt::Dense4Pattern); + if (option->state & State_Item) { + if (option->direction == Qt::RightToLeft) + painter->fillRect(option->rect.left(), mid_v, bef_h - option->rect.left(), 1, brush); + else + painter->fillRect(aft_h, mid_v, option->rect.right() - aft_h + 1, 1, brush); + } + if (option->state & State_Sibling) + painter->fillRect(mid_h, aft_v, 1, option->rect.bottom() - aft_v + 1, brush); + if (option->state & (State_Open | State_Children | State_Item | State_Sibling)) + painter->fillRect(mid_h, option->rect.y(), 1, bef_v - option->rect.y(), brush); + + if (option->state & State_Children) { + painter->save(); + QPoint center = option->rect.center(); + // border + QRect fullRect(center.x() - 4, center.y() - 4, 9, 9); + painter->setPen(borderColor); + + const QLine lines[4] = { + QLine(fullRect.left() + 1, fullRect.top(), + fullRect.right() - 1, fullRect.top()), + QLine(fullRect.left() + 1, fullRect.bottom(), + fullRect.right() - 1, fullRect.bottom()), + QLine(fullRect.left(), fullRect.top() + 1, + fullRect.left(), fullRect.bottom() - 1), + QLine(fullRect.right(), fullRect.top() + 1, + fullRect.right(), fullRect.bottom() - 1) }; + painter->drawLines(lines, 4); + + // "antialiased" corners + painter->setPen(alphaCornerColor); + const QPoint points[4] = { + fullRect.topLeft(), + fullRect.topRight(), + fullRect.bottomLeft(), + fullRect.bottomRight() }; + painter->drawPoints(points, 4); + + // fill + QRect adjustedRect = fullRect; + QRect gradientRect(adjustedRect.left() + 1, adjustedRect.top() + 1, + adjustedRect.right() - adjustedRect.left() - 1, + adjustedRect.bottom() - adjustedRect.top() - 1); + if (option->palette.base().style() == Qt::SolidPattern) { + QColor baseGradientStartColor = option->palette.base().color().darker(101); + QColor baseGradientStopColor = option->palette.base().color().darker(106); + qt_plastique_draw_gradient(painter, gradientRect, baseGradientStartColor, baseGradientStopColor); + } else { + painter->fillRect(gradientRect, option->palette.base()); + } + // draw "+" or "-" + painter->setPen(alphaTextColor); + painter->drawLine(center.x() - 2, center.y(), center.x() + 2, center.y()); + if (!(option->state & State_Open)) + painter->drawLine(center.x(), center.y() - 2, center.x(), center.y() + 2); + painter->restore(); + } + } + break; + default: + QProxyStyle::drawPrimitive(element, option, painter, widget); + break; + } +} + +/*! + \reimp +*/ +void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const +{ + QColor borderColor = option->palette.background().color().darker(178); + QColor alphaCornerColor; + if (widget) { + // ### backgroundrole/foregroundrole should be part of the style option + alphaCornerColor = mergedColors(option->palette.color(widget->backgroundRole()), borderColor); + } else { + alphaCornerColor = mergedColors(option->palette.background().color(), borderColor); + } + + QColor gradientStartColor = option->palette.button().color().lighter(104); + QColor gradientStopColor = option->palette.button().color().darker(105); + + QColor highlightedGradientStartColor = option->palette.button().color().lighter(101); + QColor highlightedGradientStopColor = mergedColors(option->palette.button().color(), option->palette.highlight().color(), 85); + + QColor lightShadowGradientStartColor = highlightedGradientStartColor.lighter(105); + QColor lightShadowGradientStopColor = highlightedGradientStopColor.lighter(105); + + QColor highlightedDarkInnerBorderColor = mergedColors(option->palette.button().color(), option->palette.highlight().color(), 35); + QColor highlightedLightInnerBorderColor = mergedColors(option->palette.button().color(), option->palette.highlight().color(), 58); + + QColor alphaInnerColor = mergedColors(highlightedDarkInnerBorderColor, option->palette.base().color()); + + switch (element) { +#ifndef QT_NO_TABBAR + case CE_TabBarTabShape: + if (const QStyleOptionTab *tab = qstyleoption_cast(option)) { + + if (tab->shape != QTabBar::RoundedNorth && tab->shape != QTabBar::RoundedWest && + tab->shape != QTabBar::RoundedSouth && tab->shape != QTabBar::RoundedEast) { + QProxyStyle::drawControl(element, option, painter, widget); + break; + } + + painter->save(); + + // Set up some convenience variables + bool disabled = !(tab->state & State_Enabled); + bool onlyTab = tab->position == QStyleOptionTab::OnlyOneTab; + bool selected = tab->state & State_Selected; + bool mouseOver = (tab->state & State_MouseOver) && !selected && !disabled; + bool previousSelected = tab->selectedPosition == QStyleOptionTab::PreviousIsSelected; + bool nextSelected = tab->selectedPosition == QStyleOptionTab::NextIsSelected; + bool leftCornerWidget = (tab->cornerWidgets & QStyleOptionTab::LeftCornerWidget); + bool reverse = (tab->direction == Qt::RightToLeft); + + int lowerTop = selected ? 0 : 3; // to make the selected tab bigger than the rest + bool atEnd = (tab->position == QStyleOptionTab::End) || onlyTab; + bool atBeginning = ((tab->position == QStyleOptionTab::Beginning) || onlyTab) + && !leftCornerWidget; + bool reverseShadow = false; + + int borderThickness = proxy()->pixelMetric(PM_TabBarBaseOverlap, tab, widget); + int marginLeft = 0; + if ((atBeginning && !selected) || (selected && leftCornerWidget && ((tab->position == QStyleOptionTab::Beginning) || onlyTab))) { + marginLeft = 1; + } + + // I've set the names based on the natural coordinate system. Vectors are used to rotate everything + // if the orientation of the tab bare is different than north. + { + // Coordinates of corners of rectangle for transformation + QPoint topLeft; + QPoint topRight; + QPoint bottomLeft; + QPoint bottomRight; + + // Fill with normalized vectors in the direction of the coordinate system + // (down and right should be complement of up and left, or it will look odd) + QPoint vectorUp; + QPoint vectorDown; + QPoint vectorLeft; + QPoint vectorRight; + + QBrush border = option->palette.shadow(); + qBrushSetAlphaF(&border, qreal(0.4)); + QBrush innerTopLeft = option->palette.shadow(); + qBrushSetAlphaF(&innerTopLeft, qreal(0.075)); + QBrush innerBottomRight = option->palette.shadow(); + qBrushSetAlphaF(&innerBottomRight, qreal(0.23)); + QBrush corner = option->palette.shadow(); + qBrushSetAlphaF(&corner, qreal(0.25)); + + QBrush baseColor1; + QBrush baseColor2; + + switch (tab->shape) { + case QTabBar::RoundedNorth: + vectorUp = QPoint(0, -1); + vectorDown = QPoint(0, 1); + + if (reverse) { + vectorLeft = QPoint(1, 0); + vectorRight = QPoint(-1, 0); + reverseShadow = true; + } else { + vectorLeft = QPoint(-1, 0); + vectorRight = QPoint(1, 0); + } + + if (reverse) { + topLeft = tab->rect.topRight(); + topRight = tab->rect.topLeft(); + bottomLeft = tab->rect.bottomRight(); + bottomRight = tab->rect.bottomLeft(); + } else { + topLeft = tab->rect.topLeft(); + topRight = tab->rect.topRight(); + bottomLeft = tab->rect.bottomLeft(); + bottomRight = tab->rect.bottomRight(); + } + + + baseColor1 = border; + baseColor2 = innerTopLeft; + break ; + case QTabBar::RoundedWest: + vectorUp = QPoint(-1, 0); + vectorDown = QPoint(1, 0); + vectorLeft = QPoint(0, -1); + vectorRight = QPoint(0, 1); + + topLeft = tab->rect.topLeft(); + topRight = tab->rect.bottomLeft(); + bottomLeft = tab->rect.topRight(); + bottomRight = tab->rect.bottomRight(); + + baseColor1 = border; + baseColor2 = innerTopLeft; + break ; + case QTabBar::RoundedEast: + vectorUp = QPoint(1, 0); + vectorDown = QPoint(-1, 0); + vectorLeft = QPoint(0, -1); + vectorRight = QPoint(0, 1); + + topLeft = tab->rect.topRight(); + topRight = tab->rect.bottomRight(); + bottomLeft = tab->rect.topLeft(); + bottomRight = tab->rect.bottomLeft(); + + baseColor1 = border; + baseColor2 = innerBottomRight; + break ; + case QTabBar::RoundedSouth: + vectorUp = QPoint(0, 1); + vectorDown = QPoint(0, -1); + + if (reverse) { + vectorLeft = QPoint(1, 0); + vectorRight = QPoint(-1, 0); + reverseShadow = true; + + topLeft = tab->rect.bottomRight(); + topRight = tab->rect.bottomLeft(); + bottomLeft = tab->rect.topRight(); + bottomRight = tab->rect.topLeft(); + } else { + vectorLeft = QPoint(-1, 0); + vectorRight = QPoint(1, 0); + + topLeft = tab->rect.bottomLeft(); + topRight = tab->rect.bottomRight(); + bottomLeft = tab->rect.topLeft(); + bottomRight = tab->rect.topRight(); + } + + baseColor1 = border; + baseColor2 = innerBottomRight; + break ; + default: + break; + } + + // Make the tab smaller when it's at the end, so that we are able to draw the corner + if (atEnd) { + topRight += vectorLeft; + bottomRight += vectorLeft; + } + + { + // Outer border + QLine topLine; + { + QPoint adjustTopLineLeft = (vectorRight * (marginLeft + (previousSelected ? 0 : 1))) + + (vectorDown * lowerTop); + QPoint adjustTopLineRight = (vectorDown * lowerTop); + if (atBeginning || selected) + adjustTopLineLeft += vectorRight; + if (atEnd || selected) + adjustTopLineRight += 2 * vectorLeft; + + topLine = QLine(topLeft + adjustTopLineLeft, topRight + adjustTopLineRight); + } + + QLine leftLine; + { + QPoint adjustLeftLineTop = (vectorRight * marginLeft) + (vectorDown * (lowerTop + 1)); + QPoint adjustLeftLineBottom = (vectorRight * marginLeft) + (vectorUp * borderThickness); + if (atBeginning || selected) + adjustLeftLineTop += vectorDown; // Make place for rounded corner + if (atBeginning && selected) + adjustLeftLineBottom += borderThickness * vectorDown; + else if (selected) + adjustLeftLineBottom += vectorUp; + + leftLine = QLine(topLeft + adjustLeftLineTop, bottomLeft + adjustLeftLineBottom); + } + + QLine rightLine; + { + QPoint adjustRightLineTop = vectorDown * (2 + lowerTop); + QPoint adjustRightLineBottom = vectorUp * borderThickness; + if (selected) + adjustRightLineBottom += vectorUp; + + rightLine = QLine(topRight + adjustRightLineTop, bottomRight + adjustRightLineBottom); + } + + // Background + QPoint startPoint = topLine.p1() + vectorDown + vectorLeft; + if (mouseOver) + startPoint += vectorDown; + QPoint endPoint = rightLine.p2(); + + if (tab->state & State_Enabled) { + QRect fillRect = QRect(startPoint, endPoint).normalized(); + if (fillRect.isValid()) { + if (selected) { + fillRect = QRect(startPoint, endPoint + vectorLeft + vectorDown * 3).normalized(); + painter->fillRect(fillRect, option->palette.window()); + + // Connect to the base + painter->setPen(QPen(option->palette.window(), 0)); + QVarLengthArray points; + points.append(rightLine.p2() + vectorDown); + points.append(rightLine.p2() + vectorDown + vectorDown); + points.append(rightLine.p2() + vectorDown + vectorDown + vectorRight); + if (tab->position != QStyleOptionTab::Beginning) { + points.append(leftLine.p2() + vectorDown); + points.append(leftLine.p2() + vectorDown + vectorDown); + points.append(leftLine.p2() + vectorDown + vectorDown + vectorLeft); + } + painter->drawPoints(points.constData(), points.size()); + } else { + QBrush buttonGradientBrush; + QBrush buttonBrush = qMapBrushToRect(option->palette.button(), fillRect); + if (buttonBrush.gradient() || !buttonBrush.texture().isNull()) { + buttonGradientBrush = buttonBrush; + } else { + // Generate gradients + QLinearGradient buttonGradient(fillRect.topLeft(), fillRect.bottomLeft()); + buttonGradient.setColorAt(0.0, buttonBrush.color().lighter(104)); + buttonGradient.setColorAt(1.0, buttonBrush.color().darker(110)); + buttonGradientBrush = QBrush(buttonGradient); + } + + painter->fillRect(fillRect, buttonGradientBrush); + } + } + } + + QPoint rightCornerDot = topRight + vectorLeft + (lowerTop + 1)*vectorDown; + QPoint leftCornerDot = topLeft + (marginLeft + 1)*vectorRight + (lowerTop + 1)*vectorDown; + QPoint bottomRightConnectToBase = rightLine.p2() + vectorRight + vectorDown; + QPoint bottomLeftConnectToBase = leftLine.p2() + vectorLeft + vectorDown; + + painter->setPen(QPen(border, 0)); + + QVarLengthArray lines; + QVarLengthArray points; + + lines.append(topLine); + + if (mouseOver) { + painter->drawLines(lines.constData(), lines.count()); + lines.clear(); + + QLine secondHoverLine = QLine(topLine.p1() + vectorDown * 2 + vectorLeft, topLine.p2() + vectorDown * 2 + vectorRight); + painter->setPen(highlightedLightInnerBorderColor); + painter->drawLine(secondHoverLine); + } + + if (mouseOver) + painter->setPen(QPen(border, 0)); + + if (!previousSelected) + lines.append(leftLine); + if (atEnd || selected) { + lines.append(rightLine); + points.append(rightCornerDot); + } + if (atBeginning || selected) + points.append(leftCornerDot); + if (selected) { + points.append(bottomRightConnectToBase); + points.append(bottomLeftConnectToBase); + } + if (lines.size() > 0) { + painter->drawLines(lines.constData(), lines.size()); + lines.clear(); + } + if (points.size() > 0) { + painter->drawPoints(points.constData(), points.size()); + points.clear(); + } + + // Antialiasing + painter->setPen(QPen(corner, 0)); + if (atBeginning || selected) + points.append(topLine.p1() + vectorLeft); + if (!previousSelected) + points.append(leftLine.p1() + vectorUp); + if (atEnd || selected) { + points.append(topLine.p2() + vectorRight); + points.append(rightLine.p1() + vectorUp); + } + + if (selected) { + points.append(bottomRightConnectToBase + vectorLeft); + if (!atBeginning) { + points.append(bottomLeftConnectToBase + vectorRight); + + if (((tab->position == QStyleOptionTab::Beginning) || onlyTab) && leftCornerWidget) { + // A special case: When the first tab is selected and + // has a left corner widget, it needs to do more work + // to connect to the base + QPoint p1 = bottomLeftConnectToBase + vectorDown; + + points.append(p1); + } + } + } + if (points.size() > 0) { + painter->drawPoints(points.constData(), points.size()); + points.clear(); + } + + // Inner border + QLine innerTopLine = QLine(topLine.p1() + vectorDown, topLine.p2() + vectorDown); + if (!selected) { + QLinearGradient topLineGradient(innerTopLine.p1(),innerTopLine.p2()); + topLineGradient.setColorAt(0, lightShadowGradientStartColor); + topLineGradient.setColorAt(1, lightShadowGradientStopColor); + painter->setPen(QPen(mouseOver ? QBrush(highlightedDarkInnerBorderColor) : QBrush(topLineGradient), 1)); + } else { + painter->setPen(QPen(innerTopLeft, 0)); + } + painter->drawLine(innerTopLine); + + QLine innerLeftLine = QLine(leftLine.p1() + vectorRight + vectorDown, leftLine.p2() + vectorRight); + QLine innerRightLine = QLine(rightLine.p1() + vectorLeft + vectorDown, rightLine.p2() + vectorLeft); + + if (selected) { + innerRightLine = QLine(innerRightLine.p1() + vectorUp, innerRightLine.p2()); + innerLeftLine = QLine(innerLeftLine.p1() + vectorUp, innerLeftLine.p2()); + } + + if (selected || atBeginning) { + QBrush leftLineGradientBrush; + QRect rect = QRect(innerLeftLine.p1(), innerLeftLine.p2()).normalized(); + QBrush buttonBrush = qMapBrushToRect(option->palette.button(), rect); + if (buttonBrush.gradient() || !buttonBrush.texture().isNull()) { + leftLineGradientBrush = qBrushLight(buttonBrush, 105); + } else { + QLinearGradient buttonGradient3(rect.topLeft(), rect.bottomLeft()); + buttonGradient3.setColorAt(0.0, buttonBrush.color().lighter(105)); + buttonGradient3.setColorAt(1.0, buttonBrush.color()); + leftLineGradientBrush = QBrush(buttonGradient3); + } + + if (!selected) + painter->setPen(QPen(leftLineGradientBrush, 0)); + + // Assume the sun is on the same side in Right-To-Left layouts and draw the + // light shadow on the left side always (the right line is on the left side in + // reverse layouts for north and south) + if (reverseShadow) + painter->drawLine(innerRightLine); + else + painter->drawLine(innerLeftLine); + } + + if (atEnd || selected) { + if (!selected) { + QBrush rightLineGradientBrush; + QRect rect = QRect(innerRightLine.p1(), innerRightLine.p2()).normalized(); + QBrush buttonBrush = qMapBrushToRect(option->palette.button(), rect); + if (buttonBrush.gradient() || !buttonBrush.texture().isNull()) { + rightLineGradientBrush = qBrushDark(buttonBrush, 105); + } else { + QLinearGradient buttonGradient4(rect.topLeft(), rect.bottomLeft()); + buttonGradient4.setColorAt(0.0, buttonBrush.color()); + buttonGradient4.setColorAt(1.0, buttonBrush.color().darker(110)); + rightLineGradientBrush = QBrush(buttonGradient4); + } + + painter->setPen(QPen(rightLineGradientBrush, 0)); + } else { + painter->setPen(QPen(innerBottomRight, 0)); + } + + if (reverseShadow) + painter->drawLine(innerLeftLine); + else + painter->drawLine(innerRightLine); + } + + + // Base + QLine baseLine = QLine(bottomLeft + marginLeft * 2 * vectorRight, bottomRight); + { + + QPoint adjustedLeft; + QPoint adjustedRight; + + if (atEnd && !selected) { + baseLine = QLine(baseLine.p1(), baseLine.p2() + vectorRight); + } + + if (nextSelected) { + adjustedRight += vectorLeft; + baseLine = QLine(baseLine.p1(), baseLine.p2() + vectorLeft); + } + if (previousSelected) { + adjustedLeft += vectorRight; + baseLine = QLine(baseLine.p1() + vectorRight, baseLine.p2()); + } + if (atBeginning) + adjustedLeft += vectorRight; + + painter->setPen(QPen(baseColor2, 0)); + if (!selected) + painter->drawLine(baseLine); + + if (atEnd && !selected) + painter->drawPoint(baseLine.p2() + vectorRight); + + if (atBeginning && !selected) + adjustedLeft = vectorRight; + else + adjustedLeft = QPoint(0, 0); + painter->setPen(QPen(baseColor1, 0)); + if (!selected) + painter->drawLine(bottomLeft + vectorUp + adjustedLeft, baseLine.p2() + vectorUp); + + QPoint endPoint = bottomRight + vectorUp; + if (atEnd && !selected) + painter->drawPoint(endPoint); + + // For drawing a lower left "fake" corner on the base when the first tab is unselected + if (atBeginning && !selected) { + painter->drawPoint(baseLine.p1() + vectorLeft); + } + + painter->setPen(QPen(corner, 0)); + if (nextSelected) + painter->drawPoint(endPoint); + else if (selected) + painter->drawPoint(endPoint + vectorRight); + + // For drawing a lower left "fake" corner on the base when the first tab is unselected + if (atBeginning && !selected) { + painter->drawPoint(baseLine.p1() + 2 * vectorLeft); + } + } + } + } + + // Yay we're done + + painter->restore(); + } + break; +#endif // QT_NO_TABBAR +#ifndef QT_NO_PROGRESSBAR + case CE_ProgressBarGroove: + if (const QStyleOptionProgressBar *bar = qstyleoption_cast(option)) { + QRect rect = bar->rect; + QPen oldPen = painter->pen(); + + QLine lines[4]; + + // outline + painter->setPen(borderColor); + lines[0] = QLine(rect.left() + 2, rect.top(), rect.right() - 2, rect.top()); + lines[1] = QLine(rect.left() + 2, rect.bottom(), rect.right() - 2, rect.bottom()); + lines[2] = QLine(rect.left(), rect.top() + 2, rect.left(), rect.bottom() - 2); + lines[3] = QLine(rect.right(), rect.top() + 2, rect.right(), rect.bottom() - 2); + painter->drawLines(lines, 4); + + QPoint points[8]; + points[0] = QPoint(rect.left() + 1, rect.top() + 1); + points[1] = QPoint(rect.right() - 1, rect.top() + 1); + points[2] = QPoint(rect.left() + 1, rect.bottom() - 1); + points[3] = QPoint(rect.right() - 1, rect.bottom() - 1); + painter->drawPoints(points, 4); + + // alpha corners + painter->setPen(alphaCornerColor); + points[0] = QPoint(rect.left(), rect.top() + 1); + points[1] = QPoint(rect.left() + 1, rect.top()); + points[2] = QPoint(rect.right(), rect.top() + 1); + points[3] = QPoint(rect.right() - 1, rect.top()); + points[4] = QPoint(rect.left(), rect.bottom() - 1); + points[5] = QPoint(rect.left() + 1, rect.bottom()); + points[6] = QPoint(rect.right(), rect.bottom() - 1); + points[7] = QPoint(rect.right() - 1, rect.bottom()); + painter->drawPoints(points, 8); + + // inner outline, north-west + painter->setPen(gradientStartColor.darker(105)); + lines[0] = QLine(rect.left() + 2, rect.top() + 1, rect.right() - 2, rect.top() + 1); + lines[1] = QLine(rect.left() + 1, rect.top() + 2, rect.left() + 1, rect.bottom() - 2); + painter->drawLines(lines, 2); + + // base of the groove + painter->setPen(QPen()); + painter->fillRect(rect.adjusted(2, 2, -2, -1), QBrush(bar->palette.base().color())); + painter->setPen(bar->palette.base().color()); + painter->drawLine(rect.right() - 1, rect.top() + 2, rect.right() - 1, rect.bottom() - 2); + + painter->setPen(oldPen); + } + break; + case CE_ProgressBarLabel: + if (const QStyleOptionProgressBar *bar = qstyleoption_cast(option)) { + // The busy indicator doesn't draw a label + if (bar->minimum == 0 && bar->maximum == 0) + return; + + painter->save(); + + QRect rect = bar->rect; + QRect leftRect; + + QFont font; + font.setBold(true); + painter->setFont(font); + painter->setPen(bar->palette.text().color()); + + bool vertical = (bar->orientation == Qt::Vertical); + bool inverted = bar->invertedAppearance; + bool bottomToTop = bar->bottomToTop; + + if (vertical) { + rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height + QTransform m; + if (bottomToTop) { + m.translate(0.0, rect.width()); + m.rotate(-90); + } else { + m.translate(rect.height(), 0.0); + m.rotate(90); + } + painter->setTransform(m, true); + } + + int progressIndicatorPos = (bar->progress - qreal(bar->minimum)) / qMax(qreal(1.0), qreal(bar->maximum) - bar->minimum) * rect.width(); + + bool flip = (!vertical && (((bar->direction == Qt::RightToLeft) && !inverted) + || ((bar->direction == Qt::LeftToRight) && inverted))) || (vertical && ((!inverted && !bottomToTop) || (inverted && bottomToTop))); + if (flip) { + int indicatorPos = rect.width() - progressIndicatorPos; + if (indicatorPos >= 0 && indicatorPos <= rect.width()) { + painter->setPen(bar->palette.base().color()); + leftRect = QRect(rect.left(), rect.top(), indicatorPos, rect.height()); + } else if (indicatorPos > rect.width()) { + painter->setPen(bar->palette.text().color()); + } else { + painter->setPen(bar->palette.base().color()); + } + } else { + if (progressIndicatorPos >= 0 && progressIndicatorPos <= rect.width()) { + leftRect = QRect(rect.left(), rect.top(), progressIndicatorPos, rect.height()); + } else if (progressIndicatorPos > rect.width()) { + painter->setPen(bar->palette.base().color()); + } else { + painter->setPen(bar->palette.text().color()); + } + } + + QRegion rightRect = rect; + rightRect = rightRect.subtracted(leftRect); + painter->setClipRegion(rightRect); + painter->drawText(rect, bar->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); + if (!leftRect.isNull()) { + painter->setPen(flip ? bar->palette.text().color() : bar->palette.base().color()); + painter->setClipRect(leftRect); + painter->drawText(rect, bar->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); + } + + painter->restore(); + } + break; + case CE_ProgressBarContents: + if (const QStyleOptionProgressBar *bar = qstyleoption_cast(option)) { + QRect rect = bar->rect; + bool vertical = (bar->orientation == Qt::Vertical); + bool inverted = bar->invertedAppearance; + bool indeterminate = (bar->minimum == 0 && bar->maximum == 0); + if (!indeterminate && bar->progress == -1) + break; + + painter->save(); + + // If the orientation is vertical, we use a transform to rotate + // the progress bar 90 degrees clockwise. This way we can use the + // same rendering code for both orientations. + if (vertical) { + rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height + QTransform m = QTransform::fromTranslate(rect.height()-1, 0); + m.rotate(90.0); + painter->setTransform(m, true); + } + + int maxWidth = rect.width() - 4; + int minWidth = 4; + qint64 progress = qMax(bar->progress, bar->minimum); // workaround for bug in QProgressBar + double vc6_workaround = ((progress - qint64(bar->minimum)) / qMax(double(1.0), double(qint64(bar->maximum) - qint64(bar->minimum))) * maxWidth); + int width = indeterminate ? maxWidth : qMax(int(vc6_workaround), minWidth); + bool reverse = (!vertical && (bar->direction == Qt::RightToLeft)) || vertical; + if (inverted) + reverse = !reverse; + + QRect progressBar; + if (!indeterminate) { + if (!reverse) { + progressBar.setRect(rect.left() + 2, rect.top() + 2, width, rect.height() - 4); + } else { + progressBar.setRect(rect.right() - 1 - width, rect.top() + 2, width, rect.height() - 4); + } + } else { + int slideWidth = ((rect.width() - 4) * 2) / 3; + int step = ((animateStep * slideWidth) / ProgressBarFps) % slideWidth; + if ((((animateStep * slideWidth) / ProgressBarFps) % (2 * slideWidth)) >= slideWidth) + step = slideWidth - step; + progressBar.setRect(rect.left() + 2 + step, rect.top() + 2, + slideWidth / 2, rect.height() - 4); + } + + // outline + painter->setPen(highlightedDarkInnerBorderColor); + + QVarLengthArray lines; + QVarLengthArray points; + if (!reverse) { + if (width == minWidth) { + points.append(QPoint(progressBar.left() + 1, progressBar.top())); + points.append(QPoint(progressBar.left() + 1, progressBar.bottom())); + } else { + if (indeterminate) { + lines.append(QLine(progressBar.left() + 2, progressBar.top(), + progressBar.right() - 2, progressBar.top())); + lines.append(QLine(progressBar.left() + 2, progressBar.bottom(), + progressBar.right() - 2, progressBar.bottom())); + } else { + lines.append(QLine(progressBar.left() + 1, progressBar.top(), + progressBar.right() - 2, progressBar.top())); + lines.append(QLine(progressBar.left() + 1, progressBar.bottom(), + progressBar.right() - 2, progressBar.bottom())); + } + } + + if (indeterminate) { + lines.append(QLine(progressBar.left(), progressBar.top() + 2, + progressBar.left(), progressBar.bottom() - 2)); + } else { + lines.append(QLine(progressBar.left(), progressBar.top() + 1, + progressBar.left(), progressBar.bottom() - 1)); + } + lines.append(QLine(progressBar.right(), progressBar.top() + 2, + progressBar.right(), progressBar.bottom() - 2)); + } else { + if (width == minWidth) { + points.append(QPoint(progressBar.right() - 1, progressBar.top())); + points.append(QPoint(progressBar.right() - 1, progressBar.bottom())); + } else { + if (indeterminate) { + lines.append(QLine(progressBar.right() - 2, progressBar.top(), + progressBar.left() + 2, progressBar.top())); + lines.append(QLine(progressBar.right() - 2, progressBar.bottom(), + progressBar.left() + 2, progressBar.bottom())); + } else { + lines.append(QLine(progressBar.right() - 1, progressBar.top(), + progressBar.left() + 2, progressBar.top())); + lines.append(QLine(progressBar.right() - 1, progressBar.bottom(), + progressBar.left() + 2, progressBar.bottom())); + } + } + if (indeterminate) { + lines.append(QLine(progressBar.right(), progressBar.top() + 2, + progressBar.right(), progressBar.bottom() - 2)); + } else { + lines.append(QLine(progressBar.right(), progressBar.top() + 1, + progressBar.right(), progressBar.bottom() - 1)); + } + lines.append(QLine(progressBar.left(), progressBar.top() + 2, + progressBar.left(), progressBar.bottom() - 2)); + } + + if (points.size() > 0) { + painter->drawPoints(points.constData(), points.size()); + points.clear(); + } + painter->drawLines(lines.constData(), lines.size()); + lines.clear(); + + // alpha corners + painter->setPen(alphaInnerColor); + if (!reverse) { + if (indeterminate) { + points.append(QPoint(progressBar.left() + 1, progressBar.top())); + points.append(QPoint(progressBar.left(), progressBar.top() + 1)); + points.append(QPoint(progressBar.left() + 1, progressBar.bottom())); + points.append(QPoint(progressBar.left(), progressBar.bottom() - 1)); + } else { + points.append(QPoint(progressBar.left(), progressBar.top())); + points.append(QPoint(progressBar.left(), progressBar.bottom())); + } + points.append(QPoint(progressBar.right() - 1, progressBar.top())); + points.append(QPoint(progressBar.right(), progressBar.top() + 1)); + points.append(QPoint(progressBar.right() - 1, progressBar.bottom())); + points.append(QPoint(progressBar.right(), progressBar.bottom() - 1)); + } else { + if (indeterminate) { + points.append(QPoint(progressBar.right() - 1, progressBar.top())); + points.append(QPoint(progressBar.right(), progressBar.top() + 1)); + points.append(QPoint(progressBar.right() - 1, progressBar.bottom())); + points.append(QPoint(progressBar.right(), progressBar.bottom() - 1)); + } else { + points.append(QPoint(progressBar.right(), progressBar.top())); + points.append(QPoint(progressBar.right(), progressBar.bottom())); + } + points.append(QPoint(progressBar.left() + 1, progressBar.top())); + points.append(QPoint(progressBar.left(), progressBar.top() + 1)); + points.append(QPoint(progressBar.left() + 1, progressBar.bottom())); + points.append(QPoint(progressBar.left(), progressBar.bottom() - 1)); + } + + painter->drawPoints(points.constData(), points.size()); + points.clear(); + + // contents + painter->setPen(QPen()); + + QString progressBarName = QStyleHelper::uniqueName(QLatin1String("progressBarContents"), + option, rect.size()); + QPixmap cache; + if (!QPixmapCache::find(progressBarName, cache) && rect.height() > 7) { + QSize size = rect.size(); + cache = QPixmap(QSize(size.width() - 6 + 30, size.height() - 6)); + cache.fill(Qt::white); + QPainter cachePainter(&cache); + QRect pixmapRect(0, 0, cache.width(), cache.height()); + + int leftEdge = 0; + bool flip = false; + while (leftEdge < cache.width() + 1) { + QColor rectColor = option->palette.highlight().color(); + QColor lineColor = option->palette.highlight().color(); + if (flip) { + flip = false; + rectColor = rectColor.lighter(105); + lineColor = lineColor.lighter(105); + } else { + flip = true; + } + + cachePainter.setPen(lineColor); + const QLine cacheLines[2] = { + QLine(pixmapRect.left() + leftEdge - 1, pixmapRect.top(), + pixmapRect.left() + leftEdge + 9, pixmapRect.top()), + QLine(pixmapRect.left() + leftEdge - 1, pixmapRect.bottom(), + pixmapRect.left() + leftEdge + 9, pixmapRect.bottom()) }; + cachePainter.drawLines(cacheLines, 2); + cachePainter.fillRect(QRect(pixmapRect.left() + leftEdge, pixmapRect.top(), + 10, pixmapRect.height()), rectColor); + + leftEdge += 10; + } + + QPixmapCache::insert(progressBarName, cache); + } + painter->setClipRect(progressBar.adjusted(1, 0, -1, -1)); + + if (!vertical) + progressBar.adjust(0, 1, 0, 1); + if (!indeterminate) { + int step = (AnimateProgressBar || (indeterminate && AnimateBusyProgressBar)) ? (animateStep % 20) : 0; + if (reverse) + painter->drawPixmap(progressBar.left() - 25 + step, progressBar.top(), cache); + else + painter->drawPixmap(progressBar.left() - 25 - step + width % 20, progressBar.top(), cache); + } else { + painter->drawPixmap(progressBar.left(), progressBar.top(), cache); + } + + painter->restore(); + } + break; +#endif // QT_NO_PROGRESSBAR + case CE_HeaderSection: + // Draws the header in tables. + if (const QStyleOptionHeader *header = qstyleoption_cast(option)) { + QPixmap cache; + QString pixmapName = QStyleHelper::uniqueName(QLatin1String("headersection"), option, option->rect.size()); + pixmapName += QString::number(- int(header->position)); + pixmapName += QString::number(- int(header->orientation)); + + if (!QPixmapCache::find(pixmapName, cache)) { + cache = QPixmap(option->rect.size()); + cache.fill(Qt::white); + QRect pixmapRect(0, 0, option->rect.width(), option->rect.height()); + QPainter cachePainter(&cache); + + bool sunken = (header->state & State_Enabled) && (header->state & State_Sunken); + + QColor headerGradientStart = sunken ? option->palette.background().color().darker(114) : gradientStartColor; + QColor headerGradientStop = sunken ? option->palette.background().color().darker(106) : gradientStopColor; + + QColor lightLine = sunken ? option->palette.background().color().darker(118) : gradientStartColor; + QColor darkLine = sunken ? option->palette.background().color().darker(110) : gradientStopColor.darker(105); + + qt_plastique_draw_gradient(&cachePainter, pixmapRect, + headerGradientStart, headerGradientStop); + + cachePainter.setPen(borderColor); + cachePainter.drawRect(pixmapRect.adjusted(0, 0, -1, -1)); + cachePainter.setPen(alphaCornerColor); + + const QPoint points[4] = { + pixmapRect.topLeft(), pixmapRect.topRight(), + pixmapRect.bottomLeft(), pixmapRect.bottomRight() }; + cachePainter.drawPoints(points, 4); + + QLine lines[2]; + + // inner lines + cachePainter.setPen(lightLine); + lines[0] = QLine(pixmapRect.left() + 2, pixmapRect.top() + 1, + pixmapRect.right() - 2, pixmapRect.top() + 1); + lines[1] = QLine(pixmapRect.left() + 1, pixmapRect.top() + 2, + pixmapRect.left() + 1, pixmapRect.bottom() - 2); + cachePainter.drawLines(lines, 2); + + cachePainter.setPen(darkLine); + lines[0] = QLine(pixmapRect.left() + 2, pixmapRect.bottom() - 1, + pixmapRect.right() - 2, pixmapRect.bottom() - 1); + lines[1] = QLine(pixmapRect.right() - 1, pixmapRect.bottom() - 2, + pixmapRect.right() - 1, pixmapRect.top() + 2); + cachePainter.drawLines(lines, 2); + + cachePainter.end(); + QPixmapCache::insert(pixmapName, cache); + } + painter->drawPixmap(option->rect.topLeft(), cache); + + } + break; +#ifndef QT_NO_MENU + case CE_MenuItem: + // Draws one item in a popup menu. + if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast(option)) { + painter->save(); + QBrush textBrush; + if (option->palette.resolve() & (1 << QPalette::ButtonText)) + textBrush = option->palette.buttonText(); + else + textBrush = option->palette.windowText(); // KDE uses windowText rather than buttonText for menus + + if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { + painter->fillRect(menuItem->rect, option->palette.background().color().lighter(103)); + + int w = 0; + if (!menuItem->text.isEmpty()) { + painter->setFont(menuItem->font); + proxy()->drawItemText(painter, menuItem->rect.adjusted(5, 0, -5, 0), Qt::AlignLeft | Qt::AlignVCenter, + menuItem->palette, menuItem->state & State_Enabled, menuItem->text, + QPalette::Text); + w = menuItem->fontMetrics.width(menuItem->text) + 5; + } + + painter->setPen(alphaCornerColor); + bool reverse = menuItem->direction == Qt::RightToLeft; + painter->drawLine(menuItem->rect.left() + 5 + (reverse ? 0 : w), menuItem->rect.center().y(), + menuItem->rect.right() - 5 - (reverse ? w : 0), menuItem->rect.center().y()); + + painter->restore(); + break; + } + + bool selected = menuItem->state & State_Selected; + bool checkable = menuItem->checkType != QStyleOptionMenuItem::NotCheckable; + bool checked = menuItem->checked; + + if (selected) { + qt_plastique_draw_gradient(painter, menuItem->rect, + option->palette.highlight().color().lighter(105), + option->palette.highlight().color().darker(110)); + + painter->setPen(option->palette.highlight().color().lighter(110)); + painter->drawLine(option->rect.topLeft(), option->rect.topRight()); + painter->setPen(option->palette.highlight().color().darker(115)); + painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight()); + } else { + painter->fillRect(option->rect, option->palette.background().color().lighter(103)); + } + + // Check + QRect checkRect(option->rect.left() + 7, option->rect.center().y() - 6, 13, 13); + checkRect = visualRect(menuItem->direction, menuItem->rect, checkRect); + if (checkable) { + if ((menuItem->checkType & QStyleOptionMenuItem::Exclusive) && menuItem->icon.isNull()) { + QStyleOptionButton button; + button.rect = checkRect; + button.state = menuItem->state; + if (checked) + button.state |= State_On; + button.palette = menuItem->palette; + proxy()->drawPrimitive(PE_IndicatorRadioButton, &button, painter, widget); + } else { + if (menuItem->icon.isNull()) { + QStyleOptionButton button; + button.rect = checkRect; + button.state = menuItem->state; + if (checked) + button.state |= State_On; + button.palette = menuItem->palette; + proxy()->drawPrimitive(PE_IndicatorCheckBox, &button, painter, widget); + } else if (checked) { + int iconSize = qMax(menuItem->maxIconWidth, 20); + QRect sunkenRect(option->rect.left() + 1, + option->rect.top() + (option->rect.height() - iconSize) / 2 + 1, + iconSize, iconSize); + sunkenRect = visualRect(menuItem->direction, menuItem->rect, sunkenRect); + + QStyleOption opt = *option; + opt.state |= State_Sunken; + opt.rect = sunkenRect; + qt_plastique_drawShadedPanel(painter, &opt, false, widget); + } + } + } + + // Text and icon, ripped from windows style + bool dis = !(menuItem->state & State_Enabled); + bool act = menuItem->state & State_Selected; + const QStyleOption *opt = option; + const QStyleOptionMenuItem *menuitem = menuItem; + int checkcol = qMax(menuitem->maxIconWidth, 20); + QPainter *p = painter; + QRect vCheckRect = visualRect(opt->direction, menuitem->rect, + QRect(menuitem->rect.x(), menuitem->rect.y(), + checkcol, menuitem->rect.height())); + if (!menuItem->icon.isNull()) { + QIcon::Mode mode = dis ? QIcon::Disabled : QIcon::Normal; + if (act && !dis) + mode = QIcon::Active; + QPixmap pixmap; + if (checked) + pixmap = menuItem->icon.pixmap(pixelMetric(PM_SmallIconSize, option, widget), mode, QIcon::On); + else + pixmap = menuItem->icon.pixmap(pixelMetric(PM_SmallIconSize, option, widget), mode); + int pixw = pixmap.width(); + int pixh = pixmap.height(); + + QRect pmr(0, 0, pixw, pixh); + pmr.moveCenter(vCheckRect.center()); + painter->setPen(textBrush.color()); + if (checkable && checked) + painter->drawPixmap(QPoint(pmr.left() + 1, pmr.top() + 1), pixmap); + else + painter->drawPixmap(pmr.topLeft(), pixmap); + } + + if (selected) { + painter->setPen(menuItem->palette.highlightedText().color()); + } else { + painter->setPen(textBrush.color()); + } + int x, y, w, h; + menuitem->rect.getRect(&x, &y, &w, &h); + int tab = menuitem->tabWidth; + QColor discol; + if (dis) { + discol = textBrush.color(); + p->setPen(discol); + } + int xm = windowsItemFrame + checkcol + windowsItemHMargin; + int xpos = menuitem->rect.x() + xm; + QRect textRect(xpos, y + windowsItemVMargin, w - xm - windowsRightBorder - tab + 1, h - 2 * windowsItemVMargin); + QRect vTextRect = visualRect(opt->direction, menuitem->rect, textRect); + QString s = menuitem->text; + if (!s.isEmpty()) { // draw text + p->save(); + int t = s.indexOf(QLatin1Char('\t')); + int text_flags = Qt::AlignVCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine; + if (!styleHint(SH_UnderlineShortcut, menuitem, widget)) + text_flags |= Qt::TextHideMnemonic; + text_flags |= Qt::AlignLeft; + if (t >= 0) { + QRect vShortcutRect = visualRect(opt->direction, menuitem->rect, + QRect(textRect.topRight(), QPoint(menuitem->rect.right(), textRect.bottom()))); + if (dis && !act && styleHint(SH_EtchDisabledText, option, widget)) { + p->setPen(menuitem->palette.light().color()); + p->drawText(vShortcutRect.adjusted(1,1,1,1), text_flags, s.mid(t + 1)); + p->setPen(discol); + } + p->drawText(vShortcutRect, text_flags, s.mid(t + 1)); + s = s.left(t); + } + QFont font = menuitem->font; + if (menuitem->menuItemType == QStyleOptionMenuItem::DefaultItem) + font.setBold(true); + p->setFont(font); + if (dis && !act && styleHint(SH_EtchDisabledText, option, widget)) { + p->setPen(menuitem->palette.light().color()); + p->drawText(vTextRect.adjusted(1,1,1,1), text_flags, s.left(t)); + p->setPen(discol); + } + p->drawText(vTextRect, text_flags, s.left(t)); + p->restore(); + } + + // Arrow + if (menuItem->menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow + int dim = (menuItem->rect.height() - 4) / 2; + PrimitiveElement arrow; + arrow = (opt->direction == Qt::RightToLeft) ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight; + int xpos = menuItem->rect.left() + menuItem->rect.width() - 6 - 2 - dim; + QRect vSubMenuRect = visualRect(option->direction, menuItem->rect, + QRect(xpos, menuItem->rect.top() + menuItem->rect.height() / 2 - dim / 2, dim, dim)); + QStyleOptionMenuItem newMI = *menuItem; + newMI.rect = vSubMenuRect; + newMI.state = option->state & State_Enabled; + if (selected) + newMI.palette.setColor(QPalette::ButtonText, + newMI.palette.highlightedText().color()); + else + newMI.palette.setColor(QPalette::ButtonText, textBrush.color()); + proxy()->drawPrimitive(arrow, &newMI, painter, widget); + } + + painter->restore(); + } + break; +#endif // QT_NO_MENU +#ifndef QT_NO_MENUBAR + case CE_MenuBarItem: + // Draws a menu bar item; File, Edit, Help etc.. + if ((option->state & State_Selected)) { + QPixmap cache; + QString pixmapName = QStyleHelper::uniqueName(QLatin1String("menubaritem"), option, option->rect.size()); + if (!QPixmapCache::find(pixmapName, cache)) { + cache = QPixmap(option->rect.size()); + cache.fill(Qt::white); + QRect pixmapRect(0, 0, option->rect.width(), option->rect.height()); + QPainter cachePainter(&cache); + + QRect rect = pixmapRect; + + // gradient fill + if ((option->state & QStyle::State_Sunken) || (option->state & QStyle::State_On)) { + qt_plastique_draw_gradient(&cachePainter, rect.adjusted(1, 1, -1, -1), + option->palette.button().color().darker(114), + option->palette.button().color().darker(106)); + } else { + qt_plastique_draw_gradient(&cachePainter, rect.adjusted(1, 1, -1, -1), + option->palette.background().color().lighter(105), + option->palette.background().color().darker(102)); + } + + // outer border and corners + cachePainter.setPen(borderColor); + cachePainter.drawRect(rect.adjusted(0, 0, -1, -1)); + cachePainter.setPen(alphaCornerColor); + + const QPoint points[4] = { + rect.topLeft(), + rect.topRight(), + rect.bottomLeft(), + rect.bottomRight() }; + cachePainter.drawPoints(points, 4); + + // inner border + if ((option->state & QStyle::State_Sunken) || (option->state & QStyle::State_On)) + cachePainter.setPen(option->palette.button().color().darker(118)); + else + cachePainter.setPen(gradientStartColor); + + QLine lines[2]; + lines[0] = QLine(rect.left() + 1, rect.top() + 1, rect.right() - 1, rect.top() + 1); + lines[1] = QLine(rect.left() + 1, rect.top() + 2, rect.left() + 1, rect.bottom() - 2); + cachePainter.drawLines(lines, 2); + + if ((option->state & QStyle::State_Sunken) || (option->state & QStyle::State_On)) + cachePainter.setPen(option->palette.button().color().darker(114)); + else + cachePainter.setPen(gradientStopColor.darker(102)); + lines[0] = QLine(rect.left() + 1, rect.bottom() - 1, rect.right() - 1, rect.bottom() - 1); + lines[1] = QLine(rect.right() - 1, rect.top() + 1, rect.right() - 1, rect.bottom() - 2); + cachePainter.drawLines(lines, 2); + cachePainter.end(); + QPixmapCache::insert(pixmapName, cache); + } + painter->drawPixmap(option->rect.topLeft(), cache); + } else { + painter->fillRect(option->rect, option->palette.background()); + } + + if (const QStyleOptionMenuItem *mbi = qstyleoption_cast(option)) { + QStyleOptionMenuItem newMI = *mbi; + if (!(option->palette.resolve() & (1 << QPalette::ButtonText))) //KDE uses windowText rather than buttonText for menus + newMI.palette.setColor(QPalette::ButtonText, newMI.palette.windowText().color()); + QCommonStyle::drawControl(element, &newMI, painter, widget); + } + break; + +#ifndef QT_NO_MAINWINDOW + case CE_MenuBarEmptyArea: + if (widget && qobject_cast(widget->parentWidget())) { + painter->fillRect(option->rect, option->palette.window()); + QPen oldPen = painter->pen(); + painter->setPen(QPen(option->palette.dark().color())); + painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight()); + painter->setPen(oldPen); + } + break; +#endif // QT_NO_MAINWINDOW + +#endif // QT_NO_MENUBAR + +#ifndef QT_NO_TOOLBOX + case CE_ToolBoxTabShape: + if (const QStyleOptionToolBox *toolBox = qstyleoption_cast(option)) { + painter->save(); + + int width = toolBox->rect.width(); + int diag = toolBox->rect.height() - 2; + + // The essential points + QPoint rightMost; + QPoint rightEdge; + QPoint leftEdge; + QPoint leftMost; + QPoint leftOne; + QPoint rightOne; + QPoint upOne(0, -1); + QPoint downOne(0, 1); + + if (toolBox->direction != Qt::RightToLeft) { + rightMost = QPoint(toolBox->rect.right(), toolBox->rect.bottom() - 2); + rightEdge = QPoint(toolBox->rect.right() - width / 10, toolBox->rect.bottom() - 2); + leftEdge = QPoint(toolBox->rect.right() - width / 10 - diag, toolBox->rect.top()); + leftMost = QPoint(toolBox->rect.left(), toolBox->rect.top()); + leftOne = QPoint(-1, 0); + rightOne = QPoint(1, 0); + } else { + rightMost = QPoint(toolBox->rect.left(), toolBox->rect.bottom() - 2); + rightEdge = QPoint(toolBox->rect.left() + width / 10, toolBox->rect.bottom() - 2); + leftEdge = QPoint(toolBox->rect.left() + width / 10 + diag, toolBox->rect.top()); + leftMost = QPoint(toolBox->rect.right(), toolBox->rect.top()); + leftOne = QPoint(1, 0); + rightOne = QPoint(-1, 0); + } + + QLine lines[3]; + + // Draw the outline + painter->setPen(borderColor); + lines[0] = QLine(rightMost, rightEdge); + lines[1] = QLine(rightEdge + leftOne, leftEdge); + lines[2] = QLine(leftEdge + leftOne, leftMost); + painter->drawLines(lines, 3); + painter->setPen(toolBox->palette.base().color()); + lines[0] = QLine(rightMost + downOne, rightEdge + downOne); + lines[1] = QLine(rightEdge + leftOne + downOne, leftEdge + downOne); + lines[2] = QLine(leftEdge + leftOne + downOne, leftMost + downOne); + painter->drawLines(lines, 3); + + painter->restore(); + } + break; +#endif // QT_NO_TOOLBOX +#ifndef QT_NO_SPLITTER + case CE_Splitter: + if ((option->state & State_Enabled) && (option->state & State_MouseOver)) + painter->fillRect(option->rect, QColor(255, 255, 255, 128)); + if (option->state & State_Horizontal) { + int height = option->rect.height() / 3; + QRect rect(option->rect.left() + (option->rect.width() / 2 - 1), + option->rect.center().y() - height / 2, 3, height); + qt_plastique_draw_handle(painter, option, rect, Qt::Horizontal, widget); + } else { + int width = option->rect.width() / 3; + QRect rect(option->rect.center().x() - width / 2, + option->rect.top() + (option->rect.height() / 2) - 1, width, 3); + qt_plastique_draw_handle(painter, option, rect, Qt::Vertical, widget); + } + break; +#endif // QT_NO_SPLITTER +#ifndef QT_NO_DOCKWIDGET + case CE_DockWidgetTitle: + if (const QStyleOptionDockWidget *dockWidget = qstyleoption_cast(option)) { + painter->save(); + + bool verticalTitleBar = dockWidget->verticalTitleBar; + + // Find text width and title rect + int textWidth = option->fontMetrics.width(dockWidget->title); + int margin = 4; + QRect titleRect = subElementRect(SE_DockWidgetTitleBarText, option, widget); + QRect rect = dockWidget->rect; + + if (verticalTitleBar) { + QRect r = rect; + QSize s = r.size(); + s.transpose(); + r.setSize(s); + + titleRect = QRect(r.left() + rect.bottom() + - titleRect.bottom(), + r.top() + titleRect.left() - rect.left(), + titleRect.height(), titleRect.width()); + + painter->translate(r.left(), r.top() + r.width()); + painter->rotate(-90); + painter->translate(-r.left(), -r.top()); + + rect = r; + } + + // Chop and insert ellide into title if text is too wide + QString title = elliditide(dockWidget->title, dockWidget->fontMetrics, titleRect, &textWidth); + + // Draw the toolbar handle pattern to the left and right of the text + QImage handle(qt_toolbarhandle); + alphaCornerColor.setAlpha(170); + handle.setColor(1, alphaCornerColor.rgba()); + handle.setColor(2, mergedColors(alphaCornerColor, option->palette.light().color()).rgba()); + handle.setColor(3, option->palette.light().color().rgba()); + + if (title.isEmpty()) { + // Joint handle if there's no title + QRect r; + r.setRect(titleRect.left(), titleRect.top(), titleRect.width(), titleRect.bottom()); + int nchunks = (r.width() / handle.width()) - 1; + int indent = (r.width() - (nchunks * handle.width())) / 2; + for (int i = 0; i < nchunks; ++i) { + painter->drawImage(QPoint(r.left() + indent + i * handle.width(), + r.center().y() - handle.height() / 2), + handle); + } + } else { + // Handle pattern to the left of the title + QRect leftSide(titleRect.left(), titleRect.top(), + titleRect.width() / 2 - textWidth / 2 - margin, titleRect.bottom()); + int nchunks = leftSide.width() / handle.width(); + int indent = (leftSide.width() - (nchunks * handle.width())) / 2; + for (int i = 0; i < nchunks; ++i) { + painter->drawImage(QPoint(leftSide.left() + indent + + i * handle.width(), + leftSide.center().y() + - handle.height() / 2), + handle); + } + + // Handle pattern to the right of the title + QRect rightSide = titleRect.adjusted(titleRect.width() / 2 + textWidth / 2 + margin, 0, 0, 0); + nchunks = rightSide.width() / handle.width(); + indent = (rightSide.width() - (nchunks * handle.width())) / 2; + for (int j = 0; j < nchunks; ++j) { + painter->drawImage(QPoint(rightSide.left() + indent + j * handle.width(), + rightSide.center().y() - handle.height() / 2), + handle); + } + } + + // Draw the text centered + QFont font = painter->font(); + font.setPointSize(QFontInfo(font).pointSize() - 1); + painter->setFont(font); + painter->setPen(dockWidget->palette.windowText().color()); + painter->drawText(titleRect, + int(Qt::AlignHCenter | Qt::AlignVCenter | Qt::TextShowMnemonic), + title); + + painter->restore(); + } + + break; +#endif // QT_NO_DOCKWIDGET +#ifndef QT_NO_TOOLBAR + case CE_ToolBar: + if (const QStyleOptionToolBar *toolBar = qstyleoption_cast(option)) { + // Draws the light line above and the dark line below menu bars and + // tool bars. + QPen oldPen = painter->pen(); + if (toolBar->toolBarArea == Qt::TopToolBarArea) { + if (toolBar->positionOfLine == QStyleOptionToolBar::End + || toolBar->positionOfLine == QStyleOptionToolBar::OnlyOne) { + // The end and onlyone top toolbar lines draw a double + // line at the bottom to blend with the central + // widget. + painter->setPen(option->palette.background().color().lighter(104)); + painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight()); + painter->setPen(alphaCornerColor); + painter->drawLine(option->rect.left(), option->rect.bottom() - 1, + option->rect.right(), option->rect.bottom() - 1); + } else { + // All others draw a single dark line at the bottom. + painter->setPen(alphaCornerColor); + painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight()); + } + // All top toolbar lines draw a light line at the top. + painter->setPen(option->palette.background().color().lighter(104)); + painter->drawLine(option->rect.topLeft(), option->rect.topRight()); + } else if (toolBar->toolBarArea == Qt::BottomToolBarArea) { + if (toolBar->positionOfLine == QStyleOptionToolBar::End + || toolBar->positionOfLine == QStyleOptionToolBar::Middle) { + // The end and middle bottom tool bar lines draw a dark + // line at the bottom. + painter->setPen(alphaCornerColor); + painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight()); + } + if (toolBar->positionOfLine == QStyleOptionToolBar::Beginning + || toolBar->positionOfLine == QStyleOptionToolBar::OnlyOne) { + // The beginning and only one tool bar lines draw a + // double line at the bottom to blend with the + // status bar. + // ### The styleoption could contain whether the + // main window has a menu bar and a status bar, and + // possibly dock widgets. + painter->setPen(alphaCornerColor); + painter->drawLine(option->rect.left(), option->rect.bottom() - 1, + option->rect.right(), option->rect.bottom() - 1); + painter->setPen(option->palette.background().color().lighter(104)); + painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight()); + } + if (toolBar->positionOfLine == QStyleOptionToolBar::End) { + painter->setPen(alphaCornerColor); + painter->drawLine(option->rect.topLeft(), option->rect.topRight()); + painter->setPen(option->palette.background().color().lighter(104)); + painter->drawLine(option->rect.left(), option->rect.top() + 1, + option->rect.right(), option->rect.top() + 1); + + } else { + // All other bottom toolbars draw a light line at the top. + painter->setPen(option->palette.background().color().lighter(104)); + painter->drawLine(option->rect.topLeft(), option->rect.topRight()); + } + } + if (toolBar->toolBarArea == Qt::LeftToolBarArea) { + if (toolBar->positionOfLine == QStyleOptionToolBar::Middle + || toolBar->positionOfLine == QStyleOptionToolBar::End) { + // The middle and left end toolbar lines draw a light + // line to the left. + painter->setPen(option->palette.background().color().lighter(104)); + painter->drawLine(option->rect.topLeft(), option->rect.bottomLeft()); + } + if (toolBar->positionOfLine == QStyleOptionToolBar::End) { + // All other left toolbar lines draw a dark line to the right + painter->setPen(alphaCornerColor); + painter->drawLine(option->rect.right() - 1, option->rect.top(), + option->rect.right() - 1, option->rect.bottom()); + painter->setPen(option->palette.background().color().lighter(104)); + painter->drawLine(option->rect.topRight(), option->rect.bottomRight()); + } else { + // All other left toolbar lines draw a dark line to the right + painter->setPen(alphaCornerColor); + painter->drawLine(option->rect.topRight(), option->rect.bottomRight()); + } + } else if (toolBar->toolBarArea == Qt::RightToolBarArea) { + if (toolBar->positionOfLine == QStyleOptionToolBar::Middle + || toolBar->positionOfLine == QStyleOptionToolBar::End) { + // Right middle and end toolbar lines draw the dark right line + painter->setPen(alphaCornerColor); + painter->drawLine(option->rect.topRight(), option->rect.bottomRight()); + } + if (toolBar->positionOfLine == QStyleOptionToolBar::End + || toolBar->positionOfLine == QStyleOptionToolBar::OnlyOne) { + // The right end and single toolbar draws the dark + // line on its left edge + painter->setPen(alphaCornerColor); + painter->drawLine(option->rect.topLeft(), option->rect.bottomLeft()); + // And a light line next to it + painter->setPen(option->palette.background().color().lighter(104)); + painter->drawLine(option->rect.left() + 1, option->rect.top(), + option->rect.left() + 1, option->rect.bottom()); + } else { + // Other right toolbars draw a light line on its left edge + painter->setPen(option->palette.background().color().lighter(104)); + painter->drawLine(option->rect.topLeft(), option->rect.bottomLeft()); + } + } + painter->setPen(oldPen); + } + break; +#endif // QT_NO_TOOLBAR +#ifndef QT_NO_SCROLLBAR + case CE_ScrollBarAddLine: + if (const QStyleOptionSlider *scrollBar = qstyleoption_cast(option)) { + + bool horizontal = scrollBar->orientation == Qt::Horizontal; + bool reverse = scrollBar->direction == Qt::RightToLeft; + bool sunken = scrollBar->state & State_Sunken; + + QString addLinePixmapName = QStyleHelper::uniqueName(QLatin1String("scrollbar_addline"), option, option->rect.size()); + QPixmap cache; + if (!QPixmapCache::find(addLinePixmapName, cache)) { + cache = QPixmap(option->rect.size()); + cache.fill(Qt::white); + QRect pixmapRect(0, 0, cache.width(), cache.height()); + QPainter addLinePainter(&cache); + addLinePainter.fillRect(pixmapRect, option->palette.background()); + + if (option->state & State_Enabled) { + // Gradient + QLinearGradient gradient(pixmapRect.center().x(), pixmapRect.top() + 2, + pixmapRect.center().x(), pixmapRect.bottom() - 2); + if ((scrollBar->activeSubControls & SC_ScrollBarAddLine) && sunken) { + gradient.setColorAt(0, gradientStopColor); + gradient.setColorAt(1, gradientStopColor); + } else { + gradient.setColorAt(0, gradientStartColor.lighter(105)); + gradient.setColorAt(1, gradientStopColor); + } + addLinePainter.fillRect(pixmapRect.left() + 2, pixmapRect.top() + 2, + pixmapRect.right() - 3, pixmapRect.bottom() - 3, + gradient); + } + + // Details + QImage addButton; + if (horizontal) { + addButton = QImage(reverse ? qt_scrollbar_button_left : qt_scrollbar_button_right); + } else { + addButton = QImage(qt_scrollbar_button_down); + } + addButton.setColor(1, alphaCornerColor.rgba()); + addButton.setColor(2, borderColor.rgba()); + if ((scrollBar->activeSubControls & SC_ScrollBarAddLine) && sunken) { + addButton.setColor(3, gradientStopColor.rgba()); + addButton.setColor(4, gradientStopColor.rgba()); + } else { + addButton.setColor(3, gradientStartColor.lighter(105).rgba()); + addButton.setColor(4, gradientStopColor.rgba()); + } + addButton.setColor(5, scrollBar->palette.text().color().rgba()); + addLinePainter.drawImage(pixmapRect, addButton); + + // Arrow + if (horizontal) { + QImage arrow(reverse ? qt_scrollbar_button_arrow_left : qt_scrollbar_button_arrow_right); + arrow.setColor(1, scrollBar->palette.foreground().color().rgba()); + + if ((scrollBar->activeSubControls & SC_ScrollBarAddLine) && sunken) + addLinePainter.translate(1, 1); + addLinePainter.drawImage(QPoint(pixmapRect.center().x() - 2, pixmapRect.center().y() - 3), arrow); + } else { + QImage arrow(qt_scrollbar_button_arrow_down); + arrow.setColor(1, scrollBar->palette.foreground().color().rgba()); + + if ((scrollBar->activeSubControls & SC_ScrollBarAddLine) && sunken) + addLinePainter.translate(1, 1); + addLinePainter.drawImage(QPoint(pixmapRect.center().x() - 3, pixmapRect.center().y() - 2), arrow); + } + addLinePainter.end(); + QPixmapCache::insert(addLinePixmapName, cache); + } + painter->drawPixmap(option->rect.topLeft(), cache); + } + break; + case CE_ScrollBarSubPage: + case CE_ScrollBarAddPage: + if (const QStyleOptionSlider *scrollBar = qstyleoption_cast(option)) { + bool sunken = scrollBar->state & State_Sunken; + bool horizontal = scrollBar->orientation == Qt::Horizontal; + + QString groovePixmapName = QStyleHelper::uniqueName(QLatin1String("scrollbar_groove"), option, option->rect.size()); + if (sunken) + groovePixmapName += QLatin1String("-sunken"); + if (element == CE_ScrollBarAddPage) + groovePixmapName += QLatin1String("-addpage"); + + QPixmap cache; + if (!QPixmapCache::find(groovePixmapName, cache)) { + cache = QPixmap(option->rect.size()); + cache.fill(option->palette.background().color()); + QPainter groovePainter(&cache); + QRect pixmapRect = QRect(0, 0, option->rect.width(), option->rect.height()); + QColor color = scrollBar->palette.base().color().darker(sunken ? 125 : 100); + groovePainter.setBrushOrigin((element == CE_ScrollBarAddPage) ? pixmapRect.width() : 0, + (element == CE_ScrollBarAddPage) ? pixmapRect.height() : 0); + groovePainter.fillRect(pixmapRect, QBrush(color, Qt::Dense4Pattern)); + + QColor edgeColor = scrollBar->palette.base().color().darker(125); + if (horizontal) { + groovePainter.setBrushOrigin((element == CE_ScrollBarAddPage) ? pixmapRect.width() : 1, 0); + groovePainter.fillRect(QRect(pixmapRect.topLeft(), QSize(pixmapRect.width(), 1)), + QBrush(edgeColor, Qt::Dense4Pattern)); + groovePainter.fillRect(QRect(pixmapRect.bottomLeft(), QSize(pixmapRect.width(), 1)), + QBrush(edgeColor, Qt::Dense4Pattern)); + } else { + groovePainter.setBrushOrigin(0, (element == CE_ScrollBarAddPage) ? pixmapRect.height() : 1); + groovePainter.fillRect(QRect(pixmapRect.topLeft(), QSize(1, pixmapRect.height())), + QBrush(edgeColor, Qt::Dense4Pattern)); + groovePainter.fillRect(QRect(pixmapRect.topRight(), QSize(1, pixmapRect.height())), + QBrush(edgeColor, Qt::Dense4Pattern)); + } + + groovePainter.end(); + QPixmapCache::insert(groovePixmapName, cache); + } + painter->drawPixmap(option->rect.topLeft(), cache); + } + break; + case CE_ScrollBarSubLine: + if (const QStyleOptionSlider *scrollBar = qstyleoption_cast(option)) { + QRect scrollBarSubLine = scrollBar->rect; + + bool horizontal = scrollBar->orientation == Qt::Horizontal; + bool isEnabled = scrollBar->state & State_Enabled; + bool reverse = scrollBar->direction == Qt::RightToLeft; + bool sunken = scrollBar->state & State_Sunken; + + // The SubLine (up/left) buttons + QRect button1; + QRect button2; + int scrollBarExtent = proxy()->pixelMetric(PM_ScrollBarExtent, option, widget); + if (horizontal) { + button1.setRect(scrollBarSubLine.left(), scrollBarSubLine.top(), scrollBarExtent, scrollBarSubLine.height()); + button2.setRect(scrollBarSubLine.right() - (scrollBarExtent - 1), scrollBarSubLine.top(), scrollBarExtent, scrollBarSubLine.height()); + } else { + button1.setRect(scrollBarSubLine.left(), scrollBarSubLine.top(), scrollBarSubLine.width(), scrollBarExtent); + button2.setRect(scrollBarSubLine.left(), scrollBarSubLine.bottom() - (scrollBarExtent - 1), scrollBarSubLine.width(), scrollBarExtent); + } + + QString subLinePixmapName = QStyleHelper::uniqueName(QLatin1String("scrollbar_subline"), option, button1.size()); + QPixmap cache; + if (!QPixmapCache::find(subLinePixmapName, cache)) { + cache = QPixmap(button1.size()); + cache.fill(Qt::white); + QRect pixmapRect(0, 0, cache.width(), cache.height()); + QPainter subLinePainter(&cache); + subLinePainter.fillRect(pixmapRect, option->palette.background()); + + if (isEnabled) { + // Gradients + if ((scrollBar->activeSubControls & SC_ScrollBarSubLine) && sunken) { + qt_plastique_draw_gradient(&subLinePainter, + QRect(pixmapRect.left() + 2, pixmapRect.top() + 2, + pixmapRect.right() - 3, pixmapRect.bottom() - 3), + gradientStopColor, + gradientStopColor); + } else { + qt_plastique_draw_gradient(&subLinePainter, + QRect(pixmapRect.left() + 2, pixmapRect.top() + 2, + pixmapRect.right() - 3, pixmapRect.bottom() - 3), + gradientStartColor.lighter(105), + gradientStopColor); + } + } + + // Details + QImage subButton; + if (horizontal) { + subButton = QImage(reverse ? qt_scrollbar_button_right : qt_scrollbar_button_left); + } else { + subButton = QImage(qt_scrollbar_button_up); + } + subButton.setColor(1, alphaCornerColor.rgba()); + subButton.setColor(2, borderColor.rgba()); + if ((scrollBar->activeSubControls & SC_ScrollBarSubLine) && sunken) { + subButton.setColor(3, gradientStopColor.rgba()); + subButton.setColor(4, gradientStopColor.rgba()); + } else { + subButton.setColor(3, gradientStartColor.lighter(105).rgba()); + subButton.setColor(4, gradientStopColor.rgba()); + } + subButton.setColor(5, scrollBar->palette.text().color().rgba()); + subLinePainter.drawImage(pixmapRect, subButton); + + // Arrows + if (horizontal) { + QImage arrow(reverse ? qt_scrollbar_button_arrow_right : qt_scrollbar_button_arrow_left); + arrow.setColor(1, scrollBar->palette.foreground().color().rgba()); + + if ((scrollBar->activeSubControls & SC_ScrollBarSubLine) && sunken) + subLinePainter.translate(1, 1); + subLinePainter.drawImage(QPoint(pixmapRect.center().x() - 2, pixmapRect.center().y() - 3), arrow); + } else { + QImage arrow(qt_scrollbar_button_arrow_up); + arrow.setColor(1, scrollBar->palette.foreground().color().rgba()); + + if ((scrollBar->activeSubControls & SC_ScrollBarSubLine) && sunken) + subLinePainter.translate(1, 1); + subLinePainter.drawImage(QPoint(pixmapRect.center().x() - 3, pixmapRect.center().y() - 2), arrow); + } + subLinePainter.end(); + QPixmapCache::insert(subLinePixmapName, cache); + } + painter->drawPixmap(button1.topLeft(), cache); + painter->drawPixmap(button2.topLeft(), cache); + } + break; + case CE_ScrollBarSlider: + if (const QStyleOptionSlider *scrollBar = qstyleoption_cast(option)) { + bool horizontal = scrollBar->orientation == Qt::Horizontal; + bool isEnabled = scrollBar->state & State_Enabled; + + // The slider + if (option->rect.isValid()) { + QString sliderPixmapName = QStyleHelper::uniqueName(QLatin1String("scrollbar_slider"), option, option->rect.size()); + if (horizontal) + sliderPixmapName += QLatin1String("-horizontal"); + + QPixmap cache; + if (!QPixmapCache::find(sliderPixmapName, cache)) { + cache = QPixmap(option->rect.size()); + cache.fill(Qt::white); + QRect pixmapRect(0, 0, cache.width(), cache.height()); + QPainter sliderPainter(&cache); + bool sunken = (scrollBar->state & State_Sunken); + + if (isEnabled) { + QLinearGradient gradient(pixmapRect.left(), pixmapRect.center().y(), + pixmapRect.right(), pixmapRect.center().y()); + if (horizontal) + gradient = QLinearGradient(pixmapRect.center().x(), pixmapRect.top(), + pixmapRect.center().x(), pixmapRect.bottom()); + + if (sunken) { + gradient.setColorAt(0, gradientStartColor.lighter(110)); + gradient.setColorAt(1, gradientStopColor.lighter(105)); + } else { + gradient.setColorAt(0, gradientStartColor.lighter(105)); + gradient.setColorAt(1, gradientStopColor); + } + sliderPainter.fillRect(pixmapRect.adjusted(2, 2, -2, -2), gradient); + } else { + sliderPainter.fillRect(pixmapRect.adjusted(2, 2, -2, -2), option->palette.background()); + } + + sliderPainter.setPen(borderColor); + sliderPainter.drawRect(pixmapRect.adjusted(0, 0, -1, -1)); + sliderPainter.setPen(alphaCornerColor); + QPoint points[4] = { + QPoint(pixmapRect.left(), pixmapRect.top()), + QPoint(pixmapRect.left(), pixmapRect.bottom()), + QPoint(pixmapRect.right(), pixmapRect.top()), + QPoint(pixmapRect.right(), pixmapRect.bottom()) }; + sliderPainter.drawPoints(points, 4); + + QLine lines[2]; + sliderPainter.setPen(sunken ? gradientStartColor.lighter(110) : gradientStartColor.lighter(105)); + lines[0] = QLine(pixmapRect.left() + 1, pixmapRect.top() + 1, + pixmapRect.right() - 1, pixmapRect.top() + 1); + lines[1] = QLine(pixmapRect.left() + 1, pixmapRect.top() + 2, + pixmapRect.left() + 1, pixmapRect.bottom() - 2); + sliderPainter.drawLines(lines, 2); + + sliderPainter.setPen(sunken ? gradientStopColor.lighter(105) : gradientStopColor); + lines[0] = QLine(pixmapRect.left() + 1, pixmapRect.bottom() - 1, + pixmapRect.right() - 1, pixmapRect.bottom() - 1); + lines[1] = QLine(pixmapRect.right() - 1, pixmapRect.top() + 2, + pixmapRect.right() - 1, pixmapRect.bottom() - 1); + sliderPainter.drawLines(lines, 2); + + int sliderMinLength = proxy()->pixelMetric(PM_ScrollBarSliderMin, scrollBar, widget); + if ((horizontal && scrollBar->rect.width() > sliderMinLength) + || (!horizontal && scrollBar->rect.height() > sliderMinLength)) { + QImage pattern(horizontal ? qt_scrollbar_slider_pattern_horizontal + : qt_scrollbar_slider_pattern_vertical); + pattern.setColor(1, alphaCornerColor.rgba()); + pattern.setColor(2, (sunken ? gradientStartColor.lighter(110) : gradientStartColor.lighter(105)).rgba()); + + if (horizontal) { + sliderPainter.drawImage(pixmapRect.center().x() - pattern.width() / 2 + 1, + pixmapRect.center().y() - 4, + pattern); + } else { + sliderPainter.drawImage(pixmapRect.center().x() - 4, + pixmapRect.center().y() - pattern.height() / 2 + 1, + pattern); + } + } + sliderPainter.end(); + // insert the slider into the cache + QPixmapCache::insert(sliderPixmapName, cache); + } + painter->drawPixmap(option->rect.topLeft(), cache); + } + } + break; +#endif +#ifndef QT_NO_COMBOBOX + case CE_ComboBoxLabel: + if (const QStyleOptionComboBox *comboBox = qstyleoption_cast(option)) { + painter->save(); + if (!comboBox->editable) { + // Plastique's non-editable combo box is drawn as a button, so + // we need the label to be drawn using ButtonText where it + // would usually use Text. + painter->setPen(QPen(comboBox->palette.buttonText(), 0)); + QCommonStyle::drawControl(element, option, painter, widget); + } else if (!comboBox->currentIcon.isNull()) { + { + QRect editRect = proxy()->subControlRect(CC_ComboBox, comboBox, SC_ComboBoxEditField, widget); + if (comboBox->direction == Qt::RightToLeft) + editRect.adjust(0, 2, -2, -2); + else + editRect.adjust(2, 2, 0, -2); + painter->save(); + painter->setClipRect(editRect); + if (!comboBox->currentIcon.isNull()) { + QIcon::Mode mode = comboBox->state & State_Enabled ? QIcon::Normal + : QIcon::Disabled; + QPixmap pixmap = comboBox->currentIcon.pixmap(comboBox->iconSize, mode); + QRect iconRect(editRect); + iconRect.setWidth(comboBox->iconSize.width() + 5); + iconRect = alignedRect(comboBox->direction, + Qt::AlignLeft | Qt::AlignVCenter, + iconRect.size(), editRect); + painter->fillRect(iconRect, option->palette.brush(QPalette::Base)); + proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); + } + painter->restore(); + } + } else { + QProxyStyle::drawControl(element, option, painter, widget); + } + + painter->restore(); + } + break; +#endif + default: + QCommonStyle::drawControl(element, option, painter, widget); + break; + } +} + +/*! + \reimp +*/ +void QPlastiqueStyle::drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, + QPainter *painter, const QWidget *widget) const +{ + QColor borderColor = option->palette.background().color().darker(178); + QColor alphaCornerColor; + if (widget) { + // ### backgroundrole/foregroundrole should be part of the style option + alphaCornerColor = mergedColors(option->palette.color(widget->backgroundRole()), borderColor); + } else { + alphaCornerColor = mergedColors(option->palette.background().color(), borderColor); + } + QColor gradientStartColor = option->palette.button().color().lighter(104); + QColor gradientStopColor = option->palette.button().color().darker(105); + + switch (control) { +#ifndef QT_NO_SLIDER + case CC_Slider: + if (const QStyleOptionSlider *slider = qstyleoption_cast(option)) { + QRect grooveRegion = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget); + QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget); + bool horizontal = slider->orientation == Qt::Horizontal; + bool ticksAbove = slider->tickPosition & QSlider::TicksAbove; + bool ticksBelow = slider->tickPosition & QSlider::TicksBelow; + + QRect groove; + //The clickable region is 5 px wider than the visible groove for improved usability + if (grooveRegion.isValid()) + groove = horizontal ? grooveRegion.adjusted(0, 5, 0, -5) : grooveRegion.adjusted(5, 0, -5, 0); + + + QPixmap cache; + + if ((option->subControls & SC_SliderGroove) && groove.isValid()) { + BEGIN_STYLE_PIXMAPCACHE(QString::fromLatin1("slider_groove-%0-%1").arg(ticksAbove).arg(ticksBelow)) + p->fillRect(groove, option->palette.background()); + + rect = groove; + rect.moveTo(groove.left() - option->rect.left(), groove.top() - option->rect.top()); + + // draw groove + if (horizontal) { + p->setPen(borderColor); + const QLine lines[4] = { + QLine(rect.left() + 1, rect.top(), + rect.right() - 1, rect.top()), + QLine(rect.left() + 1, rect.bottom(), + rect.right() - 1, rect.bottom()), + QLine(rect.left(), rect.top() + 1, + rect.left(), rect.bottom() - 1), + QLine(rect.right(), rect.top() + 1, + rect.right(), rect.bottom() - 1) }; + p->drawLines(lines, 4); + + p->setPen(alphaCornerColor); + const QPoint points[4] = { + QPoint(rect.left(), rect.top()), + QPoint(rect.left(), rect.bottom()), + QPoint(rect.right(), rect.top()), + QPoint(rect.right(), rect.bottom()) }; + p->drawPoints(points, 4); + } else { + p->setPen(borderColor); + const QLine lines[4] = { + QLine(rect.left() + 1, rect.top(), + rect.right() - 1, rect.top()), + QLine(rect.left() + 1, rect.bottom(), + rect.right() - 1, rect.bottom()), + QLine(rect.left(), rect.top() + 1, + rect.left(), rect.bottom() - 1), + QLine(rect.right(), rect.top() + 1, + rect.right(), rect.bottom() - 1) }; + p->drawLines(lines, 4); + + p->setPen(alphaCornerColor); + const QPoint points[4] = { + QPoint(rect.left(), rect.top()), + QPoint(rect.right(), rect.top()), + QPoint(rect.left(), rect.bottom()), + QPoint(rect.right(), rect.bottom()) }; + p->drawPoints(points, 4); + } + END_STYLE_PIXMAPCACHE + } + + if ((option->subControls & SC_SliderHandle) && handle.isValid()) { + QString handlePixmapName = QStyleHelper::uniqueName(QLatin1String("slider_handle"), option, handle.size()); + if (ticksAbove && !ticksBelow) + handlePixmapName += QLatin1String("-flipped"); + if ((option->activeSubControls & SC_SliderHandle) && (option->state & State_Sunken)) + handlePixmapName += QLatin1String("-sunken"); + + if (!QPixmapCache::find(handlePixmapName, cache)) { + cache = QPixmap(handle.size()); + cache.fill(Qt::transparent); + QRect pixmapRect(0, 0, handle.width(), handle.height()); + QPainter handlePainter(&cache); + + // draw handle + if (horizontal) { + QPainterPath path; + if (ticksAbove && !ticksBelow) { + path.moveTo(QPoint(pixmapRect.right(), pixmapRect.bottom())); + path.lineTo(QPoint(pixmapRect.right(), pixmapRect.bottom() - 10)); + path.lineTo(QPoint(pixmapRect.right() - 5, pixmapRect.bottom() - 14)); + path.lineTo(QPoint(pixmapRect.left() + 1, pixmapRect.bottom() - 10)); + path.lineTo(QPoint(pixmapRect.left() + 1, pixmapRect.bottom())); + path.lineTo(QPoint(pixmapRect.right(), pixmapRect.bottom())); + } else { + path.moveTo(QPoint(pixmapRect.right(), pixmapRect.top() + 1)); + path.lineTo(QPoint(pixmapRect.right(), pixmapRect.top() + 10)); + path.lineTo(QPoint(pixmapRect.right() - 5, pixmapRect.top() + 14)); + path.lineTo(QPoint(pixmapRect.left() + 1, pixmapRect.top() + 10)); + path.lineTo(QPoint(pixmapRect.left() + 1, pixmapRect.top() + 1)); + path.lineTo(QPoint(pixmapRect.right(), pixmapRect.top() + 1)); + } + if (slider->state & State_Enabled) { + QLinearGradient gradient(pixmapRect.center().x(), pixmapRect.top(), + pixmapRect.center().x(), pixmapRect.bottom()); + if ((option->activeSubControls & SC_SliderHandle) && (option->state & State_Sunken)) { + gradient.setColorAt(0, gradientStartColor.lighter(110)); + gradient.setColorAt(1, gradientStopColor.lighter(110)); + } else { + gradient.setColorAt(0, gradientStartColor); + gradient.setColorAt(1, gradientStopColor); + } + handlePainter.fillPath(path, gradient); + } else { + handlePainter.fillPath(path, slider->palette.background()); + } + } else { + QPainterPath path; + if (ticksAbove && !ticksBelow) { + path.moveTo(QPoint(pixmapRect.right(), pixmapRect.top() + 1)); + path.lineTo(QPoint(pixmapRect.right() - 10, pixmapRect.top() + 1)); + path.lineTo(QPoint(pixmapRect.right() - 14, pixmapRect.top() + 5)); + path.lineTo(QPoint(pixmapRect.right() - 10, pixmapRect.bottom())); + path.lineTo(QPoint(pixmapRect.right(), pixmapRect.bottom())); + path.lineTo(QPoint(pixmapRect.right(), pixmapRect.top() + 1)); + } else { + path.moveTo(QPoint(pixmapRect.left() + 1, pixmapRect.top() + 1)); + path.lineTo(QPoint(pixmapRect.left() + 10, pixmapRect.top() + 1)); + path.lineTo(QPoint(pixmapRect.left() + 14, pixmapRect.top() + 5)); + path.lineTo(QPoint(pixmapRect.left() + 10, pixmapRect.bottom())); + path.lineTo(QPoint(pixmapRect.left() + 1, pixmapRect.bottom())); + path.lineTo(QPoint(pixmapRect.left() + 1, pixmapRect.top() + 1)); + } + if (slider->state & State_Enabled) { + QLinearGradient gradient(pixmapRect.center().x(), pixmapRect.top(), + pixmapRect.center().x(), pixmapRect.bottom()); + gradient.setColorAt(0, gradientStartColor); + gradient.setColorAt(1, gradientStopColor); + handlePainter.fillPath(path, gradient); + } else { + handlePainter.fillPath(path, slider->palette.background()); + } + } + + QImage image; + if (horizontal) { + image = QImage((ticksAbove && !ticksBelow) ? qt_plastique_slider_horizontalhandle_up : qt_plastique_slider_horizontalhandle); + } else { + image = QImage((ticksAbove && !ticksBelow) ? qt_plastique_slider_verticalhandle_left : qt_plastique_slider_verticalhandle); + } + + image.setColor(1, borderColor.rgba()); + image.setColor(2, gradientStartColor.rgba()); + image.setColor(3, alphaCornerColor.rgba()); + if (option->state & State_Enabled) { + image.setColor(4, 0x80ffffff); + image.setColor(5, 0x25000000); + } + handlePainter.drawImage(pixmapRect, image); + handlePainter.end(); + QPixmapCache::insert(handlePixmapName, cache); + } + + painter->drawPixmap(handle.topLeft(), cache); + + if (slider->state & State_HasFocus) { + QStyleOptionFocusRect fropt; + fropt.QStyleOption::operator=(*slider); + fropt.rect = subElementRect(SE_SliderFocusRect, slider, widget); + proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); + } + } + + if (option->subControls & SC_SliderTickmarks) { + QPen oldPen = painter->pen(); + painter->setPen(borderColor); + int tickSize = proxy()->pixelMetric(PM_SliderTickmarkOffset, option, widget); + int available = proxy()->pixelMetric(PM_SliderSpaceAvailable, slider, widget); + int interval = slider->tickInterval; + if (interval <= 0) { + interval = slider->singleStep; + if (QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, interval, + available) + - QStyle::sliderPositionFromValue(slider->minimum, slider->maximum, + 0, available) < 3) + interval = slider->pageStep; + } + if (interval <= 0) + interval = 1; + + int v = slider->minimum; + int len = proxy()->pixelMetric(PM_SliderLength, slider, widget); + QVarLengthArray lines; + while (v <= slider->maximum + 1) { + if (v == slider->maximum + 1 && interval == 1) + break; + const int v_ = qMin(v, slider->maximum); + int pos = sliderPositionFromValue(slider->minimum, slider->maximum, + v_, (horizontal + ? slider->rect.width() + : slider->rect.height()) - len, + slider->upsideDown) + len / 2; + + int extra = 2 - ((v_ == slider->minimum || v_ == slider->maximum) ? 1 : 0); + + if (horizontal) { + if (ticksAbove) { + lines.append(QLine(pos, slider->rect.top() + extra, + pos, slider->rect.top() + tickSize)); + } + if (ticksBelow) { + lines.append(QLine(pos, slider->rect.bottom() - extra, + pos, slider->rect.bottom() - tickSize)); + } + } else { + if (ticksAbove) { + lines.append(QLine(slider->rect.left() + extra, pos, + slider->rect.left() + tickSize, pos)); + } + if (ticksBelow) { + lines.append(QLine(slider->rect.right() - extra, pos, + slider->rect.right() - tickSize, pos)); + } + } + + // in the case where maximum is max int + int nextInterval = v + interval; + if (nextInterval < v) + break; + v = nextInterval; + } + painter->drawLines(lines.constData(), lines.size()); + painter->setPen(oldPen); + } + } + break; +#endif // QT_NO_SLIDER +#ifndef QT_NO_SPINBOX + case CC_SpinBox: + if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast(option)) { + painter->save(); + bool upSunken = (spinBox->activeSubControls & SC_SpinBoxUp) && (spinBox->state & (State_Sunken | State_On)); + bool downSunken = (spinBox->activeSubControls & SC_SpinBoxDown) && (spinBox->state & (State_Sunken | State_On)); + bool reverse = (spinBox->direction == Qt::RightToLeft); + + // Rects + QRect upRect = proxy()->subControlRect(CC_SpinBox, option, SC_SpinBoxUp, widget); + QRect downRect = proxy()->subControlRect(CC_SpinBox, option, SC_SpinBoxDown, widget); + QRect buttonRect = upRect | downRect; + + // Brushes + QBrush corner = qMapBrushToRect(option->palette.shadow(), buttonRect); + qBrushSetAlphaF(&corner, qreal(0.25)); + QBrush border = qMapBrushToRect(option->palette.shadow(), buttonRect); + qBrushSetAlphaF(&border, qreal(0.4)); + + QVarLengthArray points; + + if (spinBox->buttonSymbols == QAbstractSpinBox::NoButtons) { + QRect filledRect = option->rect.adjusted(1, 1, -1, -1); + QBrush baseBrush = qMapBrushToRect(option->palette.base(), filledRect); + painter->setBrushOrigin(filledRect.topLeft()); + painter->fillRect(filledRect.adjusted(1, 1, -1, -1), baseBrush); + qt_plastique_draw_frame(painter, option->rect, option, QFrame::Sunken); + } else { + qt_draw_partial_frame(painter, + option, + proxy()->subControlRect(CC_SpinBox, spinBox, SC_SpinBoxEditField, widget), + widget, + this); + } + // Paint buttons + if (spinBox->buttonSymbols == QAbstractSpinBox::NoButtons) { + painter->restore(); + break; + } + // Button outlines + painter->setPen(QPen(border, 0)); + if (!reverse) + painter->drawLine(buttonRect.topLeft() + QPoint(0, 1), buttonRect.bottomLeft() + QPoint(0, -1)); + else + painter->drawLine(buttonRect.topRight() + QPoint(0, -1), buttonRect.bottomRight() + QPoint(0, 1)); + + if (!reverse) { + const QLine lines[4] = { + QLine(upRect.left(), upRect.top(), upRect.right() - 2, upRect.top()), + QLine(upRect.left() + 1, upRect.bottom(), upRect.right() - 1, upRect.bottom()), + QLine(downRect.left(), downRect.bottom(), downRect.right() - 2, downRect.bottom()), + QLine(buttonRect.right(), buttonRect.top() + 2, buttonRect.right(), buttonRect.bottom() - 2) }; + painter->drawLines(lines, 4); + + points.append(QPoint(upRect.right() - 1, upRect.top() + 1)); + points.append(QPoint(downRect.right() - 1, downRect.bottom() - 1)); + painter->drawPoints(points.constData(), points.size()); + points.clear(); + painter->setPen(QPen(corner, 0)); + points.append(QPoint(upRect.right() - 1, upRect.top())); + points.append(QPoint(upRect.right(), upRect.top() + 1)); + points.append(QPoint(upRect.right(), downRect.bottom() - 1)); + points.append(QPoint(upRect.right() - 1, downRect.bottom())); + } else { + const QLine lines[4] = { + QLine(upRect.right(), upRect.top(), upRect.left() + 2, upRect.top()), + QLine(upRect.right() - 1, upRect.bottom(), upRect.left() + 1, upRect.bottom()), + QLine(downRect.right(), downRect.bottom(), downRect.left() + 2, downRect.bottom()), + QLine(buttonRect.left(), buttonRect.top() + 2, buttonRect.left(), buttonRect.bottom() - 2) }; + painter->drawLines(lines, 4); + + points.append(QPoint(upRect.left() + 1, upRect.top() + 1)); + points.append(QPoint(downRect.left() + 1, downRect.bottom() - 1)); + painter->drawPoints(points.constData(), points.size()); + points.clear(); + painter->setPen(QPen(corner, 0)); + points.append(QPoint(upRect.left() + 1, upRect.top())); + points.append(QPoint(upRect.left(), upRect.top() + 1)); + points.append(QPoint(upRect.left(), downRect.bottom() - 1)); + points.append(QPoint(upRect.left() + 1, downRect.bottom())); + } + painter->drawPoints(points.constData(), points.size()); + points.clear(); + + // Button colors + QBrush buttonGradientBrush; + QBrush leftLineGradientBrush; + QBrush rightLineGradientBrush; + QBrush sunkenButtonGradientBrush; + QBrush sunkenLeftLineGradientBrush; + QBrush sunkenRightLineGradientBrush; + QBrush buttonBrush = qMapBrushToRect(option->palette.button(), buttonRect); + if (buttonBrush.gradient() || !buttonBrush.texture().isNull()) { + buttonGradientBrush = buttonBrush; + sunkenButtonGradientBrush = qBrushDark(buttonBrush, 108); + leftLineGradientBrush = qBrushLight(buttonBrush, 105); + rightLineGradientBrush = qBrushDark(buttonBrush, 105); + sunkenLeftLineGradientBrush = qBrushDark(buttonBrush, 110); + sunkenRightLineGradientBrush = qBrushDark(buttonBrush, 106); + } else { + // Generate gradients + QLinearGradient buttonGradient(buttonRect.topLeft(), buttonRect.bottomLeft()); + buttonGradient.setColorAt(0.0, buttonBrush.color().lighter(104)); + buttonGradient.setColorAt(1.0, buttonBrush.color().darker(110)); + buttonGradientBrush = QBrush(buttonGradient); + + QLinearGradient buttonGradient2(buttonRect.topLeft(), buttonRect.bottomLeft()); + buttonGradient2.setColorAt(0.0, buttonBrush.color().darker(113)); + buttonGradient2.setColorAt(1.0, buttonBrush.color().darker(103)); + sunkenButtonGradientBrush = QBrush(buttonGradient2); + + QLinearGradient buttonGradient3(buttonRect.topLeft(), buttonRect.bottomLeft()); + buttonGradient3.setColorAt(0.0, buttonBrush.color().lighter(105)); + buttonGradient3.setColorAt(1.0, buttonBrush.color()); + leftLineGradientBrush = QBrush(buttonGradient3); + + QLinearGradient buttonGradient4(buttonRect.topLeft(), buttonRect.bottomLeft()); + buttonGradient4.setColorAt(0.0, buttonBrush.color()); + buttonGradient4.setColorAt(1.0, buttonBrush.color().darker(110)); + rightLineGradientBrush = QBrush(buttonGradient4); + + QLinearGradient buttonGradient5(buttonRect.topLeft(), buttonRect.bottomLeft()); + buttonGradient5.setColorAt(0.0, buttonBrush.color().darker(113)); + buttonGradient5.setColorAt(1.0, buttonBrush.color().darker(107)); + sunkenLeftLineGradientBrush = QBrush(buttonGradient5); + + QLinearGradient buttonGradient6(buttonRect.topLeft(), buttonRect.bottomLeft()); + buttonGradient6.setColorAt(0.0, buttonBrush.color().darker(108)); + buttonGradient6.setColorAt(1.0, buttonBrush.color().darker(103)); + sunkenRightLineGradientBrush = QBrush(buttonGradient6); + } + + // Main fill + painter->fillRect(upRect.adjusted(2, 2, -2, -2), + qMapBrushToRect(upSunken ? sunkenButtonGradientBrush + : buttonGradientBrush, upRect)); + painter->fillRect(downRect.adjusted(2, 2, -2, -2), + qMapBrushToRect(downSunken ? sunkenButtonGradientBrush + : buttonGradientBrush, downRect)); + + // Top line + painter->setPen(QPen(qBrushLight(qMapBrushToRect(upSunken ? sunkenButtonGradientBrush + : buttonGradientBrush, upRect), 105), 0)); + if (!reverse) { + painter->drawLine(upRect.left() + 1, upRect.top() + 1, + upRect.right() - 2, upRect.top() + 1); + } else { + painter->drawLine(upRect.right() - 1, upRect.top() + 1, + upRect.left() + 2, upRect.top() + 1); + } + painter->setPen(QPen(qBrushLight(qMapBrushToRect(downSunken ? sunkenButtonGradientBrush + : buttonGradientBrush, downRect), 105), 0)); + if (!reverse) { + painter->drawLine(downRect.left() + 1, downRect.top() + 1, + downRect.right() - 1, downRect.top() + 1); + } else { + painter->drawLine(downRect.right() - 1, downRect.top() + 1, + downRect.left() + 1, downRect.top() + 1); + } + + // Left line + painter->setPen(QPen(qMapBrushToRect(upSunken ? sunkenLeftLineGradientBrush + : leftLineGradientBrush, upRect), 1)); + if (!reverse) { + painter->drawLine(upRect.left() + 1, upRect.top() + 2, + upRect.left() + 1, upRect.bottom() - 1); + } else { + painter->drawLine(upRect.left() + 1, upRect.top() + 2, + upRect.left() + 1, upRect.bottom() - 1); + } + painter->setPen(QPen(qMapBrushToRect(downSunken ? sunkenLeftLineGradientBrush + : leftLineGradientBrush, downRect), 1)); + if (!reverse) { + painter->drawLine(downRect.left() + 1, downRect.top() + 2, + downRect.left() + 1, downRect.bottom() - 1); + } else { + painter->drawLine(downRect.left() + 1, downRect.top() + 1, + downRect.left() + 1, downRect.bottom() - 2); + } + + // Bottom line + painter->setPen(QPen(qBrushDark(qMapBrushToRect(upSunken ? sunkenButtonGradientBrush + : buttonGradientBrush, upRect), 105), 0)); + if (!reverse) { + painter->drawLine(upRect.left() + 2, upRect.bottom() - 1, + upRect.right() - 1, upRect.bottom() - 1); + } else { + painter->drawLine(upRect.right() - 2, upRect.bottom() - 1, + upRect.left() + 1, upRect.bottom() - 1); + } + painter->setPen(QPen(qBrushDark(qMapBrushToRect(downSunken ? sunkenButtonGradientBrush + : buttonGradientBrush, downRect), 105), 0)); + if (!reverse) { + painter->drawLine(downRect.left() + 2, downRect.bottom() - 1, + downRect.right() - 2, downRect.bottom() - 1); + } else { + painter->drawLine(downRect.right() - 2, downRect.bottom() - 1, + downRect.left() + 2, downRect.bottom() - 1); + } + + // Right line + painter->setPen(QPen(qMapBrushToRect(upSunken ? sunkenRightLineGradientBrush + : rightLineGradientBrush, upRect), 1)); + if (!reverse) { + painter->drawLine(upRect.right() - 1, upRect.top() + 2, + upRect.right() - 1, upRect.bottom() - 1); + } else { + painter->drawLine(upRect.right() - 1, upRect.top() + 2, + upRect.right() - 1, upRect.bottom() - 1); + } + painter->setPen(QPen(qMapBrushToRect(downSunken ? sunkenRightLineGradientBrush + : rightLineGradientBrush, downRect), 1)); + if (!reverse) { + painter->drawLine(downRect.right() - 1, downRect.top() + 1, + downRect.right() - 1, downRect.bottom() - 2); + } else { + painter->drawLine(downRect.right() - 1, downRect.top() + 2, + downRect.right() - 1, downRect.bottom() - 1); + } + + QBrush indicatorBrush = qMapBrushToRect(option->palette.buttonText(), buttonRect); + painter->setPen(QPen(indicatorBrush, 0)); + if (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) { + QPoint center; + if (spinBox->subControls & SC_SpinBoxUp) { + // ....... + // ...X... + // ...X... + // .XXXXX. + // ...X... + // ...X... + // ....... + center = upRect.center(); + if (upSunken) { + ++center.rx(); + ++center.ry(); + } + painter->drawLine(center.x(), center.y() - 2, center.x(), center.y() + 2); + painter->drawLine(center.x() - 2, center.y(), center.x() + 2, center.y()); + } + if (spinBox->subControls & SC_SpinBoxDown) { + // ....... + // ....... + // ....... + // .XXXXX. + // ....... + // ....... + // ....... + center = downRect.center(); + if (downSunken) { + ++center.rx(); + ++center.ry(); + } + painter->drawLine(center.x() - 2, center.y(), center.x() + 2, center.y()); + } + } else { + int offset; + int centerX; + if (spinBox->subControls & SC_SpinBoxUp) { + // ........... + // .....X..... + // ....XXX.... + // ...XXXXX... + // ..XXXXXXX.. + // ........... + offset = upSunken ? 1 : 0; + QRect upArrowRect(upRect.center().x() - 3 + offset, upRect.center().y() - 2 + offset, 7, 4); + centerX = upArrowRect.center().x(); + painter->drawPoint(centerX, upArrowRect.top()); + const QLine lines[3] = { + QLine(centerX - 1, upArrowRect.top() + 1, centerX + 1, upArrowRect.top() + 1), + QLine(centerX - 2, upArrowRect.top() + 2, centerX + 2, upArrowRect.top() + 2), + QLine(centerX - 3, upArrowRect.top() + 3, centerX + 3, upArrowRect.top() + 3) }; + painter->drawLines(lines, 3); + } + if (spinBox->subControls & SC_SpinBoxDown) { + // ........... + // ..XXXXXXX.. + // ...XXXXX... + // ....XXX.... + // .....X..... + // ........... + offset = downSunken ? 1 : 0; + QRect downArrowRect(downRect.center().x() - 3 + offset, downRect.center().y() - 2 + offset + 1, 7, 4); + centerX = downArrowRect.center().x(); + const QLine lines[3] = { + QLine(centerX - 3, downArrowRect.top(), centerX + 3, downArrowRect.top()), + QLine(centerX - 2, downArrowRect.top() + 1, centerX + 2, downArrowRect.top() + 1), + QLine(centerX - 1, downArrowRect.top() + 2, centerX + 1, downArrowRect.top() + 2) }; + painter->drawLines(lines, 3); + painter->drawPoint(centerX, downArrowRect.top() + 3); + } + } + painter->restore(); + } + break; +#endif // QT_NO_SPINBOX +#ifndef QT_NO_COMBOBOX + case CC_ComboBox: + if (const QStyleOptionComboBox *comboBox = qstyleoption_cast(option)) { + bool sunken = comboBox->state & State_On; // play dead if combobox has no items + bool reverse = comboBox->direction == Qt::RightToLeft; + int menuButtonWidth = 16; + int xoffset = sunken ? (reverse ? -1 : 1) : 0; + int yoffset = sunken ? 1 : 0; + QRect rect = comboBox->rect; + QPen oldPen = painter->pen(); + + // Fill + if (comboBox->editable) { + // Button colors + QBrush alphaCornerBrush = qBrushDark(option->palette.button(), 165); + qBrushSetAlphaF(&alphaCornerBrush, 0.5); + QBrush buttonGradientBrush; + QBrush leftLineGradientBrush; + QBrush rightLineGradientBrush; + QBrush sunkenButtonGradientBrush; + QBrush sunkenLeftLineGradientBrush; + QBrush sunkenRightLineGradientBrush; + QBrush button = option->palette.button(); + if (button.gradient() || !button.texture().isNull()) { + buttonGradientBrush = button; + sunkenButtonGradientBrush = qBrushDark(button, 108); + leftLineGradientBrush = qBrushLight(button, 105); + rightLineGradientBrush = qBrushDark(button, 105); + sunkenLeftLineGradientBrush = qBrushDark(button, 110); + sunkenRightLineGradientBrush = qBrushDark(button, 106); + } else { + // Generate gradients + QLinearGradient buttonGradient(option->rect.topLeft(), option->rect.bottomLeft()); + buttonGradient.setColorAt(0.0, button.color().lighter(104)); + buttonGradient.setColorAt(1.0, button.color().darker(110)); + buttonGradientBrush = QBrush(buttonGradient); + + QLinearGradient buttonGradient2(option->rect.topLeft(), option->rect.bottomLeft()); + buttonGradient2.setColorAt(0.0, button.color().darker(113)); + buttonGradient2.setColorAt(1.0, button.color().darker(103)); + sunkenButtonGradientBrush = QBrush(buttonGradient2); + + QLinearGradient buttonGradient3(option->rect.topLeft(), option->rect.bottomLeft()); + buttonGradient3.setColorAt(0.0, button.color().lighter(105)); + buttonGradient3.setColorAt(1.0, button.color()); + leftLineGradientBrush = QBrush(buttonGradient3); + + QLinearGradient buttonGradient4(option->rect.topLeft(), option->rect.bottomLeft()); + buttonGradient4.setColorAt(0.0, button.color()); + buttonGradient4.setColorAt(1.0, button.color().darker(110)); + rightLineGradientBrush = QBrush(buttonGradient4); + + QLinearGradient buttonGradient5(option->rect.topLeft(), option->rect.bottomLeft()); + buttonGradient5.setColorAt(0.0, button.color().darker(113)); + buttonGradient5.setColorAt(1.0, button.color().darker(107)); + sunkenLeftLineGradientBrush = QBrush(buttonGradient5); + + QLinearGradient buttonGradient6(option->rect.topLeft(), option->rect.bottomLeft()); + buttonGradient6.setColorAt(0.0, button.color().darker(108)); + buttonGradient6.setColorAt(1.0, button.color().darker(103)); + sunkenRightLineGradientBrush = QBrush(buttonGradient6); + } + + // ComboBox starts with a lineedit in place already. + QRect buttonRect; + if (!reverse) { + buttonRect.setRect(rect.right() - menuButtonWidth, rect.top(), menuButtonWidth + 1, rect.height()); + } else { + buttonRect.setRect(rect.left(), rect.top(), menuButtonWidth + 1, rect.height()); + } + + qt_draw_partial_frame(painter, + option, + proxy()->subControlRect(CC_ComboBox, option, SC_ComboBoxEditField, widget), + widget, + this); + + QBrush border = qMapBrushToRect(option->palette.shadow(), buttonRect); + qBrushSetAlphaF(&border, qreal(0.4)); + painter->setPen(QPen(border, 0)); + if (!reverse) + painter->drawLine(buttonRect.topLeft() + QPoint(0, 1), buttonRect.bottomLeft() + QPoint(0, -1)); + else + painter->drawLine(buttonRect.topRight() + QPoint(0, -1), buttonRect.bottomRight() + QPoint(0, 1)); + + // Outline the button border + if (!reverse) { + const QLine lines[3] = { + QLine(buttonRect.left(), buttonRect.top(), + buttonRect.right() - 2, buttonRect.top()), + QLine(buttonRect.right(), buttonRect.top() + 2, + buttonRect.right(), buttonRect.bottom() - 2), + QLine(buttonRect.left(), buttonRect.bottom(), + buttonRect.right() - 2, buttonRect.bottom()) }; + painter->drawLines(lines, 3); + { + const QPoint points[2] = { + QPoint(buttonRect.right() - 1, buttonRect.top() + 1), + QPoint(buttonRect.right() - 1, buttonRect.bottom() - 1) }; + painter->drawPoints(points, 2); + } + + QBrush corner = qMapBrushToRect(option->palette.shadow(), buttonRect); + qBrushSetAlphaF(&corner, qreal(0.16)); + painter->setPen(QPen(corner, 0)); + { + const QPoint points[4] = { + QPoint(buttonRect.right() - 1, buttonRect.top()), + QPoint(buttonRect.right() - 1, buttonRect.bottom()), + QPoint(buttonRect.right(), buttonRect.top() + 1), + QPoint(buttonRect.right(), buttonRect.bottom() - 1) }; + painter->drawPoints(points, 4); + } + } else { + const QLine lines[3] = { + QLine(buttonRect.right(), buttonRect.top(), + buttonRect.left() + 2, buttonRect.top()), + QLine(buttonRect.left(), buttonRect.top() + 2, + buttonRect.left(), buttonRect.bottom() - 2), + QLine(buttonRect.right(), buttonRect.bottom(), + buttonRect.left() + 2, buttonRect.bottom()) }; + painter->drawLines(lines, 3); + { + const QPoint points[2] = { + QPoint(buttonRect.left() + 1, buttonRect.top() + 1), + QPoint(buttonRect.left() + 1, buttonRect.bottom() - 1) }; + painter->drawPoints(points, 2); + } + + QBrush corner = qMapBrushToRect(option->palette.shadow(), buttonRect); + qBrushSetAlphaF(&corner, qreal(0.16)); + painter->setPen(QPen(corner, 0)); + { + const QPoint points[4] = { + QPoint(buttonRect.left() + 1, buttonRect.top()), + QPoint(buttonRect.left() + 1, buttonRect.bottom()), + QPoint(buttonRect.left(), buttonRect.top() + 1), + QPoint(buttonRect.left(), buttonRect.bottom() - 1) }; + painter->drawPoints(points, 4); + } + } + + QRect fillRect = buttonRect.adjusted(2, 2, -2, -2); + // Main fill + painter->fillRect(fillRect, + qMapBrushToRect(sunken ? sunkenButtonGradientBrush + : buttonGradientBrush, option->rect)); + + // Top line + painter->setPen(QPen(qBrushLight(qMapBrushToRect(sunken ? sunkenButtonGradientBrush + : buttonGradientBrush, option->rect), 105), 0)); + if (!reverse) { + painter->drawLine(QPointF(buttonRect.left() + 1, buttonRect.top() + 1), + QPointF(buttonRect.right() - 2, buttonRect.top() + 1)); + } else { + painter->drawLine(QPointF(buttonRect.right() - 1, buttonRect.top() + 1), + QPointF(buttonRect.left() + 2, buttonRect.top() + 1)); + } + + // Bottom line + painter->setPen(QPen(qBrushDark(qMapBrushToRect(sunken ? sunkenButtonGradientBrush + : buttonGradientBrush, option->rect), 105), 0)); + if (!reverse) { + painter->drawLine(QPointF(buttonRect.left() + 1, buttonRect.bottom() - 1), + QPointF(buttonRect.right() - 2, buttonRect.bottom() - 1)); + } else { + painter->drawLine(QPointF(buttonRect.right() - 1, buttonRect.bottom() - 1), + QPointF(buttonRect.left() + 2, buttonRect.bottom() - 1)); + } + + // Left line + painter->setPen(QPen(qMapBrushToRect(sunken ? sunkenLeftLineGradientBrush + : leftLineGradientBrush, option->rect), 1)); + if (!reverse) { + painter->drawLine(QPointF(buttonRect.left() + 1, buttonRect.top() + 2), + QPointF(buttonRect.left() + 1, buttonRect.bottom() - 2)); + } else { + painter->drawLine(QPointF(buttonRect.left() + 1, buttonRect.top() + 2), + QPointF(buttonRect.left() + 1, buttonRect.bottom() - 2)); + } + + // Right line + painter->setPen(QPen(qMapBrushToRect(sunken ? sunkenRightLineGradientBrush + : rightLineGradientBrush, option->rect), 1)); + if (!reverse) { + painter->drawLine(QPointF(buttonRect.right() - 1, buttonRect.top() + 2), + QPointF(buttonRect.right() - 1, buttonRect.bottom() - 2)); + } else { + painter->drawLine(QPointF(buttonRect.right() - 1, buttonRect.top() + 2), + QPointF(buttonRect.right() - 1, buttonRect.bottom() - 2)); + } + } else { + // Start with a standard panel button fill + QStyleOptionButton buttonOption; + buttonOption.QStyleOption::operator=(*comboBox); + if (!sunken) { + buttonOption.state &= ~State_Sunken; + } + proxy()->drawPrimitive(PE_PanelButtonCommand, &buttonOption, painter, widget); + + // Draw the menu button separator line + QBrush border = qMapBrushToRect(option->palette.shadow(), rect); + qBrushSetAlphaF(&border, qreal(0.35)); + painter->setPen(QPen(border, 0)); + if (!reverse) { + painter->drawLine(rect.right() - menuButtonWidth + xoffset, rect.top() + 1, + rect.right() - menuButtonWidth + xoffset, rect.bottom() - 1); + } else { + painter->drawLine(rect.left() + menuButtonWidth + xoffset, rect.top() + 1, + rect.left() + menuButtonWidth + xoffset, rect.bottom() - 1); + } + } + + // Draw the little arrow + if (comboBox->subControls & SC_ComboBoxArrow) { + int left = !reverse ? rect.right() - menuButtonWidth : rect.left(); + int right = !reverse ? rect.right() : rect.left() + menuButtonWidth; + QRect arrowRect((left + right) / 2 - 3 + xoffset, + rect.center().y() - 1 + yoffset, 7, 4); + painter->setPen(QPen(qMapBrushToRect(option->palette.buttonText(), rect), 0)); + const QLine lines[3] = { + QLine(arrowRect.topLeft(), arrowRect.topRight()), + QLine(arrowRect.left() + 1, arrowRect.top() + 1, + arrowRect.right() - 1, arrowRect.top() + 1), + QLine(arrowRect.left() + 2, arrowRect.top() + 2, + arrowRect.right() - 2, arrowRect.top() + 2) }; + painter->drawLines(lines, 3); + painter->drawPoint(arrowRect.center().x(), arrowRect.bottom()); + } + + // Draw the focus rect + if ((option->state & State_HasFocus) && !comboBox->editable + && ((option->state & State_KeyboardFocusChange) || styleHint(SH_UnderlineShortcut, option, widget))) { + QStyleOptionFocusRect focus; + focus.rect = proxy()->subControlRect(CC_ComboBox, option, SC_ComboBoxEditField, widget) + .adjusted(-2, 0, 2, 0); + proxy()->drawPrimitive(PE_FrameFocusRect, &focus, painter, widget); + } + + painter->setPen(oldPen); + } + break; +#endif // QT_NO_COMBOBOX + case CC_TitleBar: + if (const QStyleOptionTitleBar *titleBar = qstyleoption_cast(option)) { + painter->save(); + bool active = (titleBar->titleBarState & State_Active); + QRect fullRect = titleBar->rect; + + // ### use palette colors instead + QColor titleBarGradientStart(active ? 0x3b508a : 0x6e6e6e); + QColor titleBarGradientStop(active ? 0x5d6e9e : 0x818181); + QColor titleBarFrameBorder(0x393939); + QColor titleBarAlphaCorner(active ? 0x4b5e7f : 0x6a6a6a); + QColor titleBarInnerTopLine(active ? 0x8e98ba : 0xa4a4a4); + QColor titleBarInnerInnerTopLine(active ? 0x57699b : 0x808080); + QColor leftCorner(active ? 0x6f7ea8 : 0x8e8e8e); + QColor rightCorner(active ? 0x44537d : 0x676767); + QColor textColor(active ? 0x282e40 : 0x282e40); + QColor textAlphaColor(active ? 0x3f4862 : 0x3f4862); + + + { + // Fill title bar gradient + qt_plastique_draw_gradient(painter, option->rect.adjusted(1, 1, -1, 0), + titleBarGradientStart, + titleBarGradientStop); + + // Frame and rounded corners + painter->setPen(titleBarFrameBorder); + + // top border line + { + const QLine lines[3] = { + QLine(fullRect.left() + 2, fullRect.top(), fullRect.right() - 2, fullRect.top()), + QLine(fullRect.left(), fullRect.top() + 2, fullRect.left(), fullRect.bottom()), + QLine(fullRect.right(), fullRect.top() + 2, fullRect.right(), fullRect.bottom()) }; + painter->drawLines(lines, 3); + const QPoint points[2] = { + QPoint(fullRect.left() + 1, fullRect.top() + 1), + QPoint(fullRect.right() - 1, fullRect.top() + 1) }; + painter->drawPoints(points, 2); + } + + // alpha corners + painter->setPen(titleBarAlphaCorner); + { + const QPoint points[4] = { + QPoint(fullRect.left() + 2, fullRect.top() + 1), + QPoint(fullRect.left() + 1, fullRect.top() + 2), + QPoint(fullRect.right() - 2, fullRect.top() + 1), + QPoint(fullRect.right() - 1, fullRect.top() + 2) }; + painter->drawPoints(points, 4); + } + + // inner top line + painter->setPen(titleBarInnerTopLine); + painter->drawLine(fullRect.left() + 3, fullRect.top() + 1, fullRect.right() - 3, fullRect.top() + 1); + + // inner inner top line + painter->setPen(titleBarInnerInnerTopLine); + painter->drawLine(fullRect.left() + 2, fullRect.top() + 2, fullRect.right() - 2, fullRect.top() + 2); + + // left and right inner + painter->setPen(leftCorner); + painter->drawLine(fullRect.left() + 1, fullRect.top() + 3, fullRect.left() + 1, fullRect.bottom()); + painter->setPen(rightCorner); + painter->drawLine(fullRect.right() - 1, fullRect.top() + 3, fullRect.right() - 1, fullRect.bottom()); + + if (titleBar->titleBarState & Qt::WindowMinimized) { + painter->setPen(titleBarFrameBorder); + painter->drawLine(fullRect.left() + 2, fullRect.bottom(), fullRect.right() - 2, fullRect.bottom()); + { + const QPoint points[2] = { + QPoint(fullRect.left() + 1, fullRect.bottom() - 1), + QPoint(fullRect.right() - 1, fullRect.bottom() - 1) }; + painter->drawPoints(points, 2); + } + painter->setPen(rightCorner); + painter->drawLine(fullRect.left() + 2, fullRect.bottom() - 1, fullRect.right() - 2, fullRect.bottom() - 1); + painter->setPen(titleBarAlphaCorner); + { + const QPoint points[4] = { + QPoint(fullRect.left() + 1, fullRect.bottom() - 2), + QPoint(fullRect.left() + 2, fullRect.bottom() - 1), + QPoint(fullRect.right() - 1, fullRect.bottom() - 2), + QPoint(fullRect.right() - 2, fullRect.bottom() - 1) }; + painter->drawPoints(points, 4); + } + } + // draw title + QRect textRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarLabel, widget); + + QFont font = painter->font(); + font.setBold(true); + painter->setFont(font); + painter->setPen(titleBar->palette.text().color()); + + // Attempt to align left if there is not enough room for the title + // text. Otherwise, align center. QWorkspace does elliding for us, + // and it doesn't know about the bold title, so we need to work + // around some of the width mismatches. + bool tooWide = (QFontMetrics(font).width(titleBar->text) > textRect.width()); + QTextOption option((tooWide ? Qt::AlignLeft : Qt::AlignHCenter) | Qt::AlignVCenter); + option.setWrapMode(QTextOption::NoWrap); + + painter->drawText(textRect.adjusted(1, 1, 1, 1), titleBar->text, option); + painter->setPen(titleBar->palette.highlightedText().color()); + painter->drawText(textRect, titleBar->text, option); + } + + // min button + if ((titleBar->subControls & SC_TitleBarMinButton) + && (titleBar->titleBarFlags & Qt::WindowMinimizeButtonHint) + && !(titleBar->titleBarState & Qt::WindowMinimized)) { + bool hover = (titleBar->activeSubControls & SC_TitleBarMinButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarMinButton) && (titleBar->state & State_Sunken); + + QRect minButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarMinButton, widget); + qt_plastique_draw_mdibutton(painter, titleBar, minButtonRect, hover, sunken); + + int xoffset = minButtonRect.width() / 3; + int yoffset = minButtonRect.height() / 3; + + QRect minButtonIconRect(minButtonRect.left() + xoffset, minButtonRect.top() + yoffset, + minButtonRect.width() - xoffset * 2, minButtonRect.height() - yoffset * 2); + + painter->setPen(textColor); + { + const QLine lines[2] = { + QLine(minButtonIconRect.center().x() - 2, + minButtonIconRect.center().y() + 3, + minButtonIconRect.center().x() + 3, + minButtonIconRect.center().y() + 3), + QLine(minButtonIconRect.center().x() - 2, + minButtonIconRect.center().y() + 4, + minButtonIconRect.center().x() + 3, + minButtonIconRect.center().y() + 4) }; + painter->drawLines(lines, 2); + } + painter->setPen(textAlphaColor); + { + const QLine lines[2] = { + QLine(minButtonIconRect.center().x() - 3, + minButtonIconRect.center().y() + 3, + minButtonIconRect.center().x() - 3, + minButtonIconRect.center().y() + 4), + QLine(minButtonIconRect.center().x() + 4, + minButtonIconRect.center().y() + 3, + minButtonIconRect.center().x() + 4, + minButtonIconRect.center().y() + 4) }; + painter->drawLines(lines, 2); + } + } + + // max button + if ((titleBar->subControls & SC_TitleBarMaxButton) + && (titleBar->titleBarFlags & Qt::WindowMaximizeButtonHint) + && !(titleBar->titleBarState & Qt::WindowMaximized)) { + bool hover = (titleBar->activeSubControls & SC_TitleBarMaxButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarMaxButton) && (titleBar->state & State_Sunken); + + QRect maxButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarMaxButton, widget); + qt_plastique_draw_mdibutton(painter, titleBar, maxButtonRect, hover, sunken); + + int xoffset = maxButtonRect.width() / 3; + int yoffset = maxButtonRect.height() / 3; + + QRect maxButtonIconRect(maxButtonRect.left() + xoffset, maxButtonRect.top() + yoffset, + maxButtonRect.width() - xoffset * 2, maxButtonRect.height() - yoffset * 2); + + painter->setPen(textColor); + painter->drawRect(maxButtonIconRect.adjusted(0, 0, -1, -1)); + painter->drawLine(maxButtonIconRect.left() + 1, maxButtonIconRect.top() + 1, + maxButtonIconRect.right() - 1, maxButtonIconRect.top() + 1); + painter->setPen(textAlphaColor); + const QPoint points[4] = { + maxButtonIconRect.topLeft(), maxButtonIconRect.topRight(), + maxButtonIconRect.bottomLeft(), maxButtonIconRect.bottomRight() }; + painter->drawPoints(points, 4); + } + + // close button + if (titleBar->subControls & SC_TitleBarCloseButton && titleBar->titleBarFlags & Qt::WindowSystemMenuHint) { + bool hover = (titleBar->activeSubControls & SC_TitleBarCloseButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarCloseButton) && (titleBar->state & State_Sunken); + + QRect closeButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarCloseButton, widget); + qt_plastique_draw_mdibutton(painter, titleBar, closeButtonRect, hover, sunken); + + int xoffset = closeButtonRect.width() / 3; + int yoffset = closeButtonRect.height() / 3; + + QRect closeIconRect(closeButtonRect.left() + xoffset, closeButtonRect.top() + yoffset, + closeButtonRect.width() - xoffset * 2, closeButtonRect.height() - yoffset * 2); + + painter->setPen(textAlphaColor); + { + const QLine lines[4] = { + QLine(closeIconRect.left() + 1, closeIconRect.top(), + closeIconRect.right(), closeIconRect.bottom() - 1), + QLine(closeIconRect.left(), closeIconRect.top() + 1, + closeIconRect.right() - 1, closeIconRect.bottom()), + QLine(closeIconRect.right() - 1, closeIconRect.top(), + closeIconRect.left(), closeIconRect.bottom() - 1), + QLine(closeIconRect.right(), closeIconRect.top() + 1, + closeIconRect.left() + 1, closeIconRect.bottom()) }; + painter->drawLines(lines, 4); + const QPoint points[4] = { + closeIconRect.topLeft(), closeIconRect.topRight(), + closeIconRect.bottomLeft(), closeIconRect.bottomRight() }; + painter->drawPoints(points, 4); + } + painter->setPen(textColor); + { + const QLine lines[2] = { + QLine(closeIconRect.left() + 1, closeIconRect.top() + 1, + closeIconRect.right() - 1, closeIconRect.bottom() - 1), + QLine(closeIconRect.left() + 1, closeIconRect.bottom() - 1, + closeIconRect.right() - 1, closeIconRect.top() + 1) }; + painter->drawLines(lines, 2); + } + } + + // normalize button + if ((titleBar->subControls & SC_TitleBarNormalButton) && + (((titleBar->titleBarFlags & Qt::WindowMinimizeButtonHint) && + (titleBar->titleBarState & Qt::WindowMinimized)) || + ((titleBar->titleBarFlags & Qt::WindowMaximizeButtonHint) && + (titleBar->titleBarState & Qt::WindowMaximized)))) { + bool hover = (titleBar->activeSubControls & SC_TitleBarNormalButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarNormalButton) && (titleBar->state & State_Sunken); + + QRect normalButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarNormalButton, widget); + qt_plastique_draw_mdibutton(painter, titleBar, normalButtonRect, hover, sunken); + int xoffset = int(normalButtonRect.width() / 3.5); + int yoffset = int(normalButtonRect.height() / 3.5); + + QRect normalButtonIconRect(normalButtonRect.left() + xoffset, normalButtonRect.top() + yoffset, + normalButtonRect.width() - xoffset * 2, normalButtonRect.height() - yoffset * 2); + + QRect frontWindowRect = normalButtonIconRect.adjusted(0, 3, -3, 0); + painter->setPen(textColor); + painter->drawRect(frontWindowRect.adjusted(0, 0, -1, -1)); + painter->drawLine(frontWindowRect.left() + 1, frontWindowRect.top() + 1, + frontWindowRect.right() - 1, frontWindowRect.top() + 1); + painter->setPen(textAlphaColor); + { + const QPoint points[4] = { + frontWindowRect.topLeft(), frontWindowRect.topRight(), + frontWindowRect.bottomLeft(), frontWindowRect.bottomRight() }; + painter->drawPoints(points, 4); + } + + QRect backWindowRect = normalButtonIconRect.adjusted(3, 0, 0, -3); + QRegion clipRegion = backWindowRect; + clipRegion -= frontWindowRect; + painter->save(); + painter->setClipRegion(clipRegion); + painter->setPen(textColor); + painter->drawRect(backWindowRect.adjusted(0, 0, -1, -1)); + painter->drawLine(backWindowRect.left() + 1, backWindowRect.top() + 1, + backWindowRect.right() - 1, backWindowRect.top() + 1); + painter->setPen(textAlphaColor); + { + const QPoint points[4] = { + backWindowRect.topLeft(), backWindowRect.topRight(), + backWindowRect.bottomLeft(), backWindowRect.bottomRight() }; + painter->drawPoints(points, 4); + } + painter->restore(); + } + + // context help button + if (titleBar->subControls & SC_TitleBarContextHelpButton + && (titleBar->titleBarFlags & Qt::WindowContextHelpButtonHint)) { + bool hover = (titleBar->activeSubControls & SC_TitleBarContextHelpButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarContextHelpButton) && (titleBar->state & State_Sunken); + + QRect contextHelpButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarContextHelpButton, widget); + + qt_plastique_draw_mdibutton(painter, titleBar, contextHelpButtonRect, hover, sunken); + + QColor blend; + // ### Use palette colors + if (active) { + blend = mergedColors(QColor(hover ? 0x7d8bb1 : 0x55689a), + QColor(hover ? 0x939ebe : 0x7381ab)); + } else { + blend = mergedColors(QColor(hover ? 0x9e9e9e : 0x818181), + QColor(hover ? 0xababab : 0x929292)); + } + QImage image(qt_titlebar_context_help); + image.setColor(4, textColor.rgba()); + image.setColor(3, mergedColors(blend, textColor, 30).rgba()); + image.setColor(2, mergedColors(blend, textColor, 70).rgba()); + image.setColor(1, mergedColors(blend, textColor, 90).rgba()); + + painter->drawImage(contextHelpButtonRect, image); + } + + // shade button + if (titleBar->subControls & SC_TitleBarShadeButton) { + bool hover = (titleBar->activeSubControls & SC_TitleBarShadeButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarShadeButton) && (titleBar->state & State_Sunken); + + QRect shadeButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarShadeButton, widget); + qt_plastique_draw_mdibutton(painter, titleBar, shadeButtonRect, hover, sunken); + + int xoffset = shadeButtonRect.width() / 3; + int yoffset = shadeButtonRect.height() / 3; + + QRect shadeButtonIconRect(shadeButtonRect.left() + xoffset, shadeButtonRect.top() + yoffset, + shadeButtonRect.width() - xoffset * 2, shadeButtonRect.height() - yoffset * 2); + + QPainterPath path(shadeButtonIconRect.bottomLeft()); + path.lineTo(shadeButtonIconRect.center().x(), shadeButtonIconRect.bottom() - shadeButtonIconRect.height() / 2); + path.lineTo(shadeButtonIconRect.bottomRight()); + path.lineTo(shadeButtonIconRect.bottomLeft()); + + painter->setPen(textAlphaColor); + painter->setBrush(textColor); + painter->drawPath(path); + } + + // unshade button + if (titleBar->subControls & SC_TitleBarUnshadeButton) { + bool hover = (titleBar->activeSubControls & SC_TitleBarUnshadeButton) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarUnshadeButton) && (titleBar->state & State_Sunken); + + QRect unshadeButtonRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarUnshadeButton, widget); + qt_plastique_draw_mdibutton(painter, titleBar, unshadeButtonRect, hover, sunken); + + int xoffset = unshadeButtonRect.width() / 3; + int yoffset = unshadeButtonRect.height() / 3; + + QRect unshadeButtonIconRect(unshadeButtonRect.left() + xoffset, unshadeButtonRect.top() + yoffset, + unshadeButtonRect.width() - xoffset * 2, unshadeButtonRect.height() - yoffset * 2); + + int midY = unshadeButtonIconRect.bottom() - unshadeButtonIconRect.height() / 2; + QPainterPath path(QPoint(unshadeButtonIconRect.left(), midY)); + path.lineTo(unshadeButtonIconRect.right(), midY); + path.lineTo(unshadeButtonIconRect.center().x(), unshadeButtonIconRect.bottom()); + path.lineTo(unshadeButtonIconRect.left(), midY); + + painter->setPen(textAlphaColor); + painter->setBrush(textColor); + painter->drawPath(path); + } + + // from QProxyStyle.cpp + if ((titleBar->subControls & SC_TitleBarSysMenu) && (titleBar->titleBarFlags & Qt::WindowSystemMenuHint)) { + bool hover = (titleBar->activeSubControls & SC_TitleBarSysMenu) && (titleBar->state & State_MouseOver); + bool sunken = (titleBar->activeSubControls & SC_TitleBarSysMenu) && (titleBar->state & State_Sunken); + + QRect iconRect = proxy()->subControlRect(CC_TitleBar, titleBar, SC_TitleBarSysMenu, widget); + if (hover) + qt_plastique_draw_mdibutton(painter, titleBar, iconRect, hover, sunken); + + if (!titleBar->icon.isNull()) { + titleBar->icon.paint(painter, iconRect); + } else { + QStyleOption tool(0); + tool.palette = titleBar->palette; + QPixmap pm = standardPixmap(SP_TitleBarMenuButton, &tool, widget); + tool.rect = iconRect; + painter->save(); + proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pm); + painter->restore(); + } + } + painter->restore(); + } + break; +#ifndef QT_NO_DIAL + case CC_Dial: + if (const QStyleOptionSlider *dial = qstyleoption_cast(option)) + QStyleHelper::drawDial(dial, painter); + break; +#endif // QT_NO_DIAL + default: + QProxyStyle::drawComplexControl(control, option, painter, widget); + break; + } +} + +/*! + \reimp +*/ +QSize QPlastiqueStyle::sizeFromContents(ContentsType type, const QStyleOption *option, + const QSize &size, const QWidget *widget) const +{ + QSize newSize = QProxyStyle::sizeFromContents(type, option, size, widget); + + switch (type) { + case CT_RadioButton: + ++newSize.rheight(); + ++newSize.rwidth(); + break; +#ifndef QT_NO_SLIDER + case CT_Slider: + if (const QStyleOptionSlider *slider = qstyleoption_cast(option)) { + int tickSize = proxy()->pixelMetric(PM_SliderTickmarkOffset, option, widget); + if (slider->tickPosition & QSlider::TicksBelow) { + if (slider->orientation == Qt::Horizontal) + newSize.rheight() += tickSize; + else + newSize.rwidth() += tickSize; + } + if (slider->tickPosition & QSlider::TicksAbove) { + if (slider->orientation == Qt::Horizontal) + newSize.rheight() += tickSize; + else + newSize.rwidth() += tickSize; + } + } + break; +#endif // QT_NO_SLIDER +#ifndef QT_NO_SCROLLBAR + case CT_ScrollBar: + if (const QStyleOptionSlider *scrollBar = qstyleoption_cast(option)) { + int scrollBarExtent = proxy()->pixelMetric(PM_ScrollBarExtent, option, widget); + int scrollBarSliderMinimum = proxy()->pixelMetric(PM_ScrollBarSliderMin, option, widget); + if (scrollBar->orientation == Qt::Horizontal) { + newSize = QSize(scrollBarExtent * 3 + scrollBarSliderMinimum, scrollBarExtent); + } else { + newSize = QSize(scrollBarExtent, scrollBarExtent * 3 + scrollBarSliderMinimum); + } + } + break; +#endif // QT_NO_SCROLLBAR +#ifndef QT_NO_SPINBOX + case CT_SpinBox: + // Make sure the size is odd + newSize.rheight() -= ((1 - newSize.rheight()) & 1); + break; +#endif +#ifndef QT_NO_TOOLBUTTON + case CT_ToolButton: + newSize.rheight() += 3; + newSize.rwidth() += 3; + break; +#endif +#ifndef QT_NO_COMBOBOX + case CT_ComboBox: + newSize = sizeFromContents(CT_PushButton, option, size, widget); + newSize.rwidth() += 30; // Make room for drop-down indicator + newSize.rheight() += 4; + break; +#endif + case CT_MenuItem: + if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast(option)) { + if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) + newSize.setHeight(menuItem->text.isEmpty() ? 2 : menuItem->fontMetrics.height()); + } + break; + case CT_MenuBarItem: + newSize.setHeight(newSize.height()); + break; + default: + break; + } + + return newSize; +} + +/*! + \reimp +*/ +QRect QPlastiqueStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const +{ + QRect rect; + switch (element) { + case SE_RadioButtonIndicator: + rect = visualRect(option->direction, option->rect, + QProxyStyle::subElementRect(element, option, widget)).adjusted(0, 0, 1, 1); + break; +#ifndef QT_NO_PROGRESSBAR + case SE_ProgressBarLabel: + case SE_ProgressBarContents: + case SE_ProgressBarGroove: + return option->rect; +#endif // QT_NO_PROGRESSBAR + default: + return QProxyStyle::subElementRect(element, option, widget); + } + + return visualRect(option->direction, option->rect, rect); +} + +/*! + \reimp +*/ +QRect QPlastiqueStyle::subControlRect(ComplexControl control, const QStyleOptionComplex *option, + SubControl subControl, const QWidget *widget) const +{ + QRect rect = QProxyStyle::subControlRect(control, option, subControl, widget); + + switch (control) { +#ifndef QT_NO_SLIDER + case CC_Slider: + if (const QStyleOptionSlider *slider = qstyleoption_cast(option)) { + int tickSize = proxy()->pixelMetric(PM_SliderTickmarkOffset, option, widget); + + switch (subControl) { + case SC_SliderHandle: + if (slider->orientation == Qt::Horizontal) { + rect.setWidth(11); + rect.setHeight(15); + int centerY = slider->rect.center().y() - rect.height() / 2; + if (slider->tickPosition & QSlider::TicksAbove) + centerY += tickSize; + if (slider->tickPosition & QSlider::TicksBelow) + centerY -= tickSize; + rect.moveTop(centerY); + } else { + rect.setWidth(15); + rect.setHeight(11); + int centerX = slider->rect.center().x() - rect.width() / 2; + if (slider->tickPosition & QSlider::TicksAbove) + centerX += tickSize; + if (slider->tickPosition & QSlider::TicksBelow) + centerX -= tickSize; + rect.moveLeft(centerX); + } + break; + case SC_SliderGroove: { + QPoint grooveCenter = slider->rect.center(); + if (slider->orientation == Qt::Horizontal) { + rect.setHeight(14); + --grooveCenter.ry(); + if (slider->tickPosition & QSlider::TicksAbove) + grooveCenter.ry() += tickSize; + if (slider->tickPosition & QSlider::TicksBelow) + grooveCenter.ry() -= tickSize; + } else { + rect.setWidth(14); + --grooveCenter.rx(); + if (slider->tickPosition & QSlider::TicksAbove) + grooveCenter.rx() += tickSize; + if (slider->tickPosition & QSlider::TicksBelow) + grooveCenter.rx() -= tickSize; + } + rect.moveCenter(grooveCenter); + break; + } + default: + break; + } + } + break; +#endif // QT_NO_SLIDER +#ifndef QT_NO_SCROLLBAR + case CC_ScrollBar: + if (const QStyleOptionSlider *scrollBar = qstyleoption_cast(option)) { + int scrollBarExtent = proxy()->pixelMetric(PM_ScrollBarExtent, scrollBar, widget); + int sliderMaxLength = ((scrollBar->orientation == Qt::Horizontal) ? + scrollBar->rect.width() : scrollBar->rect.height()) - (scrollBarExtent * 3); + int sliderMinLength = proxy()->pixelMetric(PM_ScrollBarSliderMin, scrollBar, widget); + int sliderLength; + + // calculate slider length + if (scrollBar->maximum != scrollBar->minimum) { + uint valueRange = scrollBar->maximum - scrollBar->minimum; + sliderLength = (scrollBar->pageStep * sliderMaxLength) / (valueRange + scrollBar->pageStep); + + if (sliderLength < sliderMinLength || valueRange > INT_MAX / 2) + sliderLength = sliderMinLength; + if (sliderLength > sliderMaxLength) + sliderLength = sliderMaxLength; + } else { + sliderLength = sliderMaxLength; + } + + int sliderStart = scrollBarExtent + sliderPositionFromValue(scrollBar->minimum, + scrollBar->maximum, + scrollBar->sliderPosition, + sliderMaxLength - sliderLength, + scrollBar->upsideDown); + + QRect scrollBarRect = scrollBar->rect; + + switch (subControl) { + case SC_ScrollBarSubLine: // top/left button + if (scrollBar->orientation == Qt::Horizontal) { + rect.setRect(scrollBarRect.left(), scrollBarRect.top(), scrollBarRect.width() - scrollBarExtent, scrollBarRect.height()); + } else { + rect.setRect(scrollBarRect.left(), scrollBarRect.top(), scrollBarRect.width(), scrollBarRect.height() - scrollBarExtent); + } + break; + case SC_ScrollBarAddLine: // bottom/right button + if (scrollBar->orientation == Qt::Horizontal) { + rect.setRect(scrollBarRect.right() - (scrollBarExtent - 1), scrollBarRect.top(), scrollBarExtent, scrollBarRect.height()); + } else { + rect.setRect(scrollBarRect.left(), scrollBarRect.bottom() - (scrollBarExtent - 1), scrollBarRect.width(), scrollBarExtent); + } + break; + case SC_ScrollBarSubPage: + if (scrollBar->orientation == Qt::Horizontal) { + rect.setRect(scrollBarRect.left() + scrollBarExtent, scrollBarRect.top(), + sliderStart - (scrollBarRect.left() + scrollBarExtent), scrollBarRect.height()); + } else { + rect.setRect(scrollBarRect.left(), scrollBarRect.top() + scrollBarExtent, + scrollBarRect.width(), sliderStart - (scrollBarRect.left() + scrollBarExtent)); + } + break; + case SC_ScrollBarAddPage: + if (scrollBar->orientation == Qt::Horizontal) + rect.setRect(sliderStart + sliderLength, 0, + sliderMaxLength - sliderStart - sliderLength + scrollBarExtent, scrollBarRect.height()); + else + rect.setRect(0, sliderStart + sliderLength, + scrollBarRect.width(), sliderMaxLength - sliderStart - sliderLength + scrollBarExtent); + break; + case SC_ScrollBarGroove: + if (scrollBar->orientation == Qt::Horizontal) { + rect = scrollBarRect.adjusted(scrollBarExtent, 0, -2 * scrollBarExtent, 0); + } else { + rect = scrollBarRect.adjusted(0, scrollBarExtent, 0, -2 * scrollBarExtent); + } + break; + case SC_ScrollBarSlider: + if (scrollBar->orientation == Qt::Horizontal) { + rect.setRect(sliderStart, 0, sliderLength, scrollBarRect.height()); + } else { + rect.setRect(0, sliderStart, scrollBarRect.width(), sliderLength); + } + break; + default: + break; + } + rect = visualRect(scrollBar->direction, scrollBarRect, rect); + } + break; +#endif // QT_NO_SCROLLBAR +#ifndef QT_NO_SPINBOX + case CC_SpinBox: + if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast(option)) { + int center = spinBox->rect.height() / 2; + switch (subControl) { + case SC_SpinBoxUp: + if (spinBox->buttonSymbols == QAbstractSpinBox::NoButtons) + return QRect(); + rect = visualRect(spinBox->direction, spinBox->rect, rect); + rect.setRect(spinBox->rect.right() - 16, spinBox->rect.top(), 17, center + 1); + rect = visualRect(spinBox->direction, spinBox->rect, rect); + break; + case SC_SpinBoxDown: + if (spinBox->buttonSymbols == QAbstractSpinBox::NoButtons) + return QRect(); + rect = visualRect(spinBox->direction, spinBox->rect, rect); + rect.setRect(spinBox->rect.right() - 16, spinBox->rect.top() + center, 17, spinBox->rect.height() - center); + rect = visualRect(spinBox->direction, spinBox->rect, rect); + break; + case SC_SpinBoxEditField: + if (spinBox->buttonSymbols != QAbstractSpinBox::NoButtons) { + rect = spinBox->rect.adjusted(0, 0, -16, 0); + } else { + rect = spinBox->rect; + } + rect.adjust(blueFrameWidth, blueFrameWidth, -blueFrameWidth, -blueFrameWidth); + rect = visualRect(spinBox->direction, spinBox->rect, rect); + break; + default: + break; + } + } + break; +#endif // QT_NO_SPINBOX +#ifndef QT_NO_COMBOBOX + case CC_ComboBox: + switch (subControl) { + case SC_ComboBoxArrow: + rect = visualRect(option->direction, option->rect, rect); + rect.setRect(rect.right() - 17, rect.top() - 2, + 19, rect.height() + 4); + rect = visualRect(option->direction, option->rect, rect); + break; + case SC_ComboBoxEditField: { + if (const QStyleOptionComboBox *box = qstyleoption_cast(option)) { + int frameWidth = proxy()->pixelMetric(PM_DefaultFrameWidth); + rect = visualRect(option->direction, option->rect, rect); + + if (box->editable) { + rect = box->rect.adjusted(blueFrameWidth, blueFrameWidth, -blueFrameWidth, -blueFrameWidth); + rect.setRight(rect.right() - 16); // Overlaps the combobox button by 2 pixels + } else { + rect.setRect(option->rect.left() + frameWidth, option->rect.top() + frameWidth, + option->rect.width() - 16 - 2 * frameWidth, + option->rect.height() - 2 * frameWidth); + rect.setLeft(rect.left() + 2); + rect.setRight(rect.right() - 2); + if (box->state & (State_Sunken | State_On)) + rect.translate(1, 1); + } + rect = visualRect(option->direction, option->rect, rect); + } + break; + } + default: + break; + } + break; +#endif // QT_NO_COMBOBOX + case CC_TitleBar: + if (const QStyleOptionTitleBar *tb = qstyleoption_cast(option)) { + SubControl sc = subControl; + QRect &ret = rect; + const int indent = 3; + const int controlTopMargin = 4; + const int controlBottomMargin = 3; + const int controlWidthMargin = 1; + const int controlHeight = tb->rect.height() - controlTopMargin - controlBottomMargin; + const int delta = controlHeight + controlWidthMargin; + int offset = 0; + + bool isMinimized = tb->titleBarState & Qt::WindowMinimized; + bool isMaximized = tb->titleBarState & Qt::WindowMaximized; + + switch (sc) { + case SC_TitleBarLabel: + if (tb->titleBarFlags & (Qt::WindowTitleHint | Qt::WindowSystemMenuHint)) { + ret = tb->rect; + if (tb->titleBarFlags & Qt::WindowSystemMenuHint) + ret.adjust(delta, 0, -delta, 0); + if (tb->titleBarFlags & Qt::WindowMinimizeButtonHint) + ret.adjust(0, 0, -delta, 0); + if (tb->titleBarFlags & Qt::WindowMaximizeButtonHint) + ret.adjust(0, 0, -delta, 0); + if (tb->titleBarFlags & Qt::WindowShadeButtonHint) + ret.adjust(0, 0, -delta, 0); + if (tb->titleBarFlags & Qt::WindowContextHelpButtonHint) + ret.adjust(0, 0, -delta, 0); + ret.adjusted(indent, 0, -indent, 0); + } + break; + case SC_TitleBarContextHelpButton: + if (tb->titleBarFlags & Qt::WindowContextHelpButtonHint) + offset += delta; + case SC_TitleBarMinButton: + if (!isMinimized && (tb->titleBarFlags & Qt::WindowMinimizeButtonHint)) + offset += delta; + else if (sc == SC_TitleBarMinButton) + break; + case SC_TitleBarNormalButton: + if (isMinimized && (tb->titleBarFlags & Qt::WindowMinimizeButtonHint)) + offset += delta; + else if (isMaximized && (tb->titleBarFlags & Qt::WindowMaximizeButtonHint)) + offset += delta; + else if (sc == SC_TitleBarNormalButton) + break; + case SC_TitleBarMaxButton: + if (!isMaximized && (tb->titleBarFlags & Qt::WindowMaximizeButtonHint)) + offset += delta; + else if (sc == SC_TitleBarMaxButton) + break; + case SC_TitleBarShadeButton: + if (!isMinimized && (tb->titleBarFlags & Qt::WindowShadeButtonHint)) + offset += delta; + else if (sc == SC_TitleBarShadeButton) + break; + case SC_TitleBarUnshadeButton: + if (isMinimized && (tb->titleBarFlags & Qt::WindowShadeButtonHint)) + offset += delta; + else if (sc == SC_TitleBarUnshadeButton) + break; + case SC_TitleBarCloseButton: + if (tb->titleBarFlags & Qt::WindowSystemMenuHint) + offset += delta; + else if (sc == SC_TitleBarCloseButton) + break; + ret.setRect(tb->rect.right() - indent - offset, tb->rect.top() + controlTopMargin, + controlHeight, controlHeight); + break; + case SC_TitleBarSysMenu: + if (tb->titleBarFlags & Qt::WindowSystemMenuHint) { + ret.setRect(tb->rect.left() + controlWidthMargin + indent, tb->rect.top() + controlTopMargin, + controlHeight, controlHeight); + } + break; + default: + break; + } + ret = visualRect(tb->direction, tb->rect, ret); + } + break; + default: + break; + } + + return rect; +} + +/*! + \reimp +*/ +int QPlastiqueStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, + QStyleHintReturn *returnData) const +{ + int ret = 0; + switch (hint) { + case SH_WindowFrame_Mask: + ret = 1; + if (QStyleHintReturnMask *mask = qstyleoption_cast(returnData)) { + mask->region = option->rect; + mask->region -= QRect(option->rect.left(), option->rect.top(), 2, 1); + mask->region -= QRect(option->rect.right() - 1, option->rect.top(), 2, 1); + mask->region -= QRect(option->rect.left(), option->rect.top() + 1, 1, 1); + mask->region -= QRect(option->rect.right(), option->rect.top() + 1, 1, 1); + + const QStyleOptionTitleBar *titleBar = qstyleoption_cast(option); + if (titleBar && (titleBar->titleBarState & Qt::WindowMinimized)) { + mask->region -= QRect(option->rect.left(), option->rect.bottom(), 2, 1); + mask->region -= QRect(option->rect.right() - 1, option->rect.bottom(), 2, 1); + mask->region -= QRect(option->rect.left(), option->rect.bottom() - 1, 1, 1); + mask->region -= QRect(option->rect.right(), option->rect.bottom() - 1, 1, 1); + } else { + mask->region -= QRect(option->rect.bottomLeft(), QSize(1, 1)); + mask->region -= QRect(option->rect.bottomRight(), QSize(1, 1)); + } + } + break; + case SH_TitleBar_NoBorder: + ret = 1; + break; + case SH_TitleBar_AutoRaise: + ret = 1; + break; + case SH_ItemView_ShowDecorationSelected: + ret = true; + break; + case SH_ToolBox_SelectedPageTitleBold: + case SH_ScrollBar_MiddleClickAbsolutePosition: + ret = true; + break; + case SH_MainWindow_SpaceBelowMenuBar: + ret = 0; + break; + case SH_FormLayoutWrapPolicy: + ret = QFormLayout::DontWrapRows; + break; + case SH_FormLayoutFieldGrowthPolicy: + ret = QFormLayout::ExpandingFieldsGrow; + break; + case SH_FormLayoutFormAlignment: + ret = Qt::AlignLeft | Qt::AlignTop; + break; + case SH_FormLayoutLabelAlignment: + ret = Qt::AlignRight; + break; + case SH_MessageBox_TextInteractionFlags: + ret = Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse; + break; + case SH_LineEdit_PasswordCharacter: + ret = QCommonStyle::styleHint(hint, option, widget, returnData); + break; + case SH_ItemView_ArrowKeysNavigateIntoChildren: + ret = true; + break; + case SH_Menu_SubMenuPopupDelay: + ret = 96; // from Plastik + break; + case SH_DialogButtonBox_ButtonsHaveIcons: + if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) + ret = theme->themeHint(QPlatformTheme::DialogButtonBoxButtonsHaveIcons).toBool(); + else + ret = true; + break; +#ifndef Q_OS_WIN + case SH_Menu_AllowActiveAndDisabled: + ret = false; + break; +#endif + default: + ret = QProxyStyle::styleHint(hint, option, widget, returnData); + break; + } + return ret; +} + +/*! + \reimp +*/ +QStyle::SubControl QPlastiqueStyle::hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option, + const QPoint &pos, const QWidget *widget) const +{ + SubControl ret = SC_None; + switch (control) { +#ifndef QT_NO_SCROLLBAR + case CC_ScrollBar: + if (const QStyleOptionSlider *scrollBar = qstyleoption_cast(option)) { + QRect slider = proxy()->subControlRect(control, scrollBar, SC_ScrollBarSlider, widget); + if (slider.contains(pos)) { + ret = SC_ScrollBarSlider; + break; + } + + QRect scrollBarAddLine = proxy()->subControlRect(control, scrollBar, SC_ScrollBarAddLine, widget); + if (scrollBarAddLine.contains(pos)) { + ret = SC_ScrollBarAddLine; + break; + } + + QRect scrollBarSubPage = proxy()->subControlRect(control, scrollBar, SC_ScrollBarSubPage, widget); + if (scrollBarSubPage.contains(pos)) { + ret = SC_ScrollBarSubPage; + break; + } + + QRect scrollBarAddPage = proxy()->subControlRect(control, scrollBar, SC_ScrollBarAddPage, widget); + if (scrollBarAddPage.contains(pos)) { + ret = SC_ScrollBarAddPage; + break; + } + + QRect scrollBarSubLine = proxy()->subControlRect(control, scrollBar, SC_ScrollBarSubLine, widget); + if (scrollBarSubLine.contains(pos)) { + ret = SC_ScrollBarSubLine; + break; + } + } + break; +#endif // QT_NO_SCROLLBAR + default: + break; + } + + return ret != SC_None ? ret : QProxyStyle::hitTestComplexControl(control, option, pos, widget); +} + +/*! + \reimp +*/ +int QPlastiqueStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const +{ + int ret = -1; + switch (metric) { + case PM_MenuVMargin: + case PM_MenuHMargin: + ret = 0; + break; + case PM_ButtonShiftHorizontal: + case PM_ButtonShiftVertical: + ret = 1; + break; + case PM_ButtonDefaultIndicator: + ret = 0; + break; +#ifndef QT_NO_SLIDER + case PM_SliderThickness: + ret = 15; + break; + case PM_SliderLength: + case PM_SliderControlThickness: + ret = 11; + break; + case PM_SliderTickmarkOffset: + ret = 5; + break; + case PM_SliderSpaceAvailable: + if (const QStyleOptionSlider *slider = qstyleoption_cast(option)) { + int size = 15; + if (slider->tickPosition & QSlider::TicksBelow) + ++size; + if (slider->tickPosition & QSlider::TicksAbove) + ++size; + ret = size; + break; + } +#endif // QT_NO_SLIDER + case PM_ScrollBarExtent: + ret = 16; + break; + case PM_ScrollBarSliderMin: + ret = 26; + break; + case PM_ProgressBarChunkWidth: + ret = 1; + break; + case PM_MenuBarItemSpacing: + ret = 3; + break; + case PM_MenuBarVMargin: + ret = 2; + break; + case PM_MenuBarHMargin: + ret = 0; + break; + case PM_MenuBarPanelWidth: + ret = 1; + break; + case PM_ToolBarHandleExtent: + ret = 9; + break; + case PM_ToolBarSeparatorExtent: + ret = 2; + break; + case PM_ToolBarItemSpacing: + ret = 1; + break; + case PM_ToolBarItemMargin: + ret = 1; + break; + case PM_ToolBarFrameWidth: + ret = 2; + break; + case PM_SplitterWidth: + ret = 6; + break; + case PM_DockWidgetSeparatorExtent: + ret = 6; + break; + case PM_DockWidgetHandleExtent: + ret = 20; + break; + case PM_DefaultFrameWidth: +#ifndef QT_NO_MENU + if (qobject_cast(widget)) { + ret = 1; + break; + } +#endif + ret = 2; + break; + case PM_MdiSubWindowFrameWidth: + ret = 4; + break; + case PM_TitleBarHeight: + ret = qMax(widget ? widget->fontMetrics().height() : + (option ? option->fontMetrics.height() : 0), 30); + break; + case PM_MaximumDragDistance: + return -1; + case PM_DockWidgetTitleMargin: + return 2; + case PM_LayoutHorizontalSpacing: + case PM_LayoutVerticalSpacing: + return -1; // rely on layoutHorizontalSpacing() + case PM_LayoutLeftMargin: + case PM_LayoutTopMargin: + case PM_LayoutRightMargin: + case PM_LayoutBottomMargin: + { + bool isWindow = false; + if (option) { + isWindow = (option->state & State_Window); + } else if (widget) { + isWindow = widget->isWindow(); + } + + if (isWindow) { + ret = 11; + } else { + ret = 9; + } + } + default: + break; + } + + return ret != -1 ? ret : QProxyStyle::pixelMetric(metric, option, widget); +} + +/*! + \reimp +*/ +QPalette QPlastiqueStyle::standardPalette() const +{ + QPalette palette; + + palette.setBrush(QPalette::Disabled, QPalette::WindowText, QColor(QRgb(0xff808080))); + palette.setBrush(QPalette::Disabled, QPalette::Button, QColor(QRgb(0xffdddfe4))); + palette.setBrush(QPalette::Disabled, QPalette::Light, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Disabled, QPalette::Midlight, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Disabled, QPalette::Dark, QColor(QRgb(0xff555555))); + palette.setBrush(QPalette::Disabled, QPalette::Mid, QColor(QRgb(0xffc7c7c7))); + palette.setBrush(QPalette::Disabled, QPalette::Text, QColor(QRgb(0xffc7c7c7))); + palette.setBrush(QPalette::Disabled, QPalette::BrightText, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Disabled, QPalette::ButtonText, QColor(QRgb(0xff808080))); + palette.setBrush(QPalette::Disabled, QPalette::Base, QColor(QRgb(0xffefefef))); + palette.setBrush(QPalette::Disabled, QPalette::AlternateBase, palette.color(QPalette::Disabled, QPalette::Base).darker(110)); + palette.setBrush(QPalette::Disabled, QPalette::Window, QColor(QRgb(0xffefefef))); + palette.setBrush(QPalette::Disabled, QPalette::Shadow, QColor(QRgb(0xff000000))); + palette.setBrush(QPalette::Disabled, QPalette::Highlight, QColor(QRgb(0xff567594))); + palette.setBrush(QPalette::Disabled, QPalette::HighlightedText, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Disabled, QPalette::Link, QColor(QRgb(0xff0000ee))); + palette.setBrush(QPalette::Disabled, QPalette::LinkVisited, QColor(QRgb(0xff52188b))); + palette.setBrush(QPalette::Active, QPalette::WindowText, QColor(QRgb(0xff000000))); + palette.setBrush(QPalette::Active, QPalette::Button, QColor(QRgb(0xffdddfe4))); + palette.setBrush(QPalette::Active, QPalette::Light, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Active, QPalette::Midlight, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Active, QPalette::Dark, QColor(QRgb(0xff555555))); + palette.setBrush(QPalette::Active, QPalette::Mid, QColor(QRgb(0xffc7c7c7))); + palette.setBrush(QPalette::Active, QPalette::Text, QColor(QRgb(0xff000000))); + palette.setBrush(QPalette::Active, QPalette::BrightText, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Active, QPalette::ButtonText, QColor(QRgb(0xff000000))); + palette.setBrush(QPalette::Active, QPalette::Base, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Active, QPalette::AlternateBase, palette.color(QPalette::Active, QPalette::Base).darker(110)); + palette.setBrush(QPalette::Active, QPalette::Window, QColor(QRgb(0xffefefef))); + palette.setBrush(QPalette::Active, QPalette::Shadow, QColor(QRgb(0xff000000))); + palette.setBrush(QPalette::Active, QPalette::Highlight, QColor(QRgb(0xff678db2))); + palette.setBrush(QPalette::Active, QPalette::HighlightedText, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Active, QPalette::Link, QColor(QRgb(0xff0000ee))); + palette.setBrush(QPalette::Active, QPalette::LinkVisited, QColor(QRgb(0xff52188b))); + palette.setBrush(QPalette::Inactive, QPalette::WindowText, QColor(QRgb(0xff000000))); + palette.setBrush(QPalette::Inactive, QPalette::Button, QColor(QRgb(0xffdddfe4))); + palette.setBrush(QPalette::Inactive, QPalette::Light, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Inactive, QPalette::Midlight, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Inactive, QPalette::Dark, QColor(QRgb(0xff555555))); + palette.setBrush(QPalette::Inactive, QPalette::Mid, QColor(QRgb(0xffc7c7c7))); + palette.setBrush(QPalette::Inactive, QPalette::Text, QColor(QRgb(0xff000000))); + palette.setBrush(QPalette::Inactive, QPalette::BrightText, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Inactive, QPalette::ButtonText, QColor(QRgb(0xff000000))); + palette.setBrush(QPalette::Inactive, QPalette::Base, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Inactive, QPalette::AlternateBase, palette.color(QPalette::Inactive, QPalette::Base).darker(110)); + palette.setBrush(QPalette::Inactive, QPalette::Window, QColor(QRgb(0xffefefef))); + palette.setBrush(QPalette::Inactive, QPalette::Shadow, QColor(QRgb(0xff000000))); + palette.setBrush(QPalette::Inactive, QPalette::Highlight, QColor(QRgb(0xff678db2))); + palette.setBrush(QPalette::Inactive, QPalette::HighlightedText, QColor(QRgb(0xffffffff))); + palette.setBrush(QPalette::Inactive, QPalette::Link, QColor(QRgb(0xff0000ee))); + palette.setBrush(QPalette::Inactive, QPalette::LinkVisited, QColor(QRgb(0xff52188b))); + return palette; +} + +/*! + \reimp +*/ +void QPlastiqueStyle::polish(QWidget *widget) +{ + if (qobject_cast(widget) +#ifndef QT_NO_COMBOBOX + || qobject_cast(widget) +#endif +#ifndef QT_NO_SPINBOX + || qobject_cast(widget) +#endif + || qobject_cast(widget) +#ifndef QT_NO_GROUPBOX + || qobject_cast(widget) +#endif + || qobject_cast(widget) +#ifndef QT_NO_SPLITTER + || qobject_cast(widget) +#endif +#ifndef QT_NO_TABBAR + || qobject_cast(widget) +#endif + ) { + widget->setAttribute(Qt::WA_Hover); + } + + if (widget->inherits("QDockSeparator") + || widget->inherits("QDockWidgetSeparator")) { + widget->setAttribute(Qt::WA_Hover); + } + + if (false // to simplify the #ifdefs +#ifndef QT_NO_MENUBAR + || qobject_cast(widget) +#endif +#ifndef QT_NO_TOOLBAR + || qobject_cast(widget) + || (widget && qobject_cast(widget->parent())) +#endif + ) { + widget->setBackgroundRole(QPalette::Window); + } + +#ifndef QT_NO_PROGRESSBAR + if (AnimateBusyProgressBar && qobject_cast(widget)) + widget->installEventFilter(this); +#endif + +#if defined QPlastique_MaskButtons + if (qobject_cast(widget) || qobject_cast(widget)) + widget->installEventFilter(this); +#endif +} + +/*! + \reimp +*/ +void QPlastiqueStyle::unpolish(QWidget *widget) +{ + if (qobject_cast(widget) +#ifndef QT_NO_COMBOBOX + || qobject_cast(widget) +#endif +#ifndef QT_NO_SPINBOX + || qobject_cast(widget) +#endif + || qobject_cast(widget) +#ifndef QT_NO_GROUPBOX + || qobject_cast(widget) +#endif +#ifndef QT_NO_SPLITTER + || qobject_cast(widget) +#endif +#ifndef QT_NO_TABBAR + || qobject_cast(widget) +#endif + || qobject_cast(widget)) { + widget->setAttribute(Qt::WA_Hover, false); + } + + if (widget->inherits("QDockSeparator") + || widget->inherits("QDockWidgetSeparator")) { + widget->setAttribute(Qt::WA_Hover, false); + } + + if (false // to simplify the #ifdefs +#ifndef QT_NO_MENUBAR + || qobject_cast(widget) +#endif +#ifndef QT_NO_TOOLBOX + || qobject_cast(widget) +#endif +#ifndef QT_NO_TOOLBAR + || qobject_cast(widget) + || (widget && qobject_cast(widget->parent())) +#endif + ) { + widget->setBackgroundRole(QPalette::Button); + } + +#ifndef QT_NO_PROGRESSBAR + if (AnimateBusyProgressBar && qobject_cast(widget)) { + widget->removeEventFilter(this); + bars.removeOne(static_cast(widget)); + } +#endif + +#if defined QPlastique_MaskButtons + if (qobject_cast(widget) || qobject_cast(widget)) + widget->removeEventFilter(this); +#endif +} + +/*! + \reimp +*/ +void QPlastiqueStyle::polish(QApplication *app) +{ + QProxyStyle::polish(app); +} + +/*! + \reimp +*/ +void QPlastiqueStyle::polish(QPalette &pal) +{ + QProxyStyle::polish(pal); +#ifdef Q_WS_MAC + pal.setBrush(QPalette::Shadow, Qt::black); +#endif +} + +/*! + \reimp +*/ +void QPlastiqueStyle::unpolish(QApplication *app) +{ + QProxyStyle::unpolish(app); +} + +/*! + \reimp +*/ +QIcon QPlastiqueStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, + const QWidget *widget) const +{ + return QProxyStyle::standardIcon(standardIcon, option, widget); +} + +/*! + \reimp +*/ +QPixmap QPlastiqueStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, + const QWidget *widget) const +{ + return QProxyStyle::standardPixmap(standardPixmap, opt, widget); +} + +// this works as long as we have at most 16 different control types +#define CT1(c) CT2(c, c) +#define CT2(c1, c2) (((uint)c1 << 16) | (uint)c2) + +/*! + \reimp +*/ +int QPlastiqueStyle::layoutSpacing(QSizePolicy::ControlType control1, + QSizePolicy::ControlType control2, + Qt::Orientation orientation, + const QStyleOption * /* option */, + const QWidget * /* widget */) const +{ + const int ButtonMask = QSizePolicy::ButtonBox | QSizePolicy::PushButton; + + if (control2 == QSizePolicy::ButtonBox) + return 11; + + if ((control1 | control2) & ButtonMask) + return (orientation == Qt::Horizontal) ? 10 : 9; + + switch (CT2(control1, control2)) { + case CT1(QSizePolicy::Label): + case CT2(QSizePolicy::Label, QSizePolicy::DefaultType): + case CT2(QSizePolicy::Label, QSizePolicy::CheckBox): + case CT2(QSizePolicy::Label, QSizePolicy::ComboBox): + case CT2(QSizePolicy::Label, QSizePolicy::LineEdit): + case CT2(QSizePolicy::Label, QSizePolicy::RadioButton): + case CT2(QSizePolicy::Label, QSizePolicy::Slider): + case CT2(QSizePolicy::Label, QSizePolicy::SpinBox): + case CT2(QSizePolicy::Label, QSizePolicy::ToolButton): + return 5; + case CT2(QSizePolicy::CheckBox, QSizePolicy::RadioButton): + case CT2(QSizePolicy::RadioButton, QSizePolicy::CheckBox): + case CT1(QSizePolicy::CheckBox): + if (orientation == Qt::Vertical) + return 2; + case CT1(QSizePolicy::RadioButton): + if (orientation == Qt::Vertical) + return 1; + } + + if (orientation == Qt::Horizontal + && (control2 & (QSizePolicy::CheckBox | QSizePolicy::RadioButton))) + return 8; + + if ((control1 | control2) & (QSizePolicy::Frame + | QSizePolicy::GroupBox + | QSizePolicy::TabWidget)) { + return 11; + } + + if ((control1 | control2) & (QSizePolicy::Line | QSizePolicy::Slider + | QSizePolicy::LineEdit | QSizePolicy::ComboBox + | QSizePolicy::SpinBox)) + return 7; + + return 6; +} + +/*! + \reimp +*/ +bool QPlastiqueStyle::eventFilter(QObject *watched, QEvent *event) +{ +#ifndef QT_NO_PROGRESSBAR + switch (event->type()) { + case QEvent::StyleChange: + case QEvent::Paint: + case QEvent::Show: + if (QProgressBar *bar = qobject_cast(watched)) { + // Animation by timer for progress bars that have their min and + // max values the same + if (bar->minimum() == bar->maximum()) + startProgressAnimation(bar); + else + stopProgressAnimation(bar); + } + break; + case QEvent::Destroy: + case QEvent::Hide: + stopProgressAnimation(reinterpret_cast(watched)); + break; +#if defined QPlastique_MaskButtons + case QEvent::Resize: + if (qobject_cast(watched) || qobject_cast(watched)) { + QWidget *widget = qobject_cast(watched); + QRect rect = widget->rect(); + QRegion region(rect); + region -= QRect(rect.left(), rect.top(), 2, 1); + region -= QRect(rect.left(), rect.top() + 1, 1, 1); + region -= QRect(rect.left(), rect.bottom(), 2, 1); + region -= QRect(rect.left(), rect.bottom() - 1, 1, 1); + region -= QRect(rect.right() - 1, rect.top(), 2, 1); + region -= QRect(rect.right(), rect.top() + 1, 1, 1); + region -= QRect(rect.right() - 1, rect.bottom(), 2, 1); + region -= QRect(rect.right(), rect.bottom() - 1, 1, 1); + widget->setMask(region); + } + break; +#endif + default: + break; + } +#endif // QT_NO_PROGRESSBAR + + return QProxyStyle::eventFilter(watched, event); +} + +/*! + \reimp +*/ +bool QPlastiqueStyle::event(QEvent *event) +{ + switch (event->type()) { + case QEvent::Timer: { +#ifndef QT_NO_PROGRESSBAR + QTimerEvent *timerEvent = reinterpret_cast(event); + if (timerEvent->timerId() == progressBarAnimateTimer) { + Q_ASSERT(ProgressBarFps > 0); + animateStep = timer.elapsed() / (1000 / ProgressBarFps); + foreach (QProgressBar *bar, bars) { + if (AnimateProgressBar || (bar->minimum() == 0 && bar->maximum() == 0)) + bar->update(); + } + } +#endif // QT_NO_PROGRESSBAR + event->ignore(); + } + default: + break; + } + + return QProxyStyle::event(event); +} + +void QPlastiqueStyle::startProgressAnimation(QProgressBar *bar) +{ + if (!bars.contains(bar)) { + bars << bar; + if (bars.size() == 1) { + Q_ASSERT(ProgressBarFps > 0); + animateStep = 0; + timer.start(); + progressBarAnimateTimer = startTimer(1000 / ProgressBarFps); + } + } +} + +void QPlastiqueStyle::stopProgressAnimation(QProgressBar *bar) +{ + if (!bars.isEmpty()) { + bars.removeOne(bar); + if (bars.isEmpty() && progressBarAnimateTimer) { + killTimer(progressBarAnimateTimer); + progressBarAnimateTimer = 0; + } + } +} + +QStyle *CreatePlastiqueStyle() +{ + return(new QPlastiqueStyle); +} + +QT_END_NAMESPACE diff --git a/src/style/plastique/qplastiquestyle.h b/src/style/plastique/qplastiquestyle.h new file mode 100644 index 0000000..b2d2d5d --- /dev/null +++ b/src/style/plastique/qplastiquestyle.h @@ -0,0 +1,118 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPLASTIQUESTYLE_H +#define QPLASTIQUESTYLE_H + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QProgressBar; + +class QPlastiqueStyle : public QProxyStyle +{ + Q_OBJECT + +public: + QPlastiqueStyle(); + ~QPlastiqueStyle(); + + void drawPrimitive(PrimitiveElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget = 0) const Q_DECL_OVERRIDE; + void drawControl(ControlElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const Q_DECL_OVERRIDE; + void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, + QPainter *painter, const QWidget *widget) const Q_DECL_OVERRIDE; + QSize sizeFromContents(ContentsType type, const QStyleOption *option, + const QSize &size, const QWidget *widget) const Q_DECL_OVERRIDE; + + QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const Q_DECL_OVERRIDE; + QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, + SubControl sc, const QWidget *widget) const Q_DECL_OVERRIDE; + + int styleHint(StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0, + QStyleHintReturn *returnData = 0) const Q_DECL_OVERRIDE; + SubControl hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option, + const QPoint &pos, const QWidget *widget = 0) const Q_DECL_OVERRIDE; + + int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const Q_DECL_OVERRIDE; + + QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, + const QWidget *widget = 0) const Q_DECL_OVERRIDE; + + void polish(QWidget *widget) Q_DECL_OVERRIDE; + void polish(QApplication *app) Q_DECL_OVERRIDE; + void polish(QPalette &pal) Q_DECL_OVERRIDE; + void unpolish(QWidget *widget) Q_DECL_OVERRIDE; + void unpolish(QApplication *app) Q_DECL_OVERRIDE; + + QPalette standardPalette() const Q_DECL_OVERRIDE; + + QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *opt = 0, + const QWidget *widget = 0) const Q_DECL_OVERRIDE; + int layoutSpacing(QSizePolicy::ControlType control1, + QSizePolicy::ControlType control2, + Qt::Orientation orientation, + const QStyleOption *option = 0, + const QWidget *widget = 0) const Q_DECL_OVERRIDE; + +protected: + bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; + bool event(QEvent *event) Q_DECL_OVERRIDE; + void startProgressAnimation(QProgressBar *bar); + void stopProgressAnimation(QProgressBar *bar); + +private: + int animateStep; + QList bars; + int progressBarAnimateTimer; + QElapsedTimer timer; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QPLASTIQUESTYLE_H diff --git a/src/style/shared/qhexstring_p.h b/src/style/shared/qhexstring_p.h new file mode 100644 index 0000000..99bed88 --- /dev/null +++ b/src/style/shared/qhexstring_p.h @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +#ifndef QHEXSTRING_P_H +#define QHEXSTRING_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_NAMESPACE + +// internal helper. Converts an integer value to an unique string token +template + struct HexString +{ + inline HexString(const T t) + : val(t) + {} + + inline void write(QChar *&dest) const + { + const ushort hexChars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; + const char *c = reinterpret_cast(&val); + for (uint i = 0; i < sizeof(T); ++i) { + *dest++ = hexChars[*c & 0xf]; + *dest++ = hexChars[(*c & 0xf0) >> 4]; + ++c; + } + } + const T val; +}; + +// specialization to enable fast concatenating of our string tokens to a string +template + struct QConcatenable > +{ + typedef HexString type; + enum { ExactSize = true }; + static int size(const HexString &) { return sizeof(T) * 2; } + static inline void appendTo(const HexString &str, QChar *&out) { str.write(out); } + typedef QString ConvertTo; +}; + +QT_END_NAMESPACE + +#endif // QHEXSTRING_P_H diff --git a/src/style/shared/qstylecache_p.h b/src/style/shared/qstylecache_p.h new file mode 100644 index 0000000..f9ddcfa --- /dev/null +++ b/src/style/shared/qstylecache_p.h @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSTYLECACHE_P_H +#define QSTYLECACHE_P_H + +QT_BEGIN_NAMESPACE + +#include +#include +#include +#include +#include "qstylehelper_p.h" + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +inline QImage styleCacheImage(const QSize &size) +{ + return QImage(size, QImage::Format_ARGB32_Premultiplied); +} + +inline QPixmap styleCachePixmap(const QSize &size) +{ + return QPixmap(size); +} + +#define BEGIN_STYLE_PIXMAPCACHE(a) \ + QRect rect = option->rect; \ + QPixmap internalPixmapCache; \ + QImage imageCache; \ + QPainter *p = painter; \ + QString unique = QStyleHelper::uniqueName((a), option, option->rect.size()); \ + int txType = painter->deviceTransform().type() | painter->worldTransform().type(); \ + bool doPixmapCache = (txType <= QTransform::TxTranslate) \ + || (painter->deviceTransform().type() == QTransform::TxScale); \ + if (doPixmapCache && QPixmapCache::find(unique, internalPixmapCache)) { \ + painter->drawPixmap(option->rect.topLeft(), internalPixmapCache); \ + } else { \ + if (doPixmapCache) { \ + rect.setRect(0, 0, option->rect.width(), option->rect.height()); \ + imageCache = styleCacheImage(option->rect.size()); \ + imageCache.fill(0); \ + p = new QPainter(&imageCache); \ + } + +#define END_STYLE_PIXMAPCACHE \ + if (doPixmapCache) { \ + p->end(); \ + delete p; \ + internalPixmapCache = QPixmap::fromImage(imageCache); \ + painter->drawPixmap(option->rect.topLeft(), internalPixmapCache); \ + QPixmapCache::insert(unique, internalPixmapCache); \ + } \ + } + +QT_END_NAMESPACE + +#endif // QSTYLECACHE_P_H diff --git a/src/style/shared/qstylehelper.cpp b/src/style/shared/qstylehelper.cpp new file mode 100644 index 0000000..3b647cd --- /dev/null +++ b/src/style/shared/qstylehelper.cpp @@ -0,0 +1,391 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtWidgets module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +#include "qstylecache_p.h" +#include "qstylehelper_p.h" +#include + +QT_BEGIN_NAMESPACE + +static const qreal Q_PI = qreal(3.14159265358979323846); // pi + +namespace QStyleHelper { + +QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size) +{ + const QStyleOptionComplex *complexOption = qstyleoption_cast(option); + QString tmp = key % HexString(option->state) + % HexString(option->direction) + % HexString(complexOption ? uint(complexOption->activeSubControls) : 0u) + % HexString(option->palette.cacheKey()) + % HexString(size.width()) + % HexString(size.height()); + +#ifndef QT_NO_SPINBOX + if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast(option)) { + tmp = tmp % HexString(spinBox->buttonSymbols) + % HexString(spinBox->stepEnabled) + % QLatin1Char(spinBox->frame ? '1' : '0'); ; + } +#endif // QT_NO_SPINBOX + return tmp; +} + +#ifndef QT_NO_ACCESSIBILITY +bool isInstanceOf(QObject *obj, QAccessible::Role role) +{ + bool match = false; + QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(obj); + match = iface && iface->role() == role; + return match; +} + +// Searches for an ancestor of a particular accessible role +bool hasAncestor(QObject *obj, QAccessible::Role role) +{ + bool found = false; + QObject *parent = obj ? obj->parent() : 0; + while (parent && !found) { + if (isInstanceOf(parent, role)) + found = true; + parent = parent->parent(); + } + return found; +} +#endif // QT_NO_ACCESSIBILITY + + +#ifndef QT_NO_DIAL + +int calcBigLineSize(int radius) +{ + int bigLineSize = radius / 6; + if (bigLineSize < 4) + bigLineSize = 4; + if (bigLineSize > radius / 2) + bigLineSize = radius / 2; + return bigLineSize; +} + +static QPointF calcRadialPos(const QStyleOptionSlider *dial, qreal offset) +{ + const int width = dial->rect.width(); + const int height = dial->rect.height(); + const int r = qMin(width, height) / 2; + const int currentSliderPosition = dial->upsideDown ? dial->sliderPosition : (dial->maximum - dial->sliderPosition); + qreal a = 0; + if (dial->maximum == dial->minimum) + a = Q_PI / 2; + else if (dial->dialWrapping) + a = Q_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * Q_PI + / (dial->maximum - dial->minimum); + else + a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI + / (dial->maximum - dial->minimum)) / 6; + qreal xc = width / 2.0; + qreal yc = height / 2.0; + qreal len = r - QStyleHelper::calcBigLineSize(r) - 3; + qreal back = offset * len; + QPointF pos(QPointF(xc + back * qCos(a), yc - back * qSin(a))); + return pos; +} + +qreal angle(const QPointF &p1, const QPointF &p2) +{ + static const qreal rad_factor = 180 / Q_PI; + qreal _angle = 0; + + if (p1.x() == p2.x()) { + if (p1.y() < p2.y()) + _angle = 270; + else + _angle = 90; + } else { + qreal x1, x2, y1, y2; + + if (p1.x() <= p2.x()) { + x1 = p1.x(); y1 = p1.y(); + x2 = p2.x(); y2 = p2.y(); + } else { + x2 = p1.x(); y2 = p1.y(); + x1 = p2.x(); y1 = p2.y(); + } + + qreal m = -(y2 - y1) / (x2 - x1); + _angle = qAtan(m) * rad_factor; + + if (p1.x() < p2.x()) + _angle = 180 - _angle; + else + _angle = -_angle; + } + return _angle; +} + +QPolygonF calcLines(const QStyleOptionSlider *dial) +{ + QPolygonF poly; + int width = dial->rect.width(); + int height = dial->rect.height(); + qreal r = qMin(width, height) / 2; + int bigLineSize = calcBigLineSize(int(r)); + + qreal xc = width / 2 + 0.5; + qreal yc = height / 2 + 0.5; + const int ns = dial->tickInterval; + if (!ns) // Invalid values may be set by Qt Designer. + return poly; + int notches = (dial->maximum + ns - 1 - dial->minimum) / ns; + if (notches <= 0) + return poly; + if (dial->maximum < dial->minimum || dial->maximum - dial->minimum > 1000) { + int maximum = dial->minimum + 1000; + notches = (maximum + ns - 1 - dial->minimum) / ns; + } + + poly.resize(2 + 2 * notches); + int smallLineSize = bigLineSize / 2; + for (int i = 0; i <= notches; ++i) { + qreal angle = dial->dialWrapping ? Q_PI * 3 / 2 - i * 2 * Q_PI / notches + : (Q_PI * 8 - i * 10 * Q_PI / notches) / 6; + qreal s = qSin(angle); + qreal c = qCos(angle); + if (i == 0 || (((ns * i) % (dial->pageStep ? dial->pageStep : 1)) == 0)) { + poly[2 * i] = QPointF(xc + (r - bigLineSize) * c, + yc - (r - bigLineSize) * s); + poly[2 * i + 1] = QPointF(xc + r * c, yc - r * s); + } else { + poly[2 * i] = QPointF(xc + (r - 1 - smallLineSize) * c, + yc - (r - 1 - smallLineSize) * s); + poly[2 * i + 1] = QPointF(xc + (r - 1) * c, yc -(r - 1) * s); + } + } + return poly; +} + +// This will draw a nice and shiny QDial for us. We don't want +// all the shinyness in QWindowsStyle, hence we place it here + +void drawDial(const QStyleOptionSlider *option, QPainter *painter) +{ + QPalette pal = option->palette; + QColor buttonColor = pal.button().color(); + const int width = option->rect.width(); + const int height = option->rect.height(); + const bool enabled = option->state & QStyle::State_Enabled; + qreal r = qMin(width, height) / 2; + r -= r/50; + const qreal penSize = r/20.0; + + painter->save(); + painter->setRenderHint(QPainter::Antialiasing); + + // Draw notches + if (option->subControls & QStyle::SC_DialTickmarks) { + painter->setPen(option->palette.dark().color().darker(120)); + painter->drawLines(QStyleHelper::calcLines(option)); + } + + // Cache dial background + BEGIN_STYLE_PIXMAPCACHE(QString::fromLatin1("qdial")); + p->setRenderHint(QPainter::Antialiasing); + + const qreal d_ = r / 6; + const qreal dx = option->rect.x() + d_ + (width - 2 * r) / 2 + 1; + const qreal dy = option->rect.y() + d_ + (height - 2 * r) / 2 + 1; + + QRectF br = QRectF(dx + 0.5, dy + 0.5, + int(r * 2 - 2 * d_ - 2), + int(r * 2 - 2 * d_ - 2)); + buttonColor.setHsv(buttonColor .hue(), + qMin(140, buttonColor .saturation()), + qMax(180, buttonColor.value())); + QColor shadowColor(0, 0, 0, 20); + + if (enabled) { + // Drop shadow + qreal shadowSize = qMax(1.0, penSize/2.0); + QRectF shadowRect= br.adjusted(-2*shadowSize, -2*shadowSize, + 2*shadowSize, 2*shadowSize); + QRadialGradient shadowGradient(shadowRect.center().x(), + shadowRect.center().y(), shadowRect.width()/2.0, + shadowRect.center().x(), shadowRect.center().y()); + shadowGradient.setColorAt(qreal(0.91), QColor(0, 0, 0, 40)); + shadowGradient.setColorAt(qreal(1.0), Qt::transparent); + p->setBrush(shadowGradient); + p->setPen(Qt::NoPen); + p->translate(shadowSize, shadowSize); + p->drawEllipse(shadowRect); + p->translate(-shadowSize, -shadowSize); + + // Main gradient + QRadialGradient gradient(br.center().x() - br.width()/3, dy, + br.width()*1.3, br.center().x(), + br.center().y() - br.height()/2); + gradient.setColorAt(0, buttonColor.lighter(110)); + gradient.setColorAt(qreal(0.5), buttonColor); + gradient.setColorAt(qreal(0.501), buttonColor.darker(102)); + gradient.setColorAt(1, buttonColor.darker(115)); + p->setBrush(gradient); + } else { + p->setBrush(Qt::NoBrush); + } + + p->setPen(QPen(buttonColor.darker(280))); + p->drawEllipse(br); + p->setBrush(Qt::NoBrush); + p->setPen(buttonColor.lighter(110)); + p->drawEllipse(br.adjusted(1, 1, -1, -1)); + + if (option->state & QStyle::State_HasFocus) { + QColor highlight = pal.highlight().color(); + highlight.setHsv(highlight.hue(), + qMin(160, highlight.saturation()), + qMax(230, highlight.value())); + highlight.setAlpha(127); + p->setPen(QPen(highlight, 2.0)); + p->setBrush(Qt::NoBrush); + p->drawEllipse(br.adjusted(-1, -1, 1, 1)); + } + + END_STYLE_PIXMAPCACHE + + QPointF dp = calcRadialPos(option, qreal(0.70)); + buttonColor = buttonColor.lighter(104); + buttonColor.setAlphaF(qreal(0.8)); + const qreal ds = r/qreal(7.0); + QRectF dialRect(dp.x() - ds, dp.y() - ds, 2*ds, 2*ds); + QRadialGradient dialGradient(dialRect.center().x() + dialRect.width()/2, + dialRect.center().y() + dialRect.width(), + dialRect.width()*2, + dialRect.center().x(), dialRect.center().y()); + dialGradient.setColorAt(1, buttonColor.darker(140)); + dialGradient.setColorAt(qreal(0.4), buttonColor.darker(120)); + dialGradient.setColorAt(0, buttonColor.darker(110)); + if (penSize > 3.0) { + painter->setPen(QPen(QColor(0, 0, 0, 25), penSize)); + painter->drawLine(calcRadialPos(option, qreal(0.90)), calcRadialPos(option, qreal(0.96))); + } + + painter->setBrush(dialGradient); + painter->setPen(QColor(255, 255, 255, 150)); + painter->drawEllipse(dialRect.adjusted(-1, -1, 1, 1)); + painter->setPen(QColor(0, 0, 0, 80)); + painter->drawEllipse(dialRect); + painter->restore(); +} +#endif //QT_NO_DIAL + +void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect, + int left, int top, int right, + int bottom) +{ + QSize size = pixmap.size(); + //painter->setRenderHint(QPainter::SmoothPixmapTransform); + + //top + if (top > 0) { + painter->drawPixmap(QRect(rect.left() + left, rect.top(), rect.width() -right - left, top), pixmap, + QRect(left, 0, size.width() -right - left, top)); + + //top-left + if (left > 0) + painter->drawPixmap(QRect(rect.left(), rect.top(), left, top), pixmap, + QRect(0, 0, left, top)); + + //top-right + if (right > 0) + painter->drawPixmap(QRect(rect.left() + rect.width() - right, rect.top(), right, top), pixmap, + QRect(size.width() - right, 0, right, top)); + } + + //left + if (left > 0) + painter->drawPixmap(QRect(rect.left(), rect.top()+top, left, rect.height() - top - bottom), pixmap, + QRect(0, top, left, size.height() - bottom - top)); + + //center + painter->drawPixmap(QRect(rect.left() + left, rect.top()+top, rect.width() -right - left, + rect.height() - bottom - top), pixmap, + QRect(left, top, size.width() -right -left, + size.height() - bottom - top)); + //right + if (right > 0) + painter->drawPixmap(QRect(rect.left() +rect.width() - right, rect.top()+top, right, rect.height() - top - bottom), pixmap, + QRect(size.width() - right, top, right, size.height() - bottom - top)); + + //bottom + if (bottom > 0) { + painter->drawPixmap(QRect(rect.left() +left, rect.top() + rect.height() - bottom, + rect.width() - right - left, bottom), pixmap, + QRect(left, size.height() - bottom, + size.width() - right - left, bottom)); + //bottom-left + if (left > 0) + painter->drawPixmap(QRect(rect.left(), rect.top() + rect.height() - bottom, left, bottom), pixmap, + QRect(0, size.height() - bottom, left, bottom)); + + //bottom-right + if (right > 0) + painter->drawPixmap(QRect(rect.left() + rect.width() - right, rect.top() + rect.height() - bottom, right, bottom), pixmap, + QRect(size.width() - right, size.height() - bottom, right, bottom)); + + } +} + +QColor backgroundColor(const QPalette &pal, const QWidget* widget) +{ + if (qobject_cast(widget) && widget->parent() && + qobject_cast(widget->parent()->parent())) + return widget->parentWidget()->parentWidget()->palette().color(QPalette::Base); + return pal.color(QPalette::Base); +} + +QWindow *styleObjectWindow(QObject *so) +{ + if (so) + return so->property("_q_styleObjectWindow").value(); + + return 0; +} + +} +QT_END_NAMESPACE diff --git a/src/style/shared/qstylehelper_p.h b/src/style/shared/qstylehelper_p.h new file mode 100644 index 0000000..640830e --- /dev/null +++ b/src/style/shared/qstylehelper_p.h @@ -0,0 +1,88 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtWidgets module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include + +#ifndef QSTYLEHELPER_P_H +#define QSTYLEHELPER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qhexstring_p.h" + +QT_BEGIN_NAMESPACE + +class QPainter; +class QPixmap; +class QStyleOptionSlider; +class QStyleOption; +class QWindow; + +namespace QStyleHelper +{ + QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size); +#ifndef QT_NO_DIAL + qreal angle(const QPointF &p1, const QPointF &p2); + QPolygonF calcLines(const QStyleOptionSlider *dial); + int calcBigLineSize(int radius); + void drawDial(const QStyleOptionSlider *dial, QPainter *painter); +#endif //QT_NO_DIAL + void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect, + int left = 0, int top = 0, int right = 0, + int bottom = 0); +#ifndef QT_NO_ACCESSIBILITY + bool isInstanceOf(QObject *obj, QAccessible::Role role); + bool hasAncestor(QObject *obj, QAccessible::Role role); +#endif + QColor backgroundColor(const QPalette &pal, const QWidget* widget = 0); + QWindow *styleObjectWindow(QObject *so); +} + + +QT_END_NAMESPACE + +#endif // QSTYLEHELPER_P_H diff --git a/src/style/style.cmake b/src/style/style.cmake new file mode 100644 index 0000000..0ab6070 --- /dev/null +++ b/src/style/style.cmake @@ -0,0 +1,34 @@ +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets) + +include_directories(${Qt5Widgets_PRIVATE_INCLUDE_DIRS}) + +include_directories(${CMQT_STYLE_PATH}/shared) +file(GLOB QTStyleSharedFiles ${CMQT_STYLE_PATH}/shared/*.*) + +include_directories(${CMQT_STYLE_PATH}/bb10style) +file(GLOB QTBB10StyleFiles ${CMQT_STYLE_PATH}/bb10style/*.*) + +include_directories(${CMQT_STYLE_PATH}/cleanlooks) +file(GLOB QTCleanLookStyleFiles ${CMQT_STYLE_PATH}/cleanlooks/*.*) + +include_directories(${CMQT_STYLE_PATH}/motif) +file(GLOB QTMotifStyleFiles ${CMQT_STYLE_PATH}/motif/*.*) + +include_directories(${CMQT_STYLE_PATH}/plastique) +file(GLOB QTPlastiqueStyleFiles ${CMQT_STYLE_PATH}/plastique/*.*) + +SET(CM_QT_STYLE_FILES ${CMQT_STYLE_PATH}/CMQTStyle.cpp) + +source_group("QT Style" FILES ${CM_QT_STYLE_FILES}) +source_group("QT Style\\Shared" FILES ${QTStyleSharedFiles}) +source_group("QT Style\\BB10" FILES ${QTBB10StyleFiles}) +source_group("QT Style\\Cleanlooks" FILES ${QTCleanLookStyleFiles}) +source_group("QT Style\\Motif" FILES ${QTMotifStyleFiles}) +source_group("QT Style\\Plastique" FILES ${QTPlastiqueStyleFiles}) + +SET(QT_STYLE_FILES ${CM_QT_STYLE_FILES} + ${QTStyleSharedFiles} + ${QTBB10StyleFiles} + ${QTCleanLookStyleFiles} + ${QTMotifStyleFiles} + ${QTPlastiqueStyleFiles})