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
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.2.0.0.beta1+
Hardware: All All
: medium normal
Assignee: Heiko Tietze
URL:
Whiteboard: target:7.3.0
Keywords:
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:


Attachments
Image showing the problem (182.98 KB, application/vnd.oasis.opendocument.graphics)
2021-07-20 19:03 UTC, Rafael Lima
Details
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
Details

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: 7.2.0.1 / 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
rRenderContext.SetTextColor(rStyleSettings.GetFieldTextColor());

https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/linenumberwindow.cxx?r=6da61d5f#80
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":

https://git.libreoffice.org/core/commit/f0334d62da608e140073e8831fdbbd0b5e4b1e39

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

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