Bug 143462 - Basic IDE Dark Mode: Row numbers are black with dark background
Summary: Basic IDE Dark Mode: Row numbers are black with dark background
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Heiko Tietze
Whiteboard: target:7.3.0
Depends on:
Blocks: Options-Dialog-Colours
  Show dependency treegraph
Reported: 2021-07-20 19:03 UTC by Rafael Lima
Modified: 2021-11-18 13:30 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Image showing the problem (182.98 KB, application/vnd.oasis.opendocument.graphics)
2021-07-20 19:03 UTC, Rafael Lima
Dark theme on windows, so I cannot provide a patch, since I cannot check the outcome (79.28 KB, image/png)
2021-08-12 19:51 UTC, Andreas Heinisch

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2021-07-20 19:03:02 UTC
Created attachment 173718 [details]
Image showing the problem

This is a follow-up to Bug 141566. Dark mode in the Basic Editor is working alright in LO 7.2 beta 1.

However, the row numbers that appear to the left side of the editor are still black with a dark background (see attached ODG image).

I suggest using the color #62666B - rgb(98, 102, 107).

If someone can provide a code pointer, I can try to fix it.

System Info:
Version: / LibreOffice Community
Build ID: 32efc3b7f3a71cfa6a7fa3f6c208333df48656cc
CPU threads: 16; OS: Linux 5.11; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded
Comment 1 Rafael Lima 2021-07-20 19:05:07 UTC
Heiko, maybe you can provide a code pointer for this?
Comment 2 Heiko Tietze 2021-07-21 07:02:50 UTC
Changing the background color in basctl/source/baside/linenumberwindow.cxx to COL_RED make the background red. Simply doing SetTextColor(COL_RED); is not working but perhaps you can use this as start point.

The color is taken from tools > options > app colors: Custom Colors (the top-most section) > Font color (set to Automatic). But I'd be afraid of touching this - and actually expect it to follow the system theme.
Comment 3 Andreas Heinisch 2021-08-12 19:51:39 UTC
Created attachment 174243 [details]
Dark theme on windows, so I cannot provide a patch, since I cannot check the outcome

You may add 

const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
// Adjust color to your needs, there are a lot of TextColor fields in the settings

Comment 4 Commit Notification 2021-11-18 06:03:47 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":


Resolves tdf#143462 - Fixes black row number on dark backgroud in Basic IDE

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.