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

Current line background color faded #369

Closed
jiangzhenjerry opened this issue Sep 11, 2021 · 7 comments
Closed

Current line background color faded #369

jiangzhenjerry opened this issue Sep 11, 2021 · 7 comments
Labels
Milestone

Comments

@jiangzhenjerry
Copy link

Problem: The current line background is significantly lighter than what I set in the configuration.

Notepad2 version: 9f63a60, compiled on 9/10/2021, from AppVeyor
Windows version: Windows 11 Enterprise 64-bit Build 22454

How to reproduce:

  1. Set any color in Global Styles -> Current Line. In my example, I make it "back:#E8E8FF" (i.e, color only, no alpha transparency).
  2. (Optional) Preview by clicking the "Back..." button and make sure everything looks okay

Results: The current line background color is not #E8E8FF, but actually #F6F6FF.

sshot-1
sshot-2

@zufuliu
Copy link
Owner

zufuliu commented Sep 11, 2021

Current line (either frame or background color) without alpha (which means hides line text) is not supported. The default alpha is 90,
see https://github.com/zufuliu/notepad2/blob/master/src/Styles.c#L427

#define IMEIndicatorDefaultColor	RGB(0x10, 0x80, 0x10)
#define MarkOccurrencesDefaultAlpha	100
#define SelectionDefaultAlpha		95
#define CaretLineDefaultAlpha		90

@zufuliu
Copy link
Owner

zufuliu commented Sep 11, 2021

You can use alpha:255; to get the opaque color.

@jiangzhenjerry
Copy link
Author

jiangzhenjerry commented Sep 11, 2021

Thanks for your explanation. However, it makes me a little more confused. I assume this hard-coded default alpha is not a new thing, but the end results look different in the current version v.s. in the old version (say v4.21.05r3750). My configuration stays the same

Current Line=back:#E8E8FF

sshot-1

@zufuliu zufuliu added this to the v4.21.09 milestone Sep 12, 2021
zufuliu added a commit that referenced this issue Sep 12, 2021
@zufuliu
Copy link
Owner

zufuliu commented Sep 12, 2021

Thanks for the report, fixed by 4afeeb7.

@jiangzhenjerry
Copy link
Author

Thanks for the quick fix. I confirm that:
(1) The background is no longer blocking the text 👍
(2) Without specifying alpha, the background color is still lighter than in the old version; but the true color can be brought back by adding alpha:255; and then it will look the same as in the old version.

Feel free to close this issue ticket if (2) is a change by design.

zufuliu added a commit that referenced this issue Sep 12, 2021
Fixes wrong caret line configuration introduced by a2a1013.
@zufuliu
Copy link
Owner

zufuliu commented Sep 12, 2021

That's a regression by a2a1013 (because of the wrong layer configuration), fixed by 1acadf6.

@jiangzhenjerry
Copy link
Author

Cool. I confirm that everything in this issue ticket has been fixed. Thank you very much :) Closing it now.

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

No branches or pull requests

2 participants