summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-11-07 13:13:10 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2017-11-07 13:39:43 +0100
commite379f7ff4229a3c011e3a38ae06ed812c49ab0f8 (patch)
tree54b7e4e25834e22c5b16960a4f52274d63d28a8c /vcl/qt5
parent6f521e8b7d0fb60f173be56808559cac2e0c3a14 (diff)
QT5 queue paint update on show
Something like gtk_widget_set_redraw_on_allocate. On resize of dialogs, we still get artefacts, but at least you see something without forcing an event. And since there isn't any Qt5 theming yet, we let VCL paint the menus with a border. Change-Id: Ia2ff6b199ee25e481e3fb29a921b0d3d490f1535
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/Qt5Data.cxx2
-rw-r--r--vcl/qt5/Qt5Widget.cxx7
-rw-r--r--vcl/qt5/Qt5Widget.hxx16
3 files changed, 16 insertions, 9 deletions
diff --git a/vcl/qt5/Qt5Data.cxx b/vcl/qt5/Qt5Data.cxx
index f05e30ce662f..3d524bd11c71 100644
--- a/vcl/qt5/Qt5Data.cxx
+++ b/vcl/qt5/Qt5Data.cxx
@@ -34,8 +34,6 @@ Qt5Data::Qt5Data( SalInstance *pInstance )
// draw toolbars on separate lines
pSVData->maNWFData.mbDockingAreaSeparateTB = true;
- // no borders for menu, theming does that
- pSVData->maNWFData.mbFlatMenu = true;
}
Qt5Data::~Qt5Data()
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index 195b5f2b341e..e17cd7da1a10 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -28,6 +28,7 @@
#include <QtGui/QMouseEvent>
#include <QtGui/QPainter>
#include <QtGui/QPaintEvent>
+#include <QtGui/QShowEvent>
#include <QtGui/QWheelEvent>
#include <cairo.h>
@@ -167,5 +168,11 @@ void Qt5Widget::moveEvent( QMoveEvent* )
m_pFrame->CallCallback( SalEvent::Move, nullptr );
}
+void Qt5Widget::showEvent( QShowEvent* )
+{
+ QSize aSize( m_pFrame->m_pQWidget->size() );
+ SalPaintEvent aPaintEvt( 0, 0, aSize.width(), aSize.height(), true );
+ m_pFrame->CallCallback( SalEvent::Paint, &aPaintEvt );
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qt5/Qt5Widget.hxx b/vcl/qt5/Qt5Widget.hxx
index 83375278c738..bacd6ab403d0 100644
--- a/vcl/qt5/Qt5Widget.hxx
+++ b/vcl/qt5/Qt5Widget.hxx
@@ -27,6 +27,7 @@ class QMouseEvent;
class QMoveEvent;
class QPaintEvent;
class QResizeEvent;
+class QShowEvent;
class QWheelEvent;
class Qt5Widget
@@ -38,13 +39,14 @@ class Qt5Widget
void mouseButtonEvent( QMouseEvent*, bool );
- void paintEvent( QPaintEvent* ) override;
- void resizeEvent( QResizeEvent* ) override;
- void moveEvent( QMoveEvent* ) override;
- void mouseMoveEvent( QMouseEvent*) override;
- void mousePressEvent( QMouseEvent*) override;
- void mouseReleaseEvent( QMouseEvent*) override;
- void wheelEvent( QWheelEvent* ) override;
+ virtual void mouseMoveEvent( QMouseEvent*) override;
+ virtual void mousePressEvent( QMouseEvent*) override;
+ virtual void mouseReleaseEvent( QMouseEvent*) override;
+ virtual void moveEvent( QMoveEvent* ) override;
+ virtual void paintEvent( QPaintEvent* ) override;
+ virtual void resizeEvent( QResizeEvent* ) override;
+ virtual void showEvent( QShowEvent* ) override;
+ virtual void wheelEvent( QWheelEvent* ) override;
public:
Qt5Widget( Qt5Frame &rFrame,