Bug 150413 - Inappropriate color for autofilter text in dark mode
Summary: Inappropriate color for autofilter text in dark mode
Status: RESOLVED DUPLICATE of bug 147515
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-15 08:15 UTC by Heiko Tietze
Modified: 2022-08-15 08:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2022-08-15 08:15:27 UTC
Follow-up to bug 89841: Using a dark system theme, the blue text color for text when the autofilter is active is hard to read.

Possible solutions: 
* different hard-coded value; con: not customizable and potentially not appropriate too
* attaching the color to some application color, eg. hidden col/row; con: using the normal application colors wont work well

Current code tries to merge the system text color with light blue more or less depending on dark themes.

    bool bDark = rStyleSettings.GetFaceColor().IsDark();
    Color aAFilterTextColor = rStyleSettings.GetButtonTextColor();
    aAFilterTextColor.Merge(COL_LIGHTBLUE, bDark ? 150 : 10); // color of filtered row numbers

It works when I recompile/debug returning RGB = 9494fe (kf5/gtk3 -> dark) and 0000f5 (gen -> bright) but obviously not with Version: 7.3.5.2 (the patch was for 7.2) and probably not reliably (first test with master returned blue text color). I suspect COLOR.merge() to be buggy.


We could alternatively do something like aAFilterTextColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::CALCHIDDENROWCOL).nColor; but it mixes system theme color with application colors and is not appropriate too in many scenarios.
Comment 1 Heiko Tietze 2022-08-15 08:49:31 UTC
Solved the issue myself for bug 147515. Went into 7.4 and should be published soon.

*** This bug has been marked as a duplicate of bug 147515 ***