basctl/source/basicide/linenumberwindow.cxx |    4 +++-
 basctl/source/basicide/linenumberwindow.hxx |    1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f0334d62da608e140073e8831fdbbd0b5e4b1e39
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Wed Nov 17 15:38:02 2021 +0100
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Thu Nov 18 07:02:26 2021 +0100

    Resolves tdf#143462 - Fixes black row number on dark backgroud in Basic IDE
    
    Using WindowColor for background and WindowTextColor for font color now
    
    Change-Id: Ie7bcb66d43673722ac882ac3cd59c7d9106f3020
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125403
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/basctl/source/basicide/linenumberwindow.cxx 
b/basctl/source/basicide/linenumberwindow.cxx
index be9fe3752045..7dcbff0ddd7f 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -21,7 +21,8 @@ LineNumberWindow::LineNumberWindow(vcl::Window* pParent, 
ModulWindow* pModulWind
     , m_pModulWindow(pModulWindow)
     , m_nCurYOffset(0)
 {
-    SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetFieldColor()));
+    
SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetWindowColor()));
+    m_FontColor = GetSettings().GetStyleSettings().GetWindowTextColor();
     m_nBaseWidth = GetTextWidth("8");
     m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2;
 }
@@ -78,6 +79,7 @@ void LineNumberWindow::Paint(vcl::RenderContext& 
rRenderContext, const tools::Re
     }
 
     sal_Int64 y = (nStartLine - 1) * static_cast<sal_Int64>(nLineHeight);
+    rRenderContext.SetTextColor(m_FontColor);
     for (sal_uInt32 n = nStartLine; n <= nEndLine; ++n, y += nLineHeight)
         rRenderContext.DrawText(Point(0, y - m_nCurYOffset), 
OUString::number(n));
 }
diff --git a/basctl/source/basicide/linenumberwindow.hxx 
b/basctl/source/basicide/linenumberwindow.hxx
index 14305116ef10..a2e457f71103 100644
--- a/basctl/source/basicide/linenumberwindow.hxx
+++ b/basctl/source/basicide/linenumberwindow.hxx
@@ -22,6 +22,7 @@ private:
     int m_nWidth;
     tools::Long m_nCurYOffset;
     int m_nBaseWidth;
+    Color m_FontColor;
     virtual void DataChanged(DataChangedEvent const& rDCEvt) override;
 
 protected:

Reply via email to