From 899a815414e95da8d9429a4a4f4d7094e49cfc55 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Thu, 30 Jul 2015 21:32:43 +0300 Subject: [PATCH] Remove gtk2 style from qtbase, it will be moved to qtstyleplugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will allow us to drop gtk2 support from qtbase in future, while still providing the gtk2 style for those who want to use it. Also with moving to qtstyleplugins, the code can be simplified because we can directly link to libraries we need, instead of using QLibrary. [ChangeLog][QtWidgets] Remove QGtkStyle, it is now provided in qtstyleplugins repository. Change-Id: I6221b1a513d7fda32e080f3ca159b0b2f8a8f246 Reviewed-by: Timo Jyrinki Reviewed-by: Oswald Buddenhagen Reviewed-by: Jens Bache-Wiig Reviewed-by: Lars Knoll Reviewed-by: J-P Nurmi Reviewed-by: Lisandro Damián Nicanor Pérez Meyer --- configure | 31 +- mkspecs/devices/linux-imx53qsb-g++/qmake.conf | 2 +- .../themes/genericunix/qgenericunixthemes.cpp | 2 +- src/widgets/doc/images/gtk-calendarwidget.png | Bin 16761 -> 0 bytes src/widgets/doc/images/gtk-checkbox.png | Bin 2323 -> 0 bytes src/widgets/doc/images/gtk-combobox.png | Bin 2730 -> 0 bytes src/widgets/doc/images/gtk-dateedit.png | Bin 2163 -> 0 bytes src/widgets/doc/images/gtk-datetimeedit.png | Bin 2923 -> 0 bytes src/widgets/doc/images/gtk-dial.png | Bin 7221 -> 0 bytes src/widgets/doc/images/gtk-doublespinbox.png | Bin 2325 -> 0 bytes src/widgets/doc/images/gtk-fontcombobox.png | Bin 3022 -> 0 bytes src/widgets/doc/images/gtk-frame.png | Bin 2340 -> 0 bytes src/widgets/doc/images/gtk-groupbox.png | Bin 6650 -> 0 bytes .../doc/images/gtk-horizontalscrollbar.png | Bin 1701 -> 0 bytes src/widgets/doc/images/gtk-label.png | Bin 1582 -> 0 bytes src/widgets/doc/images/gtk-lcdnumber.png | Bin 1193 -> 0 bytes src/widgets/doc/images/gtk-lineedit.png | Bin 2528 -> 0 bytes src/widgets/doc/images/gtk-listview.png | Bin 8493 -> 0 bytes src/widgets/doc/images/gtk-progressbar.png | Bin 2228 -> 0 bytes src/widgets/doc/images/gtk-pushbutton.png | Bin 2153 -> 0 bytes src/widgets/doc/images/gtk-radiobutton.png | Bin 3142 -> 0 bytes src/widgets/doc/images/gtk-slider.png | Bin 1359 -> 0 bytes src/widgets/doc/images/gtk-spinbox.png | Bin 2078 -> 0 bytes src/widgets/doc/images/gtk-tableview.png | Bin 8364 -> 0 bytes src/widgets/doc/images/gtk-tabwidget.png | Bin 8179 -> 0 bytes src/widgets/doc/images/gtk-textedit.png | Bin 12641 -> 0 bytes src/widgets/doc/images/gtk-timeedit.png | Bin 2621 -> 0 bytes src/widgets/doc/images/gtk-toolbox.png | Bin 4240 -> 0 bytes src/widgets/doc/images/gtk-toolbutton.png | Bin 2260 -> 0 bytes src/widgets/doc/images/gtk-treeview.png | Bin 9722 -> 0 bytes .../src/widgets-and-layouts/gallery-gtk.qdoc | 142 - .../doc/src/widgets-and-layouts/gallery.qdoc | 4 - .../doc/src/widgets-and-layouts/styles.qdoc | 2 +- src/widgets/itemviews/qfileiconprovider.cpp | 13 - src/widgets/styles/qgtk2painter.cpp | 699 --- src/widgets/styles/qgtk2painter_p.h | 100 - src/widgets/styles/qgtkglobal_p.h | 82 - src/widgets/styles/qgtkpainter.cpp | 76 - src/widgets/styles/qgtkpainter_p.h | 119 - src/widgets/styles/qgtkstyle.cpp | 4255 ----------------- src/widgets/styles/qgtkstyle_p.cpp | 891 ---- src/widgets/styles/qgtkstyle_p.h | 123 - src/widgets/styles/qgtkstyle_p_p.h | 449 -- src/widgets/styles/qstylefactory.cpp | 14 +- .../styles/qstylesheetstyle_default.cpp | 3 +- src/widgets/styles/styles.pri | 20 - .../qgraphicsview/tst_qgraphicsview.cpp | 3 - .../widgets/qpushbutton/tst_qpushbutton.cpp | 3 - tools/configure/configureapp.cpp | 2 - 49 files changed, 19 insertions(+), 7016 deletions(-) delete mode 100644 src/widgets/doc/images/gtk-calendarwidget.png delete mode 100644 src/widgets/doc/images/gtk-checkbox.png delete mode 100644 src/widgets/doc/images/gtk-combobox.png delete mode 100644 src/widgets/doc/images/gtk-dateedit.png delete mode 100644 src/widgets/doc/images/gtk-datetimeedit.png delete mode 100644 src/widgets/doc/images/gtk-dial.png delete mode 100644 src/widgets/doc/images/gtk-doublespinbox.png delete mode 100644 src/widgets/doc/images/gtk-fontcombobox.png delete mode 100644 src/widgets/doc/images/gtk-frame.png delete mode 100644 src/widgets/doc/images/gtk-groupbox.png delete mode 100644 src/widgets/doc/images/gtk-horizontalscrollbar.png delete mode 100644 src/widgets/doc/images/gtk-label.png delete mode 100644 src/widgets/doc/images/gtk-lcdnumber.png delete mode 100644 src/widgets/doc/images/gtk-lineedit.png delete mode 100644 src/widgets/doc/images/gtk-listview.png delete mode 100644 src/widgets/doc/images/gtk-progressbar.png delete mode 100644 src/widgets/doc/images/gtk-pushbutton.png delete mode 100644 src/widgets/doc/images/gtk-radiobutton.png delete mode 100644 src/widgets/doc/images/gtk-slider.png delete mode 100644 src/widgets/doc/images/gtk-spinbox.png delete mode 100644 src/widgets/doc/images/gtk-tableview.png delete mode 100644 src/widgets/doc/images/gtk-tabwidget.png delete mode 100644 src/widgets/doc/images/gtk-textedit.png delete mode 100644 src/widgets/doc/images/gtk-timeedit.png delete mode 100644 src/widgets/doc/images/gtk-toolbox.png delete mode 100644 src/widgets/doc/images/gtk-toolbutton.png delete mode 100644 src/widgets/doc/images/gtk-treeview.png delete mode 100644 src/widgets/doc/src/widgets-and-layouts/gallery-gtk.qdoc delete mode 100644 src/widgets/styles/qgtk2painter.cpp delete mode 100644 src/widgets/styles/qgtk2painter_p.h delete mode 100644 src/widgets/styles/qgtkglobal_p.h delete mode 100644 src/widgets/styles/qgtkpainter.cpp delete mode 100644 src/widgets/styles/qgtkpainter_p.h delete mode 100644 src/widgets/styles/qgtkstyle.cpp delete mode 100644 src/widgets/styles/qgtkstyle_p.cpp delete mode 100644 src/widgets/styles/qgtkstyle_p.h delete mode 100644 src/widgets/styles/qgtkstyle_p_p.h diff --git a/configure b/configure index 00588445be..2be16dd11a 100755 --- a/configure +++ b/configure @@ -700,7 +700,7 @@ CFG_CUPS=auto CFG_ICONV=auto CFG_DBUS=auto CFG_GLIB=auto -CFG_QGTKSTYLE=auto +CFG_GTK=auto CFG_LARGEFILE=auto CFG_OPENSSL=auto CFG_LIBPROXY=auto @@ -1958,9 +1958,9 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; - gtkstyle) + gtk) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then - CFG_QGTKSTYLE="$VAL" + CFG_GTK="$VAL" else UNKNOWN_OPT=yes fi @@ -2553,8 +2553,8 @@ Third Party Libraries: -no-alsa ............ Do not compile ALSA support. + -alsa ............... Compile ALSA support. - -no-gtkstyle ........ Do not compile GTK theme support. - + -gtkstyle ........... Compile GTK theme support. + -no-gtk ............. Do not compile GTK platform theme support. + + -gtk ................ Compile GTK platform theme support. Additional options: @@ -3373,7 +3373,7 @@ fi # disable XCB and GTK support auto-detection on Mac if [ "$XPLATFORM_MAC" = "yes" ]; then [ "$CFG_XCB" = "auto" ] && CFG_XCB=no - [ "$CFG_QGTKSTYLE" = "auto" ] && CFG_QGTKSTYLE=no + [ "$CFG_GTK" = "auto" ] && CFG_GTK=no fi QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX` @@ -5041,33 +5041,31 @@ if [ "$CFG_GLIB" != "no" ]; then fi # auto-detect GTK style support -if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then +if [ "$CFG_GLIB" = "yes" -a "$CFG_GTK" != "no" ]; then if [ -n "$PKG_CONFIG" ]; then QT_CFLAGS_QGTK2=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.18 atk 2>/dev/null` QT_LIBS_QGTK2=`$PKG_CONFIG --libs gtk+-2.0 2>/dev/null` QT_LIBS_QGOBJECT=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null` fi if [ -n "$QT_CFLAGS_QGTK2" ] ; then - CFG_QGTKSTYLE=yes - QT_CONFIG="$QT_CONFIG gtk2 gtkstyle" - QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTK2" - QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGOBJECT" + CFG_GTK=yes + QT_CONFIG="$QT_CONFIG gtk2" QMakeVar set QT_CFLAGS_QGTK2 "$QT_CFLAGS_QGTK2" QMakeVar set QT_LIBS_QGTK2 "$QT_LIBS_QGTK2" else - if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + if [ "$CFG_GTK" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then echo "GTK theme support cannot be enabled due to functionality tests!" [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?" - echo " Turn on verbose messaging (-v) to $0 to see the fin al report." + echo " Turn on verbose messaging (-v) to $0 to see the final report." echo " If you believe this message is in error you may use the continue" echo " switch (-continue) to $0 to continue." exit 101 else - CFG_QGTKSTYLE=no + CFG_GTK=no fi fi elif [ "$CFG_GLIB" = "no" ]; then - CFG_QGTKSTYLE=no + CFG_GTK=no fi # auto-detect libicu support @@ -6686,7 +6684,6 @@ QMakeVar set sql-plugins "$SQL_PLUGINS" [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV" [ "$CFG_EVDEV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EVDEV" [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB" -[ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK" [ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC" [ "$CFG_POSIX_FALLOCATE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_POSIX_FALLOCATE" [ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP" @@ -7129,7 +7126,7 @@ report_support " FontConfig ............." "$CFG_FONTCONFIG" report_support " FreeType ..............." "$CFG_FREETYPE" system "system library" yes "bundled copy" report_support " Glib ..................." "$CFG_GLIB" report_support " GStreamer .............." "$CFG_GSTREAMER" yes "$CFG_GSTREAMER_VERSION" -report_support " GTK theme .............." "$CFG_QGTKSTYLE" +report_support " GTK platformtheme ......" "$CFG_GTK" report_support " HarfBuzz ..............." "$CFG_HARFBUZZ" system "system library" qt "bundled copy" report_support " Iconv .................." "$CFG_ICONV" report_support " ICU ...................." "$CFG_ICU" diff --git a/mkspecs/devices/linux-imx53qsb-g++/qmake.conf b/mkspecs/devices/linux-imx53qsb-g++/qmake.conf index 39462d83d9..8572978cb6 100644 --- a/mkspecs/devices/linux-imx53qsb-g++/qmake.conf +++ b/mkspecs/devices/linux-imx53qsb-g++/qmake.conf @@ -11,7 +11,7 @@ # export PATH=/opt/imx53qsb/x86_64-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi:$PATH # # ./configure -prefix /usr/local/qt5-imx53 -hostprefix /opt/imx53qsb/x86_64-linux/usr/local/qt5-imx53 -release -device linux-imx53qsb-g++ -# -opensource -confirm-license -no-gtkstyle -device-option CROSS_COMPILE=arm-poky-linux-gnueabi- -sysroot /opt/imx53qsb/sysroot +# -opensource -confirm-license -device-option CROSS_COMPILE=arm-poky-linux-gnueabi- -sysroot /opt/imx53qsb/sysroot # -eglfs -no-pch -opengl es2 -no-xcb -silent include(../common/linux_device_pre.conf) diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp index 2e17c3f63c..93a8d83524 100644 --- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp +++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp @@ -602,7 +602,7 @@ QVariant QGnomeTheme::themeHint(QPlatformTheme::ThemeHint hint) const return QVariant(QGenericUnixTheme::xdgIconThemePaths()); case QPlatformTheme::StyleNames: { QStringList styleNames; - styleNames << QStringLiteral("GTK+") << QStringLiteral("fusion") << QStringLiteral("windows"); + styleNames << QStringLiteral("fusion") << QStringLiteral("windows"); return QVariant(styleNames); } case QPlatformTheme::KeyboardScheme: diff --git a/src/widgets/doc/images/gtk-calendarwidget.png b/src/widgets/doc/images/gtk-calendarwidget.png deleted file mode 100644 index 568cd1a5da2a5b3bb00ad8cb8d774a66a583a949..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16761 zcmb_^2{@GDyElfh^je~ru`eZM8^%tCrlhDSyUL7ZkVKLt>lj{3WJ}hNii)CS2{DZ9 zTTx23$u3)DU*>zI|NortobO!!?_B4+UAgiu&wD@jb3gZe|9tV8yy`T z`x*U{7wPEe1)+bJvB069WDBY<9i6VunUlIEJ{h*xtpk=Y6e$GLW88r_`eWE0#2I5w z=r$V7HYW+ISG#+KP6#>yo#B^t|8v3<_W%Cf7U{$s9b$}P1Lbh`_M`SV+#2Txz)1-% z@aOTI@~~U$(?Vxs{=5v}D)$`YeX562M4?c+3KHDx6rkz)-oWCOgdIT+Rs|Zo zk~qC9J&A5>vy;3q_R}1ES$R)!YiB80P-5XA^d!gM=iZUmmo_;m<3izxo$YlBj_^e9 z9&GPf7R1lzitcaF=qrW0!hhv_PF~*`VWw2HZz9XpEf8d4c+50SR2#}%?oUnap9!mcQft%BIcmg3Jc2VpDjKXgM>R5%%x=0BZ2rxYk7PTn3 zp-P!39CB}=(N<%rLp4D_=MW7S_u!x-jzA!MEn24|C08CKMHGoDn4uIhAyeusm+Z{p8!$Sl5cg>~rPKp$Ba2 z34)FdpRM5`dg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f-aBweCTy<3qti21wS5CV4k zGOKL-2JTFB*WNe#QrvgY$1a2dQ{bl{%94PsQfDUT25XxXjNAyfhatj2hmHVNQ-Pfz$*AP4}gTa%K1lxxtw< zlLHzwR}3#ZF>K>#AKO+#yyyO{G*^{_Z^&ury-(ac?M>z?SXI^bp5ER@3YFTZp{?yy zbFMB#0F3^IrcC+0%$ew)EWn84;_2MTIBW8m%58p~kLtyEvnx#85_cH?vX0vflxZk6 zV{#TwK*wtR0pYTM!%9wud!AJ9-gE7wKxfx!3U_H%pZ6}l9+&^ttg9#Q>#f&6_8Fxp zRb{dWG9a&UGT`?%IKzN!*l~~>cbeZ5^J@WBGscAc>;4`6qh=k5tF39ZV{(!jwjF5g z=;)Z8Z`py0mUF%an3!ZYj*Y4DpaSbSprWFJl0--P(Y|721OVK;1f(JFSHwDTYe!*W z_$&FGv27=-&N^--$Fi)+U)~Eav5IXN7G58Yk^*Ddz|;V0Gt-751y+Ewjw-3II{=vj z>W($^^aXTfOoy~G1k1`O;&D3kp*SM%YtcjB(tq8?tbn6JT8mv_|p*0zU3+mgTaFZZAT6&@vkbyXD*ODEL z$Kh}yNe^nu9_p<%FS_8r)&k^?J2j3Yru5VDyo`OUmxBwiEpCpks5MChl%%n3d#= z@G!7N(>iy^snG^`K0GpSb2JbhcBZ+fDJ1`hc5JkfiVd-(B}qxX5^RL>-EE%vzD<5T zjaW+RBf7#WY_CBAfKY>H=l3`r{_X|%AZl);Wvzo3i;)QWtI_M}w+`N07jtnqV*k{R GlK3A0EE6*T diff --git a/src/widgets/doc/images/gtk-combobox.png b/src/widgets/doc/images/gtk-combobox.png deleted file mode 100644 index 3b4544df13ca82f94bc0e53394ed05ed66c6c124..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2730 zcmX|D2~-nT7fuWYjH85#Fac$AiwiJeP{F?vHc<$!6Y!H9st zV3zFO<+>03cA;~f4jx^mqQYu5gHEH-rj@f>B{>aVV0rM9R=G?WWAyN(enwI; zj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B%;sT+w7K Z4)YV=5bx_W`{SIM-8(#8%bjUS{{X0-;r9Rl diff --git a/src/widgets/doc/images/gtk-dateedit.png b/src/widgets/doc/images/gtk-dateedit.png deleted file mode 100644 index 25229f0b3b9a1cfc970669626b21f99a459f3500..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2163 zcmX|Cdq7fo8igoSyyl}4NOwfkZ1ROrZ9Y~-5oMjxbhBy8NkBw5l#Th=N&?~Ty_kHJgzQeK2@iBI| z)i@LiWygwTB%x4f0RFtj8VkP${?e3-LRkm181yZ9=l<+(u|tupQOY~T_nHj>7yO0C zHi<85^`|z(IEW0lZ>;#EB1wPhbkPr7K1%cJ_;@PJ06|<1o6Xj}Glqb-I&ul|(%_z% z$)Pw&mjHU8xY)>ES+-<1#)id`4N++{nl;Xbnz?H??ZU-o+Ja$T$}_+m2+4cnD?B)O zK7p|OFTuTI6BA03mmjF;jZJEx;h4&`1d_b)Ay@MB0ZyhdnT%((CSwO+^=>NN!O1bb z!U6C7Fzf@-dzh%jBZkn~X(VVg8bW)19@Dlgk%E&DbdWS>kEo=igr1ySD=Ilwq8&L2 z0@}p;p1)%j+kmFsz*4-L*xlXDv@JzYBpn2Wv(ipHpi+VCCqHx8TrQW*<2~oWQ``3d znd`AG7AzOh!7v|y@$h(-$q9tpc328QP=@Y^L|qqhr~XQVGUwf+ARvhE?EHM+-F zO4(eGcP5k|Cka8T{U``_ZY=!zJ)Jt|^`m@jcD9@3yYF^Oa;KkAHJUB7yaEH|TuAOG zSFl-~m{huGXC?)P!dUV)c5GZ67`So9IEBS}O=Zq$APAIyA6BD``1~Y2@vhLliSsF@ zuh`%HJ*){64MGqAK#(y*2Tg}ZWo7wA?TNFE;xpG^ysf;Eck_4n_msPkV4E$lm(V!& zu~g_G{b}vX!SkEOrPE*blD?{muhJX#BoTv;AEjIhK2WKhY)J-GM}8+J{rcocvzKQ$ z;s99Oh{@f1e`^=H`};dL865HWe)+Cv*upQJWIG5JZdrTW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-datetimeedit.png b/src/widgets/doc/images/gtk-datetimeedit.png deleted file mode 100644 index 0c934a4d0d0b6b278a855c9aecbee132009de9f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2923 zcmX|Ddpwi-AK%QLT%Mw07j%Xa3C-3;sYX~FMc0!`+Ga)O3!6La>Iev1{ zYD=N!-i?`WL>tCWo=UyK;bA(S4i4@_84!fSX0cf6?^~Kxhn{3i`+*2QxfDv8HfvdP z-_VfU-pL)7H3x1erJFJ3E+l*D;b$DE|FM~*L#NZ8QR=j{;FRy5qAX`jj}loDou94z zNi>EMRnA^bs;kqIIyyQ?HX=Gp71W)Mk@h~xJNGcq!KH*Y>G%*f18cIUyMa{Z$@ z&v8H8K!z!B7O|at_wHS$d6ph!uSO6?P-O078V!tlb%)L3a5yY3cYupVZP5tEECg%~ zSdKmqn$ZQg*|T5AusuVYOCO{9p}IZ(^NS=PE{*~f743!+hF{S-IyTW0lQq<0?}T3}fY>_R zPG4a}3>AfwOR*r?Ji(ExPg|2tEm}*e>e)i?`w--K=0e$( zR!dR%gLv(SIIEz%en)@5S%e@`0;wAf6Z_NaCon;3R?Jznq$7|cyGU!9!=QG)!Dc2cIQr071p{sq$@GGOW=zAOGp*x zx|>;F54rl?yLZ&TFyY$(0SLVl3FfU2UN_+PY}B(uoSf$P{rv%V82g{=JWY&(wmEOl*88w{NHJHpFQD*A}-+Y z(rA+@lK@>LY=_9V_K->F$&YGhOZUWbOID37HiPD=+f|fELb@f>sN2kZulrQ=ZUIa~ zQ8}e|OGk;rERn@~r)@`e^sj+Z2QQK0Pj7fTlv(NNS*QM1;0w*#5Hq3umMSbQ)r8ukja0 zthn3V*sN%xmWCabKd3)0m+mFvC?hc=9IHM6LFiQD45sB(T~qFGb9k6`%pxb}RfD=+ zCX<;M8o5@c*1X2Tl7!`8!G$D~`H<09MQZWZ%0l9f-y8c1p0-(5UpeOsDNX&7dpJP( zmk04l!^I)c_=_+Ax7ieR^BPT2ww5hAc-g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/widgets/doc/images/gtk-dial.png b/src/widgets/doc/images/gtk-dial.png deleted file mode 100644 index 18e14b3650619cac71e44e505bc955be81be2b28..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7221 zcmai3dpy%^*vHtEIYn$Fb54|Pa>}`!qDLu}qRcr`Br=hi!w^CUMM^rMaxBVW%rU2w zdMFP@p@=zdPTPCWJkRI-y#KuWd}j7@-S>Un*Wr78uS@)KTT8+1Qro$>xCD<_nVkTi z{_HnD6#Q%%S+wEel3qVzW@?YmaSdA=Um}p?cxQ&|d&nIf9VmJE$TR=k*YQIb5tyA1 zpFg)!$+Uyc^ zwbRA8=g*53KO{woawIx?s|Cp@abCOKb&hN40*jW1uE6g8%uxQ0D_Hr9yd%|T>TUg7 z$k(qY=SHptL27|>qe^h+x-gfv&Q8>G zZ6&RYhK3=coU-!0yS9;0N;Y?~yL9mpF5S}uykBhdjG~CKv9WU6+N7sfc1Vc+^uXaF zn%fBmSwtd{YP_jjP1++tE{q7J=8Ru*afV^JNpeQ*VuAVP0yIR-S);@UcVE%+^p1ZP z-h6sH6JMZ^$@|?t33j@E^*W4gXBMj>tyC}qCC(>o1b;YruZ(D+^U*Mfn}PFlRgZfe z*8KC{TCGV$&_BAb)7*yd>lRvn$j;euZ|BSHd_FI6WQVBANU?^{*lW8*y_fS`6&Hyf z+4s*n3sCy!E}Rbu*V)vtA``PC5-n~vtYVhtL^@F`kt6I_+3CSAa>wt5TTC}&H8(`x z@$y=*0uFJ*c0vGS@$S|447*b&?q!{Dwbkq>JAUaWZr{sF#OIHQs5q4T^S$p>D~r=l z^apr$Aw?Ui6}m$r=?oE(0ak`vV&Ygv>&Eh>4L@&u(o*~TDjtK)OV*?rZl|Edqw3{S z=(h|j^-f(Q9-K%BB`&&SnB3CucJl0#Llz$4CraET$cd2GRLb*0_I32wUP=<-x#VyJ z)0^OLXKtTzVe;J=p{VkXjqQK&;zP$S<#VNgM8aWNqAd zK$>mad`Dg;i;Li0o-9|=7-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(>-;L*R_8m;nF|A7B1gd`1{B2U<3bD8&yAdiFmEyN_ z)Doo~8Q_nj)u2zvCcRF#M-JI0YpFjcuj9{(w205rridj>vyFaZ*lAhUqilUmrnjfR zQqRsmKp zf;VPe>MqGr>TP*1xM|rh>YAGkU*Ha_t0pY<#llbi$?g{`q0)(w&aU4jt$kDe?JxEw zOCc*f%qa-j-_XCWGArFDDb5ozt;aHN#n9}N|BX+~)Vujm!=Qq1IB4;xcXh)6hQzP`6AL-4$1ZILipLM%2mU6?E< zzmf!IXObFCj7Tw}xikk~$JDEby_bEB5e-kXWigA4jFk1Uw3Ib8%+lgnNHi6wJwDb) zK>}(|na{^nZrQaNT3+KA_8lUT!Xah5N`=dkAQ^#AaF6Y0I$~?6Brm1rsmpU=!2QA<0$%M>FYyu|pzBZNVo)By)hj&ND7@!s%a zJ4X_vlQvXOAHv#v!78qTd`!X$tc&p3%P>7W7_NKTD_va*hA879DiR(`~Ffo z=yn?f+7}W*NFlM)r(w~Veq*Cjb&VweY}g@~kNbPIzvNKk3KUptRC?tVB|1WK!QL2f z@JBz20uQoCi&T?id!+^_|L(6_oWOBC^`LIa|D*IZ)(0dS3tOto1PIyd^;DuUR8QzQ zzM;;L@SXSJ|JO3prGHxgIKR&OhGdF7qF(14#&H_OrVy5UeWh!hzi(3I7D<%ta0dc8 dX-fi!fIGC}ybtZ^MkmQ;E>3$K@9u!({tMRqZH)i` diff --git a/src/widgets/doc/images/gtk-frame.png b/src/widgets/doc/images/gtk-frame.png deleted file mode 100644 index c1bf52f6a665d092ab9367ad611fc0fea0f122dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2340 zcmeGe2~!hibVG1K{GtZ1>;?}ag`z;&Bq&hJKrouQ>XX}ZDBukY;fw8e*51Tj`5m7@y3mQo`Av)TB(3!rOZ+G7J-uJHW9bfj! z<%?)e3?~SJX#B;zRpehoE}kPyet&lCABG^u`+Oc(n0heYWHy^+N&)7iqz6j}d@_y| z&GVd-M)E;sbG%q25~cqAgtjp*&?!nim15gwY;ed?2ry(EWn6PSDssgz%tl46)bL5F zmX?-QmC874C)%|E%(qIk@}9Sg@=LBG+uT(Y#?TkZ;`LdI)_*{CT_B zD38EUYv^J96Vl42T%KVf+I(q!Cy%iL3R2j;kiYzyh1Ly z`VH6HO=74v(Qf!E)H&5=uK?BGJ>ddo9&ZGk`C)ivaYKfFaA*;@64Z&OOqH>^mb*{T zI*d4nrB$h39uZ5@yosWKCgc)cBg*H*>AOohhN`-IEG+$Kt)*xab0IWM^qb zss=BF{k#lK?_QKMn{Oz%>(&%-qoYdHAwFf|!Nvo^iA_wnE7?8{Rgf`Gr;o=+fL7e? zSqhV&+`NE)FzM}KnEmY+ezMG!&n0t^$~^kH}ma-KD)KPw*Ks%1bL1t{To|G3Fax@3G$_q zKs@+NmU1d&=#HBO%a|#aQOi%}ipbvk8$( zzrK=!|H)9ARwkb+ew4qmJ;m6+74{091i$5A%}O{5o?mcvX7)={($}g=#oZ@&gOlr= zf&av6P;mP?IR3B>G#t)W-zc8<3EtNN)~7ZEXL4g!9b!sG-%_?5X$1$`Y5e+RoDXFn zQ`|E$m40oNxiJPO<&ClnV4LIwhWNH)KK-#QVP_8^DhWrdxBJUtz#{fXE5is`$<$gwK2Z~0*1bBRj!g;r+cQ;S<;!ucGiFBM^FT_k$qJ~lv>;}Y{}CkF+xH>el9uq4gnTRscz2m=hz+rn(jaarI(jS z%d@-_D0QeljBI;0_huiDQh9}y(n;6ho~L%f$@VsZ$MfXNa_QNj)}SCW;^Bc3-K*zt zt>fzHAyi$PADJBB4LR#0dE@}eKpl5@_Suhj9GV!FoFTwmp|jEQqVZP&6`CHteCh5O Q<~oZSe&ljqb%aRq57`5x;{X5v diff --git a/src/widgets/doc/images/gtk-groupbox.png b/src/widgets/doc/images/gtk-groupbox.png deleted file mode 100644 index 6d217c89f9f4658e881167a5683839a4eb166d95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6650 zcmdT}3p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rU4Tm2OJ-`o>u6A&?$3;)=`?}H*Uh=pDZRii4D%&^+j;$Ud61J{1^Dhse9o2gUt;|air#Fj5`s~%tc$e4 zW`efd={WGjeoh@4;Wvx*5Jj!$U2r>|%mzg|9ZiqLpbhK}kFH{tx@l_*n=2c2Mfs+< zdZ$oSRRu`&s07}IeMABeaBQ%kHuHo;+0J$>Ozi$_UL7-+)&Ix6b7+&qGj=COtcI8W z$g9hi;bqCy{~6aITi@i5!J*~-j01(_nyOCM#VptGhUW|;Y}o8)g`4ijG>JB5gQoAI z>&yJTl*sE{lwL&N{8c(DKvb*cV(v{c>teKAG}J&F7(X9xvU2QXq+p$KA*7==9mQ zJ7XhO8pWbKG12;f8xtR0Q8&$#nb60v7Xzs-QC1L7?G)Md^ZXf^A;kgGDe+kv=0gIp z^q0$RD(pWjf!AImXXCM~kNQMC1u#6#BJ~{@IATkP-Nu*47}_7sR1pIF#Y&+O4&2AC zA-DHp06+e$KX3BA3R2$-ifOxnX``gWv8!7Daj88PlzcuQM_Cu4bvWPj336)Rs~^Nu zdwlEjb@ZDloUD58J61;G^9EVh@0vDjm7q%+Htxd4bb&d5+uE>TXu)Mz|CG7Q2Qc1|I;^W843Sg-+sA*COtKeDSkhxI z`rvRInsB+o8CT@ziEB5WE>X?Loex6aOZ12yT*1B~n$~Htn4#--=(0m5>tzeYr<|^% ztvwg>0f;r*D(IzzFA(as>*DeGucYvd3&h%xQoIz7xONL~_-d@^Rp|vObh<2PYgrJ8 z7v45zUluJ35>^)I&2_2oK5c=f6NAz|*a}`ne+M}-9B3|@^6H^+k5%8esU8tXg z!65WSv+G=UVe6B!Ch@#X66n6NDv+&V$f|TuGOG3{Sk0$OHG-%K}09e2fUztzhLHwWlS5<2N{O KcDlWe68~S#QZ*U? diff --git a/src/widgets/doc/images/gtk-horizontalscrollbar.png b/src/widgets/doc/images/gtk-horizontalscrollbar.png deleted file mode 100644 index 2887730c13faccd86cca93087240b8cc7c220130..0000000000000000000000000000000000000000 GIT binary pat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?duMvtv{W!<=u*l_fH*ji=Vvh&z9=5y9NK($V*Gh zmKpE8@~Oz*TZ@Ba1yh#;BS(YG z1XiO4_9b<|i2wiJN%M=ll7N`t)MN+U2OpClzLA<#d$N%Q%EnTPU@KYhizWT}FTeHf zsS_to9BjB1>u|g$Ok`pr6*v=e~;#ShPB7%&R%d5mpmj?Fv-HDnpjVYPOf z$wpTg-432>u-)*_*udZqJ4E@iX)a>!d>S#0Rw9gU)!f}Tkcv+wGw((0*9tsi4H|Se dY`6q5jhW#H|L&Iw`X|?e_@1tQF6*2Ung9Xyos$3n diff --git a/src/widgets/doc/images/gtk-lcdnumber.png b/src/widgets/doc/images/gtk-lcdnumber.png deleted file mode 100644 index 142d298ffc5e382ae59fd20cbbf74890e70e600f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1193 zcmeAS@N?(olHy`uVBq!ia0vp^K0xfq!3HF&Ii0>TFt8MOx;TbZ%t`w5|NsB`HbJgF zdFxXNnW<+zy5xY082&^S64op@sI~9AeF(+V+v&}u1Tq2 zc5`#{V`FRkA8@9@EqMbY*c_>kjK>ZfIKXjqgG1xSL%ir0XRO^xkJ!=YY-rTn6T@IonpAe?K5qOAum27^9odf&i%usG=}NH5Hvh3P2kJcvazI#||)f zrrtQE6_F6MONR-fv5c{eKVb1veh4p+(Tx|X9Gg=RVr7S|f4If2ym*NnZcM(5==}#u z8==~P4ze)N@P|bkklUZS94e>##gm07TM+h9nU$27pip1_$^+_*B+1U((>0+nljL$= z`TU6!Ck{45yy@pPUi7iu>PLIa|HU6KeyoSM`jBZuM}E4vF!Q%wA7{}7Zk?Qepk(|5 z5{QSy5?;*Ky}13;Au|S^=?>0(Ix)8yBoj=4djJ1FH2qM5NtMFEj7jIJC5|vyF8IJI z$IQ%p7-sU+LlP1O+rKPgzgFOx`hu}VE`sMo4#ZZaDXNkaGT7M89FXE$$rJ97$O|$O zXeLnN;!T5wJ?iNzm}44SbT2^D_@U{li47OpmM-M$;N9?_h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vrwANm@6lEj@i5&i~0H-n3RK02B#VPw@%Wclu?F*tE zmHky2l=eOzM6q7}rg_yr`OuJHb6$9hFA%H)REhV%!IgWw=?yBM02zh#ggC)WI)A47Bd|Y3 z#b`=5dTMc!iuN+wgbp%`W|*5t5_^o&N(VefFMWjXi$78owTkr4{wd-G_#$%xAr@t4 z2BEsxL5F%@u688w z8Qjod0=#)ml6$J*E5oR*-G<7o*yT9Wbq?58R&WwN-^IHn(P44hi0>>sRcP!Q9uhPLV^7*Afx$Czq#XOeETWyL3R5E?ZmMXv0 zLXL+pA3h2ms5!BPn>N<(>be$-W(Sa4l+_ zV0c!{I?>V5Xulmh(1wOLOjotwz!(6(Fb|XCgJUgVyhEV+Z7jHEvnqUBS10Su4E5(=FlA6EDk4edv6!2tv|(59aQQ*S zMLMbRcF1YJ0WtNyM0X^~RMq^3gSJaF`Z=_|ktFG*=0%BIrb9-inUg4D6$yiL-f|#_ z)mRSSP4JK7sR=&#e~=fE^dNt{PK~6adT$JZ?MrbWULmE=PgEC2P2N@`CU%X3VX?yr zE@C>_M*Kc0QHWAg8IV`}MZ^6DbYw*Pxssx-HsU02&<3Rb2VWm9RZRv5FCM)E$5h7(;jLX=BQQ#ibb!{AV%EV55pa11mgOHw zcN&M?qt-MYyC($sr#?0lJrisZfx-0ak|9PR!hYO0O?q!2emS{0dF`qC9ZL8YpaEnZ diff --git a/src/widgets/doc/images/gtk-listview.png b/src/widgets/doc/images/gtk-listview.png deleted file mode 100644 index d32f8e8aee286e8a5bade44a7e7053b016a2504e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8493 zcmdTp2{@E{zt$mMA=JExu^efUSqceb$ySO~lEjQ>=YIEj?(=+io?gxT-{1eY{eSyE(&~_@h>)}p7Z;a^ zx!FEz=zkXU6bT}rzXi40Zd_cbY4d#sM}0G#y2~%pgDHp6LMGfTAy1y{7Gg8W0)Sg< zCee3kez!wlb8|CbNTUIDCUwB1kP!4;F*?6X7(&EmJJpc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Jfn{#o6L zRdZCl*BWy$Ry-2o26`n*MecH@W|py`w7Ix?%SS4gJt4d2$iOzPl?(lHUgXqA+t<*w x9~!;N^wSfunPsNuzQG*|g3#1udxrCZmupf?+5T?8_Lb3%x$&WW#fF5i{{ScxqG|vD diff --git a/src/widgets/doc/images/gtk-progressbar.png b/src/widgets/doc/images/gtk-progressbar.png deleted file mode 100644 index 6162484bf386b3ca884c7271444a087c1a0ce395..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2228 zcmYLL2~-nV7EK5Q0)>%)Nd*)7(<%sZbZ|@{VNvOz!U!(ND!2njXd?-!sStbSpHo%m)PMKA`|rQ+pPwDNnPqNj zZHhvn%!4)rY(>6x$m48+Mc%m^Ppn0uOwxk_)@@5GXA9?9NzmW}l){xUYUetV%?Ui!r z8tvDM2{W*EE?PDDo-Q9T#*-Tywe*^xsnGrq2|F3>>>MXz@L*b*H@8f1?#!8W8+K+o z&LKH$ZEH z5jNxc$UDi?z%*G|?jx_PzOhLh`6JhH^`GV$Rm;uf6O4upGR1jW$6#*-4EVk-1NL$? zv4ewyRlhX_HV+!*0eL{ufcQ<7(L9MyVyY>M0$^@EX@#X;ZR-~vZO9#5x1nvZSd5Bp z3LYDiKZKj^=7-TPHt~s&Q#ndC4-9*4j+d zXgMl4PaqHsG3JAX&YTZt6+OYSo|JAEP|VLp|1`zfWHOlv=%>#sV3%O``NfB{64E@r z=O>^xDKf>)JS;Mh7@b@kw%^$kqrs>Rj5#xGt4l`qWxI^J zb7stxeeUu-BRZOYZN42D>GL{FJJvY_>0moW?<-+mWMi>QH{#Pz~LaskQ5S=uya@`ll^K; zn$!M*XTGqp5dD0*hrFWj+0;-0gS-lG1n+_bkjp)qnWK#^DG%?U6j6(sH;Hp?BEb** zY-AT~F;^l4zFM=1C(V8On!;nBw1p*E`!4Xw6y|}vj4H*6^nGhF75-K^eYfw2W5*j~ z0nLh<#D=lx_?<_moR}ziAoiEFuDbmYH66$Si+QP0-e;>q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rZu=^r#%O8rFvysddv7| zf7g$?nw}I-3m7>hRCqn=s$-iI<3bh-eFN3l=&ls&j$*{+S3~kb7W`uZb^(og48coY z*iSeW(pi7;w2wP#5V6E(YIx&2?Zah~%<6T=#(}e}C-yCq$pDp|^i!jwe diff --git a/src/widgets/doc/images/gtk-pushbutton.png b/src/widgets/doc/images/gtk-pushbutton.png deleted file mode 100644 index f4f4d7c1e4e3e0df23650ef710826a4342dcd566..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2153 zcmX|C3piBi8=o-@aSACjgRl`=%3)M&%$PwgwMeOKEyu_x+0uO1UIz z^UrK5)uLm@Wn|n+%T`-vyC|zn_t6}4_F(?|KF>MlIq&=a-plv>zW4h%JT!2=p@kt1 zhnpW9B1l^b(ca*j`Hjw+iKPprH^V#OX zjg&H-l-1@$!eK7~9X(Ip+#VJ5hw&UD4f*6KEf(#ggvPY?n>>wguWWGWf#q_4Lfrzo zQvKORKpnPruYY{7kegea#TBj3V+56XP%-dKzNvS`T*c7&qrh951CV(9E^u4p4uZ&Z zpqaig9d3szFUsIfiA0>(A3zM=ztFFO%f-(kC!}i)IiN|vV5(zAlkEwfuwZ)9Wy3-i z)mi)r{*4y?ws!0rj~evY6fLs(&K{DOU@7ig)(0;#gE%eP)TqruGr3$2pn*M^S8!Bk zDq%)ETqsp!b2_*hfZNHKXb7|J%!{iEB856v@MeTWIL>IxkM@`v>%gM$+6o(z@+NpIir{@C#Gk&f^sV|})rJ$`V}W&KLtZ`QSwI>^SC3DwZ`nj%nU3g*NTUkK)3YV7jrlE)k&`cC zbUiAL?G+j)PuhSl{F~+N;!*fpfvDlE`-iS~?u%5z(&wRn+yXzuoJiQVAF-C6v(%^LMTc>E z&g?lH_wrUfEJoUW1PR8jRKCG$ma=z*5lR0WKcZu^Jrv_O1ZfHHove6;UR#^*w!vv0 zOQrlsirit_+10H??xhmh3qK(0=~Ik|&XbDgJ?nuPk))Rcj?o$H@aO!iW*T(5-FB%< zzw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radiobutton.png deleted file mode 100644 index b3620fa0545b063783578eab4d930745b0f926e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3142 zcmZ`*2|QG58y}4h!x18#v1Df~jamAn?0d*sL<=)xtt%8s6UKU|a4jjp;gq;Q~n@D!NYIAhiqU|0_&hxi6Ju1tQrRqWAfaoVeBH?~h}~d0M@??jvzZ8Lr+h z2Zn$P36k%{338ubdLK4SwC+b`nVM0*N(%R4?3-*&T%|0{FB6&1lm?;c;b!LS;*=5q zH~;{dEDHn&djl#e<^VPV3n=*9Sq|z#kYzpL`bdAd-+9lT>;aSKroh4LGz}+Jb3{!d z+965yA{nLl6c#ChkVqtxwsB{Q-Hz<#g%8`Ay;tu+i<5soRny1zkwRy>)UnUmd#s6pLyc27>GEy}{DqtS~0yl95=l54EZ z#26t%P&raW91gcCw(gvi`qzB^O6Tmy-tF+3SS+!~?=ZeyTZ@Rn=;Lee-(P2pz8K<)eJTEK6iumC!sE)Q6xY}8+NAXE|yv*;@>qV6j*!N4ISz{(T9udCBvQU0Nhd2hpFXS zuX4%m?z=)r*!MHRS#{oI}MAqjeWKt%6e<5(?;yp5kNyl~-1#ub+&? zV!=pGOR#S(NyOI0MN$wHWNKxd6!SH)8tv1l|8h#J;I~2wyKfSpTY9)mCj)$(wlU6ZB|S_hflAFO$1n=5oqR4@+u2;FV=)=r z{xMF}IbnVb%UwdV9u-1%WtAL0EdU*INEbg|gTd|7A192uzsY!iml-_)-HGvr>^g2j z^HVA4KRCR!fwkKHgT8k1>DgpXsWjNU%mo!C`oVmO!(jPx0;tMcb;OU&mh1&gHC+MJ zDKv1*z!J6({S#N>_oing{MIuyJ#0r=s1mF8GcUAa*!psSc-qdrZQCP;PACN7!?|DM z26q8Q21r2f)G1(F!g(0p+$kF?D;qNYNnIr0IriT%Y~}OtO$lqo)?N}`-jQz~XLAJs z%Y6Z1h8~|(TKC}1oAOL%hBQ>{JW3`^U=ZF}I4 z8CarOb3(rQ!7$a-fW93K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gsE(8<8{&6os&dwZ_g6Ar4(%KKEcRJ@w74*)TVxC(s<_9 z_2!PxpDd=M5Ncq%*W2mV$ifLk%D6k7C4(*fHAqZGmZh@0`Zo=$#hU}pcHu_f$IN{? z8m982^jFs7z-XD6-X8{I5onVyEgy z4hkA2sWruH{l!wkfo>%-`r-;7TyhNLZ6Fw9x%h^MYr5=te?tCNd_=3ap)-Bc)d92Si-im1$gRp4|7a&lVDZVwrBld|F=;OW1Pp`5LdX$W|3-2=_z1b;NnpSI+Ej zopmS^VOajN&Y~wS7r~iBkE5=Otm_zqS;-=!Y1z@lFT#5xGF>P6XbAdYmqt}kr?zGB zkR#m+8GbUlMB8*@!>VUFt~s(7%-4O9<%U5nrtwMzSY^4P4%r3xDeuYq&?9q$B>!BF zlvN!lyTTS?=Z5|WT2A4H2}r~zzo~R?Uqp*=nUlSn-CY|}%D({L CXR2)g diff --git a/src/widgets/doc/images/gtk-slider.png b/src/widgets/doc/images/gtk-slider.png deleted file mode 100644 index 3d8e0ee89eb86f8396cbde725ca11559b2cc7ffa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1359 zcmeAS@N?(olHy`uVBq!ia0y~yVB`U^_Aoj|0gY)>g;wu#( zal-7&>FN4B*4y$^1;m8X3`~p`bve6(?7YH$NNG_F4-e1(g)3Pw_k|Eb~Yy2MzDc`|qwy*4tOc=E|Sl_>4BwlhvG!h-XI zI(#Csb5<2R5uB`2pQx$*u6nw1c(p{u_Ad3i&so3$FDW4*0SS*oItKs#B`2h$B>edP zUB8Vl#V{tPUuzTae_z>Q&od*wAo^AMRAE25{qXug1vA^!=Uc(uagH3 z960ge`T2aF({+D-I8Ny0n=x~ygN{{$AIzDEPf!(Euocl4MXF}gWTL~Y;FG`TAJ1$PDo2kone+L8yg?mL+lDmSdd@pYVW~ZYkC71ZHp6LFnwW-wgAN#8^}2z z_gp{JaPdVe%P*#Wh$*ZmSXuWSYDO~U>Y;>$12zH7dpAhrrUE0*;0t3FV`E%|fx>1; z*eP96O>|f!DPh3feK8D_KAfc=XlZN^lY&?Qly*!%%L-8)<1~BN@>$rB4u_iI1su5%qLjjnI(nSlUe`Zn*TxQL!@dZ381 hV~9>{oC=8}W`?p4LhKw$GN9su!PC{xWt~$(698CNDa8N) diff --git a/src/widgets/doc/images/gtk-spinbox.png b/src/widgets/doc/images/gtk-spinbox.png deleted file mode 100644 index a39eb3aa93c0605332ac7583c4cc2eb29e24399c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2078 zcmXw3eOQwB8b(o2cx|*Pyf{rFGn=U(<;+@YDt@&_t^7Dv0)ihM9ky$0)^XyCfl_`( znwx8WRnt5foy_L6;zQFbTWVoi9ZzDK+tSQxNus>xeUbj*;)36EKlgJ#&wa}|J0lzj z&IAkw;}8`Ywi|=70+8>Xb~xmdc&iJK!QdyO!b0|B|1{lq*#Sed!>D_X4Ky2l8-4QR z0r?m83yMt%$);=n#e#no-V%ZVw{nFA8vKpJ3S&PQ`8i5hPKtbLuJ*Q~z z|MCU6!ZomW?AbFlZLPOf)f>6HjzwUrJwci>=OJGLpmzw+mcFmfnX*?!Eonr&TtVOusc>kHtdTLu*)LAd4Hv^l=DddSm z(QF(J=i!+WR?n-l`oUqDLVa@&II*MU9;u861DceLjPj416cL*&%o5(Gg?l* zO&O8!Mq}MDu-w<#n}ODhj|E||(LDXk%DtwlJ8=hVv zQ^d_O_HApEtK$|ogjOZ_w%=G~i(FNi)j-d>LUm-`StfeUXmva{M|`Dtb!q{qUEG)n zw1;{vfD+dt(58I^46r>*r8iG8bAByOP!^$F((ooYRaIrb`dB$8>WaGsBS6LsYC5h? z*2Lnh$eJ%(M0Y<=9*f)Q(S6B$$#hj&PoN(E12+CLGPOiU_`Wka%=Ez;r+4aG#4H4+6 z>5vm(F>Iu4(nV8G>1^-5iMN|{C;$LdNxRDvYyr9Ah2M@RS1Q!ul?7?| zQuAW*Ce~uAVQy&)Pr3({64^(6nm#uB=|SYeak6aUw~lkK=iOL^my3PquC@(%K4Y-> zH`g3n^HX}0Dp+)=_O+SJ8+`nO*a6E@oilOhwsdN7Sl!B1)NWnd>9w&?~n61KX_;WozlxNkA&!@q?=%FNFwDd8MIV{ zxiN(T!2~zhr4e#q)z6u?9ZI25>|p9k3J6CsP)|zg?6aIc93i~VR?YBQ$ZGr4VlnCsnGdZ^W$0I_Ub>n2)6YwxnA}zs zh_L$uo004kkZ4heo&sR2U0&@+X(O0K2F{#~!u`s8nRN5rCwAZTkHkw0BMpng( zpzvuV_OZ*e(c5Aq2jYv`e9&y)hDqc>70cm@#fYXPxd$b_ThR%k!gq$XZ0Ab;51F)t AQvd(} diff --git a/src/widgets/doc/images/gtk-tableview.png b/src/widgets/doc/images/gtk-tableview.png deleted file mode 100644 index a0251931880295fdddcedc3a021d4308f0e92712..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8364 zcmcI}3piBk+czddtf+`J&W8>vGGii#7*cc)N`-`RR!NGSavD=h$}w_2lTLO?DoUA| zr_q8AYsLKtLsM-)^%bp?U7T)#u=7=nz)SLa;sN@nc;v z4vQ=T_%I9HLYL-sT_PC_2C$1p1DY(FfJreiOH3c3YW$h4vch` zYApIN3vmiY!I!A--zS=x?TaU6XJ@lG_0a%_!||DAP8713C&FPRq{NkB%J@Jx)$O|-JBK?lz!Cci0=tN&D1}l?&1R4+;8~F8Nho; z2DtmjA3!vR?KQhFED6^~b3pdeLh}TNLx2hi(X_dQgap9d{WEY?>?&aN^o&PGXQz5g z6rzA@x7z#0QlfN%P!)BY5Di+jw-;w;*C;*Ac%la*5B5IcyQf;=DV-2|$W#jv8;#b} z3x*IqYk!N&&c4h-Tmldsc>n-#in9b0n~11o*>bHp+yJM{@BxSS;2I zr@nR-4AA{}Cdjq-A{GGHS;S!Y%K=$%oAXX)z|5;N5f}vnyHX#&1VDl(k2g?ddEm`! z!Jx+Zgc2{`0^ov;=Ub&04ZL%|b9za9`;czJl+8l4~ZG z-b$dmizLu*2KAs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pw!6>x0whgq|u3X2#$q~1E&mM`CZz?>Y zh@nXEOf5*l%t8VymR3>%oJYEhHibLAQ_`=y6WwVhF+!VPSXi7iIUa~l**RdCCm3Gf zMvPIYuJmd<2Hn1`0Z}LdKv?)+Ir)R84xg!aM4`RC8IOOfeA%;C zfM+6c{oIY!rcAuDiK(^i!>Ve}k?&uT8AY$29Nf?M*V}(oF)B=W0~9wij$54nd5x5> z_-LQrVT(4!z9kmd(UruYY6ZcLDMqTgB^Y$!0&CN401D#cikr8$_w3>v9wn8eo z1pqzjGJ3~N#4OODqL!t=^c}2?q$C=-t|(;GO(LC{XAih2$lYFR)~xXgU6|J;S6&fq z$+3Lxi!_IkIq0%&?qLf7Nfw4bs95bCU9O}p2|P(i)Ox^e<1X@fO-8Moh`YyI0o?$k%Yh(gbWGmE zhhC=!BU*WyX!e1y?=-Ng)KXFzsb0mr6fm&+y=??h4E&|#XdoV2^zIXuoQnU`_q#FD zfR7Xm_qJg6{M{s0>(cZwEx~};zXmJ`+_y^9CG#p}$XiPvSU}Sw*?SBzb3`P-%hwN+ z$M>OIGfr?YAz>A_@-H@my3*du?e?+xQ_F{%HV|^So$4ZO%Dbmcj)8x@U?v_+S`&|0 zgS?WYfZIJN1rND>H@@R)-qi|@NQe6OEdtA6U5x^#-a9m~kr7y)=W0(JlL{VMp8k&L iMWd0{tiws(3zR_qw9(+82Q`j+zi*HA?)$rlvHu0~2Lq!3 diff --git a/src/widgets/doc/images/gtk-tabwidget.png b/src/widgets/doc/images/gtk-tabwidget.png deleted file mode 100644 index 089c76dad226bf82585e5582704ea940580a378b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8179 zcmdUUc{r5o|38MYJwlOZC~HX@vk;DDtdn-s$&xZN7!G3EG}VMLdXQyEg_5;J6izC2 zD8nRVEy~iuv}vIRVK8I9&ty91e81QA`(3}kKG*j**LBZ4&%M0w_jbSEulqeo?%Ox2 zC}}H6NlB?}a&z&7e;eR-K>-PW&)H^`Nl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V;+>@LKjc=}L;EXa^5E1#_gcrOcZ9z@G6155`RIRP)|hm&B|DXNsMK9l@+@!O+Cp@ z2_BIJmy?krIYa+mN9j@US!RtGda_QekfpI0|5(=%c!K2KVtDtD_&h~I7}Eo-A$50a f>^U)`A`wDLX6GR@1q?VK-hPwoc9(J|V%&cLUw;oT diff --git a/src/widgets/doc/images/gtk-textedit.png b/src/widgets/doc/images/gtk-textedit.png deleted file mode 100644 index e4b91c01c9bbeaa5e686d3b8aebe3a6ee59fd151..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12641 zcmeHtc|6o@+qWfz$r3U4h>&fDl8CWWx)3Qv3_=T8vn0kk)D$dD4}lT)~K-O>CcRHdlvuzrAsD^KH;gUK8M?%v7wa`Ft+0kG^sGTKu?RCV7!Bg*m&U6zu4 zD7;+M`>j;=G+YP{hi`AH;k+dU0Es)Li-mi_!Zg~^Iagag<7w;$Z4ZCIaACLHG)mvb z5PxCWVQYsbVJ141re9nas`m)(A2fRPXvOz8bOAvOHzgw+Y!Un4Y%iI6xxSAk-we}y ztq)UFoPlv{zJe)ug&CUCKr^C1F;efuz4VCt*5UQ)Wl6+e#dwX5@4_N&-oJWOu;KSJ z;Zj9?@PYFKLcK)?;OZ}7XwvG2s)0uXmz4cVveU(L%25$_HJC*>MWW)e)D7Io7lH<_ zIz=92hHlVcU?tI8Y)Y05iBMHly)2_>SlIXR zbO*po2tEAqNGQ5;03Kw>FLd{UdJc;KZN(%3#U3-o!!p3Z?xDm9=_9N0wodeB>Y1i7 z^0xrF^GfLlbAAd0*;>P^O=E?F;*PL*RlD+tG3|SvCg%KI$q8#DDRqPYc#s+Q=~3M# zYr$r(&w8zm`aF2gb`tit2sya0JC=|oP9}_it`M*;KEGM^ni5|WTz4g9{1Z!T0jc&} zw!P+fTeZfBh{f~GiuAw*?wbAY&y7};cTp}ss9QMsN3z|>L1`!3w^0=@J*9mXr#<_{ zX|tYcLPmSFlTmk3n$9;4Vx@D7D;S;)1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7h3Y9N z=bg^e{{s#FZ!PFwvGV^+ruQWOw|YVTM|4}B`hR4#6}bK%84lDhKk`0QEoE*ymv-Lv zm|H#ekgxcuTTQQjokqm%corxcp`JtC@@!DV=M!&_`yjzWkA&I_-0Z;QN8XQ}=6L6N zr&f$2N#e{M_IPc2i4Fdc!A>$li2xB*2+DRE{gBiRjrv^0IG6GrBSuk_K8{|hzz1rh)N diff --git a/src/widgets/doc/images/gtk-timeedit.png b/src/widgets/doc/images/gtk-timeedit.png deleted file mode 100644 index acf6730a8614e7f33c6bb35ef434a71e186e49e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2621 zcmX|DeLPe9AKw}iPNj%5+=gAHsAfx72+MPBkFRq5B+k}03-{9P-cT|#JLM)uQpnT1 zDqWYRDE(5+j;EWVLiEVQty@<~SJuYP?;P~|{;_j*zTfxf`SbpKGq!IHSYTvnL?93r z1O@u;BoK%I_P%^R8T)m185^pe!_u=9vR7cbh_yxm2UbbVDNdAXR>55PikVZ z;)&;1L0>RIwX^`Rv2hyg>FEI*k`n!mGk4I9U{H;g#>a>x5(#Vf?qZQ7L!#=>K>*c` zhu=OU&6$CIpdu$Mx+u-f&HlzGaFmT2MZJRdWj|stfVh{p*${`rfwik@ zd|w&+EU{q0tO!|E7w)Y7E`u2$ic+mh-4pVgy1P%Q-oLmBl$4YJuRDwVald1aA9FIobcf#qo-#VGx3O)e$G8%Sq=He zMp7h86d|BvPz-Aq3IzrSBhGFO^}>}t{*_kZLYcMrw|r+G-w-BJzxK{Y^}9t#u7*n{ zx%iR&Tu5*pd>#-6<+Krhx^E0gcjxlvpG`2X(w?4RQ0PYzQSi}3Uacm^EHkZKPlrZ9 zYV?B_f(lVebW98-Y)=@-U@|DK8(b;)6aSBWS4HbkBn*NOP~YIIRUSt*d8)s=FNTin zaRsoV<65Y!5gaCRt_h&jLTHk6gT1Y-3?Xx|q7ohdbc`FS`D^tddpJ zbmq`9-tpqyEoIAvk8%d{t=MPT5GU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@j^eBu zPo!^cDJ4ax7THazUK}AWW-q>CY4{bqkGD^LrJmh?HEIQN@?D?*Hh_v5f1EhX+Lo*y zz#NZz*~oEC8FCPxKe-y|D)ln7%9=|BC;5}6SIFn{VeRAxXY2l(XH+d678R0K%zqy} z>EZjSayeamsbGUxmdik{Uyh`t`}vN5HjeHY$~pDP+P@~S+HHpn9j&ZLrrmFv|HQz^ zQf%U9tNJcS0(Z))jdvR3_YkbYIKI>kJZzvsHpxbd7(#4j?4bWb{8=5+9cEit$dK?RsUe5`w&c;bjBWds{rm^q0tYZRwSV3#FA@n6&cQE8M8PR_3cT3fkYe{Ob^SVh?Dznw$a*|T zIVYD+UQdx*n4=UB)XiRB?D+Y5|FOPNrr2GH2hj*NSA@oi{Qkkjljcrb3r>p&&Ahe- kSM5pI!xo*!4MR~9!OHde-bMF?EZmGBzpcJCo1nD+0h(N)?EnA( diff --git a/src/widgets/doc/images/gtk-toolbox.png b/src/widgets/doc/images/gtk-toolbox.png deleted file mode 100644 index 25e613769995e87447b796d4ed6a4d6311f56033..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4240 zcmeHKX;c$g7A7D8V}T%1D6%8e(%0} z@4NNAtiTOx3<#zKEiEkre?Om%=v$2b%JlK*{|DFNGg?|k+x&ezHz%B6MZvJ53nDN@ zkPd<%>_xtAs1Aa#(&B1zIZP3yite29n!+o(Y;Z$~N>n21FKx-*Tl8|%gP=mqoN0_+ z4mt!iL#z5IVorLs9!Mg&kSwRdgIg?0ufsYjd(%7mwQ!R*lft(-2%6zx7Jxno?qiuP zz6aob>7!pkQsZe%f|-^p7AY&!($fB*J(R;ej#S%Yn?n$>OWdNRWI|`bJ5wNR&s^Z) zwaHWYX? z-AT;RCgYZxJicWFKr2=F9UfPH?} z&4?yBDQNp7GFDMdr*l1nm<66&e-v1?99bRbKaI?nJmGJ~dpqjlsj)Wra~*g-yM21& z%in?^f&iCj>(K=O(!Z;>PEPU4HKr<~z@D3MF{4y=|4}F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F?$B#G4c_-^ssC)-7}BQ@1Zd+>$N&lQUN*fzmJ^e$Sy z!P1fwIuxel#rH38Pm1I{v??@EbPW_SIf~&<|BMd1w(8OQ%?{=bt3J-M_yj!gXG$_F z;9XNRIDNsy(NR7$ydH01{#zyziNxVf;SjQM8;RqvH~`QgE9F%ZEC*}@S8XiNG0qmB z_`yD}>>j!CKL40TJOy1T7a18DV!+I_F10vPtS&ub+qnB_)VTI^2Y1+D${0Q z>;|stIJ*S=7?7cs=gY1-0`aN90`K^+{7D3BGTUf%?DM!0@s+{&GmhY}@U0h>P6wSp z#iK_+x!&cP53jZ!6~xglJDH8}moSR3U{(QWbp^`2=TknP8OX!+FuMe;+R8R0FJ6@K zLB+~qX#VS%S)nH}u^aEhDHfW$fKZiJp7C(T9^@j09Aq4c4UZa-O2Fwov5L*KK`kt< z($SaU{sWNAH`l3AfExl8LI(C<8U|q2zgxnU`{Cwd&bv=&Y9j8J`|x(yZH5R3k<6GK zK&{sT5w%t=vT+^?ME@QzD|F8)R+qZqyWzLyWQLHIYdmR$zl6m;M0YP#<^r%)wrfQQ z_r}CX@*8a81Bl3`E*}5$8o|_?eKl*0()lgD939%br!@zCf4^YH?v0a)f>#5-lA?i| zTxnSkcrca;L{}q~C>~UVWmzx8@BN9EAi# -#endif - QT_BEGIN_NAMESPACE static bool isCacheable(const QFileInfo &fi); @@ -358,15 +354,6 @@ QIcon QFileIconProvider::icon(const QFileInfo &info) const { Q_D(const QFileIconProvider); -#if defined(Q_OS_UNIX) && !defined(QT_NO_STYLE_GTK) - const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment(); - if (desktopEnvironment != QByteArrayLiteral("KDE")) { - QIcon gtkIcon = QGtkStylePrivate::getFilesystemIcon(info); - if (!gtkIcon.isNull()) - return gtkIcon; - } -#endif - QIcon retIcon = d->getIcon(info); if (!retIcon.isNull()) return retIcon; diff --git a/src/widgets/styles/qgtk2painter.cpp b/src/widgets/styles/qgtk2painter.cpp deleted file mode 100644 index ea8afbc93c..0000000000 --- a/src/widgets/styles/qgtk2painter.cpp +++ /dev/null @@ -1,699 +0,0 @@ -/**************************************************************************** -** -** 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 "qgtk2painter_p.h" - -#include -#if !defined(QT_NO_STYLE_GTK) - -// This class is primarily a wrapper around the gtk painter functions -// and takes care of converting all such calls into cached Qt pixmaps. - -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -typedef GdkPixbuf* (*Ptr_gdk_pixbuf_get_from_drawable) (GdkPixbuf *, GdkDrawable *, GdkColormap *, int, int, int, int, int, int); -typedef GdkPixmap* (*Ptr_gdk_pixmap_new) (GdkDrawable *, gint, gint, gint); -typedef void (*Ptr_gdk_draw_rectangle) (GdkDrawable *, GdkGC *, gboolean, gint, gint, gint, gint); -typedef void (*Ptr_gdk_drawable_unref)(GdkDrawable *); - -typedef void (*Ptr_gtk_paint_check) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint); -typedef void (*Ptr_gtk_paint_box) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint); -typedef void (*Ptr_gtk_paint_box_gap) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint , gint, GtkPositionType, gint, gint); -typedef void (*Ptr_gtk_paint_resize_grip) (GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, GdkWindowEdge, gint , gint , gint , gint); -typedef void (*Ptr_gtk_paint_focus) (GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint); -typedef void (*Ptr_gtk_paint_shadow) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint); -typedef void (*Ptr_gtk_paint_slider) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint, GtkOrientation); -typedef void (*Ptr_gtk_paint_expander) (GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , GtkExpanderStyle ); -typedef void (*Ptr_gtk_paint_handle) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint, GtkOrientation); -typedef void (*Ptr_gtk_paint_arrow) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, GtkArrowType, gboolean, gint , gint , gint , gint); -typedef void (*Ptr_gtk_paint_option) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint); -typedef void (*Ptr_gtk_paint_flat_box) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint); -typedef void (*Ptr_gtk_paint_extension) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint, GtkPositionType); -typedef void (*Ptr_gtk_paint_hline) (GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint y); -typedef void (*Ptr_gtk_paint_vline) (GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint); - -namespace QGtk2PainterPrivate { - static Ptr_gdk_pixmap_new gdk_pixmap_new = 0; - static Ptr_gdk_pixbuf_get_from_drawable gdk_pixbuf_get_from_drawable = 0; - static Ptr_gdk_draw_rectangle gdk_draw_rectangle = 0; - static Ptr_gdk_drawable_unref gdk_drawable_unref = 0; - - static Ptr_gtk_paint_check gtk_paint_check = 0; - static Ptr_gtk_paint_box gtk_paint_box = 0; - static Ptr_gtk_paint_box_gap gtk_paint_box_gap = 0; - static Ptr_gtk_paint_flat_box gtk_paint_flat_box = 0; - static Ptr_gtk_paint_option gtk_paint_option = 0; - static Ptr_gtk_paint_extension gtk_paint_extension = 0; - static Ptr_gtk_paint_slider gtk_paint_slider = 0; - static Ptr_gtk_paint_shadow gtk_paint_shadow = 0; - static Ptr_gtk_paint_resize_grip gtk_paint_resize_grip = 0; - static Ptr_gtk_paint_focus gtk_paint_focus = 0; - static Ptr_gtk_paint_arrow gtk_paint_arrow = 0; - static Ptr_gtk_paint_handle gtk_paint_handle = 0; - static Ptr_gtk_paint_expander gtk_paint_expander = 0; - static Ptr_gtk_paint_vline gtk_paint_vline = 0; - static Ptr_gtk_paint_hline gtk_paint_hline = 0; -} - -static void initGtk() -{ -#ifndef QT_NO_LIBRARY - static bool initialized = false; - if (!initialized) { - // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0 - QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0); - - QGtk2PainterPrivate::gdk_pixmap_new = (Ptr_gdk_pixmap_new)libgtk.resolve("gdk_pixmap_new"); - QGtk2PainterPrivate::gdk_pixbuf_get_from_drawable = (Ptr_gdk_pixbuf_get_from_drawable)libgtk.resolve("gdk_pixbuf_get_from_drawable"); - QGtk2PainterPrivate::gdk_draw_rectangle = (Ptr_gdk_draw_rectangle)libgtk.resolve("gdk_draw_rectangle"); - QGtk2PainterPrivate::gdk_drawable_unref = (Ptr_gdk_drawable_unref)libgtk.resolve("gdk_drawable_unref"); - - QGtk2PainterPrivate::gtk_paint_check = (Ptr_gtk_paint_check)libgtk.resolve("gtk_paint_check"); - QGtk2PainterPrivate::gtk_paint_box = (Ptr_gtk_paint_box)libgtk.resolve("gtk_paint_box"); - QGtk2PainterPrivate::gtk_paint_flat_box = (Ptr_gtk_paint_flat_box)libgtk.resolve("gtk_paint_flat_box"); - QGtk2PainterPrivate::gtk_paint_check = (Ptr_gtk_paint_check)libgtk.resolve("gtk_paint_check"); - QGtk2PainterPrivate::gtk_paint_box = (Ptr_gtk_paint_box)libgtk.resolve("gtk_paint_box"); - QGtk2PainterPrivate::gtk_paint_resize_grip = (Ptr_gtk_paint_resize_grip)libgtk.resolve("gtk_paint_resize_grip"); - QGtk2PainterPrivate::gtk_paint_focus = (Ptr_gtk_paint_focus)libgtk.resolve("gtk_paint_focus"); - QGtk2PainterPrivate::gtk_paint_shadow = (Ptr_gtk_paint_shadow)libgtk.resolve("gtk_paint_shadow"); - QGtk2PainterPrivate::gtk_paint_slider = (Ptr_gtk_paint_slider)libgtk.resolve("gtk_paint_slider"); - QGtk2PainterPrivate::gtk_paint_expander = (Ptr_gtk_paint_expander)libgtk.resolve("gtk_paint_expander"); - QGtk2PainterPrivate::gtk_paint_handle = (Ptr_gtk_paint_handle)libgtk.resolve("gtk_paint_handle"); - QGtk2PainterPrivate::gtk_paint_option = (Ptr_gtk_paint_option)libgtk.resolve("gtk_paint_option"); - QGtk2PainterPrivate::gtk_paint_arrow = (Ptr_gtk_paint_arrow)libgtk.resolve("gtk_paint_arrow"); - QGtk2PainterPrivate::gtk_paint_box_gap = (Ptr_gtk_paint_box_gap)libgtk.resolve("gtk_paint_box_gap"); - QGtk2PainterPrivate::gtk_paint_extension = (Ptr_gtk_paint_extension)libgtk.resolve("gtk_paint_extension"); - QGtk2PainterPrivate::gtk_paint_hline = (Ptr_gtk_paint_hline)libgtk.resolve("gtk_paint_hline"); - QGtk2PainterPrivate::gtk_paint_vline = (Ptr_gtk_paint_vline)libgtk.resolve("gtk_paint_vline"); - - initialized = true; - } -#endif // !QT_NO_LIBRARY -} - -// To recover alpha we apply the gtk painting function two times to -// white, and black window backgrounds. This can be used to -// recover the premultiplied alpha channel -QPixmap QGtk2Painter::renderTheme(uchar *bdata, uchar *wdata, const QRect &rect) const -{ - const int bytecount = rect.width() * rect.height() * 4; - for (int index = 0; index < bytecount ; index += 4) { - uchar val = bdata[index + GTK_BLUE]; - if (m_alpha) { - int alphaval = qMax(bdata[index + GTK_BLUE] - wdata[index + GTK_BLUE], - bdata[index + GTK_GREEN] - wdata[index + GTK_GREEN]); - alphaval = qMax(alphaval, bdata[index + GTK_RED] - wdata[index + GTK_RED]) + 255; - bdata[index + QT_ALPHA] = alphaval; - } - bdata[index + QT_RED] = bdata[index + GTK_RED]; - bdata[index + QT_GREEN] = bdata[index + GTK_GREEN]; - bdata[index + QT_BLUE] = val; - } - QImage converted((const uchar*)bdata, rect.width(), rect.height(), m_alpha ? - QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32); - - if (m_hflipped || m_vflipped) { - return QPixmap::fromImage(converted.mirrored(m_hflipped, m_vflipped)); - } else { - // on raster graphicssystem we need to do a copy here, because - // we intend to deallocate the qimage bits shortly after... - return QPixmap::fromImage(converted.copy()); - } -} - -// This macro is responsible for painting any GtkStyle painting function onto a QPixmap -#define DRAW_TO_CACHE(draw_func) \ - if (rect.width() > QWIDGETSIZE_MAX || rect.height() > QWIDGETSIZE_MAX) \ - return; \ - QRect pixmapRect(0, 0, rect.width(), rect.height()); \ - { \ - GdkPixmap *pixmap = QGtk2PainterPrivate::gdk_pixmap_new((GdkDrawable*)(m_window->window), \ - rect.width(), rect.height(), -1); \ - if (!pixmap) \ - return; \ - style = QGtkStylePrivate::gtk_style_attach (style, m_window->window); \ - QGtk2PainterPrivate::gdk_draw_rectangle(pixmap, m_alpha ? style->black_gc : *style->bg_gc, \ - true, 0, 0, rect.width(), rect.height()); \ - draw_func; \ - GdkPixbuf *imgb = QGtkStylePrivate::gdk_pixbuf_new(GDK_COLORSPACE_RGB, true, 8, \ - rect.width(), rect.height()); \ - if (!imgb) \ - return; \ - imgb = QGtk2PainterPrivate::gdk_pixbuf_get_from_drawable(imgb, pixmap, NULL, 0, 0, 0, 0, \ - rect.width(), rect.height()); \ - uchar* bdata = (uchar*)QGtkStylePrivate::gdk_pixbuf_get_pixels(imgb); \ - if (m_alpha) { \ - QGtk2PainterPrivate::gdk_draw_rectangle(pixmap, style->white_gc, true, 0, 0, \ - rect.width(), rect.height()); \ - draw_func; \ - GdkPixbuf *imgw = QGtkStylePrivate::gdk_pixbuf_new(GDK_COLORSPACE_RGB, true, 8, \ - rect.width(), rect.height()); \ - if (!imgw) \ - return; \ - imgw = QGtk2PainterPrivate::gdk_pixbuf_get_from_drawable(imgw, pixmap, NULL, 0, 0, 0, 0,\ - rect.width(), rect.height()); \ - uchar* wdata = (uchar*)QGtkStylePrivate::gdk_pixbuf_get_pixels(imgw); \ - cache = renderTheme(bdata, wdata, rect); \ - QGtkStylePrivate::gdk_pixbuf_unref(imgw); \ - } else { \ - cache = renderTheme(bdata, 0, rect); \ - } \ - QGtk2PainterPrivate::gdk_drawable_unref(pixmap); \ - QGtkStylePrivate::gdk_pixbuf_unref(imgb); \ - } - -QGtk2Painter::QGtk2Painter() : QGtkPainter(), m_window(QGtkStylePrivate::gtkWidget("GtkWindow")) -{ - initGtk(); -} - -// Note currently painted without alpha for performance reasons -void QGtk2Painter::paintBoxGap(GtkWidget *gtkWidget, const gchar* part, - const QRect &paintRect, GtkStateType state, - GtkShadowType shadow, GtkPositionType gap_side, - gint x, gint width, - GtkStyle *style) -{ - if (!paintRect.isValid()) - return; - - QPixmap cache; - QRect rect = paintRect; - - // To avoid exhausting cache on large tabframes we cheat a bit by - // tiling the center part. - - const int maxHeight = 256; - const int border = 16; - if (rect.height() > maxHeight && (gap_side == GTK_POS_TOP || gap_side == GTK_POS_BOTTOM)) - rect.setHeight(2 * border + 1); - - QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size(), gtkWidget) - % HexString(gap_side) - % HexString(width) - % HexString(x); - - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_box_gap (style, - pixmap, - state, - shadow, - NULL, - gtkWidget, - (const gchar*)part, - 0, 0, - rect.width(), - rect.height(), - gap_side, - x, - width)); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - if (rect.size() != paintRect.size()) { - // We assume we can stretch the middle tab part - // Note: the side effect of this is that pinstripe patterns will get fuzzy - const QSize size = cache.size(); - // top part - m_painter->drawPixmap(QRect(paintRect.left(), paintRect.top(), - paintRect.width(), border), cache, - QRect(0, 0, size.width(), border)); - - // tiled center part - QPixmap tilePart(cache.width(), 1); - QPainter scanLinePainter(&tilePart); - scanLinePainter.drawPixmap(QRect(0, 0, tilePart.width(), tilePart.height()), cache, QRect(0, border, size.width(), 1)); - scanLinePainter.end(); - m_painter->drawTiledPixmap(QRect(paintRect.left(), paintRect.top() + border, - paintRect.width(), paintRect.height() - 2*border), tilePart); - - // bottom part - m_painter->drawPixmap(QRect(paintRect.left(), paintRect.top() + paintRect.height() - border, - paintRect.width(), border), cache, - QRect(0, size.height() - border, size.width(), border)); - } else - m_painter->drawPixmap(paintRect.topLeft(), cache); -} - -void QGtk2Painter::paintBox(GtkWidget *gtkWidget, const gchar* part, - const QRect &paintRect, GtkStateType state, - GtkShadowType shadow, GtkStyle *style, - const QString &pmKey) -{ - if (!paintRect.isValid()) - return; - - QPixmap cache; - QRect rect = paintRect; - - // To avoid exhausting cache on large tabframes we cheat a bit by - // tiling the center part. - - const int maxHeight = 256; - const int maxArea = 256*512; - const int border = 32; - if (rect.height() > maxHeight && (rect.width()*rect.height() > maxArea)) - rect.setHeight(2 * border + 1); - - QString pixmapName = uniqueName(QLS(part), state, shadow, - rect.size(), gtkWidget) % pmKey; - - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_box (style, - pixmap, - state, - shadow, - NULL, - gtkWidget, - part, - 0, 0, - rect.width(), - rect.height())); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - if (rect.size() != paintRect.size()) { - // We assume we can stretch the middle tab part - // Note: the side effect of this is that pinstripe patterns will get fuzzy - const QSize size = cache.size(); - // top part - m_painter->drawPixmap(QRect(paintRect.left(), paintRect.top(), - paintRect.width(), border), cache, - QRect(0, 0, size.width(), border)); - - // tiled center part - QPixmap tilePart(cache.width(), 1); - QPainter scanLinePainter(&tilePart); - scanLinePainter.drawPixmap(QRect(0, 0, tilePart.width(), tilePart.height()), cache, QRect(0, border, size.width(), 1)); - scanLinePainter.end(); - m_painter->drawTiledPixmap(QRect(paintRect.left(), paintRect.top() + border, - paintRect.width(), paintRect.height() - 2*border), tilePart); - - // bottom part - m_painter->drawPixmap(QRect(paintRect.left(), paintRect.top() + paintRect.height() - border, - paintRect.width(), border), cache, - QRect(0, size.height() - border, size.width(), border)); - } else - m_painter->drawPixmap(paintRect.topLeft(), cache); -} - -void QGtk2Painter::paintHline(GtkWidget *gtkWidget, const gchar* part, - const QRect &rect, GtkStateType state, - GtkStyle *style, int x1, int x2, int y, - const QString &pmKey) -{ - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(QLS(part), state, GTK_SHADOW_NONE, rect.size(), gtkWidget) - % HexString(x1) - % HexString(x2) - % HexString(y) - % pmKey; - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_hline (style, - pixmap, - state, - NULL, - gtkWidget, - part, - x1, x2, y)); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - - m_painter->drawPixmap(rect.topLeft(), cache); -} - -void QGtk2Painter::paintVline(GtkWidget *gtkWidget, const gchar* part, - const QRect &rect, GtkStateType state, - GtkStyle *style, int y1, int y2, int x, - const QString &pmKey) -{ - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(QLS(part), state, GTK_SHADOW_NONE, rect.size(), gtkWidget) - % HexString(y1) - % HexString(y2) - % HexString(x) - % pmKey; - - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_vline (style, - pixmap, - state, - NULL, - gtkWidget, - part, - y1, y2, - x)); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - m_painter->drawPixmap(rect.topLeft(), cache); -} - - -void QGtk2Painter::paintExpander(GtkWidget *gtkWidget, - const gchar* part, const QRect &rect, - GtkStateType state, GtkExpanderStyle expander_state, - GtkStyle *style, const QString &pmKey) -{ - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(QLS(part), state, GTK_SHADOW_NONE, rect.size(), gtkWidget) - % HexString(expander_state) - % pmKey; - - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_expander (style, pixmap, - state, NULL, - gtkWidget, part, - rect.width()/2, - rect.height()/2, - expander_state)); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - - m_painter->drawPixmap(rect.topLeft(), cache); -} - -void QGtk2Painter::paintFocus(GtkWidget *gtkWidget, const gchar* part, - const QRect &rect, GtkStateType state, - GtkStyle *style, const QString &pmKey) -{ - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(QLS(part), state, GTK_SHADOW_NONE, rect.size(), gtkWidget) % pmKey; - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_focus (style, pixmap, state, NULL, - gtkWidget, - part, - 0, 0, - rect.width(), - rect.height())); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - - m_painter->drawPixmap(rect.topLeft(), cache); -} - - -void QGtk2Painter::paintResizeGrip(GtkWidget *gtkWidget, const gchar* part, - const QRect &rect, GtkStateType state, - GtkShadowType shadow, GdkWindowEdge edge, - GtkStyle *style, const QString &pmKey) -{ - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size(), gtkWidget) % pmKey; - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_resize_grip (style, pixmap, state, - NULL, gtkWidget, - part, edge, 0, 0, - rect.width(), - rect.height())); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - - m_painter->drawPixmap(rect.topLeft(), cache); -} - - -void QGtk2Painter::paintArrow(GtkWidget *gtkWidget, const gchar* part, - const QRect &arrowrect, GtkArrowType arrow_type, - GtkStateType state, GtkShadowType shadow, - gboolean fill, GtkStyle *style, const QString &pmKey) -{ - QRect rect = m_cliprect.isValid() ? m_cliprect : arrowrect; - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size()) - % HexString(arrow_type) - % pmKey; - - GdkRectangle gtkCliprect = {0, 0, rect.width(), rect.height()}; - int xOffset = m_cliprect.isValid() ? arrowrect.x() - m_cliprect.x() : 0; - int yOffset = m_cliprect.isValid() ? arrowrect.y() - m_cliprect.y() : 0; - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_arrow (style, pixmap, state, shadow, - >kCliprect, - gtkWidget, - part, - arrow_type, fill, - xOffset, yOffset, - arrowrect.width(), - arrowrect.height())) - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - - m_painter->drawPixmap(rect.topLeft(), cache); -} - - -void QGtk2Painter::paintHandle(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, - GtkStateType state, GtkShadowType shadow, - GtkOrientation orientation, GtkStyle *style) -{ - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size()) - % HexString(orientation); - - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_handle (style, - pixmap, - state, - shadow, - NULL, - gtkWidget, - part, 0, 0, - rect.width(), - rect.height(), - orientation)); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - m_painter->drawPixmap(rect.topLeft(), cache); -} - - -void QGtk2Painter::paintSlider(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, - GtkStateType state, GtkShadowType shadow, - GtkStyle *style, GtkOrientation orientation, - const QString &pmKey) -{ - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size(), gtkWidget) % pmKey; - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_slider (style, - pixmap, - state, - shadow, - NULL, - gtkWidget, - part, - 0, 0, - rect.width(), - rect.height(), - orientation)); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - m_painter->drawPixmap(rect.topLeft(), cache); -} - - -void QGtk2Painter::paintShadow(GtkWidget *gtkWidget, const gchar* part, - const QRect &rect, GtkStateType state, - GtkShadowType shadow, GtkStyle *style, - const QString &pmKey) - -{ - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size()) % pmKey; - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_shadow(style, pixmap, state, shadow, NULL, - gtkWidget, part, 0, 0, rect.width(), rect.height())); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - m_painter->drawPixmap(rect.topLeft(), cache); -} - -void QGtk2Painter::paintFlatBox(GtkWidget *gtkWidget, const gchar* part, - const QRect &rect, GtkStateType state, - GtkShadowType shadow, GtkStyle *style, - const QString &pmKey) -{ - if (!rect.isValid()) - return; - QPixmap cache; - QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size()) % pmKey; - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_flat_box (style, - pixmap, - state, - shadow, - NULL, - gtkWidget, - part, 0, 0, - rect.width(), - rect.height())); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - m_painter->drawPixmap(rect.topLeft(), cache); -} - -void QGtk2Painter::paintExtention(GtkWidget *gtkWidget, - const gchar *part, const QRect &rect, - GtkStateType state, GtkShadowType shadow, - GtkPositionType gap_pos, GtkStyle *style) -{ - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(QLS(part), state, shadow, rect.size(), gtkWidget) - % HexString(gap_pos); - - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_extension (style, pixmap, state, shadow, - NULL, gtkWidget, - (const gchar*)part, 0, 0, - rect.width(), - rect.height(), - gap_pos)); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - - m_painter->drawPixmap(rect.topLeft(), cache); -} - -void QGtk2Painter::paintOption(GtkWidget *gtkWidget, const QRect &radiorect, - GtkStateType state, GtkShadowType shadow, - GtkStyle *style, const QString &detail) - -{ - QRect rect = m_cliprect.isValid() ? m_cliprect : radiorect; - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(detail, state, shadow, rect.size()); - GdkRectangle gtkCliprect = {0, 0, rect.width(), rect.height()}; - int xOffset = m_cliprect.isValid() ? radiorect.x() - m_cliprect.x() : 0; - int yOffset = m_cliprect.isValid() ? radiorect.y() - m_cliprect.y() : 0; - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_option(style, pixmap, - state, shadow, - >kCliprect, - gtkWidget, - detail.toLatin1(), - xOffset, yOffset, - radiorect.width(), - radiorect.height())); - - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - - m_painter->drawPixmap(rect.topLeft(), cache); -} - -void QGtk2Painter::paintCheckbox(GtkWidget *gtkWidget, const QRect &checkrect, - GtkStateType state, GtkShadowType shadow, - GtkStyle *style, const QString &detail) - -{ - QRect rect = m_cliprect.isValid() ? m_cliprect : checkrect; - if (!rect.isValid()) - return; - - QPixmap cache; - QString pixmapName = uniqueName(detail, state, shadow, rect.size()); - GdkRectangle gtkCliprect = {0, 0, rect.width(), rect.height()}; - int xOffset = m_cliprect.isValid() ? checkrect.x() - m_cliprect.x() : 0; - int yOffset = m_cliprect.isValid() ? checkrect.y() - m_cliprect.y() : 0; - if (!m_usePixmapCache || !QPixmapCache::find(pixmapName, cache)) { - DRAW_TO_CACHE(QGtk2PainterPrivate::gtk_paint_check (style, - pixmap, - state, - shadow, - >kCliprect, - gtkWidget, - detail.toLatin1(), - xOffset, yOffset, - checkrect.width(), - checkrect.height())); - if (m_usePixmapCache) - QPixmapCache::insert(pixmapName, cache); - } - - m_painter->drawPixmap(rect.topLeft(), cache); -} - -QT_END_NAMESPACE - -#endif //!defined(QT_NO_STYLE_GTK) diff --git a/src/widgets/styles/qgtk2painter_p.h b/src/widgets/styles/qgtk2painter_p.h deleted file mode 100644 index 1e489b5bf9..0000000000 --- a/src/widgets/styles/qgtk2painter_p.h +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -#ifndef QGTK2PAINTER_P_H -#define QGTK2PAINTER_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 -#if !defined(QT_NO_STYLE_GTK) - -#include - -QT_BEGIN_NAMESPACE - -class QGtk2Painter : public QGtkPainter -{ -public: - QGtk2Painter(); - - void paintBoxGap(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, - GtkStateType state, GtkShadowType shadow, GtkPositionType gap_side, gint x, - gint width, GtkStyle *style) Q_DECL_OVERRIDE; - void paintBox(GtkWidget *gtkWidget, const gchar* part, - const QRect &rect, GtkStateType state, GtkShadowType shadow, GtkStyle *style, - const QString &pmKey = QString()) Q_DECL_OVERRIDE; - void paintHline(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkStyle *style, - int x1, int x2, int y, const QString &pmKey = QString()) Q_DECL_OVERRIDE; - void paintVline(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkStyle *style, - int y1, int y2, int x, const QString &pmKey = QString()) Q_DECL_OVERRIDE; - void paintExpander(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, - GtkExpanderStyle expander_state, GtkStyle *style, const QString &pmKey = QString()) Q_DECL_OVERRIDE; - void paintFocus(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkStyle *style, - const QString &pmKey = QString()) Q_DECL_OVERRIDE; - void paintResizeGrip(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkShadowType shadow, - GdkWindowEdge edge, GtkStyle *style, const QString &pmKey = QString()) Q_DECL_OVERRIDE; - void paintArrow(GtkWidget *gtkWidget, const gchar* part, const QRect &arrowrect, GtkArrowType arrow_type, GtkStateType state, GtkShadowType shadow, - gboolean fill, GtkStyle *style, const QString &pmKey = QString()) Q_DECL_OVERRIDE; - void paintHandle(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, - GtkStateType state, GtkShadowType shadow, GtkOrientation orientation, GtkStyle *style) Q_DECL_OVERRIDE; - void paintSlider(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkShadowType shadow, - GtkStyle *style, GtkOrientation orientation, const QString &pmKey = QString()) Q_DECL_OVERRIDE; - void paintShadow(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkShadowType shadow, - GtkStyle *style, const QString &pmKey = QString()) Q_DECL_OVERRIDE; - void paintFlatBox(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkShadowType shadow, GtkStyle *style, const QString & = QString()) Q_DECL_OVERRIDE; - void paintExtention(GtkWidget *gtkWidget, const gchar *part, const QRect &rect, GtkStateType state, GtkShadowType shadow, - GtkPositionType gap_pos, GtkStyle *style) Q_DECL_OVERRIDE; - void paintOption(GtkWidget *gtkWidget, const QRect &rect, GtkStateType state, GtkShadowType shadow, GtkStyle *style, const QString &detail) Q_DECL_OVERRIDE; - void paintCheckbox(GtkWidget *gtkWidget, const QRect &rect, GtkStateType state, GtkShadowType shadow, GtkStyle *style, const QString &detail) Q_DECL_OVERRIDE; - -private: - QPixmap renderTheme(uchar *bdata, uchar *wdata, const QRect &rect) const; - - GtkWidget *m_window; -}; - -QT_END_NAMESPACE - -#endif //!defined(QT_NO_STYLE_QGTK) - -#endif // QGTK2PAINTER_P_H diff --git a/src/widgets/styles/qgtkglobal_p.h b/src/widgets/styles/qgtkglobal_p.h deleted file mode 100644 index 7d729d7fc0..0000000000 --- a/src/widgets/styles/qgtkglobal_p.h +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -#ifndef QGTKGLOBAL_P_H -#define QGTKGLOBAL_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 -#if !defined(QT_NO_STYLE_GTK) - -#undef signals // Collides with GTK symbols -#include - -typedef unsigned long XID; - -#undef GTK_OBJECT_FLAGS -#define GTK_OBJECT_FLAGS(obj)(((GtkObject*)(obj))->flags) - -#define QLS(x) QLatin1String(x) - -QT_BEGIN_NAMESPACE - -#if Q_BYTE_ORDER == Q_BIG_ENDIAN -# define QT_RED 3 -# define QT_GREEN 2 -# define QT_BLUE 1 -# define QT_ALPHA 0 -#else -# define QT_RED 0 -# define QT_GREEN 1 -# define QT_BLUE 2 -# define QT_ALPHA 3 -#endif -# define GTK_RED 2 -# define GTK_GREEN 1 -# define GTK_BLUE 0 -# define GTK_ALPHA 3 - -QT_END_NAMESPACE - -#endif // !QT_NO_STYLE_GTK -#endif // QGTKGLOBAL_P_H diff --git a/src/widgets/styles/qgtkpainter.cpp b/src/widgets/styles/qgtkpainter.cpp deleted file mode 100644 index e86fee079e..0000000000 --- a/src/widgets/styles/qgtkpainter.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** 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 "qgtkpainter_p.h" - -#if !defined(QT_NO_STYLE_GTK) - -#include - -QT_BEGIN_NAMESPACE - -QGtkPainter::QGtkPainter() -{ - reset(0); -} - -QGtkPainter::~QGtkPainter() -{ -} - -void QGtkPainter::reset(QPainter *painter) -{ - m_painter = painter; - m_alpha = true; - m_hflipped = false; - m_vflipped = false; - m_usePixmapCache = true; - m_cliprect = QRect(); -} - -QString QGtkPainter::uniqueName(const QString &key, GtkStateType state, GtkShadowType shadow, - const QSize &size, GtkWidget *widget) -{ - // Note the widget arg should ideally use the widget path, though would compromise performance - QString tmp = key - % HexString(state) - % HexString(shadow) - % HexString(size.width()) - % HexString(size.height()) - % HexString(quint64(widget)); - return tmp; -} - -QT_END_NAMESPACE - -#endif //!defined(QT_NO_STYLE_GTK) diff --git a/src/widgets/styles/qgtkpainter_p.h b/src/widgets/styles/qgtkpainter_p.h deleted file mode 100644 index bfe97ccaef..0000000000 --- a/src/widgets/styles/qgtkpainter_p.h +++ /dev/null @@ -1,119 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -#ifndef QGTKPAINTER_H -#define QGTKPAINTER_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 -#if !defined(QT_NO_STYLE_GTK) - -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QGtkPainter -{ -public: - QGtkPainter(); - virtual ~QGtkPainter(); - - void reset(QPainter *painter = 0); - - void setAlphaSupport(bool value) { m_alpha = value; } - void setClipRect(const QRect &rect) { m_cliprect = rect; } - void setFlipHorizontal(bool value) { m_hflipped = value; } - void setFlipVertical(bool value) { m_vflipped = value; } - void setUsePixmapCache(bool value) { m_usePixmapCache = value; } - - virtual void paintBoxGap(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, - GtkStateType state, GtkShadowType shadow, GtkPositionType gap_side, gint x, - gint width, GtkStyle *style) = 0; - virtual void paintBox(GtkWidget *gtkWidget, const gchar* part, - const QRect &rect, GtkStateType state, GtkShadowType shadow, GtkStyle *style, - const QString &pmKey = QString()) = 0; - virtual void paintHline(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkStyle *style, - int x1, int x2, int y, const QString &pmKey = QString()) = 0; - virtual void paintVline(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkStyle *style, - int y1, int y2, int x, const QString &pmKey = QString()) = 0; - virtual void paintExpander(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, - GtkExpanderStyle expander_state, GtkStyle *style, const QString &pmKey = QString()) = 0; - virtual void paintFocus(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkStyle *style, - const QString &pmKey = QString()) = 0; - virtual void paintResizeGrip(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkShadowType shadow, - GdkWindowEdge edge, GtkStyle *style, const QString &pmKey = QString()) = 0; - virtual void paintArrow(GtkWidget *gtkWidget, const gchar* part, const QRect &arrowrect, GtkArrowType arrow_type, GtkStateType state, GtkShadowType shadow, - gboolean fill, GtkStyle *style, const QString &pmKey = QString()) = 0; - virtual void paintHandle(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, - GtkStateType state, GtkShadowType shadow, GtkOrientation orientation, GtkStyle *style) = 0; - virtual void paintSlider(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkShadowType shadow, - GtkStyle *style, GtkOrientation orientation, const QString &pmKey = QString()) = 0; - virtual void paintShadow(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkShadowType shadow, - GtkStyle *style, const QString &pmKey = QString()) = 0; - virtual void paintFlatBox(GtkWidget *gtkWidget, const gchar* part, const QRect &rect, GtkStateType state, GtkShadowType shadow, GtkStyle *style, const QString & = QString()) = 0; - virtual void paintExtention(GtkWidget *gtkWidget, const gchar *part, const QRect &rect, GtkStateType state, GtkShadowType shadow, - GtkPositionType gap_pos, GtkStyle *style) = 0; - virtual void paintOption(GtkWidget *gtkWidget, const QRect &rect, GtkStateType state, GtkShadowType shadow, GtkStyle *style, const QString &detail) = 0; - virtual void paintCheckbox(GtkWidget *gtkWidget, const QRect &rect, GtkStateType state, GtkShadowType shadow, GtkStyle *style, const QString &detail) = 0; - -protected: - static QString uniqueName(const QString &key, GtkStateType state, GtkShadowType shadow, const QSize &size, GtkWidget *widget = 0); - - QPainter *m_painter; - bool m_alpha; - bool m_hflipped; - bool m_vflipped; - bool m_usePixmapCache; - QRect m_cliprect; -}; - -QT_END_NAMESPACE - -#endif //!defined(QT_NO_STYLE_QGTK) - -#endif // QGTKPAINTER_H diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp deleted file mode 100644 index 348727b328..0000000000 --- a/src/widgets/styles/qgtkstyle.cpp +++ /dev/null @@ -1,4255 +0,0 @@ -/**************************************************************************** -** -** 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 "qgtkstyle_p.h" - -#if !defined(QT_NO_STYLE_GTK) - -#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 -#undef signals // Collides with GTK stymbols -#include -#include -#include - -QT_BEGIN_NAMESPACE - -static GtkStateType qt_gtk_state(const QStyleOption *option) -{ - GtkStateType state = GTK_STATE_NORMAL; - if (!(option->state & QStyle::State_Enabled)) - state = GTK_STATE_INSENSITIVE; - else if (option->state & QStyle::State_MouseOver) - state = GTK_STATE_PRELIGHT; - - return state; -} - -static QPixmap qt_gtk_get_icon(const char* iconName, GtkIconSize size = GTK_ICON_SIZE_BUTTON) -{ - GtkStyle *style = QGtkStylePrivate::gtkStyle(); - GtkIconSet* iconSet = QGtkStylePrivate::gtk_icon_factory_lookup_default (iconName); - GdkPixbuf* icon = QGtkStylePrivate::gtk_icon_set_render_icon(iconSet, - style, - GTK_TEXT_DIR_LTR, - GTK_STATE_NORMAL, - size, - NULL, - "button"); - uchar* data = (uchar*)QGtkStylePrivate::gdk_pixbuf_get_pixels(icon); - int width = QGtkStylePrivate::gdk_pixbuf_get_width(icon); - int height = QGtkStylePrivate::gdk_pixbuf_get_height(icon); - QImage converted(width, height, QImage::Format_ARGB32); - uchar* tdata = (uchar*)converted.bits(); - - for ( int index = 0 ; index < height * width*4 ; index +=4 ) { - //int index = y * rowstride + x; - tdata[index + QT_RED] = data[index + GTK_RED]; - tdata[index + QT_GREEN] = data[index + GTK_GREEN]; - tdata[index + QT_BLUE] = data[index + GTK_BLUE]; - tdata[index + QT_ALPHA] = data[index + GTK_ALPHA]; - } - - QGtkStylePrivate::gdk_pixbuf_unref(icon); - - // should we free iconset? - return QPixmap::fromImage(converted); -} - -static void qt_gtk_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); -} - -static const char * const dock_widget_close_xpm[] = - { - "11 13 5 1", - " c None", - ". c #D5CFCB", - "+ c #6C6A67", - "@ c #6C6A67", - "$ c #B5B0AC", - " ", - " @@@@@@@@@ ", - "@+ +@", - "@ +@ @+ @", - "@ @@@ @@@ @", - "@ @@@@@ @", - "@ @@@ @", - "@ @@@@@ @", - "@ @@@ @@@ @", - "@ +@ @+ @", - "@+ +@", - " @@@@@@@@@ ", - " " - }; - -static const char * const dock_widget_restore_xpm[] = - { - "11 13 5 1", - " c None", - ". c #D5CFCB", - "+ c #6C6A67", - "@ c #6C6A67", - "# c #6C6A67", - " ", - " @@@@@@@@@ ", - "@+ +@", - "@ #@@@# @", - "@ @ @ @", - "@ #@@@# @ @", - "@ @ @ @ @", - "@ @ @@@ @", - "@ @ @ @", - "@ #@@@@ @", - "@+ +@", - " @@@@@@@@@ ", - " " - }; - -static const char * const qt_titlebar_context_help[] = { - "10 10 3 1", - " c None", - "# c #000000", - "+ c #444444", - " +####+ ", - " ### ### ", - " ## ## ", - " +##+ ", - " +## ", - " ## ", - " ## ", - " ", - " ## ", - " ## "}; - -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 int groupBoxBottomMargin = 2; // space below the groupbox -static const int groupBoxTitleMargin = 6; // space between contents and title -static const int groupBoxTopMargin = 2; - -/*! - Returns the configuration string for \a value. - Returns \a fallback if \a value is not found. - */ -QString QGtkStyle::getGConfString(const QString &value, const QString &fallback) -{ - return QGtkStylePrivate::getGConfString(value, fallback); -} - -/*! - Returns the configuration boolean for \a key. - Returns \a fallback if \a key is not found. - */ -bool QGtkStyle::getGConfBool(const QString &key, bool fallback) -{ - return QGtkStylePrivate::getGConfBool(key, fallback); -} - -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 GdkColor fromQColor(const QColor &color) -{ - GdkColor retval; - retval.pixel = 0; - retval.red = color.red() * 255; - retval.green = color.green() * 255; - retval.blue = color.blue() * 255; - return retval; -} - -/*! - \class QGtkStyle - \brief The QGtkStyle class provides a widget style rendered by GTK+ - \since 4.5 - - \internal - \inmodule QtWidgets - - The QGtkStyle style provides a look and feel that integrates well - into GTK-based desktop environments such as the XFCe and GNOME. - - It does this by making use of the GTK+ theme engine, ensuring - that Qt applications look and feel native on these platforms. - - Note: The style requires GTK+ version 2.18 or later. - The Qt3-based "Qt" GTK+ theme engine will not work with QGtkStyle. - - \sa QWindowsXPStyle, QMacStyle, QWindowsStyle, QFusionStyle -*/ - -/*! - Constructs a QGtkStyle object. -*/ -QGtkStyle::QGtkStyle() - : QCommonStyle(*new QGtkStylePrivate) -{ - Q_D(QGtkStyle); - d->init(); -} - -/*! - \internal - - Constructs a QGtkStyle object. -*/ -QGtkStyle::QGtkStyle(QGtkStylePrivate &dd) - : QCommonStyle(dd) -{ - Q_D(QGtkStyle); - d->init(); -} - - -/*! - Destroys the QGtkStyle object. -*/ -QGtkStyle::~QGtkStyle() -{ -} - -/*! - \reimp -*/ -QPalette QGtkStyle::standardPalette() const -{ - Q_D(const QGtkStyle); - - QPalette palette = QCommonStyle::standardPalette(); - if (d->isThemeAvailable()) { - GtkStyle *style = d->gtkStyle(); - GtkWidget *gtkButton = d->gtkWidget("GtkButton"); - GtkWidget *gtkEntry = d->getTextColorWidget(); - GdkColor gdkBg, gdkBase, gdkText, gdkForeground, gdkSbg, gdkSfg, gdkaSbg, gdkaSfg; - QColor bg, base, text, fg, highlight, highlightText, inactiveHighlight, inactiveHighlightedTExt; - gdkBg = style->bg[GTK_STATE_NORMAL]; - gdkForeground = d->gtk_widget_get_style(gtkButton)->fg[GTK_STATE_NORMAL]; - - // Our base and selected color is primarily used for text - // so we assume a gtkEntry will have the most correct value - GtkStyle *gtkEntryStyle = d->gtk_widget_get_style(gtkEntry); - gdkBase = gtkEntryStyle->base[GTK_STATE_NORMAL]; - gdkText = gtkEntryStyle->text[GTK_STATE_NORMAL]; - gdkSbg = gtkEntryStyle->base[GTK_STATE_SELECTED]; - gdkSfg = gtkEntryStyle->text[GTK_STATE_SELECTED]; - - // The ACTIVE base color is really used for inactive windows - gdkaSbg = gtkEntryStyle->base[GTK_STATE_ACTIVE]; - gdkaSfg = gtkEntryStyle->text[GTK_STATE_ACTIVE]; - - bg = QColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8); - text = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - fg = QColor(gdkForeground.red>>8, gdkForeground.green>>8, gdkForeground.blue>>8); - base = QColor(gdkBase.red>>8, gdkBase.green>>8, gdkBase.blue>>8); - highlight = QColor(gdkSbg.red>>8, gdkSbg.green>>8, gdkSbg.blue>>8); - highlightText = QColor(gdkSfg.red>>8, gdkSfg.green>>8, gdkSfg.blue>>8); - inactiveHighlight = QColor(gdkaSbg.red>>8, gdkaSbg.green>>8, gdkaSbg.blue>>8); - inactiveHighlightedTExt = QColor(gdkaSfg.red>>8, gdkaSfg.green>>8, gdkaSfg.blue>>8); - - palette.setColor(QPalette::HighlightedText, highlightText); - - - palette.setColor(QPalette::Light, bg.lighter(125)); - palette.setColor(QPalette::Shadow, bg.darker(130)); - palette.setColor(QPalette::Dark, bg.darker(120)); - palette.setColor(QPalette::Text, text); - palette.setColor(QPalette::WindowText, fg); - palette.setColor(QPalette::ButtonText, fg); - palette.setColor(QPalette::Base, base); - - QColor alternateRowColor = palette.base().color().lighter(93); // ref gtkstyle.c draw_flat_box - GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView"); - GdkColor *gtkAltBase = NULL; - d->gtk_widget_style_get(gtkTreeView, "odd-row-color", >kAltBase, NULL); - if (gtkAltBase) { - alternateRowColor = QColor(gtkAltBase->red>>8, gtkAltBase->green>>8, gtkAltBase->blue>>8); - d->gdk_color_free(gtkAltBase); - } - palette.setColor(QPalette::AlternateBase, alternateRowColor); - - palette.setColor(QPalette::Window, bg); - palette.setColor(QPalette::Button, bg); - palette.setColor(QPalette::Background, bg); - QColor disabled((fg.red() + bg.red()) / 2, - (fg.green() + bg.green())/ 2, - (fg.blue() + bg.blue()) / 2); - palette.setColor(QPalette::Disabled, QPalette::Text, disabled); - palette.setColor(QPalette::Disabled, QPalette::WindowText, disabled); - palette.setColor(QPalette::Disabled, QPalette::Foreground, disabled); - palette.setColor(QPalette::Disabled, QPalette::ButtonText, disabled); - palette.setColor(QPalette::Highlight, highlight); - // calculate disabled colors by removing saturation - highlight.setHsv(highlight.hue(), 0, highlight.value(), highlight.alpha()); - highlightText.setHsv(highlightText.hue(), 0, highlightText.value(), highlightText.alpha()); - palette.setColor(QPalette::Disabled, QPalette::Highlight, highlight); - palette.setColor(QPalette::Disabled, QPalette::HighlightedText, highlightText); - - palette.setColor(QPalette::Inactive, QPalette::HighlightedText, inactiveHighlightedTExt); - palette.setColor(QPalette::Inactive, QPalette::Highlight, inactiveHighlight); - - style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), "gtk-tooltips", "GtkWindow", - d->gtk_window_get_type()); - if (style) { - gdkText = style->fg[GTK_STATE_NORMAL]; - text = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - palette.setColor(QPalette::ToolTipText, text); - } - } - return palette; -} - -/*! - \reimp -*/ -void QGtkStyle::polish(QPalette &palette) -{ - Q_D(QGtkStyle); - - if (!d->isThemeAvailable()) - QCommonStyle::polish(palette); - else - palette = palette.resolve(standardPalette()); -} - -/*! - \reimp -*/ -void QGtkStyle::polish(QApplication *app) -{ - Q_D(QGtkStyle); - - QCommonStyle::polish(app); - // Custom fonts and palettes with QtConfig are intentionally - // not supported as these should be entirely determined by - // current Gtk settings - if (app->desktopSettingsAware() && d->isThemeAvailable()) { - QApplicationPrivate::setSystemPalette(standardPalette()); - QApplicationPrivate::setSystemFont(d->getThemeFont()); - d->applyCustomPaletteHash(); - if (!d->isKDE4Session()) - qApp->installEventFilter(&d->filter); - } -} - -/*! - \reimp -*/ -void QGtkStyle::unpolish(QApplication *app) -{ - Q_D(QGtkStyle); - - QCommonStyle::unpolish(app); - QPixmapCache::clear(); - - if (app->desktopSettingsAware() && d->isThemeAvailable() && !d->isKDE4Session()) - qApp->removeEventFilter(&d->filter); -} - -/*! - \reimp -*/ - -void QGtkStyle::polish(QWidget *widget) -{ - Q_D(QGtkStyle); - - QCommonStyle::polish(widget); - if (!d->isThemeAvailable()) - return; - if (qobject_cast(widget) - || qobject_cast(widget) - || qobject_cast(widget) - || qobject_cast(widget) - || qobject_cast(widget) - || qobject_cast(widget) - || qobject_cast(widget) - || qobject_cast(widget) - || qobject_cast(widget)) - widget->setAttribute(Qt::WA_Hover); -#ifndef QT_NO_TREEVIEW - else if (QTreeView *tree = qobject_cast (widget)) - tree->viewport()->setAttribute(Qt::WA_Hover); -#endif -} - -/*! - \reimp -*/ -void QGtkStyle::unpolish(QWidget *widget) -{ - QCommonStyle::unpolish(widget); -} - -/*! - \reimp -*/ -int QGtkStyle::pixelMetric(PixelMetric metric, - const QStyleOption *option, - const QWidget *widget) const -{ - Q_D(const QGtkStyle); - - if (!d->isThemeAvailable()) - return QCommonStyle::pixelMetric(metric, option, widget); - - switch (metric) { - case PM_DefaultFrameWidth: - if (qobject_cast(widget)) { - if (GtkStyle *style = - d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), - "*.GtkScrolledWindow", - "*.GtkScrolledWindow", - d->gtk_window_get_type())) - return qMax(style->xthickness, style->ythickness); - } - return 2; - - case PM_MenuButtonIndicator: - return 20; - - case PM_TabBarBaseOverlap: - return 1; - - case PM_ToolBarSeparatorExtent: - return 11; - - case PM_ToolBarFrameWidth: - return 1; - - case PM_ToolBarItemSpacing: - return 0; - - case PM_ButtonShiftHorizontal: { - GtkWidget *gtkButton = d->gtkWidget("GtkButton"); - guint horizontal_shift; - d->gtk_widget_style_get(gtkButton, "child-displacement-x", &horizontal_shift, NULL); - return horizontal_shift; - } - - case PM_ButtonShiftVertical: { - GtkWidget *gtkButton = d->gtkWidget("GtkButton"); - guint vertical_shift; - d->gtk_widget_style_get(gtkButton, "child-displacement-y", &vertical_shift, NULL); - return vertical_shift; - } - - case PM_MenuBarPanelWidth: - return 0; - - case PM_MenuPanelWidth: { - GtkWidget *gtkMenu = d->gtkWidget("GtkMenu"); - guint horizontal_padding = 0; - // horizontal-padding is used by Maemo to get thicker borders - if (!d->gtk_check_version(2, 10, 0)) - d->gtk_widget_style_get(gtkMenu, "horizontal-padding", &horizontal_padding, NULL); - int padding = qMax(d->gtk_widget_get_style(gtkMenu)->xthickness, horizontal_padding); - return padding; - } - - case PM_ButtonIconSize: { - int retVal = 24; - GtkSettings *settings = d->gtk_settings_get_default(); - gchararray icon_sizes; - g_object_get(settings, "gtk-icon-sizes", &icon_sizes, NULL); - QStringList values = QString(QLS(icon_sizes)).split(QLatin1Char(':')); - g_free(icon_sizes); - QChar splitChar(QLatin1Char(',')); - foreach (const QString &value, values) { - if (value.startsWith(QLS("gtk-button="))) { - QString iconSize = value.right(value.size() - 11); - - if (iconSize.contains(splitChar)) - retVal = iconSize.split(splitChar)[0].toInt(); - break; - } - } - return retVal; - } - - case PM_MenuVMargin: - - case PM_MenuHMargin: - return 0; - - case PM_DockWidgetTitleMargin: - return 0; - - case PM_DockWidgetTitleBarButtonMargin: - return 5; - - case PM_TabBarTabVSpace: - return 12; - - case PM_TabBarTabHSpace: - return 14; - - case PM_TabBarTabShiftVertical: - return 2; - - case PM_ToolBarHandleExtent: - return 9; - - case PM_SplitterWidth: - return 6; - - case PM_SliderThickness: - case PM_SliderControlThickness: { - GtkWidget *gtkScale = d->gtkWidget("GtkHScale"); - gint val; - d->gtk_widget_style_get(gtkScale, "slider-width", &val, NULL); - if (metric == PM_SliderControlThickness) - return val + 2*d->gtk_widget_get_style(gtkScale)->ythickness; - return val; - } - - case PM_ScrollBarExtent: { - gint sliderLength; - gint trough_border; - GtkWidget *hScrollbar = d->gtkWidget("GtkHScrollbar"); - d->gtk_widget_style_get(hScrollbar, - "trough-border", &trough_border, - "slider-width", &sliderLength, - NULL); - return sliderLength + trough_border*2; - } - - case PM_ScrollBarSliderMin: - return 34; - - case PM_SliderLength: - gint val; - d->gtk_widget_style_get(d->gtkWidget("GtkHScale"), "slider-length", &val, NULL); - return val; - - case PM_ExclusiveIndicatorWidth: - case PM_ExclusiveIndicatorHeight: - case PM_IndicatorWidth: - case PM_IndicatorHeight: { - GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton"); - gint size, spacing; - d->gtk_widget_style_get(gtkCheckButton, "indicator-spacing", &spacing, "indicator-size", &size, NULL); - return size + 2 * spacing; - } - - case PM_MenuBarVMargin: { - GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar"); - return qMax(0, d->gtk_widget_get_style(gtkMenubar)->ythickness); - } - case PM_ScrollView_ScrollBarSpacing: - { - gint spacing = 3; - GtkWidget *gtkScrollWindow = d->gtkWidget("GtkScrolledWindow"); - Q_ASSERT(gtkScrollWindow); - d->gtk_widget_style_get(gtkScrollWindow, "scrollbar-spacing", &spacing, NULL); - return spacing; - } - case PM_SubMenuOverlap: { - gint offset = 0; - GtkWidget *gtkMenu = d->gtkWidget("GtkMenu"); - d->gtk_widget_style_get(gtkMenu, "horizontal-offset", &offset, NULL); - return offset; - } - case PM_ToolTipLabelFrameWidth: - return 2; - case PM_ButtonDefaultIndicator: - return 0; - case PM_ListViewIconSize: - return 24; - case PM_DialogButtonsSeparator: - return 6; - case PM_TitleBarHeight: - return 24; - case PM_SpinBoxFrameWidth: - return 3; - case PM_MenuBarItemSpacing: - return 6; - case PM_MenuBarHMargin: - return 0; - case PM_ToolBarItemMargin: - return 1; - case PM_SmallIconSize: - return 16; - case PM_MaximumDragDistance: - return -1; - case PM_TabCloseIndicatorWidth: - case PM_TabCloseIndicatorHeight: - return 20; - default: - return QCommonStyle::pixelMetric(metric, option, widget); - } -} - -/*! - \reimp -*/ -int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, - - QStyleHintReturn *returnData = 0) const -{ - Q_D(const QGtkStyle); - - if (!d->isThemeAvailable()) - return QCommonStyle::styleHint(hint, option, widget, returnData); - - switch (hint) { - case SH_ItemView_ChangeHighlightOnFocus: - return true; - case SH_ScrollBar_MiddleClickAbsolutePosition: - return true; - case SH_Menu_AllowActiveAndDisabled: - return false; - case SH_MainWindow_SpaceBelowMenuBar: - return false; - case SH_MenuBar_MouseTracking: - return true; - case SH_Menu_MouseTracking: - return true; - case SH_TitleBar_AutoRaise: - return true; - case SH_TitleBar_NoBorder: - return true; - case SH_ItemView_ShowDecorationSelected: - return true; - case SH_Table_GridLineColor: - if (option) - return option->palette.background().color().darker(120).rgb(); - break; - case SH_WindowFrame_Mask: - 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); - } - return QCommonStyle::styleHint(hint, option, widget, returnData); - case SH_MessageBox_TextInteractionFlags: - return Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse; - case SH_MessageBox_CenterButtons: - return false; -#ifndef QT_NO_WIZARD - case SH_WizardStyle: - return QWizard::ClassicStyle; -#endif - case SH_ItemView_ArrowKeysNavigateIntoChildren: - return false; - case SH_DialogButtonLayout: { - int ret = QDialogButtonBox::GnomeLayout; - gboolean alternateOrder = 0; - GtkSettings *settings = d->gtk_settings_get_default(); - g_object_get(settings, "gtk-alternative-button-order", &alternateOrder, NULL); - - if (alternateOrder) - ret = QDialogButtonBox::WinLayout; - - return ret; - } - break; - - case SH_ToolButtonStyle: - { - if (d->isKDE4Session()) - return QCommonStyle::styleHint(hint, option, widget, returnData); - GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar"); - GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS; - g_object_get(gtkToolbar, "toolbar-style", &toolbar_style, NULL); - switch (toolbar_style) { - case GTK_TOOLBAR_TEXT: - return Qt::ToolButtonTextOnly; - case GTK_TOOLBAR_BOTH: - return Qt::ToolButtonTextUnderIcon; - case GTK_TOOLBAR_BOTH_HORIZ: - return Qt::ToolButtonTextBesideIcon; - case GTK_TOOLBAR_ICONS: - default: - return Qt::ToolButtonIconOnly; - } - } - break; - case SH_SpinControls_DisableOnBounds: - return int(true); - - case SH_DitherDisabledText: - return int(false); - - case SH_ComboBox_Popup: { - GtkWidget *gtkComboBox = d->gtkWidget("GtkComboBox"); - gboolean appears_as_list; - d->gtk_widget_style_get((GtkWidget*)gtkComboBox, "appears-as-list", &appears_as_list, NULL); - return appears_as_list ? 0 : 1; - } - - case SH_MenuBar_AltKeyNavigation: - return int(false); - - case SH_EtchDisabledText: - return int(false); - - case SH_Menu_SubMenuPopupDelay: { - gint delay = 225; - GtkSettings *settings = d->gtk_settings_get_default(); - g_object_get(settings, "gtk-menu-popup-delay", &delay, NULL); - return delay; - } - - case SH_ScrollView_FrameOnlyAroundContents: { - gboolean scrollbars_within_bevel = false; - if (widget && widget->isWindow()) - scrollbars_within_bevel = true; - else if (!d->gtk_check_version(2, 12, 0)) { - GtkWidget *gtkScrollWindow = d->gtkWidget("GtkScrolledWindow"); - d->gtk_widget_style_get(gtkScrollWindow, "scrollbars-within-bevel", &scrollbars_within_bevel, NULL); - } - return !scrollbars_within_bevel; - } - - case SH_DialogButtonBox_ButtonsHaveIcons: { - static bool buttonsHaveIcons = d->getGConfBool(QLS("/desktop/gnome/interface/buttons_have_icons")); - return buttonsHaveIcons; - } - - case SH_UnderlineShortcut: { - gboolean underlineShortcut = true; - if (!d->gtk_check_version(2, 12, 0)) { - GtkSettings *settings = d->gtk_settings_get_default(); - g_object_get(settings, "gtk-enable-mnemonics", &underlineShortcut, NULL); - } - return underlineShortcut; - } - - default: - break; - } - return QCommonStyle::styleHint(hint, option, widget, returnData); -} - -/*! - \reimp -*/ -void QGtkStyle::drawPrimitive(PrimitiveElement element, - const QStyleOption *option, - QPainter *painter, - const QWidget *widget) const -{ - Q_D(const QGtkStyle); - - if (!d->isThemeAvailable()) { - QCommonStyle::drawPrimitive(element, option, painter, widget); - return; - } - - GtkStyle* style = d->gtkStyle(); - QGtkPainter* gtkPainter = d->gtkPainter(painter); - - switch (element) { - case PE_Frame: { - if (widget && widget->inherits("QComboBoxPrivateContainer")){ - QStyleOption copy = *option; - copy.state |= State_Raised; - proxy()->drawPrimitive(PE_PanelMenu, ©, painter, widget); - break; - } - // Drawing the entire itemview frame is very expensive, especially on the native X11 engine - // Instead we cheat a bit and draw a border image without the center part, hence only scaling - // thin rectangular images - const int pmSize = 64; - const int border = proxy()->pixelMetric(PM_DefaultFrameWidth, option, widget); - const QString pmKey = QLatin1String("windowframe") % HexString(option->state); - - QPixmap pixmap; - QRect pmRect(QPoint(0,0), QSize(pmSize, pmSize)); - - // Only draw through style once - if (!QPixmapCache::find(pmKey, pixmap)) { - pixmap = QPixmap(pmSize, pmSize); - pixmap.fill(Qt::transparent); - QPainter pmPainter(&pixmap); - gtkPainter->reset(&pmPainter); - gtkPainter->setUsePixmapCache(false); // Don't cache twice - - GtkShadowType shadow_type = GTK_SHADOW_NONE; - if (option->state & State_Sunken) - shadow_type = GTK_SHADOW_IN; - else if (option->state & State_Raised) - shadow_type = GTK_SHADOW_OUT; - - GtkStyle *style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), - "*.GtkScrolledWindow", "*.GtkScrolledWindow", d->gtk_window_get_type()); - if (style) - gtkPainter->paintShadow(d->gtkWidget("GtkFrame"), "viewport", pmRect, - option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, - shadow_type, style); - QPixmapCache::insert(pmKey, pixmap); - gtkPainter->reset(painter); - } - - QRect rect = option->rect; - const int rw = rect.width() - border; - const int rh = rect.height() - border; - const int pw = pmRect.width() - border; - const int ph = pmRect.height() - border; - - // Sidelines - painter->drawPixmap(rect.adjusted(border, 0, -border, -rh), pixmap, pmRect.adjusted(border, 0, -border,-ph)); - painter->drawPixmap(rect.adjusted(border, rh, -border, 0), pixmap, pmRect.adjusted(border, ph,-border,0)); - painter->drawPixmap(rect.adjusted(0, border, -rw, -border), pixmap, pmRect.adjusted(0, border, -pw, -border)); - painter->drawPixmap(rect.adjusted(rw, border, 0, -border), pixmap, pmRect.adjusted(pw, border, 0, -border)); - - // Corners - painter->drawPixmap(rect.adjusted(0, 0, -rw, -rh), pixmap, pmRect.adjusted(0, 0, -pw,-ph)); - painter->drawPixmap(rect.adjusted(rw, 0, 0, -rh), pixmap, pmRect.adjusted(pw, 0, 0,-ph)); - painter->drawPixmap(rect.adjusted(0, rh, -rw, 0), pixmap, pmRect.adjusted(0, ph, -pw,0)); - painter->drawPixmap(rect.adjusted(rw, rh, 0, 0), pixmap, pmRect.adjusted(pw, ph, 0,0)); - } - break; - case PE_FrameWindow: - painter->save(); - { - QRect rect= option->rect; - painter->setPen(QPen(option->palette.dark().color().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; - - case PE_PanelTipLabel: { - GtkWidget *gtkWindow = d->gtkWidget("GtkWindow"); // The Murrine Engine currently assumes a widget is passed - style = d->gtk_rc_get_style_by_paths(d->gtk_settings_get_default(), "gtk-tooltips", "GtkWindow", - d->gtk_window_get_type()); - gtkPainter->paintFlatBox(gtkWindow, "tooltip", option->rect, GTK_STATE_NORMAL, GTK_SHADOW_NONE, style); - } - break; - - case PE_PanelStatusBar: { - if (widget && widget->testAttribute(Qt::WA_SetPalette) && - option->palette.resolve() & (1 << QPalette::Window)) { - // Respect custom palette - painter->fillRect(option->rect, option->palette.window()); - break; - } - GtkShadowType shadow_type; - GtkWidget *gtkStatusbarFrame = d->gtkWidget("GtkStatusbar.GtkFrame"); - d->gtk_widget_style_get(d->gtk_widget_get_parent(gtkStatusbarFrame), "shadow-type", &shadow_type, NULL); - gtkPainter->paintShadow(gtkStatusbarFrame, "frame", option->rect, GTK_STATE_NORMAL, - shadow_type, d->gtk_widget_get_style(gtkStatusbarFrame)); - } - break; - - case PE_IndicatorHeaderArrow: - if (const QStyleOptionHeader *header = qstyleoption_cast(option)) { - GtkWidget *gtkTreeHeader = d->gtkWidget("GtkTreeView.GtkButton"); - GtkStateType state = qt_gtk_state(option); - style = d->gtk_widget_get_style(gtkTreeHeader); - GtkArrowType type = GTK_ARROW_UP; - // This sorting indicator inversion is intentional, and follows the GNOME HIG. - // See http://library.gnome.org/devel/hig-book/stable/controls-lists.html.en#controls-lists-sortable - if (header->sortIndicator & QStyleOptionHeader::SortUp) - type = GTK_ARROW_UP; - else if (header->sortIndicator & QStyleOptionHeader::SortDown) - type = GTK_ARROW_DOWN; - - gtkPainter->paintArrow(gtkTreeHeader, "button", option->rect.adjusted(1, 1, -1, -1), type, state, - GTK_SHADOW_NONE, false, style); - } - break; - - case PE_FrameDefaultButton: // fall through - case PE_FrameFocusRect: { - QRect frameRect = option->rect.adjusted(1, 1, -2, -2); // ### this mess should move to subcontrolrect - if (qobject_cast(widget)) { - // Don't draw anything - } else if (qobject_cast(widget)) { - GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook"); - style = d->gtk_widget_get_style(gtkNotebook); - gtkPainter->paintFocus(gtkNotebook, "tab", frameRect.adjusted(-1, 1, 1, 1), GTK_STATE_ACTIVE, style); - } else { - GtkWidget *gtkRadioButton = d->gtkWidget("GtkRadioButton"); - gtkPainter->paintFocus(gtkRadioButton, "radiobutton", frameRect, GTK_STATE_ACTIVE, style); - } - } - break; - - case PE_IndicatorBranch: - if (option->state & State_Children) { - QRect rect = option->rect; - rect = QRect(0, 0, 12, 12); - rect.moveCenter(option->rect.center()); - rect.translate(2, 0); - GtkExpanderStyle openState = GTK_EXPANDER_EXPANDED; - GtkExpanderStyle closedState = GTK_EXPANDER_COLLAPSED; - GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView"); - - GtkStateType state = GTK_STATE_NORMAL; - if (!(option->state & State_Enabled)) - state = GTK_STATE_INSENSITIVE; - else if (option->state & State_MouseOver) - state = GTK_STATE_PRELIGHT; - - gtkPainter->paintExpander(gtkTreeView, "treeview", rect, state, - option->state & State_Open ? openState : closedState , d->gtk_widget_get_style(gtkTreeView)); - } - break; - - case PE_PanelItemViewRow: - // This primitive is only used to draw selection behind selected expander arrows. - // We try not to decorate the tree branch background unless you inherit from StyledItemDelegate - // The reason for this is that a lot of code that relies on custom item delegates will look odd having - // a gradient on the branch but a flat shaded color on the item itself. - QCommonStyle::drawPrimitive(element, option, painter, widget); - if (!(option->state & State_Selected)) { - break; - } else { - if (const QAbstractItemView *view = qobject_cast(widget)) { - if (!qobject_cast(view->itemDelegate())) - break; - } - } // fall through - - case PE_PanelItemViewItem: - if (const QStyleOptionViewItem *vopt = qstyleoption_cast(option)) { - uint resolve_mask = vopt->palette.resolve(); - if (vopt->backgroundBrush.style() != Qt::NoBrush - || (resolve_mask & (1 << QPalette::Base))) - { - QPointF oldBO = painter->brushOrigin(); - painter->setBrushOrigin(vopt->rect.topLeft()); - painter->fillRect(vopt->rect, vopt->backgroundBrush); - painter->setBrushOrigin(oldBO); - if (!(option->state & State_Selected)) - break; - } - if (GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView")) { - const char *detail = "cell_even_ruled"; - if (vopt && vopt->features & QStyleOptionViewItem::Alternate) - detail = "cell_odd_ruled"; - bool isActive = option->state & State_Active; - QString key; - if (isActive ) { - // Required for active/non-active window appearance - key = QLS("a"); - QGtkStylePrivate::gtkWidgetSetFocus(gtkTreeView, true); - } - bool isEnabled = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled)); - gtkPainter->paintFlatBox(gtkTreeView, detail, option->rect, - option->state & State_Selected ? GTK_STATE_SELECTED : - isEnabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, - GTK_SHADOW_OUT, d->gtk_widget_get_style(gtkTreeView), key); - if (isActive ) - QGtkStylePrivate::gtkWidgetSetFocus(gtkTreeView, false); - } - } - break; - case PE_IndicatorToolBarSeparator: - { - const int margin = 6; - GtkWidget *gtkSeparator = d->gtkWidget("GtkToolbar.GtkSeparatorToolItem"); - if (option->state & State_Horizontal) { - const int offset = option->rect.width()/2; - QRect rect = option->rect.adjusted(offset, margin, 0, -margin); - painter->setPen(QPen(option->palette.background().color().darker(110))); - gtkPainter->paintVline(gtkSeparator, "vseparator", - rect, GTK_STATE_NORMAL, d->gtk_widget_get_style(gtkSeparator), - 0, rect.height(), 0); - } else { //Draw vertical separator - const int offset = option->rect.height()/2; - QRect rect = option->rect.adjusted(margin, offset, -margin, 0); - painter->setPen(QPen(option->palette.background().color().darker(110))); - gtkPainter->paintHline(gtkSeparator, "hseparator", - rect, GTK_STATE_NORMAL, d->gtk_widget_get_style(gtkSeparator), - 0, rect.width(), 0); - } - } - break; - - case PE_IndicatorToolBarHandle: { - GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar"); - GtkShadowType shadow_type; - d->gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL); - //Note when the toolbar is horizontal, the handle is vertical - painter->setClipRect(option->rect); - gtkPainter->paintHandle(gtkToolbar, "toolbar", option->rect.adjusted(-1, -1 ,0 ,1), - GTK_STATE_NORMAL, shadow_type, !(option->state & State_Horizontal) ? - GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL, d->gtk_widget_get_style(gtkToolbar)); - } - break; - - case PE_IndicatorArrowUp: - case PE_IndicatorArrowDown: - case PE_IndicatorArrowLeft: - case PE_IndicatorArrowRight: { - - - GtkArrowType type = GTK_ARROW_UP; - - switch (element) { - - case PE_IndicatorArrowDown: - type = GTK_ARROW_DOWN; - break; - - case PE_IndicatorArrowLeft: - type = GTK_ARROW_LEFT; - break; - - case PE_IndicatorArrowRight: - type = GTK_ARROW_RIGHT; - break; - - default: - break; - } - int size = qMin(option->rect.height(), option->rect.width()); - int border = (size > 9) ? (size/4) : 0; //Allow small arrows to have exact dimensions - int bsx = 0, bsy = 0; - if (option->state & State_Sunken) { - bsx = proxy()->pixelMetric(PM_ButtonShiftHorizontal); - bsy = proxy()->pixelMetric(PM_ButtonShiftVertical); - } - QRect arrowRect = option->rect.adjusted(border + bsx, border + bsy, -border + bsx, -border + bsy); - GtkShadowType shadow = option->state & State_Sunken ? GTK_SHADOW_IN : GTK_SHADOW_OUT; - GtkStateType state = qt_gtk_state(option); - - QColor arrowColor = option->palette.buttonText().color(); - GtkWidget *gtkArrow = d->gtkWidget("GtkArrow"); - GdkColor color = fromQColor(arrowColor); - d->gtk_widget_modify_fg (gtkArrow, state, &color); - gtkPainter->paintArrow(gtkArrow, "button", arrowRect, - type, state, shadow, false, d->gtk_widget_get_style(gtkArrow), - QString::number(arrowColor.rgba(), 16)); - // Passing NULL will revert the color change - d->gtk_widget_modify_fg (gtkArrow, state, NULL); - } - break; - - case PE_FrameGroupBox: - // Do nothing here, the GNOME groupboxes are flat - break; - - case PE_PanelMenu: { - GtkWidget *gtkMenu = d->gtkWidget("GtkMenu"); - gtkPainter->setAlphaSupport(false); // Note, alpha disabled for performance reasons - gtkPainter->paintBox(gtkMenu, "menu", option->rect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, d->gtk_widget_get_style(gtkMenu), QString()); - } - break; - - case PE_FrameMenu: - //This is actually done by PE_Widget due to a clipping issue - //Otherwise Menu items will not be able to span the entire menu width - - // This is only used by floating tool bars - if (qobject_cast(widget)) { - GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar"); - gtkPainter->paintBox(gtkMenubar, "toolbar", option->rect, - GTK_STATE_NORMAL, GTK_SHADOW_OUT, style); - gtkPainter->paintBox(gtkMenubar, "menu", option->rect, - GTK_STATE_NORMAL, GTK_SHADOW_OUT, style); - } - break; - - case PE_FrameLineEdit: { - GtkWidget *gtkEntry = d->gtkWidget("GtkEntry"); - - - gboolean interior_focus; - gint focus_line_width; - QRect rect = option->rect; - d->gtk_widget_style_get(gtkEntry, - "interior-focus", &interior_focus, - "focus-line-width", &focus_line_width, NULL); - - // See https://bugzilla.mozilla.org/show_bug.cgi?id=405421 for info about this hack - g_object_set_data(G_OBJECT(gtkEntry), "transparent-bg-hint", GINT_TO_POINTER(true)); - - if (!interior_focus && option->state & State_HasFocus) - rect.adjust(focus_line_width, focus_line_width, -focus_line_width, -focus_line_width); - - if (option->state & State_HasFocus) - QGtkStylePrivate::gtkWidgetSetFocus(gtkEntry, true); - gtkPainter->paintShadow(gtkEntry, "entry", rect, option->state & State_Enabled ? - GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, - GTK_SHADOW_IN, d->gtk_widget_get_style(gtkEntry), - option->state & State_HasFocus ? QLS("focus") : QString()); - if (!interior_focus && option->state & State_HasFocus) - gtkPainter->paintShadow(gtkEntry, "entry", option->rect, option->state & State_Enabled ? - GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE, - GTK_SHADOW_IN, d->gtk_widget_get_style(gtkEntry), QLS("GtkEntryShadowIn")); - - if (option->state & State_HasFocus) - QGtkStylePrivate::gtkWidgetSetFocus(gtkEntry, false); - } - break; - - case PE_PanelLineEdit: - if (const QStyleOptionFrame *panel = qstyleoption_cast(option)) { - GtkWidget *gtkEntry = d->gtkWidget("GtkEntry"); - if (panel->lineWidth > 0) - proxy()->drawPrimitive(PE_FrameLineEdit, option, painter, widget); - uint resolve_mask = option->palette.resolve(); - GtkStyle *gtkEntryStyle = d->gtk_widget_get_style(gtkEntry); - QRect textRect = option->rect.adjusted(gtkEntryStyle->xthickness, gtkEntryStyle->ythickness, - -gtkEntryStyle->xthickness, -gtkEntryStyle->ythickness); - - if (widget && widget->testAttribute(Qt::WA_SetPalette) && - resolve_mask & (1 << QPalette::Base)) // Palette overridden by user - painter->fillRect(textRect, option->palette.base()); - else - gtkPainter->paintFlatBox(gtkEntry, "entry_bg", textRect, - option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, GTK_SHADOW_NONE, gtkEntryStyle); - } - break; - - case PE_FrameTabWidget: - if (const QStyleOptionTabWidgetFrame *frame = qstyleoption_cast(option)) { - GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook"); - style = d->gtk_widget_get_style(gtkNotebook); - gtkPainter->setAlphaSupport(false); - GtkShadowType shadow = GTK_SHADOW_OUT; - GtkStateType state = GTK_STATE_NORMAL; // Only state supported by gtknotebook - bool reverse = (option->direction == Qt::RightToLeft); - QGtkStylePrivate::gtk_widget_set_direction(gtkNotebook, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); - if (const QStyleOptionTabWidgetFrameV2 *tabframe = qstyleoption_cast(option)) { - GtkPositionType frameType = GTK_POS_TOP; - QTabBar::Shape shape = frame->shape; - int gapStart = 0; - int gapSize = 0; - if (shape == QTabBar::RoundedNorth || shape == QTabBar::RoundedSouth) { - frameType = (shape == QTabBar::RoundedNorth) ? GTK_POS_TOP : GTK_POS_BOTTOM; - gapStart = tabframe->selectedTabRect.left(); - gapSize = tabframe->selectedTabRect.width(); - } else { - frameType = (shape == QTabBar::RoundedWest) ? GTK_POS_LEFT : GTK_POS_RIGHT; - gapStart = tabframe->selectedTabRect.y(); - gapSize = tabframe->selectedTabRect.height(); - } - gtkPainter->paintBoxGap(gtkNotebook, "notebook", option->rect, state, shadow, frameType, - gapStart, gapSize, style); - break; // done - } - - // Note this is only the fallback option - gtkPainter->paintBox(gtkNotebook, "notebook", option->rect, state, shadow, style); - } - break; - - case PE_PanelButtonCommand: - case PE_PanelButtonTool: { - bool isDefault = false; - bool isTool = (element == PE_PanelButtonTool); - if (const QStyleOptionButton *btn = qstyleoption_cast(option)) - isDefault = btn->features & QStyleOptionButton::DefaultButton; - - // don't draw a frame for tool buttons that have the autoRaise flag and are not enabled or on - if (isTool && !(option->state & State_Enabled || option->state & State_On) && (option->state & State_AutoRaise)) - break; - // don't draw a frame for dock widget buttons, unless we are hovering - if (widget && widget->inherits("QDockWidgetTitleButton") && !(option->state & State_MouseOver)) - break; - - GtkStateType state = qt_gtk_state(option); - if (option->state & State_On || option->state & State_Sunken) - state = GTK_STATE_ACTIVE; - GtkWidget *gtkButton = isTool ? d->gtkWidget("GtkToolButton.GtkButton") : d->gtkWidget("GtkButton"); - gint focusWidth, focusPad; - gboolean interiorFocus = false; - d->gtk_widget_style_get (gtkButton, - "focus-line-width", &focusWidth, - "focus-padding", &focusPad, - "interior-focus", &interiorFocus, NULL); - - style = d->gtk_widget_get_style(gtkButton); - - QRect buttonRect = option->rect; - - QString key; - if (isDefault) { - key += QLS("def"); - QGtkStylePrivate::gtk_widget_set_can_default(gtkButton, true); - QGtkStylePrivate::gtk_window_set_default((GtkWindow*)QGtkStylePrivate::gtk_widget_get_toplevel(gtkButton), gtkButton); - gtkPainter->paintBox(gtkButton, "buttondefault", buttonRect, state, GTK_SHADOW_IN, - style, isDefault ? QLS("d") : QString()); - } - - bool hasFocus = option->state & State_HasFocus; - - if (hasFocus) { - key += QLS("def"); - QGtkStylePrivate::gtkWidgetSetFocus(gtkButton, true); - } - - if (!interiorFocus) - buttonRect = buttonRect.adjusted(focusWidth, focusWidth, -focusWidth, -focusWidth); - - GtkShadowType shadow = (option->state & State_Sunken || option->state & State_On ) ? - GTK_SHADOW_IN : GTK_SHADOW_OUT; - - gtkPainter->paintBox(gtkButton, "button", buttonRect, state, shadow, - style, key); - if (isDefault) - QGtkStylePrivate::gtk_window_set_default((GtkWindow*)QGtkStylePrivate::gtk_widget_get_toplevel(gtkButton), 0); - if (hasFocus) - QGtkStylePrivate::gtkWidgetSetFocus(gtkButton, false); - } - break; - - case PE_IndicatorRadioButton: { - GtkShadowType shadow = GTK_SHADOW_OUT; - GtkStateType state = qt_gtk_state(option); - - if (option->state & State_Sunken) - state = GTK_STATE_ACTIVE; - - if (option->state & State_NoChange) - shadow = GTK_SHADOW_ETCHED_IN; - else if (option->state & State_On) - shadow = GTK_SHADOW_IN; - else - shadow = GTK_SHADOW_OUT; - - GtkWidget *gtkRadioButton = d->gtkWidget("GtkRadioButton"); - gint spacing; - d->gtk_widget_style_get(gtkRadioButton, "indicator-spacing", &spacing, NULL); - QRect buttonRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing); - gtkPainter->setClipRect(option->rect); - // ### Note: Ubuntulooks breaks when the proper widget is passed - // Murrine engine requires a widget not to get RGBA check - warnings - GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton"); - QString key(QLS("radiobutton")); - if (option->state & State_HasFocus) { // Themes such as Nodoka check this flag - key += QLatin1Char('f'); - QGtkStylePrivate::gtkWidgetSetFocus(gtkCheckButton, true); - } - gtkPainter->paintOption(gtkCheckButton , buttonRect, state, shadow, d->gtk_widget_get_style(gtkRadioButton), key); - if (option->state & State_HasFocus) - QGtkStylePrivate::gtkWidgetSetFocus(gtkCheckButton, false); - } - break; - - case PE_IndicatorCheckBox: { - GtkShadowType shadow = GTK_SHADOW_OUT; - GtkStateType state = qt_gtk_state(option); - - if (option->state & State_Sunken) - state = GTK_STATE_ACTIVE; - - if (option->state & State_NoChange) - shadow = GTK_SHADOW_ETCHED_IN; - else if (option->state & State_On) - shadow = GTK_SHADOW_IN; - else - shadow = GTK_SHADOW_OUT; - - int spacing; - - GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton"); - QString key(QLS("checkbutton")); - if (option->state & State_HasFocus) { // Themes such as Nodoka checks this flag - key += QLatin1Char('f'); - QGtkStylePrivate::gtkWidgetSetFocus(gtkCheckButton, true); - } - - // Some styles such as aero-clone assume they can paint in the spacing area - gtkPainter->setClipRect(option->rect); - - d->gtk_widget_style_get(gtkCheckButton, "indicator-spacing", &spacing, NULL); - - QRect checkRect = option->rect.adjusted(spacing, spacing, -spacing, -spacing); - - gtkPainter->paintCheckbox(gtkCheckButton, checkRect, state, shadow, d->gtk_widget_get_style(gtkCheckButton), - key); - if (option->state & State_HasFocus) - QGtkStylePrivate::gtkWidgetSetFocus(gtkCheckButton, false); - - } - break; - -#ifndef QT_NO_TABBAR - - case PE_FrameTabBarBase: - if (const QStyleOptionTabBarBase *tbb - = qstyleoption_cast(option)) { - QRect tabRect = tbb->rect; - painter->save(); - painter->setPen(QPen(option->palette.dark().color().dark(110), 0)); - switch (tbb->shape) { - - case QTabBar::RoundedNorth: - painter->drawLine(tabRect.topLeft(), tabRect.topRight()); - break; - - case QTabBar::RoundedWest: - painter->drawLine(tabRect.left(), tabRect.top(), tabRect.left(), tabRect.bottom()); - break; - - case QTabBar::RoundedSouth: - painter->drawLine(tbb->rect.left(), tbb->rect.bottom(), - tabRect.right(), tabRect.bottom()); - break; - - case QTabBar::RoundedEast: - painter->drawLine(tabRect.topRight(), tabRect.bottomRight()); - break; - - case QTabBar::TriangularNorth: - case QTabBar::TriangularEast: - case QTabBar::TriangularWest: - case QTabBar::TriangularSouth: - painter->restore(); - QCommonStyle::drawPrimitive(element, option, painter, widget); - return; - } - - painter->restore(); - } - return; - -#endif // QT_NO_TABBAR - - case PE_Widget: - break; - - default: - QCommonStyle::drawPrimitive(element, option, painter, widget); - } -} - -/*! - \reimp -*/ -void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, - - QPainter *painter, const QWidget *widget) const -{ - Q_D(const QGtkStyle); - - if (!d->isThemeAvailable()) { - QCommonStyle::drawComplexControl(control, option, painter, widget); - return; - } - - GtkStyle* style = d->gtkStyle(); - QGtkPainter* gtkPainter = d->gtkPainter(painter); - 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) - alphaCornerColor = mergedColors(option->palette.color(widget->backgroundRole()), darkOutline); - else - alphaCornerColor = mergedColors(option->palette.background().color(), darkOutline); - - switch (control) { - - case CC_TitleBar: - painter->save(); - if (const QStyleOptionTitleBar *titleBar = qstyleoption_cast(option)) { - // Since this is drawn by metacity and not Gtk we - // have to do custom drawing - - GdkColor gdkBg = style->bg[GTK_STATE_SELECTED]; - QColor bgColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8); - - const int buttonMargin = 5; - bool active = (titleBar->titleBarState & State_Active); - QRect fullRect = titleBar->rect; - QPalette palette = option->palette; - QColor highlight = bgColor; - - 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_gtk_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_gtk_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_gtk_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_gtk_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_gtk_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_gtk_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_gtk_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 = proxy()->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_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); - // Draw title - - if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) { - // Draw prelight background - GtkWidget *gtkCheckButton = d->gtkWidget("GtkCheckButton"); - - if (option->state & State_MouseOver) { - QRect bgRect = textRect | checkBoxRect; - gtkPainter->paintFlatBox(gtkCheckButton, "checkbutton", bgRect.adjusted(0, 0, 0, -2), - GTK_STATE_PRELIGHT, GTK_SHADOW_ETCHED_OUT, d->gtk_widget_get_style(gtkCheckButton)); - } - - if (!groupBox->text.isEmpty()) { - int alignment = int(groupBox->textAlignment); - if (!proxy()->styleHint(QStyle::SH_UnderlineShortcut, option, widget)) - alignment |= Qt::TextHideMnemonic; - QColor textColor = groupBox->textColor; // Note: custom textColor is currently ignored - int labelState = GTK_STATE_INSENSITIVE; - - if (option->state & State_Enabled) - labelState = (option->state & State_MouseOver) ? GTK_STATE_PRELIGHT : GTK_STATE_NORMAL; - - GdkColor gdkText = d->gtk_widget_get_style(gtkCheckButton)->fg[labelState]; - textColor = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - painter->setPen(textColor); - QFont font = painter->font(); - font.setBold(true); - painter->setFont(font); - painter->drawText(textRect, Qt::TextShowMnemonic | Qt::AlignLeft| alignment, groupBox->text); - - if (option->state & State_HasFocus) - gtkPainter->paintFocus(gtkCheckButton, "checkbutton", textRect.adjusted(-4, -1, 0, -3), GTK_STATE_ACTIVE, style); - } - } - - 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_COMBOBOX - - case CC_ComboBox: - // See: http://live.gnome.org/GnomeArt/Tutorials/GtkThemes/GtkComboBox - // and http://live.gnome.org/GnomeArt/Tutorials/GtkThemes/GtkComboBoxEntry - if (const QStyleOptionComboBox *comboBox = qstyleoption_cast(option)) { - bool sunken = comboBox->state & State_On; // play dead, if combobox has no items - BEGIN_STYLE_PIXMAPCACHE(QString::fromLatin1("cb-%0-%1").arg(sunken).arg(comboBox->editable)); - gtkPainter->reset(p); - gtkPainter->setUsePixmapCache(false); // cached externally - - bool isEnabled = (comboBox->state & State_Enabled); - bool focus = isEnabled && (comboBox->state & State_HasFocus); - GtkStateType state = qt_gtk_state(option); - int appears_as_list = !proxy()->styleHint(QStyle::SH_ComboBox_Popup, comboBox, widget); - QStyleOptionComboBox comboBoxCopy = *comboBox; - comboBoxCopy.rect = option->rect; - - bool reverse = (option->direction == Qt::RightToLeft); - QRect rect = option->rect; - QRect arrowButtonRect = proxy()->subControlRect(CC_ComboBox, &comboBoxCopy, - SC_ComboBoxArrow, widget); - - GtkShadowType shadow = (option->state & State_Sunken || option->state & State_On ) ? - GTK_SHADOW_IN : GTK_SHADOW_OUT; - const QHashableLatin1Literal comboBoxPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry") : QHashableLatin1Literal("GtkComboBox"); - - // We use the gtk widget to position arrows and separators for us - GtkWidget *gtkCombo = d->gtkWidget(comboBoxPath); - GtkAllocation geometry = {0, 0, option->rect.width(), option->rect.height()}; - d->gtk_widget_set_direction(gtkCombo, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); - d->gtk_widget_size_allocate(gtkCombo, &geometry); - - QHashableLatin1Literal buttonPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton") - : QHashableLatin1Literal("GtkComboBox.GtkToggleButton"); - GtkWidget *gtkToggleButton = d->gtkWidget(buttonPath); - d->gtk_widget_set_direction(gtkToggleButton, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); - if (gtkToggleButton && (appears_as_list || comboBox->editable)) { - if (focus) - QGtkStylePrivate::gtkWidgetSetFocus(gtkToggleButton, true); - // Draw the combo box as a line edit with a button next to it - if (comboBox->editable || appears_as_list) { - GtkStateType frameState = (state == GTK_STATE_PRELIGHT) ? GTK_STATE_NORMAL : state; - QHashableLatin1Literal entryPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkEntry") : QHashableLatin1Literal("GtkComboBox.GtkFrame"); - GtkWidget *gtkEntry = d->gtkWidget(entryPath); - d->gtk_widget_set_direction(gtkEntry, reverse ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); - QRect frameRect = option->rect; - - if (reverse) - frameRect.setLeft(arrowButtonRect.right()); - else - frameRect.setRight(arrowButtonRect.left()); - - // Fill the line edit background - // We could have used flat_box with "entry_bg" but that is probably not worth the overhead - uint resolve_mask = option->palette.resolve(); - GtkStyle *gtkEntryStyle = d->gtk_widget_get_style(gtkEntry); - QRect contentRect = frameRect.adjusted(gtkEntryStyle->xthickness, gtkEntryStyle->ythickness, - -gtkEntryStyle->xthickness, -gtkEntryStyle->ythickness); - // Required for inner blue highlight with clearlooks - if (focus) - QGtkStylePrivate::gtkWidgetSetFocus(gtkEntry, true); - - if (widget && widget->testAttribute(Qt::WA_SetPalette) && - resolve_mask & (1 << QPalette::Base)) // Palette overridden by user - p->fillRect(contentRect, option->palette.base().color()); - else { - gtkPainter->paintFlatBox(gtkEntry, "entry_bg", contentRect, - option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, - GTK_SHADOW_NONE, gtkEntryStyle, entryPath.toString() + QString::number(focus)); - } - - gtkPainter->paintShadow(gtkEntry, comboBox->editable ? "entry" : "frame", frameRect, frameState, - GTK_SHADOW_IN, gtkEntryStyle, entryPath.toString() + - QString::number(focus) + QString::number(comboBox->editable) + - QString::number(option->direction)); - if (focus) - QGtkStylePrivate::gtkWidgetSetFocus(gtkEntry, false); - } - - GtkStateType buttonState = GTK_STATE_NORMAL; - - if (!(option->state & State_Enabled)) - buttonState = GTK_STATE_INSENSITIVE; - else if (option->state & State_Sunken || option->state & State_On) - buttonState = GTK_STATE_ACTIVE; - else if (option->state & State_MouseOver && comboBox->activeSubControls & SC_ComboBoxArrow) - buttonState = GTK_STATE_PRELIGHT; - - Q_ASSERT(gtkToggleButton); - gtkPainter->paintBox(gtkToggleButton, "button", arrowButtonRect, buttonState, - shadow, d->gtk_widget_get_style(gtkToggleButton), buttonPath.toString() + - QString::number(focus) + QString::number(option->direction)); - if (focus) - QGtkStylePrivate::gtkWidgetSetFocus(gtkToggleButton, false); - } else { - // Draw combo box as a button - QRect buttonRect = option->rect; - GtkStyle *gtkToggleButtonStyle = d->gtk_widget_get_style(gtkToggleButton); - - if (focus) // Clearlooks actually check the widget for the default state - QGtkStylePrivate::gtkWidgetSetFocus(gtkToggleButton, true); - gtkPainter->paintBox(gtkToggleButton, "button", - buttonRect, state, - shadow, gtkToggleButtonStyle, - buttonPath.toString() + QString::number(focus)); - if (focus) - QGtkStylePrivate::gtkWidgetSetFocus(gtkToggleButton, false); - - - // Draw the separator between label and arrows - QHashableLatin1Literal vSeparatorPath = comboBox->editable - ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkHBox.GtkVSeparator") - : QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkHBox.GtkVSeparator"); - - if (GtkWidget *gtkVSeparator = d->gtkWidget(vSeparatorPath)) { - GtkAllocation allocation; - d->gtk_widget_get_allocation(gtkVSeparator, &allocation); - QRect vLineRect(allocation.x, allocation.y, allocation.width, allocation.height); - - gtkPainter->paintVline(gtkVSeparator, "vseparator", - vLineRect, state, d->gtk_widget_get_style(gtkVSeparator), - 0, vLineRect.height(), 0, vSeparatorPath.toString()); - - - gint interiorFocus = true; - d->gtk_widget_style_get(gtkToggleButton, "interior-focus", &interiorFocus, NULL); - int xt = interiorFocus ? gtkToggleButtonStyle->xthickness : 0; - int yt = interiorFocus ? gtkToggleButtonStyle->ythickness : 0; - if (focus && ((option->state & State_KeyboardFocusChange) || styleHint(SH_UnderlineShortcut, option, widget))) - gtkPainter->paintFocus(gtkToggleButton, "button", - option->rect.adjusted(xt, yt, -xt, -yt), - option->state & State_Sunken ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL, - gtkToggleButtonStyle); - } - } - - if (comboBox->subControls & SC_ComboBoxArrow) { - if (!isEnabled) - state = GTK_STATE_INSENSITIVE; - else if (sunken) - state = GTK_STATE_ACTIVE; - else if (option->state & State_MouseOver) - state = GTK_STATE_PRELIGHT; - else - state = GTK_STATE_NORMAL; - - QHashableLatin1Literal arrowPath(""); - if (comboBox->editable) { - if (appears_as_list) - arrowPath = QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkArrow"); - else - arrowPath = QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton.GtkHBox.GtkArrow"); - } else { - if (appears_as_list) - arrowPath = QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkArrow"); - else - arrowPath = QHashableLatin1Literal("GtkComboBox.GtkToggleButton.GtkHBox.GtkArrow"); - } - - GtkWidget *gtkArrow = d->gtkWidget(arrowPath); - gfloat scale = 0.7; - gint minSize = 15; - QRect arrowWidgetRect; - - if (gtkArrow && !d->gtk_check_version(2, 12, 0)) { - d->gtk_widget_style_get(gtkArrow, "arrow-scaling", &scale, NULL); - d->gtk_widget_style_get(gtkCombo, "arrow-size", &minSize, NULL); - } - if (gtkArrow) { - GtkAllocation allocation; - d->gtk_widget_get_allocation(gtkArrow, &allocation); - arrowWidgetRect = QRect(allocation.x, allocation.y, allocation.width, allocation.height); - style = d->gtk_widget_get_style(gtkArrow); - } - - // Note that for some reason the arrow-size is not properly respected with Hildon - // Hence we enforce the minimum "arrow-size" ourselves - int arrowSize = qMax(qMin(rect.height() - d->gtk_widget_get_style(gtkCombo)->ythickness * 2, minSize), - qMin(arrowWidgetRect.width(), arrowWidgetRect.height())); - QRect arrowRect(0, 0, static_cast(arrowSize * scale), static_cast(arrowSize * scale)); - - arrowRect.moveCenter(arrowWidgetRect.center()); - - if (sunken) { - int xoff, yoff; - const QHashableLatin1Literal toggleButtonPath = comboBox->editable - ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton") - : QHashableLatin1Literal("GtkComboBox.GtkToggleButton"); - - GtkWidget *gtkButton = d->gtkWidget(toggleButtonPath); - d->gtk_widget_style_get(gtkButton, "child-displacement-x", &xoff, NULL); - d->gtk_widget_style_get(gtkButton, "child-displacement-y", &yoff, NULL); - arrowRect = arrowRect.adjusted(xoff, yoff, xoff, yoff); - } - - // Some styles such as Nimbus paint outside the arrowRect - // hence we have provide the whole widget as the cliprect - if (gtkArrow) { - gtkPainter->setClipRect(option->rect); - gtkPainter->paintArrow(gtkArrow, "arrow", arrowRect, - GTK_ARROW_DOWN, state, GTK_SHADOW_NONE, true, - style, arrowPath.toString() + QString::number(option->direction)); - } - } - END_STYLE_PIXMAPCACHE; - } - break; -#endif // QT_NO_COMBOBOX -#ifndef QT_NO_TOOLBUTTON - - case CC_ToolButton: - if (const QStyleOptionToolButton *toolbutton - = qstyleoption_cast(option)) { - QRect button, menuarea; - button = proxy()->subControlRect(control, toolbutton, SC_ToolButton, widget); - menuarea = proxy()->subControlRect(control, toolbutton, SC_ToolButtonMenu, widget); - State bflags = toolbutton->state & ~(State_Sunken | State_MouseOver); - - if (bflags & State_AutoRaise) - if (!(bflags & State_MouseOver)) - bflags &= ~State_Raised; - - State mflags = bflags; - - if (toolbutton->state & State_Sunken) { - if (toolbutton->activeSubControls & SC_ToolButton) - bflags |= State_Sunken; - if (toolbutton->activeSubControls & SC_ToolButtonMenu) - mflags |= State_Sunken; - } else if (toolbutton->state & State_MouseOver) { - if (toolbutton->activeSubControls & SC_ToolButton) - bflags |= State_MouseOver; - if (toolbutton->activeSubControls & SC_ToolButtonMenu) - mflags |= State_MouseOver; - } - - QStyleOption tool(0); - - tool.palette = toolbutton->palette; - - if (toolbutton->subControls & SC_ToolButton) { - if (bflags & (State_Sunken | State_On | State_Raised | State_MouseOver)) { - tool.rect = button; - tool.state = bflags; - proxy()->drawPrimitive(PE_PanelButtonTool, &tool, painter, widget); - } - } - - bool drawMenuArrow = toolbutton->features & QStyleOptionToolButton::HasMenu && - !(toolbutton->features & QStyleOptionToolButton::MenuButtonPopup); - int popupArrowSize = drawMenuArrow ? 7 : 0; - - if (toolbutton->state & State_HasFocus) { - QStyleOptionFocusRect fr; - fr.QStyleOption::operator=(*toolbutton); - fr.rect = proxy()->subControlRect(CC_ToolButton, toolbutton, SC_ToolButton, widget); - fr.rect.adjust(1, 1, -1, -1); - proxy()->drawPrimitive(PE_FrameFocusRect, &fr, painter, widget); - } - - QStyleOptionToolButton label = *toolbutton; - label.state = bflags; - GtkWidget *gtkButton = d->gtkWidget("GtkToolButton.GtkButton"); - QPalette pal = toolbutton->palette; - if (option->state & State_Enabled && - option->state & State_MouseOver && !(widget && widget->testAttribute(Qt::WA_SetPalette))) { - GdkColor gdkText = d->gtk_widget_get_style(gtkButton)->fg[GTK_STATE_PRELIGHT]; - QColor textColor = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - pal.setBrush(QPalette::All, QPalette::ButtonText, textColor); - label.palette = pal; - } - label.rect = button.adjusted(style->xthickness, style->ythickness, - -style->xthickness - popupArrowSize, -style->ythickness); - proxy()->drawControl(CE_ToolButtonLabel, &label, painter, widget); - - if (toolbutton->subControls & SC_ToolButtonMenu) { - tool.rect = menuarea; - tool.state = mflags; - if ((mflags & State_Enabled && (mflags & (State_Sunken | State_Raised | State_MouseOver))) || !(mflags & State_AutoRaise)) - proxy()->drawPrimitive(PE_IndicatorButtonDropDown, &tool, painter, widget); - - proxy()->drawPrimitive(PE_IndicatorArrowDown, &tool, painter, widget); - - } else if (drawMenuArrow) { - QRect ir = toolbutton->rect; - QStyleOptionToolButton newBtn = *toolbutton; - newBtn.rect = QRect(ir.right() - popupArrowSize - style->xthickness - 3, ir.height()/2 - 1, popupArrowSize, popupArrowSize); - proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, painter, widget); - } - } - break; - -#endif // QT_NO_TOOLBUTTON -#ifndef QT_NO_SCROLLBAR - - case CC_ScrollBar: - if (const QStyleOptionSlider *scrollBar = qstyleoption_cast(option)) { - GtkWidget *gtkHScrollBar = d->gtkWidget("GtkHScrollbar"); - GtkWidget *gtkVScrollBar = d->gtkWidget("GtkVScrollbar"); - - // Fill background in case the scrollbar is partially transparent - painter->fillRect(option->rect, option->palette.background()); - - QRect rect = scrollBar->rect; - 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); - bool horizontal = scrollBar->orientation == Qt::Horizontal; - GtkWidget * scrollbarWidget = horizontal ? gtkHScrollBar : gtkVScrollBar; - style = d->gtk_widget_get_style(scrollbarWidget); - gboolean trough_under_steppers = true; - gboolean trough_side_details = false; - gboolean activate_slider = false; - gboolean stepper_size = 14; - gint trough_border = 1; - if (!d->gtk_check_version(2, 10, 0)) { - d->gtk_widget_style_get((GtkWidget*)(scrollbarWidget), - "trough-border", &trough_border, - "trough-side-details", &trough_side_details, - "trough-under-steppers", &trough_under_steppers, - "activate-slider", &activate_slider, - "stepper-size", &stepper_size, NULL); - } - if (trough_under_steppers) { - scrollBarAddLine.adjust(trough_border, trough_border, -trough_border, -trough_border); - scrollBarSubLine.adjust(trough_border, trough_border, -trough_border, -trough_border); - scrollBarSlider.adjust(horizontal ? -trough_border : 0, horizontal ? 0 : -trough_border, - horizontal ? trough_border : 0, horizontal ? 0 : trough_border); - } - - // Some styles check the position of scrollbars in order to determine - // if lines should be painted when the scrollbar is in max or min positions. - int maximum = 2; - int fakePos = 0; - bool reverse = (option->direction == Qt::RightToLeft); - if (scrollBar->minimum == scrollBar->maximum) - maximum = 0; - if (scrollBar->sliderPosition == scrollBar->maximum) - fakePos = maximum; - else if (scrollBar->sliderPosition > scrollBar->minimum) - fakePos = maximum - 1; - - - GtkRange *range = (GtkRange*)(horizontal ? gtkHScrollBar : gtkVScrollBar); - GtkAdjustment *adjustment = 0; - - if (d->gtk_adjustment_configure) - adjustment = d->gtk_range_get_adjustment(range); - if (adjustment) { - d->gtk_adjustment_configure(adjustment, fakePos, 0, maximum, 0, 0, 0); - } else { - adjustment = (GtkAdjustment*)d->gtk_adjustment_new(fakePos, 0, maximum, 0, 0, 0); - d->gtk_range_set_adjustment(range, adjustment); - } - - if (scrollBar->subControls & SC_ScrollBarGroove) { - GtkStateType state = GTK_STATE_ACTIVE; - - if (!(option->state & State_Enabled)) - state = GTK_STATE_INSENSITIVE; - - if (trough_under_steppers) - grooveRect = option->rect; - - gtkPainter->paintBox(scrollbarWidget, "trough", grooveRect, state, GTK_SHADOW_IN, style); - } - - //paint slider - if (scrollBar->subControls & SC_ScrollBarSlider) { - GtkStateType state = GTK_STATE_NORMAL; - - if (!(option->state & State_Enabled)) - state = GTK_STATE_INSENSITIVE; - else if (activate_slider && - option->state & State_Sunken && (scrollBar->activeSubControls & SC_ScrollBarSlider)) - state = GTK_STATE_ACTIVE; - else if (option->state & State_MouseOver && (scrollBar->activeSubControls & SC_ScrollBarSlider)) - state = GTK_STATE_PRELIGHT; - - GtkShadowType shadow = GTK_SHADOW_OUT; - - if (trough_under_steppers) { - if (!horizontal) - scrollBarSlider.adjust(trough_border, 0, -trough_border, 0); - else - scrollBarSlider.adjust(0, trough_border, 0, -trough_border); - } - - gtkPainter->paintSlider(scrollbarWidget, "slider", scrollBarSlider, state, shadow, style, - horizontal ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL, QString(QLS("%0%1")).arg(fakePos).arg(maximum)); - } - - if (scrollBar->subControls & SC_ScrollBarAddLine) { - GtkAllocation vAllocation; - vAllocation.y = scrollBarAddLine.top(); - vAllocation.height = scrollBarAddLine.height() - rect.height() + 6; - d->gtk_widget_set_allocation(gtkVScrollBar, &vAllocation); - - GtkAllocation hAllocation; - hAllocation.x = scrollBarAddLine.right(); - hAllocation.width = scrollBarAddLine.width() - rect.width(); - d->gtk_widget_set_allocation(gtkHScrollBar, &hAllocation); - - GtkShadowType shadow = GTK_SHADOW_OUT; - GtkStateType state = GTK_STATE_NORMAL; - - if (!(option->state & State_Enabled) || (fakePos == maximum)) - state = GTK_STATE_INSENSITIVE; - else if (option->state & State_Sunken && (scrollBar->activeSubControls & SC_ScrollBarAddLine)) { - state = GTK_STATE_ACTIVE; - shadow = GTK_SHADOW_IN; - - } else if (option->state & State_MouseOver && (scrollBar->activeSubControls & SC_ScrollBarAddLine)) - state = GTK_STATE_PRELIGHT; - - gtkPainter->paintBox(scrollbarWidget, - horizontal ? "hscrollbar" : "vscrollbar", scrollBarAddLine, - state, shadow, style, QLS("add")); - - gtkPainter->paintArrow(scrollbarWidget, horizontal ? "hscrollbar" : "vscrollbar", scrollBarAddLine.adjusted(4, 4, -4, -4), - horizontal ? (reverse ? GTK_ARROW_LEFT : GTK_ARROW_RIGHT) : - GTK_ARROW_DOWN, state, GTK_SHADOW_NONE, false, style); - } - - if (scrollBar->subControls & SC_ScrollBarSubLine) { - GtkAllocation vAllocation; - vAllocation.y = 0; - vAllocation.height = scrollBarSubLine.height(); - d->gtk_widget_set_allocation(gtkVScrollBar, &vAllocation); - - GtkAllocation hAllocation; - hAllocation.x = 0; - hAllocation.width = scrollBarSubLine.width(); - d->gtk_widget_set_allocation(gtkHScrollBar, &hAllocation); - - GtkShadowType shadow = GTK_SHADOW_OUT; - GtkStateType state = GTK_STATE_NORMAL; - - if (!(option->state & State_Enabled) || (fakePos == 0)) - state = GTK_STATE_INSENSITIVE; - else if (option->state & State_Sunken && (scrollBar->activeSubControls & SC_ScrollBarSubLine)) { - shadow = GTK_SHADOW_IN; - state = GTK_STATE_ACTIVE; - - } else if (option->state & State_MouseOver && (scrollBar->activeSubControls & SC_ScrollBarSubLine)) - state = GTK_STATE_PRELIGHT; - - gtkPainter->paintBox(scrollbarWidget, horizontal ? "hscrollbar" : "vscrollbar", scrollBarSubLine, - state, shadow, style, QLS("sub")); - - gtkPainter->paintArrow(scrollbarWidget, horizontal ? "hscrollbar" : "vscrollbar", scrollBarSubLine.adjusted(4, 4, -4, -4), - horizontal ? (reverse ? GTK_ARROW_RIGHT : GTK_ARROW_LEFT) : - GTK_ARROW_UP, state, GTK_SHADOW_NONE, false, style); - } - } - break; - -#endif //QT_NO_SCROLLBAR -#ifndef QT_NO_SPINBOX - - case CC_SpinBox: - if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast(option)) { - - GtkWidget *gtkSpinButton = spinBox->buttonSymbols == QAbstractSpinBox::NoButtons - ? d->gtkWidget("GtkEntry") - : d->gtkWidget("GtkSpinButton"); - bool isEnabled = (spinBox->state & State_Enabled); - 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); - bool reverse = (spinBox->direction == Qt::RightToLeft); - - QRect editArea = option->rect; - QRect editRect = proxy()->subControlRect(CC_SpinBox, option, SC_SpinBoxEditField, widget); - QRect upRect, downRect, buttonRect; - if (spinBox->buttonSymbols != QAbstractSpinBox::NoButtons) { - upRect = proxy()->subControlRect(CC_SpinBox, option, SC_SpinBoxUp, widget); - downRect = proxy()->subControlRect(CC_SpinBox, option, SC_SpinBoxDown, widget); - - //### Move this to subControlRect - upRect.setTop(option->rect.top()); - - if (reverse) - upRect.setLeft(option->rect.left()); - else - upRect.setRight(option->rect.right()); - - downRect.setBottom(option->rect.bottom()); - - if (reverse) - downRect.setLeft(option->rect.left()); - else - downRect.setRight(option->rect.right()); - - buttonRect = upRect | downRect; - - if (reverse) - editArea.setLeft(upRect.right()); - else - editArea.setRight(upRect.left()); - } - if (spinBox->frame) { - GtkStateType state = qt_gtk_state(option); - - if (!(option->state & State_Enabled)) - state = GTK_STATE_INSENSITIVE; - else if (option->state & State_HasFocus) - state = GTK_STATE_NORMAL; - else if (state == GTK_STATE_PRELIGHT) - state = GTK_STATE_NORMAL; - - style = d->gtk_widget_get_style(gtkSpinButton); - - - QString key; - - if (option->state & State_HasFocus) { - key += QLatin1Char('f'); - QGtkStylePrivate::gtkWidgetSetFocus(gtkSpinButton, true); - } - - uint resolve_mask = option->palette.resolve(); - - if (resolve_mask & (1 << QPalette::Base)) // Palette overridden by user - painter->fillRect(editRect, option->palette.base().color()); - else - gtkPainter->paintFlatBox(gtkSpinButton, "entry_bg", editArea.adjusted(style->xthickness, style->ythickness, - -style->xthickness, -style->ythickness), - option->state & State_Enabled ? - GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, GTK_SHADOW_NONE, style, key); - - gtkPainter->paintShadow(gtkSpinButton, "entry", editArea, state, GTK_SHADOW_IN, d->gtk_widget_get_style(gtkSpinButton), key); - if (spinBox->buttonSymbols != QAbstractSpinBox::NoButtons) { - gtkPainter->paintBox(gtkSpinButton, "spinbutton", buttonRect, state, GTK_SHADOW_IN, style, key); - - upRect.setSize(downRect.size()); - if (!(option->state & State_Enabled)) - gtkPainter->paintBox(gtkSpinButton, "spinbutton_up", upRect, GTK_STATE_INSENSITIVE, GTK_SHADOW_IN, style, key); - else if (upIsActive && sunken) - gtkPainter->paintBox(gtkSpinButton, "spinbutton_up", upRect, GTK_STATE_ACTIVE, GTK_SHADOW_IN, style, key); - else if (upIsActive && hover) - gtkPainter->paintBox(gtkSpinButton, "spinbutton_up", upRect, GTK_STATE_PRELIGHT, GTK_SHADOW_OUT, style, key); - else - gtkPainter->paintBox(gtkSpinButton, "spinbutton_up", upRect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, style, key); - - if (!(option->state & State_Enabled)) - gtkPainter->paintBox(gtkSpinButton, "spinbutton_down", downRect, GTK_STATE_INSENSITIVE, GTK_SHADOW_IN, style, key); - else if (downIsActive && sunken) - gtkPainter->paintBox(gtkSpinButton, "spinbutton_down", downRect, GTK_STATE_ACTIVE, GTK_SHADOW_IN, style, key); - else if (downIsActive && hover) - gtkPainter->paintBox(gtkSpinButton, "spinbutton_down", downRect, GTK_STATE_PRELIGHT, GTK_SHADOW_OUT, style, key); - else - gtkPainter->paintBox(gtkSpinButton, "spinbutton_down", downRect, GTK_STATE_NORMAL, GTK_SHADOW_OUT, style, key); - - if (option->state & State_HasFocus) - QGtkStylePrivate::gtkWidgetSetFocus(gtkSpinButton, false); - } - } - - if (spinBox->buttonSymbols == QAbstractSpinBox::PlusMinus) { - int centerX = upRect.center().x(); - int centerY = upRect.center().y(); - // plus/minus - - if (spinBox->activeSubControls == SC_SpinBoxUp && sunken) { - painter->drawLine(1 + centerX - 2, 1 + centerY, 1 + centerX + 2, 1 + centerY); - painter->drawLine(1 + centerX, 1 + centerY - 2, 1 + centerX, 1 + centerY + 2); - - } else { - painter->drawLine(centerX - 2, centerY, centerX + 2, centerY); - painter->drawLine(centerX, centerY - 2, centerX, centerY + 2); - } - centerX = downRect.center().x(); - centerY = downRect.center().y(); - - if (spinBox->activeSubControls == SC_SpinBoxDown && sunken) { - painter->drawLine(1 + centerX - 2, 1 + centerY, 1 + centerX + 2, 1 + centerY); - } else { - painter->drawLine(centerX - 2, centerY, centerX + 2, centerY); - } - - } else if (spinBox->buttonSymbols == QAbstractSpinBox::UpDownArrows) { - int size = d->getSpinboxArrowSize(); - int w = size / 2 - 1; - w -= w % 2 - 1; // force odd - int h = (w + 1)/2; - QRect arrowRect(0, 0, w, h); - arrowRect.moveCenter(upRect.center()); - // arrows - GtkStateType state = GTK_STATE_NORMAL; - - if (!(option->state & State_Enabled) || !(spinBox->stepEnabled & QAbstractSpinBox::StepUpEnabled)) - state = GTK_STATE_INSENSITIVE; - - gtkPainter->paintArrow(gtkSpinButton, "spinbutton", arrowRect, GTK_ARROW_UP, state, - GTK_SHADOW_NONE, false, style); - - arrowRect.moveCenter(downRect.center()); - - if (!(option->state & State_Enabled) || !(spinBox->stepEnabled & QAbstractSpinBox::StepDownEnabled)) - state = GTK_STATE_INSENSITIVE; - - gtkPainter->paintArrow(gtkSpinButton, "spinbutton", arrowRect, GTK_ARROW_DOWN, state, - GTK_SHADOW_NONE, false, style); - } - } - break; - -#endif // QT_NO_SPINBOX - -#ifndef QT_NO_SLIDER - - case CC_Slider: - if (const QStyleOptionSlider *slider = qstyleoption_cast(option)) { - GtkWidget *hScaleWidget = d->gtkWidget("GtkHScale"); - GtkWidget *vScaleWidget = d->gtkWidget("GtkVScale"); - - 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; - - QBrush oldBrush = painter->brush(); - QPen oldPen = painter->pen(); - - QColor shadowAlpha(Qt::black); - shadowAlpha.setAlpha(10); - QColor highlightAlpha(Qt::white); - highlightAlpha.setAlpha(80); - - QGtkStylePrivate::gtk_widget_set_direction(hScaleWidget, slider->upsideDown ? - GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); - GtkWidget *scaleWidget = horizontal ? hScaleWidget : vScaleWidget; - style = d->gtk_widget_get_style(scaleWidget); - - if ((option->subControls & SC_SliderGroove) && groove.isValid()) { - - GtkRange *range = (GtkRange*)scaleWidget; - GtkAdjustment *adjustment = 0; - if (d->gtk_adjustment_configure) - adjustment = d->gtk_range_get_adjustment(range); - if (adjustment) { - d->gtk_adjustment_configure(adjustment, - slider->sliderPosition, - slider->minimum, - slider->maximum, - slider->singleStep, - slider->singleStep, - slider->pageStep); - } else { - adjustment = (GtkAdjustment*)d->gtk_adjustment_new(slider->sliderPosition, - slider->minimum, - slider->maximum, - slider->singleStep, - slider->singleStep, - slider->pageStep); - d->gtk_range_set_adjustment(range, adjustment); - } - - int outerSize; - d->gtk_range_set_inverted(range, !horizontal); - d->gtk_widget_style_get(scaleWidget, "trough-border", &outerSize, NULL); - outerSize++; - - GtkStateType state = qt_gtk_state(option); - int focusFrameMargin = 2; - QRect grooveRect = option->rect.adjusted(focusFrameMargin, outerSize + focusFrameMargin, - -focusFrameMargin, -outerSize - focusFrameMargin); - - gboolean trough_side_details = false; // Indicates if the upper or lower scale background differs - if (!d->gtk_check_version(2, 10, 0)) - d->gtk_widget_style_get((GtkWidget*)(scaleWidget), "trough-side-details", &trough_side_details, NULL); - - if (!trough_side_details) { - gtkPainter->paintBox(scaleWidget, "trough", grooveRect, state, - GTK_SHADOW_IN, style, QString(QLS("p%0")).arg(slider->sliderPosition)); - } else { - QRect upperGroove = grooveRect; - QRect lowerGroove = grooveRect; - - if (horizontal) { - if (slider->upsideDown) { - lowerGroove.setLeft(handle.center().x()); - upperGroove.setRight(handle.center().x()); - } else { - upperGroove.setLeft(handle.center().x()); - lowerGroove.setRight(handle.center().x()); - } - } else { - if (!slider->upsideDown) { - lowerGroove.setBottom(handle.center().y()); - upperGroove.setTop(handle.center().y()); - } else { - upperGroove.setBottom(handle.center().y()); - lowerGroove.setTop(handle.center().y()); - } - } - - gtkPainter->paintBox(scaleWidget, "trough-upper", upperGroove, state, - GTK_SHADOW_IN, style, QString(QLS("p%0")).arg(slider->sliderPosition)); - gtkPainter->paintBox(scaleWidget, "trough-lower", lowerGroove, state, - GTK_SHADOW_IN, style, QString(QLS("p%0")).arg(slider->sliderPosition)); - } - } - - 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; - } - } - - // Draw slider handle - if (option->subControls & SC_SliderHandle) { - GtkShadowType shadow = GTK_SHADOW_OUT; - GtkStateType state = GTK_STATE_NORMAL; - - if (!(option->state & State_Enabled)) - state = GTK_STATE_INSENSITIVE; - else if (option->state & State_MouseOver && option->activeSubControls & SC_SliderHandle) - state = GTK_STATE_PRELIGHT; - - bool horizontal = option->state & State_Horizontal; - - if (slider->state & State_HasFocus) { - QStyleOptionFocusRect fropt; - fropt.QStyleOption::operator=(*slider); - fropt.rect = slider->rect.adjusted(-1, -1 ,1, 1); - - if (horizontal) { - fropt.rect.setTop(handle.top() - 3); - fropt.rect.setBottom(handle.bottom() + 4); - - } else { - fropt.rect.setLeft(handle.left() - 3); - fropt.rect.setRight(handle.right() + 3); - } - proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); - } - gtkPainter->paintSlider(scaleWidget, horizontal ? "hscale" : "vscale", handle, state, shadow, style, - horizontal ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL); - } - painter->setBrush(oldBrush); - painter->setPen(oldPen); - } - break; - case CC_Dial: - if (const QStyleOptionSlider *dial = qstyleoption_cast(option)) - QStyleHelper::drawDial(dial, painter); - break; - -#endif // QT_NO_SLIDER - - default: - QCommonStyle::drawComplexControl(control, option, painter, widget); - - break; - } -} - - -/*! - \reimp -*/ -void QGtkStyle::drawControl(ControlElement element, - const QStyleOption *option, - QPainter *painter, - const QWidget *widget) const -{ - Q_D(const QGtkStyle); - - if (!d->isThemeAvailable()) { - QCommonStyle::drawControl(element, option, painter, widget); - return; - } - - GtkStyle* style = d->gtkStyle(); - QGtkPainter* gtkPainter = d->gtkPainter(painter); - - switch (element) { - case CE_ProgressBarLabel: - if (const QStyleOptionProgressBar *bar = qstyleoption_cast(option)) { - GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar"); - if (!gtkProgressBar) - return; - - QRect leftRect; - QRect rect = bar->rect; - GtkStyle *gtkProgressBarStyle = d->gtk_widget_get_style(gtkProgressBar); - GdkColor gdkText = gtkProgressBarStyle->fg[GTK_STATE_NORMAL]; - QColor textColor = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - gdkText = gtkProgressBarStyle->fg[GTK_STATE_PRELIGHT]; - QColor alternateTextColor= QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - - painter->save(); - bool vertical = false, inverted = false; - if (const QStyleOptionProgressBarV2 *bar2 = qstyleoption_cast(option)) { - vertical = (bar2->orientation == Qt::Vertical); - inverted = bar2->invertedAppearance; - } - if (vertical) - rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height - const int progressIndicatorPos = (bar->progress - qreal(bar->minimum)) * rect.width() / - qMax(qreal(1.0), qreal(bar->maximum) - bar->minimum); - if (progressIndicatorPos >= 0 && progressIndicatorPos <= rect.width()) - leftRect = QRect(rect.left(), rect.top(), progressIndicatorPos, rect.height()); - if (vertical) - leftRect.translate(rect.width() - progressIndicatorPos, 0); - - bool flip = (!vertical && (((bar->direction == Qt::RightToLeft) && !inverted) || - ((bar->direction == Qt::LeftToRight) && inverted))); - - QRegion rightRect = rect; - rightRect = rightRect.subtracted(leftRect); - painter->setClipRegion(rightRect); - painter->setPen(flip ? alternateTextColor : textColor); - painter->drawText(rect, bar->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - if (!leftRect.isNull()) { - painter->setPen(flip ? textColor : alternateTextColor); - painter->setClipRect(leftRect); - painter->drawText(rect, bar->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - } - painter->restore(); - } - break; - case CE_PushButtonLabel: - if (const QStyleOptionButton *button = qstyleoption_cast(option)) { - QRect ir = button->rect; - uint tf = Qt::AlignVCenter | Qt::TextShowMnemonic; - QPoint buttonShift; - - if (option->state & State_Sunken) - buttonShift = QPoint(pixelMetric(PM_ButtonShiftHorizontal, option, widget), - proxy()->pixelMetric(PM_ButtonShiftVertical, option, widget)); - - if (proxy()->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() + 4; - - 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 + buttonShift), pixmap); - - if (button->direction == Qt::RightToLeft) - ir.translate(-point.x() - 2, 0); - else - ir.translate(point.x() + pixmap.width() + 2, 0); - - // left-align text if there is - if (!button->text.isEmpty()) - tf |= Qt::AlignLeft; - - } else { - tf |= Qt::AlignHCenter; - } - - ir.translate(buttonShift); - - if (button->features & QStyleOptionButton::HasMenu) - ir = ir.adjusted(0, 0, -pixelMetric(PM_MenuButtonIndicator, button, widget), 0); - - GtkWidget *gtkButton = d->gtkWidget("GtkButton"); - QPalette pal = button->palette; - int labelState = GTK_STATE_INSENSITIVE; - if (option->state & State_Enabled) - labelState = (option->state & State_MouseOver && !(option->state & State_Sunken)) ? - GTK_STATE_PRELIGHT : GTK_STATE_NORMAL; - - GdkColor gdkText = d->gtk_widget_get_style(gtkButton)->fg[labelState]; - QColor textColor = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - pal.setBrush(QPalette::ButtonText, textColor); - proxy()->drawItemText(painter, ir, tf, pal, (button->state & State_Enabled), - button->text, QPalette::ButtonText); - } - break; - - case CE_RadioButton: // Fall through - case CE_CheckBox: - if (const QStyleOptionButton *btn = qstyleoption_cast(option)) { - bool isRadio = (element == CE_RadioButton); - - // Draw prelight background - GtkWidget *gtkRadioButton = d->gtkWidget("GtkRadioButton"); - - if (option->state & State_MouseOver) { - gtkPainter->paintFlatBox(gtkRadioButton, "checkbutton", option->rect, - GTK_STATE_PRELIGHT, GTK_SHADOW_ETCHED_OUT, d->gtk_widget_get_style(gtkRadioButton)); - } - - QStyleOptionButton subopt = *btn; - subopt.rect = subElementRect(isRadio ? SE_RadioButtonIndicator - : SE_CheckBoxIndicator, btn, widget); - proxy()->drawPrimitive(isRadio ? PE_IndicatorRadioButton : PE_IndicatorCheckBox, - &subopt, painter, widget); - subopt.rect = subElementRect(isRadio ? SE_RadioButtonContents - : SE_CheckBoxContents, btn, widget); - // Get label text color - QPalette pal = subopt.palette; - int labelState = GTK_STATE_INSENSITIVE; - if (option->state & State_Enabled) - labelState = (option->state & State_MouseOver) ? GTK_STATE_PRELIGHT : GTK_STATE_NORMAL; - - GdkColor gdkText = d->gtk_widget_get_style(gtkRadioButton)->fg[labelState]; - QColor textColor = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - pal.setBrush(QPalette::WindowText, textColor); - subopt.palette = pal; - proxy()->drawControl(isRadio ? CE_RadioButtonLabel : CE_CheckBoxLabel, &subopt, painter, widget); - - if (btn->state & State_HasFocus) { - QStyleOptionFocusRect fropt; - fropt.QStyleOption::operator=(*btn); - fropt.rect = subElementRect(isRadio ? SE_RadioButtonFocusRect - : SE_CheckBoxFocusRect, btn, widget); - proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); - } - } - break; - -#ifndef QT_NO_COMBOBOX - - case CE_ComboBoxLabel: - if (const QStyleOptionComboBox *cb = qstyleoption_cast(option)) { - QRect editRect = proxy()->subControlRect(CC_ComboBox, cb, SC_ComboBoxEditField, widget); - bool appearsAsList = !proxy()->styleHint(QStyle::SH_ComboBox_Popup, cb, widget); - painter->save(); - painter->setClipRect(editRect); - - if (!cb->currentIcon.isNull()) { - QIcon::Mode mode = cb->state & State_Enabled ? QIcon::Normal - : QIcon::Disabled; - QPixmap pixmap = cb->currentIcon.pixmap(cb->iconSize, mode); - QRect iconRect(editRect); - iconRect.setWidth(cb->iconSize.width() + 4); - - iconRect = alignedRect(cb->direction, - Qt::AlignLeft | Qt::AlignVCenter, - iconRect.size(), editRect); - - if (cb->editable) - painter->fillRect(iconRect, option->palette.brush(QPalette::Base)); - - proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); - - if (cb->direction == Qt::RightToLeft) - editRect.translate(-4 - cb->iconSize.width(), 0); - else - editRect.translate(cb->iconSize.width() + 4, 0); - } - - if (!cb->currentText.isEmpty() && !cb->editable) { - GtkWidget *gtkCombo = d->gtkWidget("GtkComboBox"); - QPalette pal = cb->palette; - int labelState = GTK_STATE_INSENSITIVE; - - if (option->state & State_Enabled) - labelState = (option->state & State_MouseOver && !appearsAsList) ? GTK_STATE_PRELIGHT : GTK_STATE_NORMAL; - - GdkColor gdkText = d->gtk_widget_get_style(gtkCombo)->fg[labelState]; - - QColor textColor = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - - pal.setBrush(QPalette::ButtonText, textColor); - - proxy()->drawItemText(painter, editRect.adjusted(1, 0, -1, 0), - visualAlignment(cb->direction, Qt::AlignLeft | Qt::AlignVCenter), - pal, cb->state & State_Enabled, cb->currentText, QPalette::ButtonText); - } - - painter->restore(); - } - break; - -#endif // QT_NO_COMBOBOX - - case CE_DockWidgetTitle: - painter->save(); - if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast(option)) { - const QStyleOptionDockWidgetV2 *v2 - = qstyleoption_cast(dwOpt); - bool verticalTitleBar = v2 == 0 ? false : v2->verticalTitleBar; - - QRect rect = dwOpt->rect; - QRect titleRect = subElementRect(SE_DockWidgetTitleBarText, option, widget).adjusted(-2, 0, -2, 0); - QRect r = rect.adjusted(0, 0, -1, -1); - if (verticalTitleBar) - r.adjust(0, 0, 0, -1); - - if (verticalTitleBar) { - QRect r = rect; - r.setSize(r.size().transposed()); - - 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; - } - - 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; - - - - case CE_HeaderSection: - painter->save(); - - // Draws the header in tables. - if (const QStyleOptionHeader *header = qstyleoption_cast(option)) { - Q_UNUSED(header); - GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView"); - // Get the middle column - GtkTreeViewColumn *column = d->gtk_tree_view_get_column((GtkTreeView*)gtkTreeView, 1); - Q_ASSERT(column); - - GtkWidget *gtkTreeHeader = column->button; - GtkStateType state = qt_gtk_state(option); - GtkShadowType shadow = GTK_SHADOW_OUT; - - if (option->state & State_Sunken) - shadow = GTK_SHADOW_IN; - - gtkPainter->paintBox(gtkTreeHeader, "button", option->rect.adjusted(-1, 0, 0, 0), state, shadow, d->gtk_widget_get_style(gtkTreeHeader)); - } - - painter->restore(); - break; - -#ifndef QT_NO_SIZEGRIP - - case CE_SizeGrip: { - GtkWidget *gtkStatusbar = d->gtkWidget("GtkStatusbar.GtkFrame"); - GtkStyle *gtkStatusbarStyle = d->gtk_widget_get_style(gtkStatusbar); - QRect gripRect = option->rect.adjusted(0, 0, -gtkStatusbarStyle->xthickness, -gtkStatusbarStyle->ythickness); - gtkPainter->paintResizeGrip(gtkStatusbar, "statusbar", gripRect, GTK_STATE_NORMAL, - GTK_SHADOW_OUT, option->direction == Qt::RightToLeft ? - GDK_WINDOW_EDGE_SOUTH_WEST : GDK_WINDOW_EDGE_SOUTH_EAST, - gtkStatusbarStyle); - } - break; - -#endif // QT_NO_SIZEGRIP - - case CE_MenuBarEmptyArea: { - GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar"); - GdkColor gdkBg = d->gtk_widget_get_style(gtkMenubar)->bg[GTK_STATE_NORMAL]; // Theme can depend on transparency - painter->fillRect(option->rect, QColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8)); - if (widget) { // See CE_MenuBarItem - QRect menuBarRect = widget->rect(); - QPixmap pixmap(menuBarRect.size()); - pixmap.fill(Qt::transparent); - QPainter pmPainter(&pixmap); - gtkPainter->reset(&pmPainter); - GtkShadowType shadow_type; - d->gtk_widget_style_get(gtkMenubar, "shadow-type", &shadow_type, NULL); - gtkPainter->paintBox(gtkMenubar, "menubar", menuBarRect, - GTK_STATE_NORMAL, shadow_type, d->gtk_widget_get_style(gtkMenubar)); - pmPainter.end(); - painter->drawPixmap(option->rect, pixmap, option->rect); - gtkPainter->reset(painter); - } - } - break; - - case CE_MenuBarItem: - painter->save(); - - if (const QStyleOptionMenuItem *mbi = qstyleoption_cast(option)) { - GtkWidget *gtkMenubarItem = d->gtkWidget("GtkMenuBar.GtkMenuItem"); - GtkWidget *gtkMenubar = d->gtkWidget("GtkMenuBar"); - - style = d->gtk_widget_get_style(gtkMenubarItem); - - if (widget) { - // Since Qt does not currently allow filling the entire background - // we use a hack for this by making a complete menubar each time and - // paint with the correct offset inside it. Pixmap caching should resolve - // most of the performance penalty. - QRect menuBarRect = widget->rect(); - QPixmap pixmap(menuBarRect.size()); - pixmap.fill(Qt::transparent); - QPainter pmPainter(&pixmap); - gtkPainter->reset(&pmPainter); - GtkShadowType shadow_type; - d->gtk_widget_style_get(gtkMenubar, "shadow-type", &shadow_type, NULL); - GdkColor gdkBg = d->gtk_widget_get_style(gtkMenubar)->bg[GTK_STATE_NORMAL]; // Theme can depend on transparency - painter->fillRect(option->rect, QColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8)); - gtkPainter->paintBox(gtkMenubar, "menubar", menuBarRect, - GTK_STATE_NORMAL, shadow_type, d->gtk_widget_get_style(gtkMenubar)); - pmPainter.end(); - painter->drawPixmap(option->rect, pixmap, option->rect); - gtkPainter->reset(painter); - } - - QStyleOptionMenuItem item = *mbi; - bool act = mbi->state & State_Selected && mbi->state & State_Sunken; - bool dis = !(mbi->state & State_Enabled); - item.rect = mbi->rect; - GdkColor gdkText = style->fg[dis ? GTK_STATE_INSENSITIVE : GTK_STATE_NORMAL]; - GdkColor gdkHText = style->fg[GTK_STATE_PRELIGHT]; - QColor normalTextColor = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - QColor highlightedTextColor = QColor(gdkHText.red>>8, gdkHText.green>>8, gdkHText.blue>>8); - item.palette.setBrush(QPalette::HighlightedText, highlightedTextColor); - item.palette.setBrush(QPalette::Text, normalTextColor); - item.palette.setBrush(QPalette::ButtonText, normalTextColor); - QCommonStyle::drawControl(element, &item, painter, widget); - - if (act) { - GtkShadowType shadowType = GTK_SHADOW_NONE; - d->gtk_widget_style_get (gtkMenubarItem, "selected-shadow-type", &shadowType, NULL); - gtkPainter->paintBox(gtkMenubarItem, "menuitem", option->rect.adjusted(0, 0, 0, 3), - GTK_STATE_PRELIGHT, shadowType, style); - //draw text - QPalette::ColorRole textRole = dis ? QPalette::Text : QPalette::HighlightedText; - uint alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine; - - if (!proxy()->styleHint(SH_UnderlineShortcut, mbi, widget)) - alignment |= Qt::TextHideMnemonic; - - proxy()->drawItemText(painter, item.rect, alignment, item.palette, mbi->state & State_Enabled, mbi->text, textRole); - } - } - painter->restore(); - break; - - case CE_Splitter: { - GtkWidget *gtkWindow = d->gtkWidget("GtkWindow"); // The Murrine Engine currently assumes a widget is passed - gtkPainter->paintHandle(gtkWindow, "splitter", option->rect, qt_gtk_state(option), GTK_SHADOW_NONE, - !(option->state & State_Horizontal) ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL, - style); - } - break; - -#ifndef QT_NO_TOOLBAR - - case CE_ToolBar: - if (const QStyleOptionToolBar *toolbar = qstyleoption_cast(option)) { - // Reserve the beveled appearance only for mainwindow toolbars - if (!(widget && qobject_cast (widget->parentWidget()))) - break; - - QRect rect = option->rect; - // There is a 1 pixel gap between toolbar lines in some styles (i.e Human) - if (toolbar->positionWithinLine != QStyleOptionToolBar::End) - rect.adjust(0, 0, 1, 0); - - GtkWidget *gtkToolbar = d->gtkWidget("GtkToolbar"); - GtkShadowType shadow_type = GTK_SHADOW_NONE; - d->gtk_widget_style_get(gtkToolbar, "shadow-type", &shadow_type, NULL); - gtkPainter->paintBox(gtkToolbar, "toolbar", rect, - GTK_STATE_NORMAL, shadow_type, d->gtk_widget_get_style(gtkToolbar)); - } - break; - -#endif // QT_NO_TOOLBAR - - case CE_MenuItem: - painter->save(); - - // Draws one item in a popup menu. - if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast(option)) { - const int windowsItemHMargin = 3; // menu item hor text margin - const int windowsItemVMargin = 26; // menu item ver text margin - GtkWidget *gtkMenuItem = menuItem->checked ? d->gtkWidget("GtkMenu.GtkCheckMenuItem") : - d->gtkWidget("GtkMenu.GtkMenuItem"); - - style = d->gtk_widget_get_style(gtkMenuItem); - QColor shadow = option->palette.dark().color(); - - if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { - GtkWidget *gtkMenuSeparator = d->gtkWidget("GtkMenu.GtkSeparatorMenuItem"); - painter->setPen(shadow.lighter(106)); - gboolean wide_separators = 0; - gint separator_height = 0; - guint horizontal_padding = 3; - QRect separatorRect = option->rect; - if (!d->gtk_check_version(2, 10, 0)) { - d->gtk_widget_style_get(gtkMenuSeparator, - "wide-separators", &wide_separators, - "separator-height", &separator_height, - "horizontal-padding", &horizontal_padding, - NULL); - } - GtkStyle *gtkMenuSeparatorStyle = d->gtk_widget_get_style(gtkMenuSeparator); - separatorRect.setHeight(option->rect.height() - 2 * gtkMenuSeparatorStyle->ythickness); - separatorRect.setWidth(option->rect.width() - 2 * (horizontal_padding + gtkMenuSeparatorStyle->xthickness)); - separatorRect.moveCenter(option->rect.center()); - if (wide_separators) - gtkPainter->paintBox(gtkMenuSeparator, "hseparator", - separatorRect, GTK_STATE_NORMAL, GTK_SHADOW_NONE, gtkMenuSeparatorStyle); - else - gtkPainter->paintHline(gtkMenuSeparator, "hseparator", - separatorRect, GTK_STATE_NORMAL, gtkMenuSeparatorStyle, - 0, option->rect.right() - 1, 1); - painter->restore(); - break; - } - - bool selected = menuItem->state & State_Selected && menuItem->state & State_Enabled; - - if (selected) { - QRect rect = option->rect; -#ifndef QT_NO_COMBOBOX - if (qobject_cast(widget)) - rect = option->rect; -#endif - gtkPainter->paintBox(gtkMenuItem, "menuitem", rect, GTK_STATE_PRELIGHT, GTK_SHADOW_OUT, style); - } - - bool checkable = menuItem->checkType != QStyleOptionMenuItem::NotCheckable; - bool checked = menuItem->checked; - bool enabled = menuItem->state & State_Enabled; - bool ignoreCheckMark = false; - - gint checkSize; - d->gtk_widget_style_get(d->gtkWidget("GtkMenu.GtkCheckMenuItem"), "indicator-size", &checkSize, NULL); - - int checkcol = qMax(menuItem->maxIconWidth, qMax(20, checkSize)); - -#ifndef QT_NO_COMBOBOX - - if (qobject_cast(widget) || - (option->styleObject && option->styleObject->property("_q_isComboBoxPopupItem").toBool())) - ignoreCheckMark = true; // Ignore the checkmarks provided by the QComboMenuDelegate - -#endif - if (!ignoreCheckMark) { - // Check - QRect checkRect(option->rect.left() + 7, option->rect.center().y() - checkSize/2 + 1, checkSize, checkSize); - checkRect = visualRect(menuItem->direction, menuItem->rect, checkRect); - - if (checkable && menuItem->icon.isNull()) { - // Some themes such as aero-clone draw slightly outside the paint rect - int spacing = 1; // ### Consider using gtkCheckBox : "indicator-spacing" instead - - if (menuItem->checkType & QStyleOptionMenuItem::Exclusive) { - // Radio button - GtkShadowType shadow = GTK_SHADOW_OUT; - GtkStateType state = qt_gtk_state(option); - - if (selected) - state = GTK_STATE_PRELIGHT; - if (checked) - shadow = GTK_SHADOW_IN; - - gtkPainter->setClipRect(checkRect.adjusted(-spacing, -spacing, spacing, spacing)); - gtkPainter->paintOption(gtkMenuItem, checkRect.translated(-spacing, -spacing), state, shadow, - style, QLS("option")); - gtkPainter->setClipRect(QRect()); - - } else { - // Check box - if (menuItem->icon.isNull()) { - GtkShadowType shadow = GTK_SHADOW_OUT; - GtkStateType state = qt_gtk_state(option); - - if (selected) - state = GTK_STATE_PRELIGHT; - if (checked) - shadow = GTK_SHADOW_IN; - - gtkPainter->setClipRect(checkRect.adjusted(-spacing, -spacing, -spacing, -spacing)); - gtkPainter->paintCheckbox(gtkMenuItem, checkRect.translated(-spacing, -spacing), state, shadow, - style, QLS("check")); - gtkPainter->setClipRect(QRect()); - } - } - } - - } else { - // Ignore checkmark - if (menuItem->icon.isNull()) - checkcol = 0; - else - checkcol = menuItem->maxIconWidth; - } - - 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() + 3, 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); - - const int pixw = pixmap.width() / pixmap.devicePixelRatio(); - const int pixh = pixmap.height() / pixmap.devicePixelRatio(); - QRect pmr(0, 0, pixw, pixh); - pmr.moveCenter(vCheckRect.center() - QPoint(0, 1)); - painter->setPen(menuItem->palette.text().color()); - if (!ignoreCheckMark && 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); - } - - GdkColor gdkText = style->fg[GTK_STATE_NORMAL]; - GdkColor gdkDText = style->fg[GTK_STATE_INSENSITIVE]; - GdkColor gdkHText = style->fg[GTK_STATE_PRELIGHT]; - uint resolve_mask = option->palette.resolve(); - QColor textColor = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - QColor disabledTextColor = QColor(gdkDText.red>>8, gdkDText.green>>8, gdkDText.blue>>8); - if (resolve_mask & (1 << QPalette::ButtonText)) { - textColor = option->palette.buttonText().color(); - disabledTextColor = option->palette.brush(QPalette::Disabled, QPalette::ButtonText).color(); - } - - QColor highlightedTextColor = QColor(gdkHText.red>>8, gdkHText.green>>8, gdkHText.blue>>8); - if (resolve_mask & (1 << QPalette::HighlightedText)) { - highlightedTextColor = option->palette.highlightedText().color(); - } - - if (selected) - painter->setPen(highlightedTextColor); - else - painter->setPen(textColor); - - int x, y, w, h; - menuitem->rect.getRect(&x, &y, &w, &h); - int tab = menuitem->tabWidth; - int xm = QGtkStylePrivate::menuItemFrame + checkcol + windowsItemHMargin; - int xpos = menuitem->rect.x() + xm + 1; - QRect textRect(xpos, y + windowsItemVMargin, w - xm - QGtkStylePrivate::menuRightBorder - 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 (!proxy()->styleHint(SH_UnderlineShortcut, menuitem, widget)) - text_flags |= Qt::TextHideMnemonic; - - // Draw shortcut right aligned - text_flags |= Qt::AlignRight; - - if (t >= 0) { - int rightMargin = 12; // Hardcode for now - QRect vShortcutRect = visualRect(opt->direction, menuitem->rect, - QRect(textRect.topRight(), QPoint(menuitem->rect.right() - rightMargin, textRect.bottom()))); - - if (dis) - p->setPen(disabledTextColor); - p->drawText(vShortcutRect, text_flags , s.mid(t + 1)); - s = s.left(t); - } - - text_flags &= ~Qt::AlignRight; - text_flags |= Qt::AlignLeft; - QFont font = menuitem->font; - if (menuitem->menuItemType == QStyleOptionMenuItem::DefaultItem) - font.setBold(true); - p->setFont(font); - - if (dis) - p->setPen(disabledTextColor); - p->drawText(vTextRect, text_flags, s.left(t)); - p->restore(); - } - - // Arrow - if (menuItem->menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow - - QFontMetrics fm(menuitem->font); - int arrow_size = fm.ascent() + fm.descent() - 2 * style->ythickness; - gfloat arrow_scaling = 0.8; - int extra = 0; - if (!d->gtk_check_version(2, 16, 0)) { - // "arrow-scaling" is actually hardcoded and fails on hardy (see gtk+-2.12/gtkmenuitem.c) - // though the current documentation states otherwise - d->gtk_widget_style_get(gtkMenuItem, "arrow-scaling", &arrow_scaling, NULL); - // in versions < 2.16 ythickness was previously subtracted from the arrow_size - extra = 2 * style->ythickness; - } - - int horizontal_padding; - d->gtk_widget_style_get(gtkMenuItem, "horizontal-padding", &horizontal_padding, NULL); - - const int dim = static_cast(arrow_size * arrow_scaling) + extra; - int xpos = menuItem->rect.left() + menuItem->rect.width() - horizontal_padding - dim; - QRect vSubMenuRect = visualRect(option->direction, menuItem->rect, - QRect(xpos, menuItem->rect.top() + - menuItem->rect.height() / 2 - dim / 2, dim, dim)); - GtkStateType state = enabled ? (act ? GTK_STATE_PRELIGHT: GTK_STATE_NORMAL) : GTK_STATE_INSENSITIVE; - GtkShadowType shadowType = (state == GTK_STATE_PRELIGHT) ? GTK_SHADOW_OUT : GTK_SHADOW_IN; - gtkPainter->paintArrow(gtkMenuItem, "menuitem", vSubMenuRect, option->direction == Qt::RightToLeft ? GTK_ARROW_LEFT : GTK_ARROW_RIGHT, state, - shadowType, false, style); - } - } - painter->restore(); - break; - - case CE_PushButton: - if (const QStyleOptionButton *btn = qstyleoption_cast(option)) { - GtkWidget *gtkButton = d->gtkWidget("GtkButton"); - proxy()->drawControl(CE_PushButtonBevel, btn, painter, widget); - QStyleOptionButton subopt = *btn; - subopt.rect = subElementRect(SE_PushButtonContents, btn, widget); - gint interiorFocus = true; - d->gtk_widget_style_get(gtkButton, "interior-focus", &interiorFocus, NULL); - GtkStyle *gtkButtonStyle = d->gtk_widget_get_style(gtkButton); - int xt = interiorFocus ? gtkButtonStyle->xthickness : 0; - int yt = interiorFocus ? gtkButtonStyle->ythickness : 0; - - if (btn->features & QStyleOptionButton::Flat && btn->state & State_HasFocus) - // The normal button focus rect does not work well for flat buttons in Clearlooks - proxy()->drawPrimitive(PE_FrameFocusRect, option, painter, widget); - else if (btn->state & State_HasFocus) - gtkPainter->paintFocus(gtkButton, "button", - option->rect.adjusted(xt, yt, -xt, -yt), - btn->state & State_Sunken ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL, - gtkButtonStyle); - - proxy()->drawControl(CE_PushButtonLabel, &subopt, painter, widget); - } - break; - -#ifndef QT_NO_TABBAR - - case CE_TabBarTabShape: - if (const QStyleOptionTab *tab = qstyleoption_cast(option)) { - GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook"); - style = d->gtk_widget_get_style(gtkNotebook); - - QRect rect = option->rect; - GtkShadowType shadow = GTK_SHADOW_OUT; - GtkStateType state = GTK_STATE_ACTIVE; - if (tab->state & State_Selected) - state = GTK_STATE_NORMAL; - - bool selected = (tab->state & State_Selected); - bool first = false, last = false; - if (widget) { - // This is most accurate and avoids resizing tabs while moving - first = tab->rect.left() == widget->rect().left(); - last = tab->rect.right() == widget->rect().right(); - } else if (option->direction == Qt::RightToLeft) { - bool tmp = first; - first = last; - last = tmp; - } - int topIndent = 3; - int bottomIndent = 1; - int tabOverlap = 1; - painter->save(); - - switch (tab->shape) { - case QTabBar::RoundedNorth: - if (!selected) - rect.adjust(first ? 0 : -tabOverlap, topIndent, last ? 0 : tabOverlap, -bottomIndent); - gtkPainter->paintExtention(gtkNotebook, "tab", rect, - state, shadow, GTK_POS_BOTTOM, style); - break; - - case QTabBar::RoundedSouth: - if (!selected) - rect.adjust(first ? 0 : -tabOverlap, 0, last ? 0 : tabOverlap, -topIndent); - gtkPainter->paintExtention(gtkNotebook, "tab", rect.adjusted(0, 1, 0, 0), - state, shadow, GTK_POS_TOP, style); - break; - - case QTabBar::RoundedWest: - if (!selected) - rect.adjust(topIndent, 0, -bottomIndent, 0); - gtkPainter->paintExtention(gtkNotebook, "tab", rect, state, shadow, GTK_POS_RIGHT, style); - break; - - case QTabBar::RoundedEast: - if (!selected) - rect.adjust(bottomIndent, 0, -topIndent, 0); - gtkPainter->paintExtention(gtkNotebook, "tab", rect, state, shadow, GTK_POS_LEFT, style); - break; - - default: - QCommonStyle::drawControl(element, option, painter, widget); - break; - } - - painter->restore(); - } - - break; - -#endif //QT_NO_TABBAR - - case CE_ProgressBarGroove: - if (const QStyleOptionProgressBar *bar = qstyleoption_cast(option)) { - Q_UNUSED(bar); - GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar"); - GtkStateType state = qt_gtk_state(option); - gtkPainter->paintBox(gtkProgressBar, "trough", option->rect, state, GTK_SHADOW_IN, d->gtk_widget_get_style(gtkProgressBar)); - } - - break; - - case CE_ProgressBarContents: - if (const QStyleOptionProgressBar *bar = qstyleoption_cast(option)) { - GtkStateType state = option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE; - GtkWidget *gtkProgressBar = d->gtkWidget("GtkProgressBar"); - style = d->gtk_widget_get_style(gtkProgressBar); - gtkPainter->paintBox(gtkProgressBar, "trough", option->rect, state, GTK_SHADOW_IN, style); - int xt = style->xthickness; - int yt = style->ythickness; - QRect rect = bar->rect.adjusted(xt, yt, -xt, -yt); - bool vertical = false; - bool inverted = false; - bool indeterminate = (bar->minimum == 0 && bar->maximum == 0); - // Get extra style options if version 2 - - if (const QStyleOptionProgressBarV2 *bar2 = qstyleoption_cast(option)) { - vertical = (bar2->orientation == Qt::Vertical); - inverted = bar2->invertedAppearance; - } - - // 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.translate(xt, -yt * 2); - rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // Flip width and height - QTransform m = QTransform::fromTranslate(rect.height(), 0); - m.rotate(90.0); - painter->setTransform(m); - } - - int maxWidth = rect.width(); - int minWidth = 4; - - qint64 progress = (qint64)qMax(bar->progress, bar->minimum); // Workaround for bug in QProgressBar - double vc6_workaround = ((progress - qint64(bar->minimum)) / double(qint64(bar->maximum) - qint64(bar->minimum))) * maxWidth; - int progressBarWidth = (int(vc6_workaround) > minWidth ) ? int(vc6_workaround) : minWidth; - int width = indeterminate ? maxWidth : progressBarWidth; - bool reverse = (!vertical && (bar->direction == Qt::RightToLeft)) || vertical; - - if (inverted) - reverse = !reverse; - - int maximum = 2; - int fakePos = 0; - if (bar->minimum == bar->maximum) - maximum = 0; - if (bar->progress == bar->maximum) - fakePos = maximum; - else if (bar->progress > bar->minimum) - fakePos = maximum - 1; - - QRect progressBar; - - if (!indeterminate) { - if (!reverse) - progressBar.setRect(rect.left(), rect.top(), width, rect.height()); - else - progressBar.setRect(rect.right() - width, rect.top(), width, rect.height()); -#ifndef QT_NO_ANIMATION - d->stopAnimation(option->styleObject); -#endif - } else { - Q_D(const QGtkStyle); - int slideWidth = ((rect.width() - 4) * 2) / 3; - int step = 0; -#ifndef QT_NO_ANIMATION - if (QProgressStyleAnimation *animation = qobject_cast(d->animation(option->styleObject))) - step = animation->progressStep(slideWidth); - else - d->startAnimation(new QProgressStyleAnimation(d->animationFps, option->styleObject)); -#endif - progressBar.setRect(rect.left() + step, rect.top(), slideWidth / 2, rect.height()); - } - - QString key = QString(QLS("%0")).arg(fakePos); - if (inverted) { - key += QLatin1String("inv"); - gtkPainter->setFlipHorizontal(true); - } - gtkPainter->paintBox(gtkProgressBar, "bar", progressBar, GTK_STATE_SELECTED, GTK_SHADOW_OUT, style, key); - } - - break; - - default: - QCommonStyle::drawControl(element, option, painter, widget); - } -} - -/*! - \reimp -*/ -QRect QGtkStyle::subControlRect(ComplexControl control, const QStyleOptionComplex *option, - SubControl subControl, const QWidget *widget) const -{ - Q_D(const QGtkStyle); - - QRect rect = QCommonStyle::subControlRect(control, option, subControl, widget); - if (!d->isThemeAvailable()) - return QCommonStyle::subControlRect(control, option, subControl, widget); - - switch (control) { - case CC_ScrollBar: - break; - 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; - -#ifndef QT_NO_GROUPBOX - - case CC_GroupBox: - if (const QStyleOptionGroupBox * groupBox = qstyleoption_cast(option)) { - rect = option->rect.adjusted(0, groupBoxTopMargin, 0, -groupBoxBottomMargin); - int topMargin = 0; - int topHeight = 0; - topHeight = 10; - QRect frameRect = rect; - frameRect.setTop(topMargin); - - if (subControl == SC_GroupBoxFrame) - return rect; - else if (subControl == SC_GroupBoxContents) { - int margin = 0; - int leftMarginExtension = 8; - return frameRect.adjusted(leftMarginExtension + margin, margin + topHeight + groupBoxTitleMargin, -margin, -margin); - } - - QFontMetrics fontMetrics = option->fontMetrics; - if (qobject_cast(widget)) { - //Prepare metrics for a bold font - QFont font = widget->font(); - font.setBold(true); - fontMetrics = QFontMetrics(font); - } else if (QStyleHelper::isInstanceOf(groupBox->styleObject, QAccessible::Grouping)) { - QVariant var = groupBox->styleObject->property("font"); - if (var.isValid() && var.canConvert()) { - QFont font = var.value(); - font.setBold(true); - fontMetrics = QFontMetrics(font); - } - } - - QSize textRect = fontMetrics.boundingRect(groupBox->text).size() + QSize(4, 4); - int indicatorWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); - int indicatorHeight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); - - if (subControl == SC_GroupBoxCheckBox) { - rect.setWidth(indicatorWidth); - rect.setHeight(indicatorHeight); - rect.moveTop((textRect.height() - indicatorHeight) / 2); - - } else if (subControl == SC_GroupBoxLabel) { - if (groupBox->subControls & SC_GroupBoxCheckBox) - rect.adjust(indicatorWidth + 4, 0, 0, 0); - rect.setSize(textRect); - } - rect = visualRect(option->direction, option->rect, rect); - } - - return rect; - -#endif -#ifndef QT_NO_SPINBOX - - case CC_SpinBox: - if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast(option)) { - GtkWidget *gtkSpinButton = d->gtkWidget("GtkSpinButton"); - int center = spinbox->rect.height() / 2; - GtkStyle *gtkSpinButtonStyle = d->gtk_widget_get_style(gtkSpinButton); - int xt = spinbox->frame ? gtkSpinButtonStyle->xthickness : 0; - int yt = spinbox->frame ? gtkSpinButtonStyle->ythickness : 0; - int y = yt; - - QSize bs; - bs.setHeight(qMax(8, spinbox->rect.height()/2 - y)); - bs.setWidth(d->getSpinboxArrowSize()); - int x, lx, rx; - x = spinbox->rect.width() - y - bs.width() + 2; - lx = xt; - rx = x - xt; - - switch (subControl) { - - case SC_SpinBoxUp: - if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) - return QRect(); - rect = QRect(x, xt, bs.width(), center - yt); - break; - - case SC_SpinBoxDown: - if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) - return QRect(); - rect = QRect(x, center, bs.width(), spinbox->rect.bottom() - center - yt + 1); - break; - - case SC_SpinBoxEditField: - if (spinbox->buttonSymbols == QAbstractSpinBox::NoButtons) - rect = QRect(lx, yt, spinbox->rect.width() - 2*xt, spinbox->rect.height() - 2*yt); - else - rect = QRect(lx, yt, rx - qMax(xt - 1, 0), spinbox->rect.height() - 2*yt); - break; - - case SC_SpinBoxFrame: - rect = spinbox->rect; - - default: - break; - } - - rect = visualRect(spinbox->direction, spinbox->rect, rect); - } - - break; - -#endif // Qt_NO_SPINBOX -#ifndef 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 = 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; - case CC_ComboBox: - if (const QStyleOptionComboBox *box = qstyleoption_cast(option)) { - // We employ the gtk widget to position arrows and separators for us - GtkWidget *gtkCombo = box->editable ? d->gtkWidget("GtkComboBoxEntry") - : d->gtkWidget("GtkComboBox"); - d->gtk_widget_set_direction(gtkCombo, (option->direction == Qt::RightToLeft) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); - GtkAllocation geometry = {0, 0, qMax(0, option->rect.width()), qMax(0, option->rect.height())}; - d->gtk_widget_size_allocate(gtkCombo, &geometry); - int appears_as_list = !proxy()->styleHint(QStyle::SH_ComboBox_Popup, option, widget); - QHashableLatin1Literal arrowPath("GtkComboBoxEntry.GtkToggleButton"); - if (!box->editable) { - if (appears_as_list) - arrowPath = "GtkComboBox.GtkToggleButton"; - else - arrowPath = "GtkComboBox.GtkToggleButton.GtkHBox.GtkArrow"; - } - - GtkWidget *arrowWidget = d->gtkWidget(arrowPath); - if (!arrowWidget) - return QCommonStyle::subControlRect(control, option, subControl, widget); - - GtkAllocation allocation; - d->gtk_widget_get_allocation(arrowWidget, &allocation); - QRect buttonRect(option->rect.left() + allocation.x, - option->rect.top() + allocation.y, - allocation.width, allocation.height); - - switch (subControl) { - - case SC_ComboBoxArrow: // Note: this indicates the arrowbutton for editable combos - rect = buttonRect; - break; - - case SC_ComboBoxEditField: { - rect = visualRect(option->direction, option->rect, rect); - int xMargin = box->editable ? 1 : 4, yMargin = 2; - GtkStyle *gtkComboStyle = d->gtk_widget_get_style(gtkCombo); - rect.setRect(option->rect.left() + gtkComboStyle->xthickness + xMargin, - option->rect.top() + gtkComboStyle->ythickness + yMargin, - option->rect.width() - buttonRect.width() - 2*(gtkComboStyle->xthickness + xMargin), - option->rect.height() - 2*(gtkComboStyle->ythickness + yMargin)); - rect = visualRect(option->direction, option->rect, rect); - break; - } - - default: - break; - } - } - - break; -#endif // QT_NO_COMBOBOX - - default: - break; - } - - return rect; -} - -/*! - \reimp -*/ -QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, - const QSize &size, const QWidget *widget) const -{ - Q_D(const QGtkStyle); - - QSize newSize = QCommonStyle::sizeFromContents(type, option, size, widget); - if (!d->isThemeAvailable()) - return newSize; - - switch (type) { - 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(4, 1 + groupBoxBottomMargin + groupBoxTopMargin + groupBoxTitleMargin); // Add some space below the groupbox - break; - case CT_ToolButton: - if (const QStyleOptionToolButton *toolbutton = qstyleoption_cast(option)) { - GtkWidget *gtkButton = d->gtkWidget("GtkToolButton.GtkButton"); - GtkStyle *gtkButtonStyle = d->gtk_widget_get_style(gtkButton); - newSize = size + QSize(2 * gtkButtonStyle->xthickness, 2 + 2 * gtkButtonStyle->ythickness); - if (widget && qobject_cast(widget->parentWidget())) { - QSize minSize(0, 25); - if (toolbutton->toolButtonStyle != Qt::ToolButtonTextOnly) - minSize = toolbutton->iconSize + QSize(12, 12); - newSize = newSize.expandedTo(minSize); - } - - if (toolbutton->features & QStyleOptionToolButton::HasMenu) - newSize += QSize(6, 0); - } - break; - case CT_SpinBox: - // QSpinBox does some nasty things that depends on CT_LineEdit - newSize = newSize + QSize(0, -d->gtk_widget_get_style(d->gtkWidget("GtkSpinButton"))->ythickness * 2); - break; - case CT_RadioButton: - case CT_CheckBox: - newSize += QSize(0, 1); - break; - case CT_PushButton: - if (const QStyleOptionButton *btn = qstyleoption_cast(option)) { - if (!btn->icon.isNull() && btn->iconSize.height() > 16) - newSize -= QSize(0, 2); // From cleanlooksstyle - newSize += QSize(0, 1); - GtkWidget *gtkButton = d->gtkWidget("GtkButton"); - gint focusPadding, focusWidth; - d->gtk_widget_style_get(gtkButton, "focus-padding", &focusPadding, NULL); - d->gtk_widget_style_get(gtkButton, "focus-line-width", &focusWidth, NULL); - newSize = size; - GtkStyle *gtkButtonStyle = d->gtk_widget_get_style(gtkButton); - newSize += QSize(2*gtkButtonStyle->xthickness + 4, 2*gtkButtonStyle->ythickness); - newSize += QSize(2*(focusWidth + focusPadding + 2), 2*(focusWidth + focusPadding)); - - GtkWidget *gtkButtonBox = d->gtkWidget("GtkHButtonBox"); - gint minWidth = 85, minHeight = 0; - d->gtk_widget_style_get(gtkButtonBox, "child-min-width", &minWidth, - "child-min-height", &minHeight, NULL); - if (!btn->text.isEmpty() && newSize.width() < minWidth) - newSize.setWidth(minWidth); - if (newSize.height() < minHeight) - newSize.setHeight(minHeight); - } - break; - case CT_Slider: { - GtkWidget *gtkSlider = d->gtkWidget("GtkHScale"); - GtkStyle *gtkSliderStyle = d->gtk_widget_get_style(gtkSlider); - newSize = size + QSize(2*gtkSliderStyle->xthickness, 2*gtkSliderStyle->ythickness); } - break; - case CT_LineEdit: { - GtkWidget *gtkEntry = d->gtkWidget("GtkEntry"); - GtkStyle *gtkEntryStyle = d->gtk_widget_get_style(gtkEntry); - newSize = size + QSize(2*gtkEntryStyle->xthickness, 2 + 2*gtkEntryStyle->ythickness); } - break; - case CT_ItemViewItem: - newSize += QSize(0, 2); - break; - case CT_ComboBox: - if (const QStyleOptionComboBox *combo = qstyleoption_cast(option)) { - GtkWidget *gtkCombo = d->gtkWidget("GtkComboBox"); - QRect arrowButtonRect = proxy()->subControlRect(CC_ComboBox, combo, SC_ComboBoxArrow, widget); - GtkStyle *gtkComboStyle = d->gtk_widget_get_style(gtkCombo); - newSize = size + QSize(12 + arrowButtonRect.width() + 2*gtkComboStyle->xthickness, 4 + 2*gtkComboStyle->ythickness); - - if (!(widget && qobject_cast(widget->parentWidget()))) - newSize += QSize(0, 2); - } - break; - case CT_TabBarTab: - if (const QStyleOptionTab *tab = qstyleoption_cast(option)) { - if (!tab->icon.isNull()) - newSize += QSize(6, 0); - } - newSize += QSize(1, 1); - break; - case CT_MenuBarItem: - newSize += QSize(QGtkStylePrivate::menuItemHMargin * 4, QGtkStylePrivate::menuItemVMargin * 2 + 2); - 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; - case CT_MenuItem: - if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast(option)) { - int w = newSize.width(); - int maxpmw = menuItem->maxIconWidth; - int tabSpacing = 20; - if (menuItem->text.contains(QLatin1Char('\t'))) - w += tabSpacing; - else if (menuItem->menuItemType == QStyleOptionMenuItem::SubMenu) - w += 2 * QGtkStylePrivate::menuArrowHMargin; - else if (menuItem->menuItemType == QStyleOptionMenuItem::DefaultItem) { - // adjust the font and add the difference in size. - // it would be better if the font could be adjusted in the initStyleOption qmenu func!! - QFontMetrics fm(menuItem->font); - QFont fontBold = menuItem->font; - fontBold.setBold(true); - QFontMetrics fmBold(fontBold); - w += fmBold.width(menuItem->text) - fm.width(menuItem->text); - } - - int checkcol = qMax(maxpmw, QGtkStylePrivate::menuCheckMarkWidth); // Windows always shows a check column - w += checkcol; - w += int(QGtkStylePrivate::menuRightBorder) + 10; - - newSize.setWidth(w); - - int textMargin = 8; - if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { - GtkWidget *gtkMenuSeparator = d->gtkWidget("GtkMenu.GtkSeparatorMenuItem"); - GtkRequisition sizeReq = {0, 0}; - d->gtk_widget_size_request(gtkMenuSeparator, &sizeReq); - newSize = QSize(newSize.width(), sizeReq.height); - break; - } - - GtkWidget *gtkMenuItem = d->gtkWidget("GtkMenu.GtkCheckMenuItem"); - GtkStyle* style = d->gtk_widget_get_style(gtkMenuItem); - - // Note we get the perfect height for the default font since we - // set a fake text label on the gtkMenuItem - // But if custom fonts are used on the widget we need a minimum size - GtkRequisition sizeReq = {0, 0}; - d->gtk_widget_size_request(gtkMenuItem, &sizeReq); - newSize.setHeight(qMax(newSize.height() - 4, sizeReq.height)); - newSize += QSize(textMargin + style->xthickness - 1, 0); - - gint checkSize; - d->gtk_widget_style_get(gtkMenuItem, "indicator-size", &checkSize, NULL); - newSize.setWidth(newSize.width() + qMax(0, checkSize - 20)); - } - break; - default: - break; - } - - return newSize; -} - - -/*! \reimp */ -QPixmap QGtkStyle::standardPixmap(StandardPixmap sp, const QStyleOption *option, - const QWidget *widget) const -{ - Q_D(const QGtkStyle); - - if (!d->isThemeAvailable()) - return QCommonStyle::standardPixmap(sp, option, widget); - - QPixmap pixmap; - switch (sp) { - - case SP_TitleBarNormalButton: { - QImage restoreButton(dock_widget_restore_xpm); - QColor alphaCorner = restoreButton.color(2); - alphaCorner.setAlpha(80); - restoreButton.setColor(2, alphaCorner.rgba()); - alphaCorner.setAlpha(180); - restoreButton.setColor(4, alphaCorner.rgba()); - return QPixmap::fromImage(restoreButton); - } - break; - - case SP_TitleBarCloseButton: // Fall through - case SP_DockWidgetCloseButton: { - - QImage closeButton(dock_widget_close_xpm); - QColor alphaCorner = closeButton.color(2); - alphaCorner.setAlpha(80); - closeButton.setColor(2, alphaCorner.rgba()); - return QPixmap::fromImage(closeButton); - } - break; - - case SP_DialogDiscardButton: - return qt_gtk_get_icon(GTK_STOCK_DELETE); - case SP_DialogOkButton: - return qt_gtk_get_icon(GTK_STOCK_OK); - case SP_DialogCancelButton: - return qt_gtk_get_icon(GTK_STOCK_CANCEL); - case SP_DialogYesButton: - return qt_gtk_get_icon(GTK_STOCK_YES); - case SP_DialogNoButton: - return qt_gtk_get_icon(GTK_STOCK_NO); - case SP_DialogOpenButton: - return qt_gtk_get_icon(GTK_STOCK_OPEN); - case SP_DialogCloseButton: - return qt_gtk_get_icon(GTK_STOCK_CLOSE); - case SP_DialogApplyButton: - return qt_gtk_get_icon(GTK_STOCK_APPLY); - case SP_DialogSaveButton: - return qt_gtk_get_icon(GTK_STOCK_SAVE); - case SP_MessageBoxWarning: - return qt_gtk_get_icon(GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG); - case SP_MessageBoxQuestion: - return qt_gtk_get_icon(GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG); - case SP_MessageBoxInformation: - return qt_gtk_get_icon(GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG); - case SP_MessageBoxCritical: - return qt_gtk_get_icon(GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_DIALOG); - default: - return QCommonStyle::standardPixmap(sp, option, widget); - } - return pixmap; -} - -/*! - \reimp -*/ -QIcon QGtkStyle::standardIcon(StandardPixmap standardIcon, - const QStyleOption *option, - const QWidget *widget) const -{ - Q_D(const QGtkStyle); - - if (!d->isThemeAvailable()) - return QCommonStyle::standardIcon(standardIcon, option, widget); - switch (standardIcon) { - case SP_DialogDiscardButton: - return qt_gtk_get_icon(GTK_STOCK_DELETE); - case SP_DialogOkButton: - return qt_gtk_get_icon(GTK_STOCK_OK); - case SP_DialogCancelButton: - return qt_gtk_get_icon(GTK_STOCK_CANCEL); - case SP_DialogYesButton: - return qt_gtk_get_icon(GTK_STOCK_YES); - case SP_DialogNoButton: - return qt_gtk_get_icon(GTK_STOCK_NO); - case SP_DialogOpenButton: - return qt_gtk_get_icon(GTK_STOCK_OPEN); - case SP_DialogCloseButton: - return qt_gtk_get_icon(GTK_STOCK_CLOSE); - case SP_DialogApplyButton: - return qt_gtk_get_icon(GTK_STOCK_APPLY); - case SP_DialogSaveButton: - return qt_gtk_get_icon(GTK_STOCK_SAVE); - case SP_MessageBoxWarning: - return qt_gtk_get_icon(GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG); - case SP_MessageBoxQuestion: - return qt_gtk_get_icon(GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG); - case SP_MessageBoxInformation: - return qt_gtk_get_icon(GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG); - case SP_MessageBoxCritical: - return qt_gtk_get_icon(GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_DIALOG); - default: - return QCommonStyle::standardIcon(standardIcon, option, widget); - } -} - - -/*! \reimp */ -QRect QGtkStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const -{ - Q_D(const QGtkStyle); - - QRect r = QCommonStyle::subElementRect(element, option, widget); - if (!d->isThemeAvailable()) - return r; - - switch (element) { - case SE_PushButtonFocusRect: - r.adjust(0, 1, 0, -1); - break; - case SE_DockWidgetTitleBarText: { - const QStyleOptionDockWidgetV2 *v2 - = qstyleoption_cast(option); - bool verticalTitleBar = v2 == 0 ? false : v2->verticalTitleBar; - if (verticalTitleBar) { - r.adjust(0, 0, 0, -4); - } else { - if (option->direction == Qt::LeftToRight) - r.adjust(4, 0, 0, 0); - else - r.adjust(0, 0, -4, 0); - } - - break; - } - case SE_ProgressBarLabel: - case SE_ProgressBarContents: - case SE_ProgressBarGroove: - return option->rect; - case SE_PushButtonContents: - if (!d->gtk_check_version(2, 10, 0)) { - GtkWidget *gtkButton = d->gtkWidget("GtkButton"); - GtkBorder *border = 0; - d->gtk_widget_style_get(gtkButton, "inner-border", &border, NULL); - if (border) { - r = option->rect.adjusted(border->left, border->top, -border->right, -border->bottom); - d->gtk_border_free(border); - } else { - r = option->rect.adjusted(1, 1, -1, -1); - } - r = visualRect(option->direction, option->rect, r); - } - break; - default: - break; - } - - return r; -} - -/*! - \reimp -*/ -QRect QGtkStyle::itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const -{ - return QCommonStyle::itemPixmapRect(r, flags, pixmap); -} - -/*! - \reimp -*/ -void QGtkStyle::drawItemPixmap(QPainter *painter, const QRect &rect, - int alignment, const QPixmap &pixmap) const -{ - QCommonStyle::drawItemPixmap(painter, rect, alignment, pixmap); -} - -/*! - \reimp -*/ -QStyle::SubControl QGtkStyle::hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, - const QPoint &pt, const QWidget *w) const -{ - return QCommonStyle::hitTestComplexControl(cc, opt, pt, w); -} - -/*! - \reimp -*/ -QPixmap QGtkStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, - const QStyleOption *opt) const -{ - return QCommonStyle::generatedIconPixmap(iconMode, pixmap, opt); -} - -/*! - \reimp -*/ -void QGtkStyle::drawItemText(QPainter *painter, const QRect &rect, int alignment, const QPalette &pal, - bool enabled, const QString& text, QPalette::ColorRole textRole) const -{ - return QCommonStyle::drawItemText(painter, rect, alignment, pal, enabled, text, textRole); -} - -QT_END_NAMESPACE - -#endif //!defined(QT_NO_STYLE_QGTK) diff --git a/src/widgets/styles/qgtkstyle_p.cpp b/src/widgets/styles/qgtkstyle_p.cpp deleted file mode 100644 index 00682c1c0f..0000000000 --- a/src/widgets/styles/qgtkstyle_p.cpp +++ /dev/null @@ -1,891 +0,0 @@ -/**************************************************************************** -** -** 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 "qgtkstyle_p_p.h" - -// This file is responsible for resolving all GTK functions we use -// dynamically. This is done to avoid link-time dependancy on GTK -// as well as crashes occurring due to usage of the GTK_QT engines -// -// Additionally we create a map of common GTK widgets that we can pass -// to the GTK theme engine as many engines resort to querying the -// actual widget pointers for details that are not covered by the -// state flags - -#include -#if !defined(QT_NO_STYLE_GTK) - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef Q_OS_MAC -// X11 Includes: - -// the following is necessary to work around breakage in many versions -// of XFree86's Xlib.h still in use -// ### which versions? -#if defined(_XLIB_H_) // crude hack, but... -#error "cannot include before this file" -#endif -#define XRegisterIMInstantiateCallback qt_XRegisterIMInstantiateCallback -#define XUnregisterIMInstantiateCallback qt_XUnregisterIMInstantiateCallback -#define XSetIMValues qt_XSetIMValues -#include -#undef XRegisterIMInstantiateCallback -#undef XUnregisterIMInstantiateCallback -#undef XSetIMValues -#endif - -QT_BEGIN_NAMESPACE - -Q_GLOBAL_STATIC(QGtkStyleUpdateScheduler, styleScheduler) - -Ptr_gtk_container_forall QGtkStylePrivate::gtk_container_forall = 0; -Ptr_gtk_init QGtkStylePrivate::gtk_init = 0; -Ptr_gtk_style_attach QGtkStylePrivate::gtk_style_attach = 0; -Ptr_gtk_window_new QGtkStylePrivate::gtk_window_new = 0; -Ptr_gtk_widget_destroy QGtkStylePrivate::gtk_widget_destroy = 0; -Ptr_gtk_widget_realize QGtkStylePrivate::gtk_widget_realize = 0; -Ptr_gtk_widget_set_default_direction QGtkStylePrivate::gtk_widget_set_default_direction = 0; -Ptr_gtk_widget_modify_color QGtkStylePrivate::gtk_widget_modify_fg = 0; -Ptr_gtk_widget_modify_color QGtkStylePrivate::gtk_widget_modify_bg = 0; -Ptr_gtk_arrow_new QGtkStylePrivate::gtk_arrow_new = 0; -Ptr_gtk_menu_item_new_with_label QGtkStylePrivate::gtk_menu_item_new_with_label = 0; -Ptr_gtk_check_menu_item_new_with_label QGtkStylePrivate::gtk_check_menu_item_new_with_label = 0; -Ptr_gtk_menu_bar_new QGtkStylePrivate::gtk_menu_bar_new = 0; -Ptr_gtk_menu_new QGtkStylePrivate::gtk_menu_new = 0; -Ptr_gtk_button_new QGtkStylePrivate::gtk_button_new = 0; -Ptr_gtk_tool_button_new QGtkStylePrivate::gtk_tool_button_new = 0; -Ptr_gtk_hbutton_box_new QGtkStylePrivate::gtk_hbutton_box_new = 0; -Ptr_gtk_check_button_new QGtkStylePrivate::gtk_check_button_new = 0; -Ptr_gtk_radio_button_new QGtkStylePrivate::gtk_radio_button_new = 0; -Ptr_gtk_spin_button_new QGtkStylePrivate::gtk_spin_button_new = 0; -Ptr_gtk_frame_new QGtkStylePrivate::gtk_frame_new = 0; -Ptr_gtk_expander_new QGtkStylePrivate::gtk_expander_new = 0; -Ptr_gtk_statusbar_new QGtkStylePrivate::gtk_statusbar_new = 0; -Ptr_gtk_entry_new QGtkStylePrivate::gtk_entry_new = 0; -Ptr_gtk_hscale_new QGtkStylePrivate::gtk_hscale_new = 0; -Ptr_gtk_vscale_new QGtkStylePrivate::gtk_vscale_new = 0; -Ptr_gtk_hscrollbar_new QGtkStylePrivate::gtk_hscrollbar_new = 0; -Ptr_gtk_vscrollbar_new QGtkStylePrivate::gtk_vscrollbar_new = 0; -Ptr_gtk_scrolled_window_new QGtkStylePrivate::gtk_scrolled_window_new = 0; -Ptr_gtk_notebook_new QGtkStylePrivate::gtk_notebook_new = 0; -Ptr_gtk_toolbar_new QGtkStylePrivate::gtk_toolbar_new = 0; -Ptr_gtk_toolbar_insert QGtkStylePrivate::gtk_toolbar_insert = 0; -Ptr_gtk_separator_tool_item_new QGtkStylePrivate::gtk_separator_tool_item_new = 0; -Ptr_gtk_tree_view_new QGtkStylePrivate::gtk_tree_view_new = 0; -Ptr_gtk_combo_box_new QGtkStylePrivate::gtk_combo_box_new = 0; -Ptr_gtk_combo_box_entry_new QGtkStylePrivate::gtk_combo_box_entry_new = 0; -Ptr_gtk_progress_bar_new QGtkStylePrivate::gtk_progress_bar_new = 0; -Ptr_gtk_container_add QGtkStylePrivate::gtk_container_add = 0; -Ptr_gtk_menu_shell_append QGtkStylePrivate::gtk_menu_shell_append = 0; -Ptr_gtk_range_get_adjustment QGtkStylePrivate::gtk_range_get_adjustment = 0; -Ptr_gtk_range_set_adjustment QGtkStylePrivate::gtk_range_set_adjustment = 0; -Ptr_gtk_range_set_inverted QGtkStylePrivate::gtk_range_set_inverted = 0; -Ptr_gtk_icon_factory_lookup_default QGtkStylePrivate::gtk_icon_factory_lookup_default = 0; -Ptr_gtk_icon_theme_get_default QGtkStylePrivate::gtk_icon_theme_get_default = 0; -Ptr_gtk_widget_get_style QGtkStylePrivate::gtk_widget_get_style = 0; -Ptr_gtk_widget_style_get QGtkStylePrivate::gtk_widget_style_get = 0; -Ptr_gtk_icon_set_render_icon QGtkStylePrivate::gtk_icon_set_render_icon = 0; -Ptr_gtk_fixed_new QGtkStylePrivate::gtk_fixed_new = 0; -Ptr_gtk_tree_view_column_new QGtkStylePrivate::gtk_tree_view_column_new = 0; -Ptr_gtk_tree_view_get_column QGtkStylePrivate::gtk_tree_view_get_column = 0; -Ptr_gtk_tree_view_append_column QGtkStylePrivate::gtk_tree_view_append_column = 0; -Ptr_gtk_adjustment_configure QGtkStylePrivate::gtk_adjustment_configure = 0; -Ptr_gtk_adjustment_new QGtkStylePrivate::gtk_adjustment_new = 0; -Ptr_gtk_menu_item_set_submenu QGtkStylePrivate::gtk_menu_item_set_submenu = 0; -Ptr_gtk_settings_get_default QGtkStylePrivate::gtk_settings_get_default = 0; -Ptr_gtk_separator_menu_item_new QGtkStylePrivate::gtk_separator_menu_item_new = 0; -Ptr_gtk_widget_size_allocate QGtkStylePrivate::gtk_widget_size_allocate = 0; -Ptr_gtk_widget_size_request QGtkStylePrivate::gtk_widget_size_request = 0; -Ptr_gtk_widget_set_direction QGtkStylePrivate::gtk_widget_set_direction = 0; -Ptr_gtk_widget_path QGtkStylePrivate::gtk_widget_path = 0; -Ptr_gtk_container_get_type QGtkStylePrivate::gtk_container_get_type = 0; -Ptr_gtk_window_get_type QGtkStylePrivate::gtk_window_get_type = 0; -Ptr_gtk_widget_get_type QGtkStylePrivate::gtk_widget_get_type = 0; -Ptr_gtk_widget_get_parent QGtkStylePrivate::gtk_widget_get_parent = 0; -Ptr_gtk_widget_is_toplevel QGtkStylePrivate::gtk_widget_is_toplevel = 0; -Ptr_gtk_widget_get_toplevel QGtkStylePrivate::gtk_widget_get_toplevel = 0; -Ptr_gtk_rc_get_style_by_paths QGtkStylePrivate::gtk_rc_get_style_by_paths = 0; -Ptr_gtk_check_version QGtkStylePrivate::gtk_check_version = 0; -Ptr_gtk_border_free QGtkStylePrivate::gtk_border_free = 0; -Ptr_gtk_widget_get_allocation QGtkStylePrivate::gtk_widget_get_allocation = 0; -Ptr_gtk_widget_set_allocation QGtkStylePrivate::gtk_widget_set_allocation = 0; -Ptr_gtk_widget_set_can_default QGtkStylePrivate::gtk_widget_set_can_default = 0; -Ptr_gtk_window_set_default QGtkStylePrivate::gtk_window_set_default = 0; - -Ptr_gdk_event_new QGtkStylePrivate::gdk_event_new = 0; -Ptr_gdk_event_free QGtkStylePrivate::gdk_event_free = 0; -Ptr_gtk_widget_send_focus_change QGtkStylePrivate::gtk_widget_send_focus_change = 0; - -Ptr_pango_font_description_get_size QGtkStylePrivate::pango_font_description_get_size = 0; -Ptr_pango_font_description_get_weight QGtkStylePrivate::pango_font_description_get_weight = 0; -Ptr_pango_font_description_get_family QGtkStylePrivate::pango_font_description_get_family = 0; -Ptr_pango_font_description_get_style QGtkStylePrivate::pango_font_description_get_style = 0; - -Ptr_gdk_pixbuf_get_pixels QGtkStylePrivate::gdk_pixbuf_get_pixels = 0; -Ptr_gdk_pixbuf_get_width QGtkStylePrivate::gdk_pixbuf_get_width = 0; -Ptr_gdk_pixbuf_get_height QGtkStylePrivate::gdk_pixbuf_get_height = 0; -Ptr_gdk_pixbuf_new QGtkStylePrivate::gdk_pixbuf_new = 0; -Ptr_gdk_pixbuf_unref QGtkStylePrivate::gdk_pixbuf_unref = 0; -Ptr_gdk_color_free QGtkStylePrivate::gdk_color_free = 0; -Ptr_gdk_x11_window_set_user_time QGtkStylePrivate::gdk_x11_window_set_user_time = 0; -Ptr_gdk_x11_drawable_get_xid QGtkStylePrivate::gdk_x11_drawable_get_xid = 0; -Ptr_gdk_x11_drawable_get_xdisplay QGtkStylePrivate::gdk_x11_drawable_get_xdisplay = 0; - -Ptr_gconf_client_get_default QGtkStylePrivate::gconf_client_get_default = 0; -Ptr_gconf_client_get_string QGtkStylePrivate::gconf_client_get_string = 0; -Ptr_gconf_client_get_bool QGtkStylePrivate::gconf_client_get_bool = 0; - -Ptr_gnome_icon_lookup_sync QGtkStylePrivate::gnome_icon_lookup_sync = 0; -Ptr_gnome_vfs_init QGtkStylePrivate::gnome_vfs_init = 0; - -#ifndef Q_OS_MAC -typedef int (*x11ErrorHandler)(Display*, XErrorEvent*); -#endif - -QT_END_NAMESPACE - -Q_DECLARE_METATYPE(QGtkStylePrivate*); - -QT_BEGIN_NAMESPACE - -static void gtkStyleSetCallback(GtkWidget*) -{ - qRegisterMetaType(); - - // We have to let this function return and complete the event - // loop to ensure that all gtk widgets have been styled before - // updating - QMetaObject::invokeMethod(styleScheduler(), "updateTheme", Qt::QueuedConnection); -} - -static void update_toolbar_style(GtkWidget *gtkToolBar, GParamSpec *, gpointer) -{ - GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS; - g_object_get(gtkToolBar, "toolbar-style", &toolbar_style, NULL); - QWidgetList widgets = QApplication::allWidgets(); - for (int i = 0; i < widgets.size(); ++i) { - QWidget *widget = widgets.at(i); - if (qobject_cast(widget)) { - QEvent event(QEvent::StyleChange); - QApplication::sendEvent(widget, &event); - } - } -} - -static QHashableLatin1Literal classPath(GtkWidget *widget) -{ - char *class_path; - QGtkStylePrivate::gtk_widget_path (widget, NULL, &class_path, NULL); - - char *copy = class_path; - if (strncmp(copy, "GtkWindow.", 10) == 0) - copy += 10; - if (strncmp(copy, "GtkFixed.", 9) == 0) - copy += 9; - - copy = strdup(copy); - - g_free(class_path); - - return QHashableLatin1Literal::fromData(copy); -} - - - -bool QGtkStyleFilter::eventFilter(QObject *obj, QEvent *e) -{ - if (e->type() == QEvent::ApplicationPaletteChange) { - // Only do this the first time since this will also - // generate applicationPaletteChange events - if (!qt_app_palettes_hash() || qt_app_palettes_hash()->isEmpty()) { - stylePrivate->applyCustomPaletteHash(); - } - } - return QObject::eventFilter(obj, e); -} - -QList QGtkStylePrivate::instances; -QGtkStylePrivate::WidgetMap *QGtkStylePrivate::widgetMap = 0; - -QGtkStylePrivate::QGtkStylePrivate() - : QCommonStylePrivate() - , filter(this) -{ - instances.append(this); - animationFps = 60; -} - -QGtkStylePrivate::~QGtkStylePrivate() -{ - instances.removeOne(this); -} - -void QGtkStylePrivate::init() -{ - resolveGtk(); - initGtkWidgets(); -} - -QGtkPainter* QGtkStylePrivate::gtkPainter(QPainter *painter) -{ - // TODO: choose between gtk2 and gtk3 - static QGtk2Painter instance; - instance.reset(painter); - return &instance; -} - -GtkWidget* QGtkStylePrivate::gtkWidget(const QHashableLatin1Literal &path) -{ - GtkWidget *widget = gtkWidgetMap()->value(path); - if (!widget) { - // Theme might have rearranged widget internals - widget = gtkWidgetMap()->value(path); - } - return widget; -} - -GtkStyle* QGtkStylePrivate::gtkStyle(const QHashableLatin1Literal &path) -{ - if (GtkWidget *w = gtkWidgetMap()->value(path)) - return QGtkStylePrivate::gtk_widget_get_style(w); - return 0; -} - -void QGtkStylePrivate::gtkWidgetSetFocus(GtkWidget *widget, bool focus) -{ - if (QGtkStylePrivate::gtk_widget_send_focus_change) { - GdkEvent *event = QGtkStylePrivate::gdk_event_new(GDK_FOCUS_CHANGE); - event->focus_change.type = GDK_FOCUS_CHANGE; - event->focus_change.in = focus; - QGtkStylePrivate::gtk_widget_send_focus_change(widget, event); - QGtkStylePrivate::gdk_event_free(event); - } else { -#if defined(GTK_WIDGET_SET_FLAGS) && defined(GTK_WIDGET_UNSET_FLAGS) - if (focus) - GTK_WIDGET_SET_FLAGS(widget, GTK_HAS_FOCUS); - else - GTK_WIDGET_UNSET_FLAGS(widget, GTK_HAS_FOCUS); -#endif - } -} - -/*! \internal - * Get references to gtk functions after we dynamically load the library. - */ -void QGtkStylePrivate::resolveGtk() const -{ -#ifndef QT_NO_LIBRARY - // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0 - QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0); - - gtk_init = (Ptr_gtk_init)libgtk.resolve("gtk_init"); - gtk_window_new = (Ptr_gtk_window_new)libgtk.resolve("gtk_window_new"); - gtk_style_attach = (Ptr_gtk_style_attach)libgtk.resolve("gtk_style_attach"); - gtk_widget_destroy = (Ptr_gtk_widget_destroy)libgtk.resolve("gtk_widget_destroy"); - gtk_widget_realize = (Ptr_gtk_widget_realize)libgtk.resolve("gtk_widget_realize"); - - gdk_pixbuf_get_pixels = (Ptr_gdk_pixbuf_get_pixels)libgtk.resolve("gdk_pixbuf_get_pixels"); - gdk_pixbuf_get_width = (Ptr_gdk_pixbuf_get_width)libgtk.resolve("gdk_pixbuf_get_width"); - gdk_pixbuf_get_height = (Ptr_gdk_pixbuf_get_height)libgtk.resolve("gdk_pixbuf_get_height"); - gdk_pixbuf_new = (Ptr_gdk_pixbuf_new)libgtk.resolve("gdk_pixbuf_new"); - gdk_pixbuf_unref = (Ptr_gdk_pixbuf_unref)libgtk.resolve("gdk_pixbuf_unref"); - gdk_color_free = (Ptr_gdk_color_free)libgtk.resolve("gdk_color_free"); - gdk_x11_window_set_user_time = (Ptr_gdk_x11_window_set_user_time)libgtk.resolve("gdk_x11_window_set_user_time"); - gdk_x11_drawable_get_xid = (Ptr_gdk_x11_drawable_get_xid)libgtk.resolve("gdk_x11_drawable_get_xid"); - gdk_x11_drawable_get_xdisplay = (Ptr_gdk_x11_drawable_get_xdisplay)libgtk.resolve("gdk_x11_drawable_get_xdisplay"); - - gtk_widget_set_default_direction = (Ptr_gtk_widget_set_default_direction)libgtk.resolve("gtk_widget_set_default_direction"); - gtk_widget_modify_fg = (Ptr_gtk_widget_modify_color)libgtk.resolve("gtk_widget_modify_fg"); - gtk_widget_modify_bg = (Ptr_gtk_widget_modify_color)libgtk.resolve("gtk_widget_modify_bg"); - gtk_arrow_new = (Ptr_gtk_arrow_new)libgtk.resolve("gtk_arrow_new"); - gtk_menu_item_new_with_label = (Ptr_gtk_menu_item_new_with_label)libgtk.resolve("gtk_menu_item_new_with_label"); - gtk_check_menu_item_new_with_label = (Ptr_gtk_check_menu_item_new_with_label)libgtk.resolve("gtk_check_menu_item_new_with_label"); - gtk_menu_bar_new = (Ptr_gtk_menu_bar_new)libgtk.resolve("gtk_menu_bar_new"); - gtk_menu_new = (Ptr_gtk_menu_new)libgtk.resolve("gtk_menu_new"); - gtk_toolbar_new = (Ptr_gtk_toolbar_new)libgtk.resolve("gtk_toolbar_new"); - gtk_separator_tool_item_new = (Ptr_gtk_separator_tool_item_new)libgtk.resolve("gtk_separator_tool_item_new"); - gtk_toolbar_insert = (Ptr_gtk_toolbar_insert)libgtk.resolve("gtk_toolbar_insert"); - gtk_button_new = (Ptr_gtk_button_new)libgtk.resolve("gtk_button_new"); - gtk_tool_button_new = (Ptr_gtk_tool_button_new)libgtk.resolve("gtk_tool_button_new"); - gtk_hbutton_box_new = (Ptr_gtk_hbutton_box_new)libgtk.resolve("gtk_hbutton_box_new"); - gtk_check_button_new = (Ptr_gtk_check_button_new)libgtk.resolve("gtk_check_button_new"); - gtk_radio_button_new = (Ptr_gtk_radio_button_new)libgtk.resolve("gtk_radio_button_new"); - gtk_notebook_new = (Ptr_gtk_notebook_new)libgtk.resolve("gtk_notebook_new"); - gtk_progress_bar_new = (Ptr_gtk_progress_bar_new)libgtk.resolve("gtk_progress_bar_new"); - gtk_spin_button_new = (Ptr_gtk_spin_button_new)libgtk.resolve("gtk_spin_button_new"); - gtk_hscale_new = (Ptr_gtk_hscale_new)libgtk.resolve("gtk_hscale_new"); - gtk_vscale_new = (Ptr_gtk_vscale_new)libgtk.resolve("gtk_vscale_new"); - gtk_hscrollbar_new = (Ptr_gtk_hscrollbar_new)libgtk.resolve("gtk_hscrollbar_new"); - gtk_vscrollbar_new = (Ptr_gtk_vscrollbar_new)libgtk.resolve("gtk_vscrollbar_new"); - gtk_scrolled_window_new = (Ptr_gtk_scrolled_window_new)libgtk.resolve("gtk_scrolled_window_new"); - gtk_menu_shell_append = (Ptr_gtk_menu_shell_append)libgtk.resolve("gtk_menu_shell_append"); - gtk_entry_new = (Ptr_gtk_entry_new)libgtk.resolve("gtk_entry_new"); - gtk_tree_view_new = (Ptr_gtk_tree_view_new)libgtk.resolve("gtk_tree_view_new"); - gtk_combo_box_new = (Ptr_gtk_combo_box_new)libgtk.resolve("gtk_combo_box_new"); - gtk_combo_box_entry_new = (Ptr_gtk_combo_box_entry_new)libgtk.resolve("gtk_combo_box_entry_new"); - gtk_range_get_adjustment = (Ptr_gtk_range_get_adjustment)libgtk.resolve("gtk_range_get_adjustment"); - gtk_range_set_adjustment = (Ptr_gtk_range_set_adjustment)libgtk.resolve("gtk_range_set_adjustment"); - gtk_range_set_inverted = (Ptr_gtk_range_set_inverted)libgtk.resolve("gtk_range_set_inverted"); - gtk_container_add = (Ptr_gtk_container_add)libgtk.resolve("gtk_container_add"); - gtk_icon_factory_lookup_default = (Ptr_gtk_icon_factory_lookup_default)libgtk.resolve("gtk_icon_factory_lookup_default"); - gtk_icon_theme_get_default = (Ptr_gtk_icon_theme_get_default)libgtk.resolve("gtk_icon_theme_get_default"); - gtk_widget_get_style = (Ptr_gtk_widget_get_style)libgtk.resolve("gtk_widget_get_style"); - gtk_widget_style_get = (Ptr_gtk_widget_style_get)libgtk.resolve("gtk_widget_style_get"); - gtk_icon_set_render_icon = (Ptr_gtk_icon_set_render_icon)libgtk.resolve("gtk_icon_set_render_icon"); - gtk_fixed_new = (Ptr_gtk_fixed_new)libgtk.resolve("gtk_fixed_new"); - gtk_tree_view_column_new = (Ptr_gtk_tree_view_column_new)libgtk.resolve("gtk_tree_view_column_new"); - gtk_tree_view_append_column= (Ptr_gtk_tree_view_append_column )libgtk.resolve("gtk_tree_view_append_column"); - gtk_tree_view_get_column = (Ptr_gtk_tree_view_get_column )libgtk.resolve("gtk_tree_view_get_column"); - gtk_adjustment_configure = (Ptr_gtk_adjustment_configure)libgtk.resolve("gtk_adjustment_configure"); - gtk_adjustment_new = (Ptr_gtk_adjustment_new)libgtk.resolve("gtk_adjustment_new"); - gtk_menu_item_set_submenu = (Ptr_gtk_menu_item_set_submenu)libgtk.resolve("gtk_menu_item_set_submenu"); - gtk_settings_get_default = (Ptr_gtk_settings_get_default)libgtk.resolve("gtk_settings_get_default"); - gtk_separator_menu_item_new = (Ptr_gtk_separator_menu_item_new)libgtk.resolve("gtk_separator_menu_item_new"); - gtk_frame_new = (Ptr_gtk_frame_new)libgtk.resolve("gtk_frame_new"); - gtk_expander_new = (Ptr_gtk_expander_new)libgtk.resolve("gtk_expander_new"); - gtk_statusbar_new = (Ptr_gtk_statusbar_new)libgtk.resolve("gtk_statusbar_new"); - gtk_container_forall = (Ptr_gtk_container_forall)libgtk.resolve("gtk_container_forall"); - gtk_widget_size_allocate =(Ptr_gtk_widget_size_allocate)libgtk.resolve("gtk_widget_size_allocate"); - gtk_widget_size_request =(Ptr_gtk_widget_size_request)libgtk.resolve("gtk_widget_size_request"); - gtk_widget_set_direction =(Ptr_gtk_widget_set_direction)libgtk.resolve("gtk_widget_set_direction"); - gtk_widget_path =(Ptr_gtk_widget_path)libgtk.resolve("gtk_widget_path"); - gtk_container_get_type =(Ptr_gtk_container_get_type)libgtk.resolve("gtk_container_get_type"); - gtk_window_get_type =(Ptr_gtk_window_get_type)libgtk.resolve("gtk_window_get_type"); - gtk_widget_get_type =(Ptr_gtk_widget_get_type)libgtk.resolve("gtk_widget_get_type"); - gtk_widget_get_parent =(Ptr_gtk_widget_get_parent)libgtk.resolve("gtk_widget_get_parent"); - gtk_widget_is_toplevel =(Ptr_gtk_widget_is_toplevel)libgtk.resolve("gtk_widget_is_toplevel"); - gtk_widget_get_toplevel =(Ptr_gtk_widget_get_toplevel)libgtk.resolve("gtk_widget_get_toplevel"); - - gtk_rc_get_style_by_paths =(Ptr_gtk_rc_get_style_by_paths)libgtk.resolve("gtk_rc_get_style_by_paths"); - gtk_check_version =(Ptr_gtk_check_version)libgtk.resolve("gtk_check_version"); - gtk_border_free =(Ptr_gtk_border_free)libgtk.resolve("gtk_border_free"); - gtk_widget_get_allocation = (Ptr_gtk_widget_get_allocation)libgtk.resolve("gtk_widget_get_allocation"); - gtk_widget_set_allocation = (Ptr_gtk_widget_set_allocation)libgtk.resolve("gtk_widget_set_allocation"); - - gtk_widget_set_can_default = (Ptr_gtk_widget_set_can_default)libgtk.resolve("gtk_widget_set_can_default"); - gtk_window_set_default = (Ptr_gtk_window_set_default)libgtk.resolve("gtk_window_set_default"); - - gdk_event_new = (Ptr_gdk_event_new)libgtk.resolve("gdk_event_new"); - gdk_event_free = (Ptr_gdk_event_free)libgtk.resolve("gdk_event_free"); - gtk_widget_send_focus_change = (Ptr_gtk_widget_send_focus_change)libgtk.resolve("gtk_widget_send_focus_change"); - - pango_font_description_get_size = (Ptr_pango_font_description_get_size)libgtk.resolve("pango_font_description_get_size"); - pango_font_description_get_weight = (Ptr_pango_font_description_get_weight)libgtk.resolve("pango_font_description_get_weight"); - pango_font_description_get_family = (Ptr_pango_font_description_get_family)libgtk.resolve("pango_font_description_get_family"); - pango_font_description_get_style = (Ptr_pango_font_description_get_style)libgtk.resolve("pango_font_description_get_style"); - - gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("gnomeui-2"), 0, "gnome_icon_lookup_sync"); - gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("gnomevfs-2"), 0, "gnome_vfs_init"); -#endif // !QT_NO_LIBRARY -} - -/* \internal - * Initializes a number of gtk menu widgets. - * The widgets are cached. - */ -void QGtkStylePrivate::initGtkMenu() const -{ - // Create menubar - GtkWidget *gtkMenuBar = QGtkStylePrivate::gtk_menu_bar_new(); - setupGtkWidget(gtkMenuBar); - - GtkWidget *gtkMenuBarItem = QGtkStylePrivate::gtk_menu_item_new_with_label("X"); - gtk_menu_shell_append((GtkMenuShell*)(gtkMenuBar), gtkMenuBarItem); - gtk_widget_realize(gtkMenuBarItem); - - // Create menu - GtkWidget *gtkMenu = QGtkStylePrivate::gtk_menu_new(); - gtk_menu_item_set_submenu((GtkMenuItem*)(gtkMenuBarItem), gtkMenu); - gtk_widget_realize(gtkMenu); - - GtkWidget *gtkMenuItem = QGtkStylePrivate::gtk_menu_item_new_with_label("X"); - gtk_menu_shell_append((GtkMenuShell*)gtkMenu, gtkMenuItem); - gtk_widget_realize(gtkMenuItem); - - GtkWidget *gtkCheckMenuItem = QGtkStylePrivate::gtk_check_menu_item_new_with_label("X"); - gtk_menu_shell_append((GtkMenuShell*)gtkMenu, gtkCheckMenuItem); - gtk_widget_realize(gtkCheckMenuItem); - - GtkWidget *gtkMenuSeparator = QGtkStylePrivate::gtk_separator_menu_item_new(); - gtk_menu_shell_append((GtkMenuShell*)gtkMenu, gtkMenuSeparator); - - addAllSubWidgets(gtkMenuBar); - addAllSubWidgets(gtkMenu); -} - - -void QGtkStylePrivate::initGtkTreeview() const -{ - GtkWidget *gtkTreeView = gtk_tree_view_new(); - gtk_tree_view_append_column((GtkTreeView*)gtkTreeView, gtk_tree_view_column_new()); - gtk_tree_view_append_column((GtkTreeView*)gtkTreeView, gtk_tree_view_column_new()); - gtk_tree_view_append_column((GtkTreeView*)gtkTreeView, gtk_tree_view_column_new()); - addWidget(gtkTreeView); -} - - -/* \internal - * Initializes a number of gtk widgets that we can later on use to determine some of our styles. - * The widgets are cached. - */ -void QGtkStylePrivate::initGtkWidgets() const -{ - // From gtkmain.c - uid_t ruid = getuid (); - uid_t rgid = getgid (); - uid_t euid = geteuid (); - uid_t egid = getegid (); - if (ruid != euid || rgid != egid) { - qWarning("\nThis process is currently running setuid or setgid.\nGTK+ does not allow this " - "therefore Qt cannot use the GTK+ integration.\nTry launching your app using \'gksudo\', " - "\'kdesudo\' or a similar tool.\n\n" - "See http://www.gtk.org/setuid.html for more information.\n"); - return; - } - - if (QGtkStylePrivate::gtk_init) { -#ifndef Q_OS_MAC - // Gtk will set the Qt error handler so we have to reset it afterwards - x11ErrorHandler qt_x_errhandler = XSetErrorHandler(0); -#endif - QGtkStylePrivate::gtk_init (NULL, NULL); -#ifndef Q_OS_MAC - XSetErrorHandler(qt_x_errhandler); -#endif - - // make a window - GtkWidget* gtkWindow = QGtkStylePrivate::gtk_window_new(GTK_WINDOW_POPUP); - QGtkStylePrivate::gtk_widget_realize(gtkWindow); - QHashableLatin1Literal widgetPath = QHashableLatin1Literal::fromData(strdup("GtkWindow")); - removeWidgetFromMap(widgetPath); - gtkWidgetMap()->insert(widgetPath, gtkWindow); - - - // Make all other widgets. respect the text direction - if (qApp->layoutDirection() == Qt::RightToLeft) - QGtkStylePrivate::gtk_widget_set_default_direction(GTK_TEXT_DIR_RTL); - - if (!gtkWidgetMap()->contains("GtkButton")) { - GtkWidget *gtkButton = QGtkStylePrivate::gtk_button_new(); - addWidget(gtkButton); - g_signal_connect(gtkButton, "style-set", G_CALLBACK(gtkStyleSetCallback), 0); - addWidget(QGtkStylePrivate::gtk_tool_button_new(NULL, "Qt")); - addWidget(QGtkStylePrivate::gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE)); - addWidget(QGtkStylePrivate::gtk_hbutton_box_new()); - addWidget(QGtkStylePrivate::gtk_check_button_new()); - addWidget(QGtkStylePrivate::gtk_radio_button_new(NULL)); - addWidget(QGtkStylePrivate::gtk_combo_box_new()); - addWidget(QGtkStylePrivate::gtk_combo_box_entry_new()); - GtkWidget *entry = QGtkStylePrivate::gtk_entry_new(); - // gtk-im-context-none is supported in gtk+ since 2.19.5 - // and also exists in gtk3 - // http://git.gnome.org/browse/gtk+/tree/gtk/gtkimmulticontext.c?id=2.19.5#n33 - // reason that we don't use gtk-im-context-simple here is, - // gtk-im-context-none has less overhead, and 2.19.5 is - // relatively old. and even for older gtk+, it will fallback - // to gtk-im-context-simple if gtk-im-context-none doesn't - // exists. - g_object_set(entry, "im-module", "gtk-im-context-none", NULL); - addWidget(entry); - addWidget(QGtkStylePrivate::gtk_frame_new(NULL)); - addWidget(QGtkStylePrivate::gtk_expander_new("")); - addWidget(QGtkStylePrivate::gtk_statusbar_new()); - addWidget(QGtkStylePrivate::gtk_hscale_new((QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0)))); - addWidget(QGtkStylePrivate::gtk_hscrollbar_new(NULL)); - addWidget(QGtkStylePrivate::gtk_scrolled_window_new(NULL, NULL)); - - initGtkMenu(); - addWidget(QGtkStylePrivate::gtk_notebook_new()); - addWidget(QGtkStylePrivate::gtk_progress_bar_new()); - addWidget(QGtkStylePrivate::gtk_spin_button_new((QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0)), 0.1, 3)); - GtkWidget *toolbar = gtk_toolbar_new(); - g_signal_connect (toolbar, "notify::toolbar-style", G_CALLBACK (update_toolbar_style), toolbar); - gtk_toolbar_insert((GtkToolbar*)toolbar, gtk_separator_tool_item_new(), -1); - addWidget(toolbar); - initGtkTreeview(); - addWidget(gtk_vscale_new((QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0)))); - addWidget(gtk_vscrollbar_new(NULL)); - } - else // Rebuild map - { - // When styles change subwidgets can get rearranged - // as with the combo box. We need to update the widget map - // to reflect this; - QHash oldMap = *gtkWidgetMap(); - gtkWidgetMap()->clear(); - QHashIterator it(oldMap); - while (it.hasNext()) { - it.next(); - if (!strchr(it.key().data(), '.')) { - addAllSubWidgets(it.value()); - } - free(const_cast(it.key().data())); - } - } - } else { - qWarning("QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries."); - } -} - -/*! \internal - * destroys all previously buffered widgets. - */ -void QGtkStylePrivate::cleanupGtkWidgets() -{ - if (!widgetMap) - return; - if (widgetMap->contains("GtkWindow")) // Gtk will destroy all children - gtk_widget_destroy(widgetMap->value("GtkWindow")); - for (QHash::const_iterator it = widgetMap->constBegin(); - it != widgetMap->constEnd(); ++it) - free(const_cast(it.key().data())); -} - -static bool resolveGConf() -{ -#ifndef QT_NO_LIBRARY - if (!QGtkStylePrivate::gconf_client_get_default) { - QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_default"); - QGtkStylePrivate::gconf_client_get_string = (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_string"); - QGtkStylePrivate::gconf_client_get_bool = (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_bool"); - } -#endif // !QT_NO_LIBRARY - return (QGtkStylePrivate::gconf_client_get_default !=0); -} - -QString QGtkStylePrivate::getGConfString(const QString &value, const QString &fallback) -{ - QString retVal = fallback; - if (resolveGConf()) { -#if !defined(GLIB_VERSION_2_36) - g_type_init(); -#endif - GConfClient* client = gconf_client_get_default(); - GError *err = 0; - char *str = gconf_client_get_string(client, qPrintable(value), &err); - if (!err) { - retVal = QString::fromUtf8(str); - g_free(str); - } - g_object_unref(client); - if (err) - g_error_free (err); - } - return retVal; -} - -bool QGtkStylePrivate::getGConfBool(const QString &key, bool fallback) -{ - bool retVal = fallback; - if (resolveGConf()) { -#if !defined(GLIB_VERSION_2_36) - g_type_init(); -#endif - GConfClient* client = gconf_client_get_default(); - GError *err = 0; - bool result = gconf_client_get_bool(client, qPrintable(key), &err); - g_object_unref(client); - if (!err) - retVal = result; - else - g_error_free (err); - } - return retVal; -} - -QString QGtkStylePrivate::getThemeName() -{ - QString themeName; - // Read the theme name from GtkSettings - GtkSettings *settings = QGtkStylePrivate::gtk_settings_get_default(); - gchararray value; - g_object_get(settings, "gtk-theme-name", &value, NULL); - themeName = QString::fromUtf8(value); - g_free(value); - return themeName; -} - -// Get size of the arrow controls in a GtkSpinButton -int QGtkStylePrivate::getSpinboxArrowSize() const -{ - const int MIN_ARROW_WIDTH = 6; - GtkWidget *spinButton = gtkWidget("GtkSpinButton"); - GtkStyle *style = QGtkStylePrivate::gtk_widget_get_style(spinButton); - gint size = pango_font_description_get_size (style->font_desc); - gint arrow_size; - arrow_size = qMax(PANGO_PIXELS (size), MIN_ARROW_WIDTH) + style->xthickness; - arrow_size += arrow_size%2 + 1; - return arrow_size; -} - - -bool QGtkStylePrivate::isKDE4Session() -{ - static int version = -1; - if (version == -1) - version = qgetenv("KDE_SESSION_VERSION").toInt(); - return (version == 4); -} - -void QGtkStylePrivate::applyCustomPaletteHash() -{ - QPalette menuPal = gtkWidgetPalette("GtkMenu"); - GdkColor gdkBg = QGtkStylePrivate::gtk_widget_get_style(gtkWidget("GtkMenu"))->bg[GTK_STATE_NORMAL]; - QColor bgColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8); - menuPal.setBrush(QPalette::Base, bgColor); - menuPal.setBrush(QPalette::Window, bgColor); - qApp->setPalette(menuPal, "QMenu"); - - QPalette toolbarPal = gtkWidgetPalette("GtkToolbar"); - qApp->setPalette(toolbarPal, "QToolBar"); - - QPalette menuBarPal = gtkWidgetPalette("GtkMenuBar"); - qApp->setPalette(menuBarPal, "QMenuBar"); -} - -/*! \internal - * Returns the gtk Widget that should be used to determine text foreground and background colors. -*/ -GtkWidget* QGtkStylePrivate::getTextColorWidget() const -{ - return gtkWidget("GtkEntry"); -} - -void QGtkStylePrivate::setupGtkWidget(GtkWidget* widget) -{ - if (Q_GTK_IS_WIDGET(widget)) { - GtkWidget *protoLayout = gtkWidgetMap()->value("GtkContainer"); - if (!protoLayout) { - protoLayout = QGtkStylePrivate::gtk_fixed_new(); - QGtkStylePrivate::gtk_container_add((GtkContainer*)(gtkWidgetMap()->value("GtkWindow")), protoLayout); - QHashableLatin1Literal widgetPath = QHashableLatin1Literal::fromData(strdup("GtkContainer")); - gtkWidgetMap()->insert(widgetPath, protoLayout); - } - Q_ASSERT(protoLayout); - - if (!QGtkStylePrivate::gtk_widget_get_parent(widget) && !QGtkStylePrivate::gtk_widget_is_toplevel(widget)) - QGtkStylePrivate::gtk_container_add((GtkContainer*)(protoLayout), widget); - QGtkStylePrivate::gtk_widget_realize(widget); - } -} - -void QGtkStylePrivate::removeWidgetFromMap(const QHashableLatin1Literal &path) -{ - WidgetMap *map = gtkWidgetMap(); - WidgetMap::iterator it = map->find(path); - if (it != map->end()) { - char* keyData = const_cast(it.key().data()); - map->erase(it); - free(keyData); - } -} - -void QGtkStylePrivate::addWidgetToMap(GtkWidget *widget) -{ - if (Q_GTK_IS_WIDGET(widget)) { - gtk_widget_realize(widget); - QHashableLatin1Literal widgetPath = classPath(widget); - - removeWidgetFromMap(widgetPath); - gtkWidgetMap()->insert(widgetPath, widget); -#ifdef DUMP_GTK_WIDGET_TREE - qWarning("Inserted Gtk Widget: %s", widgetPath.data()); -#endif - } - } - -void QGtkStylePrivate::addAllSubWidgets(GtkWidget *widget, gpointer v) -{ - Q_UNUSED(v); - addWidgetToMap(widget); - if (G_TYPE_CHECK_INSTANCE_TYPE ((widget), gtk_container_get_type())) - gtk_container_forall((GtkContainer*)widget, addAllSubWidgets, NULL); -} - -// Updates window/windowtext palette based on the indicated gtk widget -QPalette QGtkStylePrivate::gtkWidgetPalette(const QHashableLatin1Literal >kWidgetName) const -{ - GtkWidget *gtkWidget = QGtkStylePrivate::gtkWidget(gtkWidgetName); - Q_ASSERT(gtkWidget); - QPalette pal = QApplication::palette(); - GdkColor gdkBg = gtk_widget_get_style(gtkWidget)->bg[GTK_STATE_NORMAL]; - GdkColor gdkText = gtk_widget_get_style(gtkWidget)->fg[GTK_STATE_NORMAL]; - GdkColor gdkDisabledText = gtk_widget_get_style(gtkWidget)->fg[GTK_STATE_INSENSITIVE]; - QColor bgColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8); - QColor textColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); - QColor disabledTextColor(gdkDisabledText.red>>8, gdkDisabledText.green>>8, gdkDisabledText.blue>>8); - pal.setBrush(QPalette::Window, bgColor); - pal.setBrush(QPalette::Button, bgColor); - pal.setBrush(QPalette::All, QPalette::WindowText, textColor); - pal.setBrush(QPalette::Disabled, QPalette::WindowText, disabledTextColor); - pal.setBrush(QPalette::All, QPalette::ButtonText, textColor); - pal.setBrush(QPalette::Disabled, QPalette::ButtonText, disabledTextColor); - return pal; -} - - -void QGtkStyleUpdateScheduler::updateTheme() -{ - static QString oldTheme(QLS("qt_not_set")); - QPixmapCache::clear(); - - QFont font = QGtkStylePrivate::getThemeFont(); - if (QApplication::font() != font) - qApp->setFont(font); - - if (oldTheme != QGtkStylePrivate::getThemeName()) { - oldTheme = QGtkStylePrivate::getThemeName(); - QPalette newPalette = qApp->style()->standardPalette(); - QApplicationPrivate::setSystemPalette(newPalette); - QApplication::setPalette(newPalette); - if (!QGtkStylePrivate::instances.isEmpty()) { - QGtkStylePrivate::instances.last()->initGtkWidgets(); - QGtkStylePrivate::instances.last()->applyCustomPaletteHash(); - } - QList widgets = QApplication::allWidgets(); - // Notify all widgets that size metrics might have changed - foreach (QWidget *widget, widgets) { - QEvent e(QEvent::StyleChange); - QApplication::sendEvent(widget, &e); - } - } - QIconLoader::instance()->updateSystemTheme(); -} - -void QGtkStylePrivate::addWidget(GtkWidget *widget) -{ - if (widget) { - setupGtkWidget(widget); - addAllSubWidgets(widget); - } -} - - -// Fetch the application font from the pango font description -// contained in the theme. -QFont QGtkStylePrivate::getThemeFont() -{ - QFont font; - GtkStyle *style = gtkStyle(); - if (style && qApp->desktopSettingsAware()) - { - PangoFontDescription *gtk_font = style->font_desc; - font.setPointSizeF((float)(pango_font_description_get_size(gtk_font))/PANGO_SCALE); - - QString family = QString::fromLatin1(pango_font_description_get_family(gtk_font)); - if (!family.isEmpty()) - font.setFamily(family); - - const int weight = pango_font_description_get_weight(gtk_font); - font.setWeight(QPlatformFontDatabase::weightFromInteger(weight)); - - PangoStyle fontstyle = pango_font_description_get_style(gtk_font); - if (fontstyle == PANGO_STYLE_ITALIC) - font.setStyle(QFont::StyleItalic); - else if (fontstyle == PANGO_STYLE_OBLIQUE) - font.setStyle(QFont::StyleOblique); - else - font.setStyle(QFont::StyleNormal); - } - return font; -} - -QIcon QGtkStylePrivate::getFilesystemIcon(const QFileInfo &info) -{ - QIcon icon; - if (isThemeAvailable() && gnome_vfs_init && gnome_icon_lookup_sync) { - gnome_vfs_init(); - GtkIconTheme *theme = gtk_icon_theme_get_default(); - QByteArray fileurl = QUrl::fromLocalFile(info.absoluteFilePath()).toEncoded(); - char * icon_name = gnome_icon_lookup_sync(theme, - NULL, - fileurl.data(), - NULL, - GNOME_ICON_LOOKUP_FLAGS_NONE, - NULL); - QString iconName = QString::fromUtf8(icon_name); - g_free(icon_name); - if (iconName.startsWith(QLatin1Char('/'))) - return QIcon(iconName); - return QIcon::fromTheme(iconName); - } - return icon; -} - -bool operator==(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2) -{ - return l1.size() == l2.size() || qstrcmp(l1.data(), l2.data()) == 0; -} - -// copied from qHash.cpp -uint qHash(const QHashableLatin1Literal &key) -{ - int n = key.size(); - const uchar *p = reinterpret_cast(key.data()); - uint h = 0; - uint g; - - while (n--) { - h = (h << 4) + *p++; - if ((g = (h & 0xf0000000)) != 0) - h ^= g >> 23; - h &= ~g; - } - return h; -} - -QT_END_NAMESPACE - -#endif // !defined(QT_NO_STYLE_GTK) diff --git a/src/widgets/styles/qgtkstyle_p.h b/src/widgets/styles/qgtkstyle_p.h deleted file mode 100644 index 3dcd7bf6ef..0000000000 --- a/src/widgets/styles/qgtkstyle_p.h +++ /dev/null @@ -1,123 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -#ifndef QGTKSTYLE_P_H -#define QGTKSTYLE_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 -#include -#include -#include - -QT_BEGIN_NAMESPACE - - -#if !defined(QT_NO_STYLE_GTK) - -class QPainterPath; -class QGtkStylePrivate; - -class QGtkStyle : public QCommonStyle -{ - Q_OBJECT - Q_DECLARE_PRIVATE(QGtkStyle) - -public: - QGtkStyle(); - QGtkStyle(QGtkStylePrivate &dd); - - ~QGtkStyle(); - - QPalette standardPalette() const Q_DECL_OVERRIDE; - - void drawPrimitive(PrimitiveElement element, const QStyleOption *option, - QPainter *painter, const QWidget *widget) const Q_DECL_OVERRIDE; - void drawControl(ControlElement control, 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; - void drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, - const QPixmap &pixmap) const Q_DECL_OVERRIDE; - void drawItemText(QPainter *painter, const QRect &rect, int alignment, const QPalette &pal, - bool enabled, const QString& text, QPalette::ColorRole textRole) const Q_DECL_OVERRIDE; - - int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, - const QWidget *widget = 0) const Q_DECL_OVERRIDE; - int styleHint(StyleHint hint, const QStyleOption *option, - const QWidget *widget, QStyleHintReturn *returnData) const Q_DECL_OVERRIDE; - - QStyle::SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, - const QPoint &pt, const QWidget *w) const Q_DECL_OVERRIDE; - - QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option, - SubControl subControl, const QWidget *widget) const Q_DECL_OVERRIDE; - QRect subElementRect(SubElement sr, const QStyleOption *opt, const QWidget *w) const Q_DECL_OVERRIDE; - QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const Q_DECL_OVERRIDE; - - - QSize sizeFromContents(ContentsType type, const QStyleOption *option, - const QSize &size, const QWidget *widget) const Q_DECL_OVERRIDE; - QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = 0, - const QWidget *widget = 0) const Q_DECL_OVERRIDE; - QPixmap standardPixmap(StandardPixmap sp, const QStyleOption *option, - const QWidget *widget) const Q_DECL_OVERRIDE; - QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, - const QStyleOption *opt) const Q_DECL_OVERRIDE; - - void polish(QWidget *widget) Q_DECL_OVERRIDE; - void polish(QApplication *app) Q_DECL_OVERRIDE; - void polish(QPalette &palette) Q_DECL_OVERRIDE; - - void unpolish(QWidget *widget) Q_DECL_OVERRIDE; - void unpolish(QApplication *app) Q_DECL_OVERRIDE; - - static bool getGConfBool(const QString &key, bool fallback = 0); - static QString getGConfString(const QString &key, const QString &fallback = QString()); -}; - -#endif //!defined(QT_NO_STYLE_QGTK) - -QT_END_NAMESPACE - -#endif //QGTKSTYLE_P_H diff --git a/src/widgets/styles/qgtkstyle_p_p.h b/src/widgets/styles/qgtkstyle_p_p.h deleted file mode 100644 index 4cb03ed833..0000000000 --- a/src/widgets/styles/qgtkstyle_p_p.h +++ /dev/null @@ -1,449 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -#ifndef QGTKSTYLE_P_P_H -#define QGTKSTYLE_P_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 -#if !defined(QT_NO_STYLE_GTK) - -#include -#include -#include - -#include - -#include -#include -#include - -#define Q_GTK_IS_WIDGET(widget) widget && G_TYPE_CHECK_INSTANCE_TYPE ((widget), QGtkStylePrivate::gtk_widget_get_type()) - -QT_BEGIN_NAMESPACE - -class QHashableLatin1Literal -{ -public: - int size() const { return m_size; } - const char *data() const { return m_data; } - -#ifdef __SUNPRO_CC - QHashableLatin1Literal(const char* str) - : m_size(strlen(str)), m_data(str) {} -#else - template - QHashableLatin1Literal(const char (&str)[N]) - : m_size(N - 1), m_data(str) {} -#endif - - QHashableLatin1Literal(const QHashableLatin1Literal &other) - : m_size(other.m_size), m_data(other.m_data) - {} - - QHashableLatin1Literal &operator=(const QHashableLatin1Literal &other) - { - if (this == &other) - return *this; - *const_cast(&m_size) = other.m_size; - *const_cast(&m_data) = const_cast(other.m_data); - return *this; - } - - QString toString() const { return QString::fromLatin1(m_data, m_size); } - - static QHashableLatin1Literal fromData(const char *str) - { - return QHashableLatin1Literal(str, qstrlen(str)); - } - -private: - QHashableLatin1Literal(const char *str, int length) - : m_size(length), m_data(str) - {} - - const int m_size; - const char *m_data; -}; - -bool operator==(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2); -inline bool operator!=(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2) { return !operator==(l1, l2); } -uint qHash(const QHashableLatin1Literal &key); - -QT_END_NAMESPACE - -class GConf; -class GConfClient; -typedef struct _XDisplay Display; - -typedef GConfClient* (*Ptr_gconf_client_get_default)(); -typedef char* (*Ptr_gconf_client_get_string)(GConfClient*, const char*, GError **); -typedef bool (*Ptr_gconf_client_get_bool)(GConfClient*, const char*, GError **); - -typedef void (*Ptr_gtk_init)(int *, char ***); -typedef GtkWidget* (*Ptr_gtk_window_new) (GtkWindowType); -typedef GtkStyle* (*Ptr_gtk_style_attach)(GtkStyle *, GdkWindow *); -typedef void (*Ptr_gtk_widget_destroy) (GtkWidget *); -typedef void (*Ptr_gtk_widget_realize) (GtkWidget *); -typedef void (*Ptr_gtk_widget_set_default_direction) (GtkTextDirection); -typedef void (*Ptr_gtk_widget_modify_color)(GtkWidget *widget, GtkStateType state, const GdkColor *color); -typedef GtkWidget* (*Ptr_gtk_arrow_new)(GtkArrowType, GtkShadowType); -typedef GtkWidget* (*Ptr_gtk_menu_item_new_with_label)(const gchar *); -typedef GtkWidget* (*Ptr_gtk_separator_menu_item_new)(void); -typedef GtkWidget* (*Ptr_gtk_check_menu_item_new_with_label)(const gchar *); -typedef GtkWidget* (*Ptr_gtk_menu_bar_new)(void); -typedef GtkWidget* (*Ptr_gtk_menu_new)(void); -typedef GtkWidget* (*Ptr_gtk_combo_box_new)(void); -typedef GtkWidget* (*Ptr_gtk_combo_box_entry_new)(void); -typedef GtkWidget* (*Ptr_gtk_toolbar_new)(void); -typedef GtkWidget* (*Ptr_gtk_spin_button_new)(GtkAdjustment*, double, int); -typedef GtkWidget* (*Ptr_gtk_button_new)(void); -typedef GtkWidget* (*Ptr_gtk_tool_button_new)(GtkWidget *, const gchar *); -typedef GtkWidget* (*Ptr_gtk_hbutton_box_new)(void); -typedef GtkWidget* (*Ptr_gtk_check_button_new)(void); -typedef GtkWidget* (*Ptr_gtk_radio_button_new)(GSList *); -typedef GtkWidget* (*Ptr_gtk_notebook_new)(void); -typedef GtkWidget* (*Ptr_gtk_progress_bar_new)(void); -typedef GtkWidget* (*Ptr_gtk_hscale_new)(GtkAdjustment*); -typedef GtkWidget* (*Ptr_gtk_vscale_new)(GtkAdjustment*); -typedef GtkWidget* (*Ptr_gtk_hscrollbar_new)(GtkAdjustment*); -typedef GtkWidget* (*Ptr_gtk_vscrollbar_new)(GtkAdjustment*); -typedef GtkWidget* (*Ptr_gtk_scrolled_window_new)(GtkAdjustment*, GtkAdjustment*); -typedef gchar* (*Ptr_gtk_check_version)(guint, guint, guint); -typedef GtkToolItem* (*Ptr_gtk_separator_tool_item_new) (void); -typedef GtkWidget* (*Ptr_gtk_entry_new)(void); -typedef GtkWidget* (*Ptr_gtk_tree_view_new)(void); -typedef GtkTreeViewColumn* (*Ptr_gtk_tree_view_get_column)(GtkTreeView *, gint); -typedef GtkWidget* (*Ptr_gtk_frame_new)(const gchar *); -typedef GtkWidget* (*Ptr_gtk_expander_new)(const gchar*); -typedef GtkWidget* (*Ptr_gtk_statusbar_new)(void); -typedef GtkSettings* (*Ptr_gtk_settings_get_default)(void); -typedef GtkAdjustment* (*Ptr_gtk_range_get_adjustment)(GtkRange *); -typedef void (*Ptr_gtk_range_set_adjustment)(GtkRange *, GtkAdjustment *); -typedef void (*Ptr_gtk_range_set_inverted)(GtkRange*, bool); -typedef void (*Ptr_gtk_container_add)(GtkContainer *container, GtkWidget *widget); -typedef GtkIconSet* (*Ptr_gtk_icon_factory_lookup_default) (const gchar*); -typedef GtkIconTheme* (*Ptr_gtk_icon_theme_get_default) (void); -typedef GtkStyle* (*Ptr_gtk_widget_get_style)(GtkWidget *); -typedef void (*Ptr_gtk_widget_style_get)(GtkWidget *, const gchar *first_property_name, ...); -typedef GtkTreeViewColumn* (*Ptr_gtk_tree_view_column_new)(void); -typedef GtkWidget* (*Ptr_gtk_fixed_new)(void); -typedef GdkPixbuf* (*Ptr_gtk_icon_set_render_icon)(GtkIconSet *, GtkStyle *, GtkTextDirection, GtkStateType, GtkIconSize, GtkWidget *,const char *); -typedef void (*Ptr_gtk_tree_view_append_column) (GtkTreeView*, GtkTreeViewColumn*); -typedef void (*Ptr_gtk_adjustment_configure) (GtkAdjustment *, double, double, double, double, double, double); -typedef GtkAdjustment* (*Ptr_gtk_adjustment_new) (double, double, double, double, double, double); -typedef void (*Ptr_gtk_menu_item_set_submenu) (GtkMenuItem *, GtkWidget *); -typedef void (*Ptr_gtk_container_forall) (GtkContainer *, GtkCallback, gpointer); -typedef void (*Ptr_gtk_widget_size_allocate) (GtkWidget *, GtkAllocation*); -typedef void (*Ptr_gtk_widget_size_request) (GtkWidget *widget, GtkRequisition *requisition); -typedef void (*Ptr_gtk_widget_set_direction) (GtkWidget *, GtkTextDirection); -typedef void (*Ptr_gtk_widget_path) (GtkWidget *, guint *, gchar **, gchar**); - -typedef void (*Ptr_gtk_toolbar_insert) (GtkToolbar *toolbar, GtkToolItem *item, int pos); -typedef void (*Ptr_gtk_menu_shell_append)(GtkMenuShell *, GtkWidget *); -typedef GType (*Ptr_gtk_container_get_type) (void); -typedef GType (*Ptr_gtk_window_get_type) (void); -typedef GType (*Ptr_gtk_widget_get_type) (void); -typedef GtkWidget* (*Ptr_gtk_widget_get_parent) (GtkWidget *); -typedef gboolean (*Ptr_gtk_widget_is_toplevel) (GtkWidget *); -typedef GtkWidget* (*Ptr_gtk_widget_get_toplevel) (GtkWidget *); -typedef GtkStyle* (*Ptr_gtk_rc_get_style_by_paths) (GtkSettings *, const char *, const char *, GType); -typedef gint (*Ptr_pango_font_description_get_size) (const PangoFontDescription *); -typedef PangoWeight (*Ptr_pango_font_description_get_weight) (const PangoFontDescription *); -typedef const char* (*Ptr_pango_font_description_get_family) (const PangoFontDescription *); -typedef PangoStyle (*Ptr_pango_font_description_get_style) (const PangoFontDescription *desc); -typedef void (*Ptr_gtk_border_free)(GtkBorder *); -typedef void (*Ptr_gtk_widget_get_allocation) (GtkWidget*, GtkAllocation*); -typedef void (*Ptr_gtk_widget_set_allocation) (GtkWidget*, const GtkAllocation*); - -typedef void (*Ptr_gtk_widget_set_can_default) (GtkWidget*, gboolean); -typedef void (*Ptr_gtk_window_set_default) (GtkWindow*, GtkWidget*); - -typedef GdkEvent* (*Ptr_gdk_event_new) (GdkEventType); -typedef void (*Ptr_gdk_event_free) (GdkEvent*); -typedef void (*Ptr_gtk_widget_send_focus_change) (GtkWidget*, GdkEvent*); - -typedef guchar* (*Ptr_gdk_pixbuf_get_pixels) (const GdkPixbuf *pixbuf); -typedef int (*Ptr_gdk_pixbuf_get_width) (const GdkPixbuf *pixbuf); -typedef void (*Ptr_gdk_color_free) (const GdkColor *); -typedef int (*Ptr_gdk_pixbuf_get_height) (const GdkPixbuf *pixbuf); -typedef GdkPixbuf* (*Ptr_gdk_pixbuf_new) (GdkColorspace colorspace, gboolean has_alpha, - int bits_per_sample, int width, int height); -typedef void (*Ptr_gdk_pixbuf_unref)(GdkPixbuf *); -typedef void (*Ptr_gdk_x11_window_set_user_time) (GdkWindow *window, guint32); -typedef XID (*Ptr_gdk_x11_drawable_get_xid) (GdkDrawable *); -typedef Display* (*Ptr_gdk_x11_drawable_get_xdisplay) ( GdkDrawable *); - - -QT_BEGIN_NAMESPACE - -class QGtkPainter; -class QGtkStylePrivate; - -class QGtkStyleFilter : public QObject -{ -public: - QGtkStyleFilter(QGtkStylePrivate* sp) - : stylePrivate(sp) - {} -private: - QGtkStylePrivate* stylePrivate; - bool eventFilter(QObject *obj, QEvent *e) Q_DECL_OVERRIDE; -}; - -typedef enum { - GNOME_ICON_LOOKUP_FLAGS_NONE = 0, - GNOME_ICON_LOOKUP_FLAGS_EMBEDDING_TEXT = 1<<0, - GNOME_ICON_LOOKUP_FLAGS_SHOW_SMALL_IMAGES_AS_THEMSELVES = 1<<1, - GNOME_ICON_LOOKUP_FLAGS_ALLOW_SVG_AS_THEMSELVES = 1<<2 -} GnomeIconLookupFlags; - -typedef enum { - GNOME_ICON_LOOKUP_RESULT_FLAGS_NONE = 0, - GNOME_ICON_LOOKUP_RESULT_FLAGS_THUMBNAIL = 1<<0 -} GnomeIconLookupResultFlags; - -struct GnomeThumbnailFactory; -typedef gboolean (*Ptr_gnome_vfs_init) (void); -typedef char* (*Ptr_gnome_icon_lookup_sync) ( - GtkIconTheme *icon_theme, - GnomeThumbnailFactory *, - const char *file_uri, - const char *custom_icon, - GnomeIconLookupFlags flags, - GnomeIconLookupResultFlags *result); - -class QGtkStylePrivate : public QCommonStylePrivate -{ - Q_DECLARE_PUBLIC(QGtkStyle) -public: - QGtkStylePrivate(); - ~QGtkStylePrivate(); - - QGtkStyleFilter filter; - - static QGtkPainter* gtkPainter(QPainter *painter = 0); - static GtkWidget* gtkWidget(const QHashableLatin1Literal &path); - static GtkStyle* gtkStyle(const QHashableLatin1Literal &path = QHashableLatin1Literal("GtkWindow")); - static void gtkWidgetSetFocus(GtkWidget *widget, bool focus); - - virtual void resolveGtk() const; - virtual void initGtkMenu() const; - virtual void initGtkTreeview() const; - virtual void initGtkWidgets() const; - - static void cleanupGtkWidgets(); - - static bool isKDE4Session(); - void applyCustomPaletteHash(); - static QFont getThemeFont(); - static bool isThemeAvailable() { return gtkStyle() != 0; } - - static bool getGConfBool(const QString &key, bool fallback = 0); - static QString getGConfString(const QString &key, const QString &fallback = QString()); - - static QString getThemeName(); - virtual int getSpinboxArrowSize() const; - - static QIcon getFilesystemIcon(const QFileInfo &); - - static Ptr_gtk_container_forall gtk_container_forall; - static Ptr_gtk_init gtk_init; - static Ptr_gtk_style_attach gtk_style_attach; - static Ptr_gtk_window_new gtk_window_new; - static Ptr_gtk_widget_destroy gtk_widget_destroy; - static Ptr_gtk_widget_realize gtk_widget_realize; - static Ptr_gtk_widget_set_default_direction gtk_widget_set_default_direction; - static Ptr_gtk_widget_modify_color gtk_widget_modify_fg; - static Ptr_gtk_widget_modify_color gtk_widget_modify_bg; - static Ptr_gtk_menu_item_new_with_label gtk_menu_item_new_with_label; - static Ptr_gtk_arrow_new gtk_arrow_new; - static Ptr_gtk_check_menu_item_new_with_label gtk_check_menu_item_new_with_label; - static Ptr_gtk_menu_bar_new gtk_menu_bar_new; - static Ptr_gtk_menu_new gtk_menu_new; - static Ptr_gtk_expander_new gtk_expander_new; - static Ptr_gtk_button_new gtk_button_new; - static Ptr_gtk_tool_button_new gtk_tool_button_new; - static Ptr_gtk_hbutton_box_new gtk_hbutton_box_new; - static Ptr_gtk_check_button_new gtk_check_button_new; - static Ptr_gtk_radio_button_new gtk_radio_button_new; - static Ptr_gtk_spin_button_new gtk_spin_button_new; - static Ptr_gtk_separator_tool_item_new gtk_separator_tool_item_new; - static Ptr_gtk_toolbar_insert gtk_toolbar_insert; - static Ptr_gtk_frame_new gtk_frame_new; - static Ptr_gtk_statusbar_new gtk_statusbar_new; - static Ptr_gtk_entry_new gtk_entry_new; - static Ptr_gtk_hscale_new gtk_hscale_new; - static Ptr_gtk_vscale_new gtk_vscale_new; - static Ptr_gtk_hscrollbar_new gtk_hscrollbar_new; - static Ptr_gtk_vscrollbar_new gtk_vscrollbar_new; - static Ptr_gtk_scrolled_window_new gtk_scrolled_window_new; - static Ptr_gtk_notebook_new gtk_notebook_new; - static Ptr_gtk_toolbar_new gtk_toolbar_new; - static Ptr_gtk_tree_view_new gtk_tree_view_new; - static Ptr_gtk_tree_view_get_column gtk_tree_view_get_column; - static Ptr_gtk_combo_box_new gtk_combo_box_new; - static Ptr_gtk_combo_box_entry_new gtk_combo_box_entry_new; - static Ptr_gtk_progress_bar_new gtk_progress_bar_new; - static Ptr_gtk_container_add gtk_container_add; - static Ptr_gtk_menu_shell_append gtk_menu_shell_append; - static Ptr_gtk_range_get_adjustment gtk_range_get_adjustment; - static Ptr_gtk_range_set_adjustment gtk_range_set_adjustment; - static Ptr_gtk_range_set_inverted gtk_range_set_inverted; - static Ptr_gtk_icon_factory_lookup_default gtk_icon_factory_lookup_default; - static Ptr_gtk_icon_theme_get_default gtk_icon_theme_get_default; - static Ptr_gtk_widget_get_style gtk_widget_get_style; - static Ptr_gtk_widget_style_get gtk_widget_style_get; - static Ptr_gtk_icon_set_render_icon gtk_icon_set_render_icon; - static Ptr_gtk_fixed_new gtk_fixed_new; - static Ptr_gtk_tree_view_column_new gtk_tree_view_column_new; - static Ptr_gtk_tree_view_append_column gtk_tree_view_append_column; - static Ptr_gtk_adjustment_configure gtk_adjustment_configure; - static Ptr_gtk_adjustment_new gtk_adjustment_new; - static Ptr_gtk_menu_item_set_submenu gtk_menu_item_set_submenu; - static Ptr_gtk_settings_get_default gtk_settings_get_default; - static Ptr_gtk_separator_menu_item_new gtk_separator_menu_item_new; - static Ptr_gtk_widget_size_allocate gtk_widget_size_allocate; - static Ptr_gtk_widget_size_request gtk_widget_size_request; - static Ptr_gtk_widget_set_direction gtk_widget_set_direction; - static Ptr_gtk_widget_path gtk_widget_path; - static Ptr_gtk_container_get_type gtk_container_get_type; - static Ptr_gtk_window_get_type gtk_window_get_type; - static Ptr_gtk_widget_get_type gtk_widget_get_type; - static Ptr_gtk_widget_get_parent gtk_widget_get_parent; - static Ptr_gtk_widget_is_toplevel gtk_widget_is_toplevel; - static Ptr_gtk_widget_get_toplevel gtk_widget_get_toplevel; - static Ptr_gtk_rc_get_style_by_paths gtk_rc_get_style_by_paths; - static Ptr_gtk_check_version gtk_check_version; - static Ptr_gtk_border_free gtk_border_free; - static Ptr_gtk_widget_get_allocation gtk_widget_get_allocation; - static Ptr_gtk_widget_set_allocation gtk_widget_set_allocation; - static Ptr_gtk_widget_set_can_default gtk_widget_set_can_default; - static Ptr_gtk_window_set_default gtk_window_set_default; - - static Ptr_gdk_event_new gdk_event_new; - static Ptr_gdk_event_free gdk_event_free; - static Ptr_gtk_widget_send_focus_change gtk_widget_send_focus_change; - - static Ptr_pango_font_description_get_size pango_font_description_get_size; - static Ptr_pango_font_description_get_weight pango_font_description_get_weight; - static Ptr_pango_font_description_get_family pango_font_description_get_family; - static Ptr_pango_font_description_get_style pango_font_description_get_style; - - static Ptr_gdk_pixbuf_get_pixels gdk_pixbuf_get_pixels; - static Ptr_gdk_pixbuf_get_width gdk_pixbuf_get_width; - static Ptr_gdk_pixbuf_get_height gdk_pixbuf_get_height; - static Ptr_gdk_pixbuf_new gdk_pixbuf_new; - static Ptr_gdk_pixbuf_unref gdk_pixbuf_unref; - static Ptr_gdk_color_free gdk_color_free; - static Ptr_gdk_x11_window_set_user_time gdk_x11_window_set_user_time; - static Ptr_gdk_x11_drawable_get_xid gdk_x11_drawable_get_xid; - static Ptr_gdk_x11_drawable_get_xdisplay gdk_x11_drawable_get_xdisplay; - - static Ptr_gconf_client_get_default gconf_client_get_default; - static Ptr_gconf_client_get_string gconf_client_get_string; - static Ptr_gconf_client_get_bool gconf_client_get_bool; - - static Ptr_gnome_icon_lookup_sync gnome_icon_lookup_sync; - static Ptr_gnome_vfs_init gnome_vfs_init; - - virtual QPalette gtkWidgetPalette(const QHashableLatin1Literal >kWidgetName) const; - -protected: - typedef QHash WidgetMap; - - static inline void destroyWidgetMap() - { - cleanupGtkWidgets(); - delete widgetMap; - widgetMap = 0; - } - - static inline WidgetMap *gtkWidgetMap() - { - if (!widgetMap) { - widgetMap = new WidgetMap(); - qAddPostRoutine(destroyWidgetMap); - } - return widgetMap; - } - - static QStringList extract_filter(const QString &rawFilter); - - virtual GtkWidget* getTextColorWidget() const; - static void setupGtkWidget(GtkWidget* widget); - static void addWidgetToMap(GtkWidget* widget); - static void addAllSubWidgets(GtkWidget *widget, gpointer v = 0); - static void addWidget(GtkWidget *widget); - static void removeWidgetFromMap(const QHashableLatin1Literal &path); - - virtual void init(); - - enum { - menuItemFrame = 2, // menu item frame width - menuItemHMargin = 3, // menu item hor text margin - menuArrowHMargin = 6, // menu arrow horizontal margin - menuItemVMargin = 2, // menu item ver text margin - menuRightBorder = 15, // right border on menus - menuCheckMarkWidth = 12 // checkmarks width on menus - }; - -private: - static QList instances; - static WidgetMap *widgetMap; - friend class QGtkStyleUpdateScheduler; -}; - -// Helper to ensure that we have polished all our gtk widgets -// before updating our own palettes -class QGtkStyleUpdateScheduler : public QObject -{ - Q_OBJECT -public slots: - void updateTheme(); -}; - -QT_END_NAMESPACE - -#endif // !QT_NO_STYLE_GTK -#endif // QGTKSTYLE_P_P_H diff --git a/src/widgets/styles/qstylefactory.cpp b/src/widgets/styles/qstylefactory.cpp index 520e303d93..f651521cbd 100644 --- a/src/widgets/styles/qstylefactory.cpp +++ b/src/widgets/styles/qstylefactory.cpp @@ -44,9 +44,6 @@ #include "qandroidstyle_p.h" #endif #endif -#ifndef QT_NO_STYLE_GTK -#include "qgtkstyle_p.h" -#endif #ifndef QT_NO_STYLE_WINDOWSXP #include "qwindowsxpstyle_p.h" #endif @@ -86,7 +83,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, The valid keys can be retrieved using the keys() function. Typically they include "windows" and "fusion". - Depending on the platform, "windowsxp", "windowsvista", "gtk" + Depending on the platform, "windowsxp", "windowsvista" and "macintosh" may be available. Note that keys are case insensitive. @@ -143,11 +140,6 @@ QStyle *QStyleFactory::create(const QString& key) ret = new QAndroidStyle; else #endif -#ifndef QT_NO_STYLE_GTK - if (style == QLatin1String("gtk") || style == QLatin1String("gtk+")) - ret = new QGtkStyle; - else -#endif #ifndef QT_NO_STYLE_MAC if (style.startsWith(QLatin1String("macintosh"))) { ret = new QMacStyle; @@ -210,10 +202,6 @@ QStringList QStyleFactory::keys() if (!list.contains(QLatin1String("Android"))) list << QLatin1String("Android"); #endif -#ifndef QT_NO_STYLE_GTK - if (!list.contains(QLatin1String("GTK+"))) - list << QLatin1String("GTK+"); -#endif #ifndef QT_NO_STYLE_FUSION if (!list.contains(QLatin1String("Fusion"))) list << QLatin1String("Fusion"); diff --git a/src/widgets/styles/qstylesheetstyle_default.cpp b/src/widgets/styles/qstylesheetstyle_default.cpp index c3d00f1883..a444be006d 100644 --- a/src/widgets/styles/qstylesheetstyle_default.cpp +++ b/src/widgets/styles/qstylesheetstyle_default.cpp @@ -149,8 +149,7 @@ StyleSheet QStyleSheetStyle::getDefaultStyleSheet() const // pixmap based style doesn't support any features bool styleIsPixmapBased = baseStyle()->inherits("QMacStyle") - || baseStyle()->inherits("QWindowsXPStyle") - || baseStyle()->inherits("QGtkStyle"); + || baseStyle()->inherits("QWindowsXPStyle"); /*QLineEdit { diff --git a/src/widgets/styles/styles.pri b/src/widgets/styles/styles.pri index 3707090c4c..968429dc1e 100644 --- a/src/widgets/styles/styles.pri +++ b/src/widgets/styles/styles.pri @@ -42,13 +42,6 @@ contains( styles, all ) { !macx:styles -= mac -contains(QT_CONFIG, gtkstyle) { - QMAKE_CXXFLAGS += $$QT_CFLAGS_QGTKSTYLE - LIBS_PRIVATE += $$QT_LIBS_QGTKSTYLE - styles += gtk - CONFIG += x11 -} - contains( styles, mac ) { HEADERS += \ styles/qmacstyle_mac_p.h \ @@ -90,19 +83,6 @@ contains( styles, windows ) { DEFINES += QT_NO_STYLE_WINDOWS } -contains( styles, gtk ) { - HEADERS += styles/qgtkglobal_p.h - HEADERS += styles/qgtkstyle_p.h - HEADERS += styles/qgtkpainter_p.h - HEADERS += styles/qgtk2painter_p.h - HEADERS += styles/qgtkstyle_p_p.h - SOURCES += styles/qgtkstyle.cpp - SOURCES += styles/qgtkpainter.cpp - SOURCES += styles/qgtk2painter.cpp - SOURCES += styles/qgtkstyle_p.cpp -} else { - DEFINES += QT_NO_STYLE_GTK -} contains( styles, fusion ) { HEADERS += styles/qfusionstyle_p.h HEADERS += styles/qfusionstyle_p_p.h diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index aa523ab629..85ddc7f710 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -2889,9 +2889,6 @@ void tst_QGraphicsView::scrollBarRanges() QFETCH(ExpectedValueDescription, vmax); QFETCH(bool, useStyledPanel); - if (style == QLatin1String("GTK+") && useStyledPanel) - QSKIP("GTK + style test skipped, see QTBUG-29002"); - if (useStyledPanel && style == QStringLiteral("Macintosh") && platformName == QStringLiteral("cocoa")) QSKIP("Insignificant on OSX"); QGraphicsScene scene; diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp index 44a554ad82..1657751605 100644 --- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp +++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp @@ -537,9 +537,6 @@ void tst_QPushButton::sizeHint_data() #if !defined(QT_NO_STYLE_WINDOWS) QTest::newRow("windows") << QString::fromLatin1("windows"); #endif -#if !defined(QT_NO_STYLE_GTK) - QTest::newRow("gtk") << QString::fromLatin1("gtk"); -#endif #if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC) QTest::newRow("macintosh") << QString::fromLatin1("macintosh"); #endif diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index c4455eeb63..9cb79e976b 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -280,7 +280,6 @@ Configure::Configure(int& argc, char** argv) dictionary[ "STYLE_FUSION" ] = "yes"; dictionary[ "STYLE_WINDOWSCE" ] = "no"; dictionary[ "STYLE_WINDOWSMOBILE" ] = "no"; - dictionary[ "STYLE_GTK" ] = "no"; dictionary[ "SQL_MYSQL" ] = "no"; dictionary[ "SQL_ODBC" ] = "no"; @@ -3608,7 +3607,6 @@ void Configure::generateConfigfiles() if (dictionary["STYLE_WINDOWSVISTA"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSVISTA"; if (dictionary["STYLE_WINDOWSCE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSCE"; if (dictionary["STYLE_WINDOWSMOBILE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSMOBILE"; - if (dictionary["STYLE_GTK"] != "yes") qconfigList += "QT_NO_STYLE_GTK"; if (dictionary["GIF"] == "yes") qconfigList += "QT_BUILTIN_GIF_READER=1"; if (dictionary["PNG"] != "yes") qconfigList += "QT_NO_IMAGEFORMAT_PNG";