Changeset 2137 in subversion


Ignore:
Timestamp:
Dec 9, 2008 8:48:42 AM (4 years ago)
Author:
alec
Message:

#1485544: quota image better look

Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/bin/quotaimg.php

    r2019 r2137  
    7171        $padding = 0; 
    7272 
    73         $limit['high'] = 70; 
    74         $limit['mid']  = 45; 
     73        $limit['high'] = 80; 
     74        $limit['mid']  = 55; 
    7575        $limit['low']  = 0; 
    7676 
    7777        // Fill Colors 
    78         $color['fill']['high'] = '215, 13, 13';   // Near quota fill color 
    79         $color['fill']['mid']  = '126, 192, 238'; // Mid-area of quota fill color 
    80         $color['fill']['low']  = '147, 225, 100'; // Far from quota fill color 
     78        $color['fill']['high'] = '243, 49, 49';   // Near quota fill color 
     79        $color['fill']['mid']  = '245, 173, 60'; // Mid-area of quota fill color 
     80        $color['fill']['low']  = '145, 225, 100'; // Far from quota fill color 
    8181 
    8282        // Background colors 
     
    8787        // Misc. Colors 
    8888        $color['border'] = '0, 0, 0'; 
    89         $color['text']   = '102, 102, 102'; 
     89        $color['text']['high'] = '255, 255, 255';  // white text for red background 
     90        $color['text']['mid'] = '102, 102, 102'; 
     91        $color['text']['low'] = '102, 102, 102'; 
     92        $color['text']['normal'] = '102, 102, 102'; 
    9093 
    9194 
     
    9497         ***********************************/ 
    9598 
    96     // @todo: Set to "??" instead? 
     99        // @todo: Set to "??" instead? 
    97100        if (ereg("^[^0-9?]*$", $used) || ereg("^[^0-9?]*$", $total)) { 
    98101                return false;  
     
    116119        } 
    117120                 
    118         list($r, $g, $b) = explode(',', $color['text']); 
    119         $text = imagecolorallocate($im, $r, $g, $b); 
    120  
    121121        if ($unknown) { 
     122                list($r, $g, $b) = explode(',', $color['text']['normal']); 
     123                $text = imagecolorallocate($im, $r, $g, $b); 
    122124                list($r, $g, $b) = explode(',', $color['bg']['Unknown']); 
    123125                $background = imagecolorallocate($im, $r, $g, $b); 
     126 
    124127                imagefilledrectangle($im, 0, 0, $width, $height, $background); 
    125128 
     
    128131                imagestring($im, $font, $mid, $padding, $string, $text); 
    129132        } else if ($used > $total) { 
     133                list($r, $g, $b) = explode(',', $color['text']['normal']); 
     134                $text = imagecolorallocate($im, $r, $g, $b); 
    130135                list($r, $g, $b) = explode(',', $color['bg']['OL']); 
    131          
    132136                $background = imagecolorallocate($im, $r, $g, $b); 
    133137         
     
    139143        } else { 
    140144                list($r, $g, $b) = explode(',', $color['bg']['quota']); 
    141          
    142145                $background = imagecolorallocate($im, $r, $b, $g); 
    143146         
     
    147150 
    148151                if ($quota >= $limit['high']) { 
     152                        list($r, $g, $b) = explode(',', $color['text']['high']); 
     153                        $text = imagecolorallocate($im, $r, $g, $b); 
    149154                        list($r, $g, $b) = explode(',', $color['fill']['high']); 
    150155                        $fill = imagecolorallocate($im, $r, $g, $b); 
    151156                } elseif($quota >= $limit['mid']) { 
     157                        list($r, $g, $b) = explode(',', $color['text']['mid']); 
     158                        $text = imagecolorallocate($im, $r, $g, $b); 
    152159                        list($r, $g, $b) = explode(',', $color['fill']['mid']); 
    153160                        $fill = imagecolorallocate($im, $r, $g, $b); 
    154161                } else { 
    155162                        // if($quota >= $limit['low']) 
     163                        list($r, $g, $b) = explode(',', $color['text']['low']); 
     164                        $text = imagecolorallocate($im, $r, $g, $b); 
    156165                        list($r, $g, $b) = explode(',', $color['fill']['low']); 
    157166                        $fill = imagecolorallocate($im, $r, $g, $b); 
  • trunk/roundcubemail/skins/default/mail.css

    r2131 r2137  
    651651  vertical-align: middle; 
    652652  margin-left: 4px; 
    653   border: 1px solid #666666; 
     653  border: 1px solid #999; 
    654654} 
    655655 
Note: See TracChangeset for help on using the changeset viewer.