Author Topic: Improvement to color management needed  (Read 1911 times)

Offline Andreas

  • Registered User
  • Jr. Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Improvement to color management needed
« on: October 25, 2014, 09:58:13 am »
Hi Alex,

suppose the user wants to have a yellow background of the current line and a blue background of selected text. This is a simple and reasonable wish, isn't it? But it seems to be impossible to get this in HippoEdit. Here is what I tried:

1. Attempt:
    Current line: Yellow, Alpha=0%
    Selected back: Blue, Alpha=0%
    Result: Selected back in current line is yellow ==> fail

2. Attempt:
    Current line: Yellow, Alpha=100%
    Selected back: Blue, Alpha=0%
    Result: Background of current line is white ==> fail

3. Attempt:
    Current line: Yellow, Alpha=0%
    Selected back: Blue, Alpha=100%
    Result: Selected back in current line is yellow ==> fail

4. Attempt:
    Current line: Yellow, Alpha=50%
    Selected back: Blue, Alpha=50%
    Result: Selected back in current line is light grey ==> fail

5. Attempt:
    Current line: Yellow, Alpha=50%
    Selected back: Blue, Alpha=0%
    Result: Selected back in current line is dark grey ==> fail

Things get even worse when the user also wants to freely configure the background color of smart highlighted text (incremental search result 2).

By the way, I think that this shortcoming in the color management of HippoEdit is also the reason for the poor quality of many pre-defined color schemes, e.g. Eclipse.

In my opinion, HippoEdit needs to maintain some sort of "priorities" for colors. For example, the configured color of Selected back must have a higher priority than the configured color of the Current line. And the configured color of smart highlighted text needs to have even a higher priority.

Best regards,
Andreas

PS: While I made the above tests, HippoEdit crahed several times (after I pressed the Apply button in the Color Schemes dialog box).

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2171
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Improvement to color management needed
« Reply #1 on: October 26, 2014, 10:33:25 pm »
Hi Andreas,

there are actually priorities of style layering which actually and lead to configuration problems you got.
It was also worth to mention, that you can not achieve visualization you like only for intersections of current line and selection. While current line color comes on TOP of the selection.

It is also mostly not possible to change the priority now, while this will be incompatible change, and can destroy of other users setup, that are used to current priorities.

If you fill some color schemes has poor quality, explain what shall be improved and how, and I will try to correct the scheme and update it in repository. Or better do it by yourself and send theme to me ;) It is rather difficult (time consuming, I am not MS) to verify all color schemes with layering combination after new style changes. So, I am mostly take care about default scheme.

If you got crash, please send it to supportbox, I will verify what has gone wrong. I did not get any during my tests with colors. Can be that yours one related to something else (plugins or open document in this moment).

Configurable priorities - maybe. But this is rather big effort. Changing of the hardocded priorities - maybe, if I will get enough facts that show me that current ones are wrong (examples from other editors).

BR, Alex.

Offline Andreas

  • Registered User
  • Jr. Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Improvement to color management needed
« Reply #2 on: October 27, 2014, 12:21:01 pm »
Hi Alex,


If you fill some color schemes has poor quality, explain what shall be improved and how
For example, in the Eclipse color scheme, when you select some text in the current line, the selection is not visible.  In my opinion, this is poor quality. Smart highlight isn't visible either.


If you got crash, please send it to supportbox
Done.


Configurable priorities - maybe.
I don't know any other editor which has configurable priorities. I my opinion, it's not nedded. Instead, the hardcoded default priorities should be "right" in the first place.


Changing of the hardocded priorities - maybe, if I will get enough facts that show me that current ones are wrong (examples from other editors).
In all editors that I know, the selected text has a higher priority than the current line. A concrete example is Notepad++.

Regarding smart highlight: In EditPad Pro, smart highlight (which is called instant highlight in EditPad Pro) has a higher priority than the current line. Selected text has even a higher priority, but that's no problem, because smart highlighted text is not automatically selected. (In contrast to that, in HippoEdit, when you Ctrl+click some text, the text automatically gets selected. This is not good in my opinion.)


