Page 2 of 6
Re: Custom column - Ability to display icon(s)
Posted: 16 Mar 2017 00:25
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.)...
Re: Custom column - Ability to display icon(s)
Posted: 16 Mar 2017 10:46
by autocart
admin wrote:TheQwerty wrote:But how do we define the icon's onClick script?

You can't 'cause there is none.

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)
Re: Custom column - Ability to display icon(s)
Posted: 16 Mar 2017 10:54
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.
Re: Custom column - Ability to display icon(s)
Posted: 16 Mar 2017 10:55
by binocular222
Does icon size affect loading speed? If yes, which size is optimal?
Re: Custom column - Ability to display icon(s)
Posted: 16 Mar 2017 11:07
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.
Re: Custom column - Ability to display icon(s)
Posted: 16 Mar 2017 11:51
by TheQwerty
autocart wrote:admin wrote:TheQwerty wrote:But how do we define the icon's onClick script?

You can't 'cause there is none.

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...
Re: Custom column - Ability to display icon(s)
Posted: 16 Mar 2017 21:24
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?
Re: Custom column - Ability to display icon(s)
Posted: 17 Mar 2017 18:55
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";
}
Re: Custom column - Ability to display icon(s)
Posted: 18 Mar 2017 19:29
by admin
Anybody interested in drawing circles in the list?
Re: Custom column - Ability to display icon(s)
Posted: 18 Mar 2017 19:35
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.
Re: Custom column - Ability to display icon(s)
Posted: 18 Mar 2017 19:37
by bdeshi
Do you have to ask?
Absolutely!
What about arcs?
Re: Custom column - Ability to display icon(s)
Posted: 19 Mar 2017 11:58
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.
Re: Custom column - Ability to display icon(s)
Posted: 19 Mar 2017 11:58
by admin
SammaySarkar wrote:What about arcs?
No arcs in the store at the moment, just full circles.
Re: Custom column - Ability to display icon(s)
Posted: 19 Mar 2017 12:41
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"

Re: Custom column - Ability to display icon(s)
Posted: 20 Mar 2017 10:46
by admin
Added an offset parameter for even more psychedelic liberty: