summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2011-08-11 07:15:34 +0000
committerPaul Buetow <paul@buetow.org>2011-08-11 07:15:34 +0000
commit03b78a19cb368187a56c6d6b6570405f85a1f317 (patch)
tree76812e0256a961bbc81669c3cf4960a98a863c51
parent771f0acfd8bec8f27522593e58593902c1fc8fc1 (diff)
Some code refactoring
-rwxr-xr-xloadbars.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/loadbars.pl b/loadbars.pl
index d4dfead..8cc8a72 100755
--- a/loadbars.pl
+++ b/loadbars.pl
@@ -34,7 +34,7 @@ use constant {
ORANGE => SDL::Color->new(-r => 0xff, -g => 0x70, -b => 0x00),
PURPLE => SDL::Color->new(-r => 0xa0, -g => 0x20, -b => 0xf0),
RED => SDL::Color->new(-r => 0xff, -g => 0x00, -b => 0x00),
- White => SDL::Color->new(-r => 0xff, -g => 0xff, -b => 0xff),
+ WHITE => SDL::Color->new(-r => 0xff, -g => 0xff, -b => 0xff),
GREY => SDL::Color->new(-r => 0x3b, -g => 0x3b, -b => 0x3b),
YELLOW0 => SDL::Color->new(-r => 0xff, -g => 0xa0, -b => 0x00),
YELLOW => SDL::Color->new(-r => 0xff, -g => 0xc0, -b => 0x00),
@@ -429,7 +429,7 @@ sub main_loop ($@) {
$app->fill($rect_system, $cpuaverage{system} > Loadbars::SYSTEM_PURPLE
? Loadbars::PURPLE
: Loadbars::BLUE);
- $app->fill($rect_user, $system_n_user > Loadbars::USER_WHITE ? Loadbars::White
+ $app->fill($rect_user, $system_n_user > Loadbars::USER_WHITE ? Loadbars::WHITE
: ($system_n_user > Loadbars::USER_RED ? Loadbars::RED
: ($system_n_user > Loadbars::USER_ORANGE ? Loadbars::ORANGE
: ($system_n_user > Loadbars::USER_YELLOW0 ? Loadbars::YELLOW0