diff options
author | Janne Koskinen <janne.p.koskinen@digia.com> | 2010-04-23 14:08:48 (GMT) |
---|---|---|
committer | Janne Koskinen <janne.p.koskinen@digia.com> | 2010-04-23 14:08:48 (GMT) |
commit | fecce960a050ef2964e28f373bf1a35f7d9949a3 (patch) | |
tree | 296ef35071a80076a5186e71696cddc88cc1a56f /src/gui/kernel/qapplication_win.cpp | |
parent | 02c65146610cdd5bfe1f3ee4656ba07af82afcc7 (diff) | |
parent | 15088d236924bccee787953e04214f87392e8e55 (diff) | |
download | Qt-fecce960a050ef2964e28f373bf1a35f7d9949a3.zip Qt-fecce960a050ef2964e28f373bf1a35f7d9949a3.tar.gz Qt-fecce960a050ef2964e28f373bf1a35f7d9949a3.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-webkit into 4.7
Diffstat (limited to 'src/gui/kernel/qapplication_win.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_win.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 1d8eb4c..fb2837e 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -79,6 +79,7 @@ extern void qt_wince_hide_taskbar(HWND hwnd); //defined in qguifunctions_wince.c #include "qlayout.h" #include "qtooltip.h" #include "qt_windows.h" +#include "qscrollbar.h" #if defined(QT_NON_COMMERCIAL) #include "qnc_win.h" #endif @@ -701,6 +702,21 @@ void QApplicationPrivate::initializeWidgetPaletteHash() QApplication::setPalette(menu, "QMenuBar"); } +static void qt_set_windows_updateScrollBar(QWidget *widget) +{ + QList<QObject*> children = widget->children(); + for (int i = 0; i < children.size(); ++i) { + QObject *o = children.at(i); + if(!o->isWidgetType()) + continue; + if (QWidget *w = static_cast<QWidget *>(o)) + qt_set_windows_updateScrollBar(w); + } + if (qobject_cast<QScrollBar*>(widget)) + widget->updateGeometry(); +} + + /***************************************************************************** qt_init() - initializes Qt for Windows *****************************************************************************/ @@ -1930,6 +1946,15 @@ extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wPa } } } + else if (msg.wParam == SPI_SETNONCLIENTMETRICS) { + widget = (QETWidget*)QWidget::find(hwnd); + if (widget && !widget->parentWidget()) { + qt_set_windows_updateScrollBar(widget); + QEvent e(QEvent::LayoutRequest); + QApplication::sendEvent(widget, &e); + } + } + break; case WM_PAINT: // paint event |