Best regards,
Andreas

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2171
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Improvement to color management needed
« Reply #3 on: October 27, 2014, 12:45:22 pm »
Quote
For example, in the Eclipse color scheme, when you select some text in the current line, the selection is not visible.  In my opinion, this is poor quality. Smart highlight isn't visible either.
May you provide the screenshot? It would be helpful. I would try to optimize the theme using current priorities to get some acceptable result.

Quote
Done.
Did not get them yet :/

Quote
In all editors that I know, the selected text has a higher priority than the current line. A concrete example is Notepad++.

Regarding smart highlight: In EditPad Pro, smart highlight (which is called instant highlight in EditPad Pro) has a higher priority than the current line. Selected text has even a higher priority, but that's no problem, because smart highlighted text is not automatically selected. (In contrast to that, in HippoEdit, when you Ctrl+click some text, the text automatically gets selected. This is not good in my opinion.)

I will check. In case of correction here, as I wrote, this is large effort and big risk. So, maybe I will check in a month.

About Ctrl+Click selection: what is not good exactly (you know you can also get it automatically for current word)? N++ does it for double click.
« Last Edit: October 27, 2014, 12:55:48 pm by alex »

Offline Andreas

  • Registered User
  • Jr. Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Improvement to color management needed
« Reply #4 on: October 27, 2014, 01:28:39 pm »
Hi Alex,


May you provide the screenshot?
In the screenshot below, the Eclipse color scheme is used. I have Ctrl+click'ed the "aaa" in the second line. So the two "aaa"s in the first line should be highlighted. But they aren't. Furthermore, "aaa" in the second line is selected. (You can also see that in the status line). But the selection isn't visible. Seleceted text and not-selected text looks identical.




About Ctrl+Click selection: what is not good exactly
It's not good, because
a) it messes up the colors (all smart-highlighted text should have the same color), and
b) selecting text and smart-highlighting text are two different things which are unrelated. There is no reason why smart-highlighting some text should have a selection as a side-result.


Best regards,
Andreas

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2171
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Improvement to color management needed
« Reply #5 on: October 27, 2014, 02:43:04 pm »
Thanks for screenshot. Got it. Will fix Eclipse schema.

There is explicit shortcut for smart highlight of current word. But I was looking for providing the same action with mouse only (as double click in N++). OK -> mouse + modifiers. Ctrl+Left click was one which from my point of view was less conflicting with other functionality. Can you provide better way to do smart highlight with mouse + modifiers? ;)

Offline Andreas

  • Registered User
  • Jr. Member
  • *
  • Posts: 53
  • Karma: +0/-0
    • View Profile
Re: Improvement to color management needed
« Reply #6 on: October 27, 2014, 03:12:31 pm »
Ctrl+Left click is absolutely okay. There is no need to change that.

But currently, Ctrl+Left click does two things at the same time:
- highlight all occurrences of the current word (that's fine), and
- select the current word (why???)

In contrast to that, Right click -> Smart highlight -> Auto only highlights all occurrences of the current word, but it does not select the current word. That's much better. My wish is that Ctrl+Left click behaves the same way. And if smart-highlighted text had a higher priority than the current line, it would be perfect.  ;)

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2171
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Improvement to color management needed
« Reply #7 on: October 27, 2014, 05:11:20 pm »
Ctrl+Click leads to word selection in MS Visual Studio and in EmEditor.
Ctrl+Click leads to line selection in MS Word.

And in same time Ctrl+Click is used for in a lot editors (Sublime or MS Word or EmEditor) for creating multi carets. So, this is also some how conflicting.
In Notepad++, if you use Double Click on word for triggering Smart Highlight it also causes selection of the word in same time.

So, everything is not so straightforward as may look like ;) I will be probably drop Ctrl+Click as shortcut for word selection, but also as shortcut for smart highlight because I am planning to implement multi selecting and than I would need to use Ctrl for creating multi carets to be consistent with other editors.

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
1964 Views
Last post February 25, 2009, 10:50:40 pm
by Arthur
6 Replies
2037 Views
Last post April 15, 2009, 03:14:02 pm
by Arthur
1 Replies
2007 Views
Last post May 04, 2009, 10:32:40 pm
by alex
0 Replies
2613 Views
Last post June 19, 2011, 01:05:34 pm
by Anonymous
6 Replies
1647 Views
Last post January 06, 2015, 09:14:51 pm
by alex