summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2022-01-21 15:43:47 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-01-31 12:27:48 +0100
commit2174b56ffb5817e42c8b4f6891214fcb67c55b30 (patch)
treee2aae9dff53accf86c50355b77ca1812ff54b60f /svtools
parentad1da9345b75dbe3ed9c503916c83c38d8a2e22f (diff)
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 <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ruler.cxx6
1 files changed, 6 insertions, 0 deletions
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)