sw/source/ui/config/optload.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit d45d65559f11ecb34b14e3b5c838391c62c8c694
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Dec 1 09:14:48 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Dec 1 11:08:20 2022 +0100

    Resolves: tdf#152329 Caption preview font is black when using OS dark mode
    
    Change-Id: I2ed9ae77ecb9a5a83d88dce5a2834e6c882cfec1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143515
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 9e3ba24a1f92..93d6b7e4dabe 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -375,10 +375,12 @@ SwCaptionPreview::SwCaptionPreview()
 
 void SwCaptionPreview::ApplySettings(vcl::RenderContext& rRenderContext)
 {
-    Wallpaper 
aBack(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor());
+    const StyleSettings& rSettings = 
rRenderContext.GetSettings().GetStyleSettings();
+    Wallpaper aBack(rSettings.GetWindowColor());
     rRenderContext.SetBackground(aBack);
     rRenderContext.SetFillColor(aBack.GetColor());
     rRenderContext.SetLineColor(aBack.GetColor());
+    rRenderContext.SetTextColor(rSettings.GetWindowTextColor());
 
     if (!mbFontInitialized)
     {

Reply via email to