New CC-Size

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Native2904
Posts: 132
Joined: 23 Apr 2025 18:48
Location: Aachen

New CC-Size

Post by Native2904 »

Hi,
in the history for version 28.30.0403 (2026-04-27 18:29) there’s a sample script...
I’ve seen examples from others, so I know how it’s supposed to look.

Code: Select all

v28.30.0403 - 2026-04-27 18:29
       $size = "<cc_size>";
      switch (true){
        case $size == 0:          return ''; // draw nothing
        case $size < 1024:        return '>draw.bar ' . 100 * $size \ 1024 . ', 66CC66, BBEEBB|' . formatbytes($size);        //smaller 1 KB
        case $size < 1048576:     return '>draw.bar ' . 100 * $size \ 1048576 . ', FFBB00, FFEE88|' . formatbytes($size);     //smaller 1 MB
        case $size < 1073741824:  return '>draw.bar ' . 100 * $size \ 1073741824 . ', DD4444, FFAAAA|' . formatbytes($size);  //smaller 1 GB
        default:                  return '>draw.bar ' . 100 * $size \ 1099511627776 . ', DD44AA, FFAADD|' . formatbytes($size);  //1 GB or more
      }
I don’t want to make a fool of myself but when I use the column, I’m not getting the expected results.

>draw.bar 0, FFBB00, FFEE88|7,32 KB

Type: Script
Format: Text
Auslöser: all tested
Elementtyp: Dateien und Ordner

What am I doing wrong?
Lts. 64-bit XY-Port. ƒ JetBrainsMono @ Windows 11 Pro 24H2 ▣ 1920x1080 ⇵ 115%
Glückauf

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

Re: New CC-Size

Post by highend »

Format = Icon^^
One of my scripts helped you out? Please donate via Paypal

Native2904
Posts: 132
Joined: 23 Apr 2025 18:48
Location: Aachen

Re: New CC-Size

Post by Native2904 »

:party:
Thank you!
Lts. 64-bit XY-Port. ƒ JetBrainsMono @ Windows 11 Pro 24H2 ▣ 1920x1080 ⇵ 115%
Glückauf

Native2904
Posts: 132
Joined: 23 Apr 2025 18:48
Location: Aachen

Re: New CC-Size

Post by Native2904 »

In the context of this fantastic column feature...
is there any way in XYplorer to disable the tooltip for a specific column?

Thank you for your support!
Lts. 64-bit XY-Port. ƒ JetBrainsMono @ Windows 11 Pro 24H2 ▣ 1920x1080 ⇵ 115%
Glückauf

jupe
Posts: 3446
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: New CC-Size

Post by jupe »

No not a specific column, but if you disable the below setting you shouldn't get them for these style columns (among other things),

Configuration | Information | File Info Tips & Hover Box | [ ] Show tips for clipped tree and list items

Native2904
Posts: 132
Joined: 23 Apr 2025 18:48
Location: Aachen

Re: New CC-Size

Post by Native2904 »

Yes, that works now — thank you.
Lts. 64-bit XY-Port. ƒ JetBrainsMono @ Windows 11 Pro 24H2 ▣ 1920x1080 ⇵ 115%
Glückauf

Post Reply