Ticket #1484857 (new Bugs)

Opened 6 months ago

Last modified 41 hours ago

Quota image rendered wrong with non default width

Reported by: oscar Owned by:
Priority: 5 Milestone: 0.2-beta
Component: User Interface Version: 0.1-stable
Severity: trivial Keywords:
Cc:

Description

When setting a different width for the quota image, it renders wrong (100% is only 100px, instead of the width).

Index: bin/quotaimg.php
===================================================================
--- bin/quotaimg.php    (revision 1186)
+++ bin/quotaimg.php    (arbetskopia)
@@ -159,9 +159,10 @@
                }

                $quota_width = $quota / 100 * $width;
-               imagefilledrectangle($im, $border, 0, $quota, $height-2*$border, $fill);
+               imagefilledrectangle($im, $border, 0, $quota_width, $height-2*$border, $fill);

Attachments

quotaimg.php.diff (1.4 kB) - added by lancey 6 months ago.
Patch which fixes the quota width issue, and also adds an URL option to show used/total size in MB next to the percents, e.g. 2% (2/100 MB)

Change History

Changed 6 months ago by lancey

Patch which fixes the quota width issue, and also adds an URL option to show used/total size in MB next to the percents, e.g. 2% (2/100 MB)

Changed 6 months ago by lancey

The patch adds the option to show the used/total sizes in MBs. quotaimg.php should be invoked with the showsizes=true URL option.

Changed 6 months ago by oscar

The width is specified in the file source:trunk/roundcubemail/program/steps/mail/func.inc@1125#L439 and needs to be set to something like 250px in order for the text to display nicely.

Changed 6 months ago by oscar

The patch should divide by 1024 and not 1000 instead I think.

Changed 6 months ago by oscar

Or maybe use show_bytes() instead.. But I couldn't figure out where to include it, so I leave it up to you. show_bytes() probably needs a round() as well by the way, it seems to just cut the decimals out of there.

Changed 6 months ago by thomasb

  • milestone changed from 0.1.1 to 0.1.5

Changed 6 months ago by oscar

Also, the width of #listcontrols in default/mail.css needs to be widened or removed in order to make room for the bigger image when using quotaimg.php.diff.

Changed 4 months ago by anonymous

  • milestone deleted

Milestone 0.1.5 deleted

Changed 41 hours ago by alec

  • milestone set to 0.2-beta
Note: See TracTickets for help on using tickets.