diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-07-19 23:28:47 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-07-20 15:03:07 +0200 |
commit | ec77a2ed0283cb3446f6e352fc329afd3dfb785c (patch) | |
tree | 73295fe0cfbd4fad5d42d6c4933bf3b7df683503 /vcl/qt5/Qt5Frame.cxx | |
parent | 6c294343edc283aed0af392c09779fee572c0c4c (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>
Diffstat (limited to 'vcl/qt5/Qt5Frame.cxx')
-rw-r--r-- | vcl/qt5/Qt5Frame.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
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); } |