diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/effects/qgraphicseffect.cpp | 12 | ||||
-rw-r--r-- | src/gui/egl/qegl.cpp | 23 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 8 | ||||
-rw-r--r-- | src/gui/widgets/qdockarealayout.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qmainwindowlayout.cpp | 1 |
5 files changed, 23 insertions, 23 deletions
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp index 7d1d03d..ce4ce6a 100644 --- a/src/gui/effects/qgraphicseffect.cpp +++ b/src/gui/effects/qgraphicseffect.cpp @@ -726,7 +726,8 @@ void QGraphicsColorizeEffect::draw(QPainter *painter) elements. The level of detail can be modified using the setBlurRadius() function. Use setBlurHints() to choose the blur hints. - By default, the blur radius is 5 pixels. + By default, the blur radius is 5 pixels. The blur radius is specified in + device coordinates. \img graphicseffect-blur.png @@ -781,6 +782,9 @@ QGraphicsBlurEffect::~QGraphicsBlurEffect() radius results in a more blurred appearance. By default, the blur radius is 5 pixels. + + The radius is given in device coordinates, meaning it is + unaffected by scale. */ qreal QGraphicsBlurEffect::blurRadius() const { @@ -884,7 +888,8 @@ void QGraphicsBlurEffect::draw(QPainter *painter) By default, the drop shadow is a semi-transparent dark gray (QColor(63, 63, 63, 180)) shadow, blurred with a radius of 1 at an offset - of 8 pixels towards the lower right. + of 8 pixels towards the lower right. The drop shadow offset is specified + in device coordinates. \img graphicseffect-drop-shadow.png @@ -913,6 +918,9 @@ QGraphicsDropShadowEffect::~QGraphicsDropShadowEffect() By default, the offset is 8 pixels towards the lower right. + The offset is given in device coordinates, which means it is + unaffected by scale. + \sa xOffset(), yOffset(), blurRadius(), color() */ QPointF QGraphicsDropShadowEffect::offset() const diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 4d447cb..0ed95ea 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -101,7 +101,7 @@ bool QEglContext::chooseConfig // If we want the best pixel format, then return the first // matching configuration. if (match == QEgl::BestPixelFormat) { - eglChooseConfig(dpy, props.properties(), &cfg, 1, &matching); + eglChooseConfig(display(), props.properties(), &cfg, 1, &matching); if (matching < 1) continue; return true; @@ -111,13 +111,13 @@ bool QEglContext::chooseConfig // first that matches the pixel format we wanted. EGLint size = matching; EGLConfig *configs = new EGLConfig [size]; - eglChooseConfig(dpy, props.properties(), configs, size, &matching); + eglChooseConfig(display(), props.properties(), configs, size, &matching); for (EGLint index = 0; index < size; ++index) { EGLint red, green, blue, alpha; - eglGetConfigAttrib(dpy, configs[index], EGL_RED_SIZE, &red); - eglGetConfigAttrib(dpy, configs[index], EGL_GREEN_SIZE, &green); - eglGetConfigAttrib(dpy, configs[index], EGL_BLUE_SIZE, &blue); - eglGetConfigAttrib(dpy, configs[index], EGL_ALPHA_SIZE, &alpha); + eglGetConfigAttrib(display(), configs[index], EGL_RED_SIZE, &red); + eglGetConfigAttrib(display(), configs[index], EGL_GREEN_SIZE, &green); + eglGetConfigAttrib(display(), configs[index], EGL_BLUE_SIZE, &blue); + eglGetConfigAttrib(display(), configs[index], EGL_ALPHA_SIZE, &alpha); if (red == props.value(EGL_RED_SIZE) && green == props.value(EGL_GREEN_SIZE) && blue == props.value(EGL_BLUE_SIZE) && @@ -181,7 +181,7 @@ bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties } } if (ctx == EGL_NO_CONTEXT) { - ctx = eglCreateContext(dpy, cfg, 0, contextProps.properties()); + ctx = eglCreateContext(display(), cfg, 0, contextProps.properties()); if (ctx == EGL_NO_CONTEXT) { qWarning() << "QEglContext::createContext(): Unable to create EGL context:" << errorString(eglGetError()); return false; @@ -197,7 +197,7 @@ void QEglContext::destroySurface(EGLSurface surface) if (surface != EGL_NO_SURFACE) { if (surface == currentSurface) doneCurrent(); - eglDestroySurface(dpy, surface); + eglDestroySurface(display(), surface); } } @@ -205,8 +205,7 @@ void QEglContext::destroySurface(EGLSurface surface) void QEglContext::destroyContext() { if (ctx != EGL_NO_CONTEXT && ownsContext) - eglDestroyContext(dpy, ctx); - dpy = EGL_NO_DISPLAY; + eglDestroyContext(display(), ctx); ctx = EGL_NO_CONTEXT; cfg = 0; } @@ -343,7 +342,7 @@ QEglProperties QEglContext::configProperties(EGLConfig cfg) const QEglProperties props; for (int name = 0x3020; name <= 0x304F; ++name) { EGLint value; - if (name != EGL_NONE && eglGetConfigAttrib(dpy, cfg, name, &value)) + if (name != EGL_NONE && eglGetConfigAttrib(display(), cfg, name, &value)) props.setValue(name, value); } eglGetError(); // Clear the error state. @@ -417,7 +416,7 @@ void QEglContext::dumpAllConfigs() if (!eglGetConfigs(display(), 0, 0, &count) || count < 1) return; EGLConfig *configs = new EGLConfig [count]; - eglGetConfigs(dpy, configs, count, &count); + eglGetConfigs(display(), configs, count, &count); for (EGLint index = 0; index < count; ++index) { props = configProperties(configs[index]); qWarning() << props.toString(); diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 4a4792a..3c2cc8c 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -100,10 +100,6 @@ #endif #include <limits.h> -#if defined(QT_NO_FPU) || (_MSC_VER >= 1300 && _MSC_VER < 1400) -# define FLOATING_POINT_BUGGY_OR_NO_FPU -#endif - QT_BEGIN_NAMESPACE extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp @@ -1827,7 +1823,6 @@ void QRasterPaintEngine::fill(const QVectorPath &path, const QBrush &brush) } } -#ifndef FLOATING_POINT_BUGGY_OR_NO_FPU if (path.shape() == QVectorPath::EllipseHint) { if (!s->flags.antialiased && s->matrix.type() <= QTransform::TxScale) { const qreal *p = path.points(); @@ -1847,7 +1842,6 @@ void QRasterPaintEngine::fill(const QVectorPath &path, const QBrush &brush) } } } -#endif // ### Optimize for non transformed ellipses and rectangles... QRectF cpRect = path.controlPointRect(); @@ -3674,7 +3668,6 @@ void QRasterPaintEngine::drawLines(const QLineF *lines, int lineCount) */ void QRasterPaintEngine::drawEllipse(const QRectF &rect) { -#ifndef FLOATING_POINT_BUGGY_OR_NO_FPU Q_D(QRasterPaintEngine); QRasterPaintEngineState *s = state(); @@ -3697,7 +3690,6 @@ void QRasterPaintEngine::drawEllipse(const QRectF &rect) return; } } -#endif QPaintEngineEx::drawEllipse(rect); } diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp index d754800..0c39f42 100644 --- a/src/gui/widgets/qdockarealayout.cpp +++ b/src/gui/widgets/qdockarealayout.cpp @@ -2635,7 +2635,7 @@ void QDockAreaLayout::getGrid(QVector<QLayoutStruct> *_ver_struct_list, QSize bottom_max = docks[QInternal::BottomDock].maximumSize(); bottom_hint = bottom_hint.boundedTo(bottom_max).expandedTo(bottom_min); - fallbackToSizeHints = !have_central; + fallbackToSizeHints = false; if (_ver_struct_list != 0) { QVector<QLayoutStruct> &ver_struct_list = *_ver_struct_list; diff --git a/src/gui/widgets/qmainwindowlayout.cpp b/src/gui/widgets/qmainwindowlayout.cpp index fc75c92..593e391 100644 --- a/src/gui/widgets/qmainwindowlayout.cpp +++ b/src/gui/widgets/qmainwindowlayout.cpp @@ -1772,6 +1772,7 @@ void QMainWindowLayout::setCentralWidget(QWidget *widget) if (savedState.isValid()) { #ifndef QT_NO_DOCKWIDGET savedState.dockAreaLayout.centralWidgetItem = layoutState.dockAreaLayout.centralWidgetItem; + savedState.dockAreaLayout.fallbackToSizeHints = true; #else savedState.centralWidgetItem = layoutState.centralWidgetItem; #endif |