diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-07-19 23:28:47 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-07-21 04:05:09 +0200 |
commit | 83f91ec066614c3c40282913898083d317edd072 (patch) | |
tree | fe2733c62ab9e6dd9713989c5c13f3a71fa7edc1 /vcl | |
parent | c8f149c62e37a465944f7aea65822b37a4836a27 (diff) |
tdf#143334 Qt5 don't reset buffer on style change
This bug was "unveiled" by commit
963f252cd1ea9c268a6ced68a3454b10cbee1a89 ("Qt5/KF5 get rid
of unneeded own grahics handling"). I'm not sure why I ever came
up with that code. Eventually we would need a paint event, but at
least changing the theme correctly updated LO UI, so that seems
to be handled correctly.
Change-Id: I528b551180be184427eeeeeb2977e2b7da073ce6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119237
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit ec77a2ed0283cb3446f6e352fc329afd3dfb785c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119190
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/qt5/Qt5Frame.hxx | 1 | ||||
-rw-r--r-- | vcl/qt5/Qt5Frame.cxx | 8 |
2 files changed, 2 insertions, 7 deletions
diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx index 62877e15e89a..f90936528399 100644 --- a/vcl/inc/qt5/Qt5Frame.hxx +++ b/vcl/inc/qt5/Qt5Frame.hxx @@ -83,7 +83,6 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public SalFrame bool m_bNullRegion; bool m_bGraphicsInUse; - bool m_bGraphicsInvalid; SalFrameStyleFlags m_nStyle; Qt5Frame* m_pParent; PointerStyle m_ePointerStyle; diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 36ce1222cb5e..6dc54d9408e3 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -105,7 +105,6 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo) , m_bUseCairo(bUseCairo) , m_bNullRegion(true) , m_bGraphicsInUse(false) - , m_bGraphicsInvalid(false) , m_ePointerStyle(PointerStyle::Arrow) , m_pDragSource(nullptr) , m_pDropTarget(nullptr) @@ -296,7 +295,7 @@ SalGraphics* Qt5Frame::AcquireGraphics() if (m_bUseCairo) { - if (!m_pSvpGraphics || m_bGraphicsInvalid) + if (!m_pSvpGraphics) { QSize aSize = m_pQWidget->size() * devicePixelRatioF(); m_pSvpGraphics.reset(new Qt5SvpGraphics(this)); @@ -306,20 +305,18 @@ SalGraphics* Qt5Frame::AcquireGraphics() basegfx::B2IVector(aSize.width(), aSize.height())); cairo_surface_set_user_data(m_pSurface.get(), Qt5SvpGraphics::getDamageKey(), &m_aDamageHandler, nullptr); - m_bGraphicsInvalid = false; } return m_pSvpGraphics.get(); } else { - if (!m_pQt5Graphics || m_bGraphicsInvalid) + if (!m_pQt5Graphics) { m_pQt5Graphics.reset(new Qt5Graphics(this)); m_pQImage.reset( new QImage(m_pQWidget->size() * devicePixelRatioF(), Qt5_DefaultFormat32)); m_pQImage->fill(Qt::transparent); m_pQt5Graphics->ChangeQImage(m_pQImage.get()); - m_bGraphicsInvalid = false; } return m_pQt5Graphics.get(); } @@ -1153,7 +1150,6 @@ void Qt5Frame::UpdateSettings(AllSettings& rSettings) style.SetShadowColor(toColor(pal.color(QPalette::Disabled, QPalette::WindowText))); style.SetDarkShadowColor(toColor(pal.color(QPalette::Inactive, QPalette::WindowText))); - m_bGraphicsInvalid = true; rSettings.SetStyleSettings(style); } |