From 97ac77f067910fa5e8206d75160fa63546a9358d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 07:03:24 +0200 Subject: Merging upstream version 4:24.2.3. Signed-off-by: Daniel Baumann --- cui/source/dialogs/SpellDialog.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cui/source/dialogs') diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index dfdad984ec..9dd877f80c 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1152,6 +1152,13 @@ void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea) m_xEditEngine->SetStatusEventHdl(LINK(this, SentenceEditWindow_Impl, EditStatusHdl)); + SetDocumentColor(pDrawingArea); +} + +void SentenceEditWindow_Impl::SetDocumentColor(weld::DrawingArea* pDrawingArea) +{ + if (!pDrawingArea || !m_xEditView || !m_xEditEngine) + return; // tdf#142631 use document background color in this widget Color aBgColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; OutputDevice& rDevice = pDrawingArea->get_ref_device(); @@ -1160,6 +1167,12 @@ void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea) m_xEditEngine->SetBackgroundColor(aBgColor); } +void SentenceEditWindow_Impl::StyleUpdated() +{ + SetDocumentColor(GetDrawingArea()); + WeldEditView::StyleUpdated(); +} + IMPL_LINK_NOARG(SentenceEditWindow_Impl, EditStatusHdl, EditStatus&, void) { SetScrollBarRange(); -- cgit v1.2.3