Skip to content

Conversation

@egmontkob
Copy link
Contributor

@egmontkob egmontkob commented Jan 23, 2026

This is the main thing I wanted to do.

The screenshots are now easy to generate, easy to reproduce similar ones. No more manual editing of those templates!

Many incorrect colors have been fixed. Some were due to faulty inheritance / fallback, some were presumably due to manual template editing mistakes.


I'll continue with many smaller improvements / addressing the other issues, but I wanted to send out this big step in the mean time :)


Copy link
Member

@zyv zyv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments - not a review (my understanding is it wasn't requested either). Looks very impressive!

@@ -0,0 +1,109 @@
This file is used to take a screenshot of mcdiff.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought - maybe you could put this inside a multiline comment, just to make the file a valid C code.

I understand that this doesn't matter, but you know the mcedit parser is not particularly good.

I'm afraid that this way you can unintentionally introduce incorrect highlighting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the instructions, this file is not opened in mcedit.

Moreover, mcedit has special hacks for syntax highlighting, it's a mixture of colors defined in the skin and colors defined for the syntax. Neither the screenshot taking patch, nor the online skin viewer supports it.

So we cheat a little bit and intentionally avoid showing such screenshots.

Maybe we'll fix this one day. Until then it's perfectly okay (and even has an additional step of "protection") to not detect the file as C source code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay. Thank you for the explanation. As I said, I didn't realize you wanted a review and only glanced at the instructions instead of reading them more attentively.

You are right, it's fine to leave it as it is. I would have made it a comment out of principle as a matter of taste, but if you don't like it, you can ignore my suggestion.

@@ -0,0 +1,82 @@
This file is used to take a screenshot of mcdiff.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, although it probably matters even less.

@egmontkob
Copy link
Contributor Author

not a review (my understanding is it wasn't requested either)

Please review properly -- I accidentally forgot to press that button :)

@egmontkob egmontkob requested a review from zyv January 23, 2026 20:41
@egmontkob egmontkob force-pushed the 10_11_12_semi_automated_screenshots_and_fix_attribute_inheritance branch from f5cebad to 794a56f Compare January 24, 2026 07:45
@egmontkob
Copy link
Contributor Author

Added a comment to if(parts[0]) and friends.

Renamed selected-file-* to marked-file-* because the skin file calls them "marked" and uses the word "selected" for something else, it was really confusing.

Copy link
Member

@zyv zyv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this. It's fantastic! It would be cool if you could showcase the following items:

  • hiddenfiles-hide-char
  • filename-scroll-left-char

Is it just a matter of adding the hide files shortcut and scrolling right a couple of times to the instructions?

…enshots

Document how to recreate screenshots that are very close to (but not
necessarily identical) to the current ones.

Signed-off-by: Egmont Koblinger <egmont@gmail.com>
…: Create new screenshots

Fix the HTML side of attribute inheritance and faulty colors.

Increase screenshot height from 30 to 32 rows, to allow more room for file
type highlights.

These screenshots are not compatible with the current rendering engine, the
next commit will fix that.

Signed-off-by: Egmont Koblinger <egmont@gmail.com>
…ndering engine

Update the skin rendering engine to match the HTML + CSS of the new
screenshots.

Fix the JS side of attribute inheritance.

Signed-off-by: Egmont Koblinger <egmont@gmail.com>
@egmontkob egmontkob force-pushed the 10_11_12_semi_automated_screenshots_and_fix_attribute_inheritance branch from 794a56f to dcf8c30 Compare January 24, 2026 13:36
@egmontkob
Copy link
Contributor Author

hiddenfiles-hide-char

It's already there in the "brief" screenshot.

It truly surprised me that showing / hiding hidden files, even though has a button at the top-right corner of each panel, is a global (not per-panel) property. Is this a bug or feature?

In the current skin viewer's first screenshot, one of the panels has dotfiles enabled and the other has them disabled. This either originated from an older version of mc that behaved this way, or was manually manipulated and shows an impossible state (something I no longer want to have, manually modifying those files looks like nightmare).

If it's a bug then we should first fix that and then recreate the screenshots (and update the instructions).

filename-scroll-left-char

Is it just a matter of adding the hide files shortcut and scrolling right a couple of times to the instructions?

Yup, done.


There are still many colors not showcased in the screenshots. I'll add a bug soon.


Awesome new feature: Move the mouse somewhere over the screenshot and wait for the tooltip text. It tells you which color (and if relevant, which character) of the skin file is used in that cell.

@zyv
Copy link
Member

zyv commented Jan 25, 2026

hiddenfiles-hide-char

It's already there in the "brief" screenshot.

Ah, I didn't realize that. Awesome!

It truly surprised me that showing / hiding hidden files, even though has a button at the top-right corner of each panel, is a global (not per-panel) property. Is this a bug or feature?

I think this must be a feature, since it works in FAR in the same way.

In the current skin viewer's first screenshot, one of the panels has dotfiles enabled and the other has them disabled. This either originated from an older version of mc that behaved this way, or was manually manipulated and shows an impossible state (something I no longer want to have, manually modifying those files looks like nightmare).

Yeah, I think I didn't realize it was on brief (or maybe it wasn’t), and hand-patched it in there.

@egmontkob egmontkob merged commit 8140b94 into MidnightCommander:master Jan 26, 2026
2 checks passed
@egmontkob egmontkob deleted the 10_11_12_semi_automated_screenshots_and_fix_attribute_inheritance branch January 26, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attribute fallback is faulty Find a mostly automated way of updating the templates Color discrepancies

2 participants