Custom column - Ability to display icon(s)

Features wanted...
highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Custom column - Ability to display icon(s)

Post by highend »

A simple variant:

Code: Select all

    $tags = tagitems("tag", , <cc_item>);
    $ext = gpc(<cc_item>, "ext");
    $match = regexmatches($tags, "(0|1)\.(00|25|50|75)");
    switch ($match) {
        case "0.25": $icon = "0.25 [$ext].ico"; break;
        case "0.50": $icon = "0.50 [$ext].ico"; break;
        case "0.75": $icon = "0.75 [$ext].ico"; break;
        case "1.00": $icon = "1.00 [$ext].ico"; break;
        default: $icon = "";
    }
    return $icon;
Allows to tag items with 0.00 / 0.25 / ... (and I know with > 1.00 as well)
resulting in different "progress states" per extension type. Could
be enhanced by using generic file types (video, audio, text, etc.)...
One of my scripts helped you out? Please donate via Paypal

autocart
Posts: 1248
Joined: 26 Sep 2013 15:22

Re: Custom column - Ability to display icon(s)

Post by autocart »

admin wrote:
TheQwerty wrote:But how do we define the icon's onClick script? :twisted:
You can't 'cause there is none. :P
as a work around this might be a good case for an ahk script using ahk's ImageSearch command (to determine if the mouse is over the icon)

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom column - Ability to display icon(s)

Post by admin »

Next beta adds to the coolness:

Code: Select all

    + Extra Tags: Added type "Icon". The syntax is identical to that in Custom 
      Columns of Format "Icon".
      So now you can tag particular files with particular icons, all stored in 
      the tags database (tag.dat). A cool new way to mark files.
Attachments
ExtraIcons.png
ExtraIcons.png (14.82 KiB) Viewed 2942 times

binocular222
Posts: 1416
Joined: 04 Nov 2008 05:35
Location: Hanoi, Vietnam

Re: Custom column - Ability to display icon(s)

Post by binocular222 »

Does icon size affect loading speed? If yes, which size is optimal?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom column - Ability to display icon(s)

Post by admin »

You mean the file size? Minimally. Neglectable.

Scripted custom columns are rather slow, of course, that's the price you pay for all the wonders.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Custom column - Ability to display icon(s)

Post by TheQwerty »

autocart wrote:
admin wrote:
TheQwerty wrote:But how do we define the icon's onClick script? :twisted:
You can't 'cause there is none. :P
as a work around this might be a good case for an ahk script using ahk's ImageSearch command (to determine if the mouse is over the icon)
Indeed, but considering all the ways to trigger scripts I'm not willing to expend the effort in using AHK to add another one.

Ah well.. onClick just gets added to my long list of dreams...

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Custom column - Ability to display icon(s)

Post by highend »

@kunkel321

Could you create a transparent (vector) graphic that could be used as an overlay for normal icons to show "some state",
so it's easily visible if I read 1/4 of an ebook or heard only half a .mp3 song, etc?
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom column - Ability to display icon(s)

Post by admin »

To give a quick and dirty usage example here is a column that shows an icon for all pics that were made with a Nikon. The script for this column is a simple 4-liner. Works for me.

Code: Select all

$camera = property("#image.cameramodel", <cc_item>);
if (strpos($camera, "Nikon") != -1) {
  return "Nikon.ico";
}
Attachments
Nikon.png
Nikon.png (26.89 KiB) Viewed 2886 times

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom column - Ability to display icon(s)

Post by admin »

Anybody interested in drawing circles in the list?
Attachments
DrawCircle.png
DrawCircle.png (11.94 KiB) Viewed 2857 times

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Custom column - Ability to display icon(s)

Post by Filehero »

admin wrote:Anybody interested in drawing circles in the list?
As quantity/progress indicators? Yes.
Or as circles with parameterized diameter, stroke and fill color, stroke width, stroke style? Yes.

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Custom column - Ability to display icon(s)

Post by bdeshi »

Do you have to ask?
Absolutely!

What about arcs?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom column - Ability to display icon(s)

Post by admin »

Filehero wrote:
admin wrote:Anybody interested in drawing circles in the list?
As quantity/progress indicators? Yes.
Or as circles with parameterized diameter, stroke and fill color, stroke width, stroke style? Yes.
The latter.

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom column - Ability to display icon(s)

Post by admin »

SammaySarkar wrote:What about arcs?
No arcs in the store at the moment, just full circles.

yusef88
Posts: 1126
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: Custom column - Ability to display icon(s)

Post by yusef88 »

admin wrote: Scripted custom columns are rather slow, of course, that's the price you pay for all the wonders.
"Magic always comes with a price, Dearie" :lol:

admin
Site Admin
Posts: 60567
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom column - Ability to display icon(s)

Post by admin »

Added an offset parameter for even more psychedelic liberty:
Attachments
offset.png
offset.png (9.65 KiB) Viewed 2797 times

Post Reply