summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qapplication.cpp6
-rw-r--r--src/widgets/kernel/qmacgesturerecognizer.cpp3
-rw-r--r--src/widgets/kernel/qwidget.cpp7
3 files changed, 11 insertions, 5 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index a8a0968ff8..4ff466e04b 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -454,6 +454,9 @@ QDesktopWidget *qt_desktopWidget = 0; // root window widgets
*/
void QApplicationPrivate::process_cmdline()
{
+ if (styleOverride.isEmpty() && qEnvironmentVariableIsSet("QT_STYLE_OVERRIDE"))
+ styleOverride = QString::fromLocal8Bit(qgetenv("QT_STYLE_OVERRIDE"));
+
if (!styleOverride.isEmpty()) {
if (app_style) {
delete app_style;
@@ -1086,11 +1089,8 @@ QStyle *QApplication::style()
// Compile-time search for default style
//
QString style;
- QString envStyle = QString::fromLocal8Bit(qgetenv("QT_STYLE_OVERRIDE"));
if (!QApplicationPrivate::styleOverride.isEmpty()) {
style = QApplicationPrivate::styleOverride.toLower();
- } else if (!envStyle.isEmpty()) {
- style = envStyle;
} else {
style = QApplicationPrivate::desktopStyleKey();
}
diff --git a/src/widgets/kernel/qmacgesturerecognizer.cpp b/src/widgets/kernel/qmacgesturerecognizer.cpp
index 7adccb9ed3..6dedd3c2d0 100644
--- a/src/widgets/kernel/qmacgesturerecognizer.cpp
+++ b/src/widgets/kernel/qmacgesturerecognizer.cpp
@@ -121,7 +121,8 @@ QMacPinchGestureRecognizer::recognize(QGesture *gesture, QObject *obj, QEvent *e
case Qt::ZoomNativeGesture:
g->setLastScaleFactor(g->scaleFactor());
g->setLastRotationAngle(g->rotationAngle());
- g->setScaleFactor(g->scaleFactor() * (1 + ev->value()));
+ g->setScaleFactor(1 + ev->value());
+ g->setTotalScaleFactor(g->totalScaleFactor() * g->scaleFactor());
g->setChangeFlags(QPinchGesture::ScaleFactorChanged);
g->setTotalChangeFlags(g->totalChangeFlags() | g->changeFlags());
g->setHotSpot(ev->screenPos());
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 426f206480..217a075b07 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -385,6 +385,7 @@ void QWidgetPrivate::updateWidgetTransform(QEvent *event)
t.translate(p.x(), p.y());
QGuiApplication::inputMethod()->setInputItemTransform(t);
QGuiApplication::inputMethod()->setInputItemRectangle(q->rect());
+ QGuiApplication::inputMethod()->update(Qt::ImInputItemClipRectangle);
}
}
@@ -5258,7 +5259,9 @@ QPixmap QWidget::grab(const QRect &rectangle)
if (!r.intersects(rect()))
return QPixmap();
- QPixmap res(r.size());
+ const qreal dpr = devicePixelRatioF();
+ QPixmap res((QSizeF(r.size()) * dpr).toSize());
+ res.setDevicePixelRatio(dpr);
if (!d->isOpaque)
res.fill(Qt::transparent);
d->render(&res, QPoint(), QRegion(r), renderFlags);
@@ -9763,6 +9766,8 @@ QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const
return inputMethodQuery(Qt::ImCursorPosition);
case Qt::ImHints:
return (int)inputMethodHints();
+ case Qt::ImInputItemClipRectangle:
+ return d_func()->clipRect();
default:
return QVariant();
}