Custom column - Ability to display icon(s)
-
- Site Admin
- Posts: 60595
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Custom column - Ability to display icon(s)
I saw it and fixed it.
FAQ | XY News RSS | XY Twitter
-
- Site Admin
- Posts: 60595
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Custom column - Ability to display icon(s)
Next version you can easily convert the file size to something colorful. I added <cc_size> to the Custom Column variables.
Code: Select all
Snip: CustomColumn 1
XYplorer 17.80.0001, 22.03.2017 11:11:37
Action
ConfigureColumn
Caption
Cize
Type
3
Definition
$size = "<cc_size>";
switch (true){
case $size == 0: return '';
case $size < 1024: return ">draw.circle 4, 0088ee, 127";
case $size < 10 * 1024: return ">draw.circle 8, 0088ee, 127";
case $size < 100 * 1024: return ">draw.circle 12, 0088ee, 127";
case $size < 1024 * 1024: return ">draw.circle 16, 0088ee, 127";
case $size < 10 * 1024 * 1024: return ">draw.circle 16, 0088ee, 127; >draw.circle 4, 0088ee, 192";
case $size < 100 * 1024 * 1024: return ">draw.circle 16, 0088ee, 127; >draw.circle 8, 0088ee, 192";
case $size < 1024 * 1024 * 1024: return ">draw.circle 16, 0088ee, 127; >draw.circle 12, 0088ee, 192";
default: return ">draw.circle 16, 0088ee, 192";
}
Format
7
Trigger
1
Item Type
0
Item Filter
- Attachments
-
- Cize.png (52.61 KiB) Viewed 2572 times
FAQ | XY News RSS | XY Twitter
Re: Custom column - Ability to display icon(s)
Refresh list messes up the custom column. Refresh column sorts it out.
- Attachments
-
- 2017-03-22_11h39_28.gif (698.88 KiB) Viewed 2568 times
Re: Custom column - Ability to display icon(s)
Smart!admin wrote:Next version you can easily convert the file size to something colorful. I added <cc_size> to the Custom Column variables.
-
- Site Admin
- Posts: 60595
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Custom column - Ability to display icon(s)
Could you post the script?LittleBiG wrote:Refresh list messes up the custom column. Refresh column sorts it out.
FAQ | XY News RSS | XY Twitter
Re: Custom column - Ability to display icon(s)
admin wrote:Could you post the script?LittleBiG wrote:Refresh list messes up the custom column. Refresh column sorts it out.
Code: Select all
if (gettokenindex(<cc_ext>, "exe|bat|xyi", , "i")) > 0 {
return '>draw.circle 20, ff0000,, 3; 6, 008000;'
}
Code: Select all
if (gettokenindex(<cc_ext>, "exe|bat|xyi", , "i")) > 0 {
return '>draw.circle 20, ff0000,, 3; 6, 008000;'
} else {
return ''
}
-
- Site Admin
- Posts: 60595
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Custom column - Ability to display icon(s)
No problems with this over here. There must be sth else going on.LittleBiG wrote:admin wrote:Could you post the script?LittleBiG wrote:Refresh list messes up the custom column. Refresh column sorts it out.Code: Select all
if (gettokenindex(<cc_ext>, "exe|bat|xyi", , "i")) > 0 { return '>draw.circle 20, ff0000,, 3; 6, 008000;' }
FAQ | XY News RSS | XY Twitter
Re: Custom column - Ability to display icon(s)
@LittleBig, no problems for me either. Icon columns were a bit buggy until the last beta. Do you have the latest <xyver>?
btw, the last closing brace in the if block should be after the 0, (although actually there's no problem as it is)
btw, the last closing brace in the if block should be after the 0, (although actually there's no problem as it is)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Custom column - Ability to display icon(s)
Indeed, thanks!SammaySarkar wrote:@LittleBig, no problems for me either. Icon columns were a bit buggy until the last beta. Do you have the latest <xyver>?
btw, the last closing brace in the if block should be after the 0, (although actually there's no problem as it is)
I managed to reproduce it on a different computer, so I give a detailed instruction:
1. Open a brand new instance
2. Go to a folder containing executables.
3. Right-click on the Ext column and choose Add column. Undefined appears.
4. Right-click on the Undefined column, choose "Select Custom Column" and choose the first Undefined one. (Custom Column 16) Seemingly nothing happens.
5. Right click again on the column header Undefined and choose "Configure Custom Column 16"
6, Fill out the form like this: 7. Click OK.
8 Add a new User button to the address bar. Name "Refresh List", on left click: #485
9. Refresh the list by the new button. Now you should notice what I mentioned earlier, circles appear on the wrong places.
Re: Custom column - Ability to display icon(s)
Indeed.
This is the point of concern, Don.LittleBiG wrote:8 Add a new User button to the address bar. Name "Refresh List", on left click: #485
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Site Admin
- Posts: 60595
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Custom column - Ability to display icon(s)
Yep, let's see if I can fix it...
FAQ | XY News RSS | XY Twitter
-
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Custom column - Ability to display icon(s)
While your at it, why not adding draw.star so current official rating system gains script freedom?
...or what about the ultimate capability of a
draw.pixel
with parameters to control h x w position, density perhaps (allowing blank pixels too), round\square\rhombus as base formats, color?
Finally, spreading those draw.* to status (mainly), text(), echo() and other user outputs?
TIA!
...or what about the ultimate capability of a
draw.pixel
with parameters to control h x w position, density perhaps (allowing blank pixels too), round\square\rhombus as base formats, color?
Finally, spreading those draw.* to status (mainly), text(), echo() and other user outputs?
TIA!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Re: Custom column - Ability to display icon(s)
Code: Select all
v17.80.0006 - 2017-03-26 15:41
+++ List | Size Column: Now the Size column can have graphical representations
of the byte counts right in the column. Simply right-click the Size column
header and choose between three options:
- No Graphics Shows no graphics.
Like it has been all the years before.
- Circles Shows circles identical to macro >draw.circle.size.
Diameter adjusts to row height (which adjusts to font size).
- Bars Shows bars identical to macro >draw.bar.size.
Width: 50 pixels, Height: small icon height minus 2.
......
+ Custom Columns: Added macro ">draw.bar.size". It will draw a column-wide
colored size-related bars according to a hard-coded color scheme:
grey: Empty
green: < 1KB
yellow: < 1MB
red: < 1GB
purple: 1GB or more
Something for v2.0:
- bars: allow to manually change the colors (or re-assign the coded color set). For me red has a higher warning impact than pink.
- circles (and bars?): allow unique color for files and folders. I would choose grey to have a decent visual size indicator across all file items.
Something for v3.0:
- bars:render the numeric sizes into the bars.
Very helpful addition!
Cheers,
FH
-
- Site Admin
- Posts: 60595
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Custom column - Ability to display icon(s)
It's not pink, it's infra-red. Rainbow logic.Filehero wrote:- bars: allow to manually change the colors (or re-assign the coded color set). For me red has a higher warning impact than pink.
Anyway, if you don't like my colors then script you own. (Okay, not inside the Size column)
PS: Agreed, really nice feature!
And all this goes back to a post by highend from 13 Mar 2017 12:14.
FAQ | XY News RSS | XY Twitter