I prefer to use fonts instead of paint the symbols. Fonts can be changed easily.
Ivan found the font solution for folds and Gérard fond the font solution for links.
Both I have running on my computer and it looks very pretty.
This solution will be available with the next CPC edition.
Here there ar the missing link solution:
Code: Select all
...
NEW(d); dir := d; stdDir := d;
IF Dialog.IsLinux() OR Dialog.IsWine() THEN
iconFont := "Liberation Mono";
font := Fonts.dir.This(iconFont, 10*Fonts.point (*arbitrary*), {}, Fonts.normal);
IF font.IsAlien() THEN DefaultAppearance
ELSE
linkLeft[0] := 02192X; linkLeft[1] := 0X; linkRight[0] := 02190X; linkRight[1] := 0X; (* "→" "←" *)
targetLeft[0] := 025CFX; targetLeft[1] := 0X; targetRight[0] := 025CFX; targetRight[1] := 0X; (* "●" "●" *)
coloredBackg := FALSE
END
ELSIF Dialog.IsWindows() THEN
iconFont := "Wingdings";
font := Fonts.dir.This(iconFont, 10*Fonts.point (*arbitrary*), {}, Fonts.normal);
IF font.IsAlien() THEN DefaultAppearance
ELSE
linkLeft[0] := 0F0F6X; linkLeft[1] := 0X; linkRight[0] := 0F0F5X; linkRight[1] := 0X; (* "" "" *)
targetLeft[0] := 0F0A4X; targetLeft[1] := 0X; targetRight[0] := 0F0A1X; targetRight[1] := 0X; (* "" "" *)
coloredBackg := FALSE
END
ELSIF Dialog.IsMac() THEN
DefaultAppearance
ELSE
DefaultAppearance
END;
NEW(cleaner);
dialog.close.SetResources("#Std:links")
...
As you can see above: The font displays correctly in the Linux/Wine solution. The Windings font doesn't display correct.
What I'm not understand is: Why the Russian user needs a leading F0 in the Wingdings definition for the correct display?
The Wine detection is used internally only and works. Why should we throw it away?