Cudatext: hide the cursor in input while it is not focused.

Created on 22 May 2020  Β·  37Comments  Β·  Source: Alexey-T/CudaText

a
Where am I??

hard toddelayed

Most helpful comment

Next iteration of fixes!! beta updated. now I tried to totally ignore caret paint code. seems better now? no even ramaining light block?
@kvichans @Jairo-Martinez @xcme @tmsg-gh

All 37 comments

We have option ui_active_border
to help with that.

I believe CudaText is the only program still shows cursor after lost focus?
It will be nice to have something like ui_active_cursor.

Hi @Alexey-T
If I enter to Plugins->Options Editor... the carets remains but when I close the Dialog, the only caret that remains is the Editor one.

interesting. I will look at this issue and maybe at how to hide the cursor..

tried to hide the caret, did changes. not succeed. not easy to solve.

Several changes have been made for Find dialog and logic last days. Might this issue be fixed as well?

Nope, it must be changed in the core, and it's hard.

Some ideas on this:

  1. Could the Status bar contain information about the active panel? I may have a new field "Active windows: XYZ".
  2. I think the main issue with the Find dialog. Can it have bold font? (Find when the focus is on it). Or may we have an opportunity to increase border width and color for this field? See the picture.
    image

we have the opt "ui_active_border" which highlights the active input with a dark-navy. it works for Find-what field. and for replace-with field. etc. (but not for main editor).

so why do we need an additional statusbar cell? it will be irritating.

Honestly, I don't know the right answer but for me it related to #2988. It now contains hotkey Alt+H for 'highlight all' but the same hotkey brings up Help menu while pressing in main editor. I've had such wrong pressing several times and realized it sometimes not obvious where I am, so I remember about this issue. Yes, we have a border here but it didn't help me :)

Is it easy to add 'ui_active_border_thickness=2' and 'ui_active_border_theme_param=SeparLine' for instance to have some control on it? I'm not insisting, just asking.

Alt+H for 'highlight all' but the same hotkey brings up Help menu

okay, I cleared the default hotkeys for Alt+H "Hi" and for "Syntax elements" too.

Is it easy to add 'ui_active_border_thickness=2'

I will write the new issue in GH about it.

@Alexey-T could you change cursor's color to bg_color when control doesn't have focus?

added OlehL's idea, it's better now!
let's test beta
http://www.uvviewsoft.com/c/

@akizuha @OlehL @kvichans @MiroslavMatas @Jairo-Martinez @xcme

ΠšΠ°Ρ€Π΅Ρ‚ΠΊΠ° Π² Π΄ΠΈΠ°Π»ΠΎΠ³Π΅ Поиск/Π—Π°ΠΌΠ΅Π½Π° Π΄Π΅ΠΉΡΡ‚Π²ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎ ΠΈΠ·ΠΌΠ΅Π½ΠΈΠ»Π° Ρ†Π²Π΅Ρ‚ Π² Π½Π΅Π°ΠΊΡ‚ΠΈΠ²Π½ΠΎΠΌ ΠΊΠΎΠ½Ρ‚Ρ€ΠΎΠ»Π΅
image

Но ΠΏΡ€ΠΈ этом Π² Π°ΠΊΡ‚ΠΈΠ²Π½ΠΎΠΌ ΠΊΠ°Ρ€Π΅Ρ‚ΠΊΠ° стала ΠΌΠΈΠ³Π°ΡŽΡ‰Π΅ΠΉ. Как Π²Π΅Ρ€Π½ΡƒΡ‚ΡŒ Π½Π΅ΠΌΠΈΠ³Π°ΡŽΡ‰ΡƒΡŽ? (Π’ Ρ‚Π°Π±Π΅ ΠΎΡΡ‚Π°Π»Π°ΡΡŒ Π½Π΅ΠΌΠΈΠ³Π°ΡŽΡ‰Π°Ρ)

image
I downloaded last beta, but everything looks the same.

works fine here…
appreciate this feature

@OlehL adjusted the color of unfocused caret; now it's better for 'ebony' and 'cobalt' themes.

@kvichans Opt 'caret_blink_en':false? I see it ignores controls others than main editor. and before it was so! do we need to apply this option to all editors?

