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.tietze@documentfoundation.org>
This commit is contained in:
Heiko Tietze 2021-11-17 15:38:02 +01:00 committed by Heiko Tietze
parent 4be0ae1906
commit f0334d62da
2 changed files with 4 additions and 1 deletions

View file

@ -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));
}

View file

@ -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: