Re: Custom column - Ability to display icon(s)
Posted: 21 Mar 2017 09:32
I saw it and fixed it. 
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
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
Smart!admin wrote:Next version you can easily convert the file size to something colorful. I added <cc_size> to the Custom Column variables.![]()
Could you post the script?LittleBiG wrote:Refresh list messes up the custom column. Refresh column sorts it out.
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 ''
}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;' }
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)
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
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 moreIt'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.