image

Π”ΠΎ внСсСния послСдних (Π·Π° ΠΏΠΎΠ»Π³ΠΎΠ΄Π°!) ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ Π² edit-ΠΊΠΎΠ½Ρ‚Ρ€ΠΎΠ»Π°Ρ… Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ² ΠΊΠ°Ρ€Π΅Ρ‚ΠΊΠ° Π½Π΅ ΠΌΠΈΠ³Π°Π»Π° (Ρ‚Π°ΠΊ ΠΆΠ΅ ΠΊΠ°ΠΊ Π² Ρ‚Π°Π±Π΅)

Π”ΠΎ внСсСния послСдних ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ Π² edit-ΠΊΠΎΠ½Ρ‚Ρ€ΠΎΠ»Π°Ρ… Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ² ΠΊΠ°Ρ€Π΅Ρ‚ΠΊΠ° Π½Π΅ ΠΌΠΈΠ³Π°Π»Π° (Ρ‚Π°ΠΊ ΠΆΠ΅ ΠΊΠ°ΠΊ Π² Ρ‚Π°Π±Π΅)
I didn't download latest beta and it blinks in my 1.120.3 and 1.117.6.

@xcme What is your option caret_blink_en?

@Alexey-T I like this feature but it doesn't look good for all themes I have. I think the color of inactive caret shouldn't be a constant but something that is related with background or other color. For example, if there's a light background it darkens the caret color a bit and vice versa. There are some algorithms to calculate if the color dark or light in the google and there should be a way to 'darken a bit' I think.

If you point me out where is the caret color stored I can do some tests.

@xcme What is your option caret_blink_en?

Default value - true. Should I change it and try with false?

@xcme No, you should not.
I like "not blincked" caret and set the option to "false" a long time ago

@xcme I failed to calc proper color for unfocused caret. my code comment

  if _IsFocused then
    NCaretColor:= Colors.Caret
  else
    //I cannot find proper color of NCaretColor, to make unfocused carets invisible,
    //tried several combinations of Colors.TextBG / Colors.TextFont,
    //tried 'xor', 'xor $ffffff' with some values, but it didn't help.
    //at least value 'Colors.TextBG xor Colors.TextFont' gives PALE caret color
    //on many CudaText themes (default and dark themes).
    NCaretColor:= Colors.TextBG xor Colors.TextFont;

I tried with this options ("caret_blink_en": false) and see an interesting behavior:

  1. It doesn't blink for main window only (it still blinks in search and code-tree windows
  2. In new version the caret disappears after pressing Ctrl+F and make a hole in the nearest symbol:
    image
    (Look at the last "a" character in the line 4)

@xcme

  1. it is #3028. fixed
  2. it is normal

@Alexey-T I don't think we have to completely hide it (btw, it was hided on my screen above). I think it should just change the color. Loot at my next picture:
image
The active caret (with valid color) is in the Find dialog but inactive carets are much more lighter. It would be great to have it the other way around. I mean that inactive carets should have pale color.

with last build (not public) I see

car

@xcme Pls test on last beta?

Sure, but give me some time. I will test.

Next iteration of fixes!! beta updated. now I tried to totally ignore caret paint code. seems better now? no even ramaining light block?
@kvichans @Jairo-Martinez @xcme @tmsg-gh

@Alexey-T, it looks fine except the cases with completely dark caret. But it only from my perspective, because I consider completely dark caret as a kind of "hole" (as on your screen, for example). It may look better with grey caret in that case but I'm not sure. What is the logic for the current behavior?

We replied with 3 sec interval. My comment was related with previous beta. Let me test the new one :)

Yeeeah! Now it's perfect. Now I agree with this solution when t completely hides the caret. Looks great!
The only question why does it have different caret color with caret_blink_en in different states?
image
image

pls post this color-issue to a new topic? this is overheated. I am closing it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alexey-T picture Alexey-T  Β·  4Comments

Alexey-T picture Alexey-T  Β·  4Comments

Alexey-T picture Alexey-T  Β·  5Comments

JairoMartinezA picture JairoMartinezA  Β·  7Comments

GHNewbiee picture GHNewbiee  Β·  7Comments