diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-12-09 13:48:42 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-12-09 13:48:42 +0000 |
| commit | abb13835cc163385dce8467528d2f6071de9a75f (patch) | |
| tree | be5197a5edf5ee9e9cf238aa7061cd1181f4643a | |
| parent | 215370c885973d0b12a10f0a07662d5044dffbb9 (diff) | |
#1485544: quota image better look
git-svn-id: https://svn.roundcube.net/trunk@2137 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/bin/quotaimg.php | 33 | ||||
| -rw-r--r-- | roundcubemail/skins/default/mail.css | 2 |
2 files changed, 22 insertions, 13 deletions
diff --git a/roundcubemail/bin/quotaimg.php b/roundcubemail/bin/quotaimg.php index 664625942..dfec24150 100644 --- a/roundcubemail/bin/quotaimg.php +++ b/roundcubemail/bin/quotaimg.php @@ -70,14 +70,14 @@ function genQuota($used, $total, $width, $height) $font = 2; $padding = 0; - $limit['high'] = 70; - $limit['mid'] = 45; + $limit['high'] = 80; + $limit['mid'] = 55; $limit['low'] = 0; // Fill Colors - $color['fill']['high'] = '215, 13, 13'; // Near quota fill color - $color['fill']['mid'] = '126, 192, 238'; // Mid-area of quota fill color - $color['fill']['low'] = '147, 225, 100'; // Far from quota fill color + $color['fill']['high'] = '243, 49, 49'; // Near quota fill color + $color['fill']['mid'] = '245, 173, 60'; // Mid-area of quota fill color + $color['fill']['low'] = '145, 225, 100'; // Far from quota fill color // Background colors $color['bg']['OL'] = '215, 13, 13'; // Over limit bbackground @@ -86,14 +86,17 @@ function genQuota($used, $total, $width, $height) // Misc. Colors $color['border'] = '0, 0, 0'; - $color['text'] = '102, 102, 102'; + $color['text']['high'] = '255, 255, 255'; // white text for red background + $color['text']['mid'] = '102, 102, 102'; + $color['text']['low'] = '102, 102, 102'; + $color['text']['normal'] = '102, 102, 102'; /************************************ ***** DO NOT EDIT BELOW HERE ***** ***********************************/ - // @todo: Set to "??" instead? + // @todo: Set to "??" instead? if (ereg("^[^0-9?]*$", $used) || ereg("^[^0-9?]*$", $total)) { return false; } @@ -115,20 +118,21 @@ function genQuota($used, $total, $width, $height) imageline($im, $width, $height-$border, 0, $height-$border, $borderc); } - list($r, $g, $b) = explode(',', $color['text']); - $text = imagecolorallocate($im, $r, $g, $b); - if ($unknown) { + list($r, $g, $b) = explode(',', $color['text']['normal']); + $text = imagecolorallocate($im, $r, $g, $b); list($r, $g, $b) = explode(',', $color['bg']['Unknown']); $background = imagecolorallocate($im, $r, $g, $b); + imagefilledrectangle($im, 0, 0, $width, $height, $background); $string = 'Unknown'; $mid = floor(($width-(strlen($string)*imagefontwidth($font)))/2)+1; imagestring($im, $font, $mid, $padding, $string, $text); } else if ($used > $total) { + list($r, $g, $b) = explode(',', $color['text']['normal']); + $text = imagecolorallocate($im, $r, $g, $b); list($r, $g, $b) = explode(',', $color['bg']['OL']); - $background = imagecolorallocate($im, $r, $g, $b); imagefilledrectangle($im, 0, 0, $width, $height, $background); @@ -138,7 +142,6 @@ function genQuota($used, $total, $width, $height) imagestring($im, $font, $mid, $padding, $string, $text); } else { list($r, $g, $b) = explode(',', $color['bg']['quota']); - $background = imagecolorallocate($im, $r, $b, $g); imagefilledrectangle($im, 0, 0, $width, $height, $background); @@ -146,13 +149,19 @@ function genQuota($used, $total, $width, $height) $quota = ($used==0)?0:(round($used/$total, 2)*100); if ($quota >= $limit['high']) { + list($r, $g, $b) = explode(',', $color['text']['high']); + $text = imagecolorallocate($im, $r, $g, $b); list($r, $g, $b) = explode(',', $color['fill']['high']); $fill = imagecolorallocate($im, $r, $g, $b); } elseif($quota >= $limit['mid']) { + list($r, $g, $b) = explode(',', $color['text']['mid']); + $text = imagecolorallocate($im, $r, $g, $b); list($r, $g, $b) = explode(',', $color['fill']['mid']); $fill = imagecolorallocate($im, $r, $g, $b); } else { // if($quota >= $limit['low']) + list($r, $g, $b) = explode(',', $color['text']['low']); + $text = imagecolorallocate($im, $r, $g, $b); list($r, $g, $b) = explode(',', $color['fill']['low']); $fill = imagecolorallocate($im, $r, $g, $b); } diff --git a/roundcubemail/skins/default/mail.css b/roundcubemail/skins/default/mail.css index a3df8ebaf..2ba02f609 100644 --- a/roundcubemail/skins/default/mail.css +++ b/roundcubemail/skins/default/mail.css @@ -650,7 +650,7 @@ html>body*input[type$="file"]:not([class="none"]) { background-color: transparen { vertical-align: middle; margin-left: 4px; - border: 1px solid #666666; + border: 1px solid #999; } |
