svtools/source/control/ruler.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 2174b56ffb5817e42c8b4f6891214fcb67c55b30 Author: Justin Luth <justin_l...@sil.org> AuthorDate: Fri Jan 21 15:43:47 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Jan 31 12:27:48 2022 +0100 tdf#83523 ruler: Invalidate full ruler rect on app bg change Instead of waiting for the application to restart, hack out an immediate invalidation of the ruler. Perhaps there is a better place to do this because the ruler background apparently IS changing, but it seems to require a hack to invalidate everything. Change-Id: I4a27cbaf484e96c19c71c04017c649e95bf80d96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128733 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index d3d5af0e00de..07e030aac109 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -994,6 +994,12 @@ void Ruler::ApplySettings(vcl::RenderContext& rRenderContext) svtools::ColorConfig aColorConfig; aColor = aColorConfig.GetColorValue(svtools::APPBACKGROUND).nColor; ApplyControlBackground(rRenderContext, aColor); + // A hack to get it to change the non-ruler application background to change immediately + if (aColor != maVirDev->GetBackground().GetColor()) + { + maVirDev->SetBackground(aColor); + Resize(); + } } void Ruler::ImplInitSettings(bool bFont, bool bForeground, bool bBackground)