-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Bug]: 0.118.0 No cursor when using black text on white background (regression: worked in 0.117.0) #2653
Comments
Can you provide screenshots for differences or at least of issue and the exact theme you are using. |
I was just using white background colour and black foreground in colors.properties but the same thing happens with any white background, for instance, the "black on white" style. termux.mp4Attached is a quick demonstration - at the end i'm pressing cursor-left - you can see how the text on the command line I just had a further look around, and this looks suspect: 4a74618 I tried adding this to colors.properties but it didn't do anything: cursor: #ffA9AAA9 I can't compile the source at the moment, so I wasn't able to try regressing the above patch. It would seem to be useful if the default cursor colour was dark when the background colour is close to white. Or maybe an option to set the cursor colour? Let me know if you need anything else. Thanks, Jamie (Apologies for the edits, my browser went mental and I had to force-close it) |
You need to add
Yeah, previously default color was grey and was changed to white with the commit cause its easier to read text with white as contrast. However, issue is not with the commit, but with the color themes. "Some" don't have The default color will not be changed though since if you are using custom theme, then it's your responsibility to set colors appropriately. There should ideally have been a wiki for it.
Well... Now, that you mention it...
Yeah, yeah, blame the poor browser... |
When using android dark mode, the cursor color in color.properties is completely ignored, and is alway black. |
It's working fine on my android 11. Dark mode with What's your termux app version? Post |
Yep just verified again, this is only an issue when using android dark mode, it ignores the cursor color.
|
So actual file name is |
hmmm, I even installed github I'll test with android avd later and report back, could be a device specific issue. Are you using f-droid or github builds in case debugging is required? Was it broken on older releases as well or |
f-droid builds. I don't know if it worked or was broken previously, as this is the only version of termux I've used. |
The thing is, this is "what I did", but rather, I chose the original grey cursor as shown above, but it didn't work. If it had, I'd not have logged the ticket.... But... I was an idiot (again). If you look at the command I quoted, I had an extra "ff" before the colour code. Removing it and everything works as expected.
That makes sense, and I'd have come to the same conclusion if I'd managed to set "cursor" correctly. My stupid mistake made me think "cursor" wasn't an accepted instruction (I couldn't see it in the docs)
Yes, and that's what I attempted to do, but the cockup was mine. My only suggestion - it may avoid stupid tickets like this, and ones regarding themes... How about, if cursor color isn't set by the users config, instead of default it to #ffffff always, instead set it to #000000 if background-color >> #800000
gulp me and my big mouth!
Well, I know my track record doesn't really support my case, but that's the excuse I'm sticking with. If you don't believe that, then how about "my dog ate my browser", or my cat posted the comment when I was preparing food for him (he's sly that way) Anything but take personal responsibility, of course! slips off embarrassedly |
@Jamie-Landeg-Jones so, the problem is solved? |
Apologies for the delay - I missed the notification for this. It's "solved' for me, in that I could manually change the cursor color after I realised I messed up my original attempt. The other issues reported in this thread are presumably still present. I don't know the intricacies of the code, so this may be dumb, but I did suggest that if no cursor color is specified, default it to black for light backgrounds, white otherwise. Brightness can be calculated using something like. sqrt (c.R * c.R * .241 + c.G * c.G * .691 + c.B * c.B * .068) (from https://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx ) |
@agnostic-apollo i think you can close this issue |
@Jamie-Landeg-Jones thanks for the math! I have added your request and seems to be working good with different backgrounds. You can test yourself if using github builds. https://github.com/termux/termux-app/actions/runs/2509680073 https://github.com/termux/termux-app#Installation
Too late now, time to pay up! ;)
That's not how you are supposed to bury your browser history!
Me at @termux does not let people get away that easily. You stay right here. |
@dessalines Sorry dude, I tried again and can't reproduce it. A video would be helpful, you can also send me privately at [email protected] Does it happen outside text editors too? Best way to debug this would be with logs. I can add them to the app and you can install and send them back. But you would need to use github builds. Since you installed from F-Droid, you would have to uninstall it first due to different signing keys of F-Droid and github builds, optionally after backing up. Let me know if you are willing to do that. |
If reinstalling from github, use the build at https://github.com/termux/termux-app/actions/runs/2518728695 instead, it has an unrelated bug fix for bootstrap not being installed. |
I reinstalled and it appeared to fix the issue. |
Great. Thanks. |
… instead of always white if colors.properties didn't have cursor color set Credit for algorithm link belong to @Jamie-Landeg-Jones Closes termux#2653
… instead of always white if colors.properties didn't have cursor color set Credit for algorithm link belong to @Jamie-Landeg-Jones Closes termux#2653
… instead of always white if colors.properties didn't have cursor color set Credit for algorithm link belong to @Jamie-Landeg-Jones Closes #2653
Problem description
Whilst it was fine in 0.117.0, the cursor is no longer visible with 0.118.0 when using a black text on white background theme.
Steps to reproduce the behavior.
install 0.118.0 and set the foreground and background colours appropriately, or install one of the black on white themes
What is the expected behavior?
A visible cursor!
System information
The text was updated successfully, but these errors were encountered: