diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-08-30 10:45:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-08-30 12:45:24 +0200 |
commit | 6af64a35270678ce07a9c2e5e3aeaa7507f79710 (patch) | |
tree | f655aa94e8875c6bc6f867cda4ad984674cf461c /starmath | |
parent | d2272426cc79d9aacf4a34c5fd7744b59c29e95b (diff) |
its not ideal to wait until Paint to set the bg color
set it at construction time
Change-Id: I8923ea8f79c4bf18054fc697e2b35caad1b12486
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139024
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/edit.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index a0e75f18b408..1c92b03fb2b1 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -100,6 +100,12 @@ void SmEditTextWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea) { weld::CustomWidgetController::SetDrawingArea(pDrawingArea); + const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + Color aBgColor = rStyleSettings.GetWindowColor(); + + OutputDevice& rDevice = pDrawingArea->get_ref_device(); + rDevice.SetBackground(aBgColor); + SetHelpId(HID_SMA_COMMAND_WIN_EDIT); EnableRTL(false); @@ -113,6 +119,8 @@ void SmEditTextWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea) m_xEditView->SetOutputArea(mrEditWindow.AdjustScrollBars()); + m_xEditView->SetBackgroundColor(aBgColor); + pDrawingArea->set_cursor(PointerStyle::Text); pEditEngine->SetStatusEventHdl(LINK(this, SmEditTextWindow, EditStatusHdl)); |