FarManager icon indicating copy to clipboard operation
FarManager copied to clipboard

Alpha-channel and FCF_INHERIT_STYLE should be applied to filepanel selection and cursor.

Open johnd0e opened this issue 10 months ago • 21 comments

johnd0e avatar Feb 12 '25 15:02 johnd0e

I think I've got it right, but better check thoroughly.

alabuzhev avatar Feb 12 '25 19:02 alabuzhev

Testing Style: [x] Inherit on file panel.

  1. Normal text set to Italic:
    • [x] Normal cursor set to Inherit ==> Italic
    • [ ] Selected text set to Inherit and ==> not Italic.
    • [x] Files highlighting group set Normal file name style to Inherit ==> Italic
  2. Files highlighting +D group set Normal file name style to Italic
    • [ ] The same group Selected file name style to Inherit ==> not Italic.
    • [ ] Selected text set to Inherit and ==> not Italic.

johnd0e avatar Feb 13 '25 13:02 johnd0e

Well, you initially asked for cursor, so selection is not covered. However, why not.

alabuzhev avatar Feb 13 '25 17:02 alabuzhev

Ok, how should it work?

Assuming that cursor lies on top of text, e.g.

cursor
text
  • cursor inherits text.

Assuming that selection lies on top of text, e.g.

selection
text
  • selection inherits text.

Now, what is "selected cursor"? Is it cursor that lies on top of selection that lies on top of text, e.g.

cursor
selection
text

or something else?

  • Should selected cursor inherit cursor, then selection, then text or something else?

alabuzhev avatar Feb 13 '25 18:02 alabuzhev

Should selected cursor inherit cursor, then selection, then text

I suppose yes, exactly so.

But than where is "Files highlighting" in that hierarchy?

cursor
selection
highlight
text

Or?...

johnd0e avatar Feb 13 '25 19:02 johnd0e

Don't forget that there's no "highlight". There are "highlight", "highlight selected", "highlight cursor", "highlight selected cursor". Although the last 3 are mostly useless and probably not used by anyone.

Currently highlight does not follow this logic and inherits from previous groups component-wise if "continue processing" is on. Then the final result inherits panel colors. Somehow. I didn't check how exactly.

More in 6440.

alabuzhev avatar Feb 13 '25 21:02 alabuzhev

There are "highlight", "highlight selected", "highlight cursor", "highlight selected cursor". Although the last 3 are mostly useless and probably not used by anyone.

They are (supplementary) part of the Attribution highlighting concept, and I use all three on a daily basis. E.g. you can see my selection highlighting here (and, in case you're curious, selected cursor is bright green and regular cursor is bright blue).

HamRusTal avatar Feb 14 '25 02:02 HamRusTal

@HamRusTal

They are (supplementary) part of the Attribution highlighting concept, and I use all three on a daily basis.

I suppose that they are redundant after we have sorted all inheritance issues out.

johnd0e avatar Feb 14 '25 20:02 johnd0e

More in 6440.

Still unable to get it work with highlighting.

Selection and cursor over highlighted item do not inherit it's style

johnd0e avatar Feb 14 '25 20:02 johnd0e

@johnd0e please try to describe how exactly you expect it to work in the most complex case, e.g. multiple highlight groups with "continue processing" and color / style inheritance.

alabuzhev avatar Feb 15 '25 13:02 alabuzhev

  1. Normal text
  2. Highlighting Normal file name. E.g. these, all with inheritance and continue processing:
    • [+D] Color, Style: Italic
    • [+D] Marking: \
    • [+L] Style: Underline
  3. Selected text
  4. Highlighting Selected file name. In my case nothing is set explicitly, only Default / unset / Inherit.
  5. Normal cursor
  6. Highlighting File name under cursor Default
  7. Selected cursor
  8. Highlighting Selected file name under cursor Default

Highlighting works the same as before, so I expect nothing new here.

The new thing is hierarchy:

  1. Normal + Highlighting
  2. Selected + Highlighting [optional]
  3. Cursor + Highlighting [optional]
  4. Selected Cursor + Highlighting [optional]

I'm not sure if we still need that [optional] highlighting settings. Considering all the possibilities, I think it's too granular. I believe it's safe to just drop it (?) @HamRusTal However, I still find that normal/selected/cursor/selected preview useful.

johnd0e avatar Feb 15 '25 19:02 johnd0e

If I'm still able to assign highlighting as expressively as before, I'm fine. By “as before”, I mean distinct highlighting (FG/BG color, styles, mark char, etc) for regular (normal), selected, current (under cursor), and selected current with regard to file name (glob), size, attributes, times, and number of hard links. If needed, I can explain why, but in general, Attribution is the answer.

If the highlighting settings get revamped, then it would be user-friendly to have proper automatic migration of settings. Failing to do that, we'll get numerous complaints on the forum over indefinite time span.

HamRusTal avatar Feb 15 '25 21:02 HamRusTal

If I'm still able to assign highlighting as expressively as before

That is the question

johnd0e avatar Feb 15 '25 21:02 johnd0e

Ok next attempt, 6441.

If the highlighting settings get revamped

There are no such plans.

If I'm still able to assign highlighting as expressively as before

That is the question

That is not the question. This issue is about inheritance of specific items, which makes sense only when their colors are (semi-)transparent or style inheritance is enabled, everything else stays the same.

alabuzhev avatar Feb 15 '25 23:02 alabuzhev

Ok next attempt, 6441.

Working like a charm, thanks!

This issue is about inheritance of specific items, which makes sense only when their colors are (semi-)transparent or style inheritance is enabled, everything else stays the same.

Correct. So it is offtopic, but still interesting: do we really need 4 color settings for highlighting?

johnd0e avatar Feb 16 '25 15:02 johnd0e

@alabuzhev There is a good question in https://t.me/FarManager/18518

johnd0e avatar Mar 01 '25 16:03 johnd0e

@johnd0e

  1. As explained elsewhere, currently Alpha applies selectively where it makes sense, or, in other words, where a notion of a "previous color in Z-order" exists. Otherwise it's ignored. The preview shows it as black because it's a bug. Fixed.
  2. Because it inherits blue, as explained above.

alabuzhev avatar Mar 01 '25 16:03 alabuzhev

  1. Is it possible then to disable fields, where Alpha is not applicable?

  2. I expect that black background of selection is fixed as well

johnd0e avatar Mar 01 '25 16:03 johnd0e

  1. Which fields? The leftmost cells (AA) in the color code? We can't disable a part of an edit control, and I don't think that monitoring the input and reverting alpha to FF programmatically would make much sense.
  2. What black background?

alabuzhev avatar Mar 01 '25 17:03 alabuzhev

  1. Perhaps it is possible to achieve with edit mask.

  2. If Normal text background is fully transparent (00), and Selected is not set (thus should be inherited), then selected files get black background. Not in the preview, but on real file panel.

johnd0e avatar Mar 01 '25 18:03 johnd0e

selected files get black background

6447

alabuzhev avatar Mar 01 '25 19:03 alabuzhev