From 062839df85a084feacb0db86efdd1180ef4a8cf4 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Tue, 3 Aug 2010 18:42:14 +0000 Subject: [PATCH] Weigh reverse with factor 20 so coloring takes effect more quickly. --- maintenance/language/StatOutputs.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maintenance/language/StatOutputs.php b/maintenance/language/StatOutputs.php index f1e935b4bb..839d0095c5 100644 --- a/maintenance/language/StatOutputs.php +++ b/maintenance/language/StatOutputs.php @@ -52,6 +52,10 @@ class wikiStatsOutput extends statsOutput { function formatPercent( $subset, $total, $revert = false, $accuracy = 2 ) { $v = @round( 255 * $subset / $total ); if ( $revert ) { + # Weigh reverse with factor 20 so coloring takes effect more quickly as + # this option is used solely for reporting 'bad' percentages. + $v = $v * 20; + if ( $v > 255 ) $v = 255; $v = 255 - $v; } if ( $v < 128 ) { -- 2.20.1