Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text color used in bottom of Find dialog box makes text almost impossible to read when using a dark theme/mode #9309

Open
Gitoffthelawn opened this issue Dec 27, 2020 · 6 comments

Comments

@Gitoffthelawn
Copy link
Contributor

Description of the Issue

After performing the Count action in the Find dialog box, the results of the action are displayed in the bottom row of the Find dialog box. The foreground color used for that text makes the text almost impossible to read when using a dark theme in Windows.

Steps to Reproduce the Issue

  1. Create a dark theme in Windows
  2. Open a text file in Notepad++
  3. Open Notepad++'s Find dialog box
  4. Perform a Count operation for any string in the file opened in Step 2
  5. Notice that the Count results are almost impossible to read at the bottom of the Find dialog box

Expected Behavior

Be able to read all text in Notepad++ UI.

Actual Behavior

Some of the text in the Notepad++ UI is almost impossible to read.

Debug Information

Notepad++ v7.9.1 (32-bit)
Build time : Nov 2 2020 - 01:03:56
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 7 (64-bit)
OS Build : 7601.0

Additional Information

Here is a screenshot:
_npp

  • The first question is: From where does Notepad++ get this dark blue color? It is not a color specified in the dark OS theme. I'm very interested in the answer to this question, as there are a few other applications that seem to use this same color.
  • The next question is: Can Notepad++ simply employ a user-defined color for this text?
@Gitoffthelawn Gitoffthelawn changed the title Text color used in bottom of Find dialog box makes text almost impossible to read Text color used in bottom of Find dialog box makes text almost impossible to read when using a dark theme/mode Dec 27, 2020
@chcg
Copy link
Contributor

chcg commented Dec 27, 2020

Colour values seem to be hardcoded here:

if (_statusbarFindStatus == FSNotFound)
{
fgColor = RGB(0xFF, 00, 00); // red
}
else if (_statusbarFindStatus == FSMessage)
{
fgColor = RGB(0, 0, 0xFF); // blue
}
else if (_statusbarFindStatus == FSTopReached || _statusbarFindStatus == FSEndReached)
{
fgColor = RGB(0, 166, 0); // green
}
else if (_statusbarFindStatus == FSNoMessage)
{
ptStr = TEXT("");
}

@sasumner
Copy link
Contributor

See #5087

@Gitoffthelawn
Copy link
Contributor Author

Gitoffthelawn commented Dec 27, 2020

@chcg Good find! Thanks! Hardcoded values... ugh! Instead of hardcoding those values would it be fairly easy to load them from a settings file?

In the short-term, the colors could be set from values manually assigned in config.xml or the current Notepad++ theme file, and in the long-term, 3 input fields could be added to the Preferences dialog box to allow the user to change them.

What do you think?

@adzm
Copy link
Contributor

adzm commented Jan 13, 2021

How are you creating a dark theme for the win32 components in the first place? This is a uxtheme, right? I recall some hacks to do this a long while ago, but not sure how that works now.

@Gitoffthelawn
Copy link
Contributor Author

Gitoffthelawn commented Jan 14, 2021

@adzm I create my own .theme files for Windows (ironically, in Notepad+++). If you don't have anything set up to use a standard Windows .theme file, this will do it:

%SystemRoot%\system32\rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"%1"

@pryrt
Copy link
Contributor

pryrt commented Apr 27, 2024

According to Community Forum post "How to change the color...of the notification in the search box", 4 years later, users are still asking for this feature.

Please note: there are 3 colors for that status line -- failed search (red), successful count or mark (blue), and successful-search-wraps-around (green). It would be nice if all three of those colors were customizable. (Or possibly if the blue and green were merged so there's only "success" and "failure" colors.)

And it would make sense if the "failure" color was defined by the Preferences > Dark Mode > Tones > Error, and "success" was defined by a new color (or two) in that list of Tones. (Or alternately, if those two or three colors were defined in the Preferences > Searching.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants