← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1423468 into lp:widelands

 

TiborB has proposed merging lp:~widelands-dev/widelands/bug-1423468 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1423468 in widelands: "After reload, all percentages are blue until they are updated again"
  https://bugs.launchpad.net/widelands/+bug/1423468

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1423468/+merge/250381

The fix is quite simple as you can see
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1423468 into lp:widelands.
=== modified file 'src/graphic/text_constants.h'
--- src/graphic/text_constants.h	2014-11-27 18:18:09 +0000
+++ src/graphic/text_constants.h	2015-02-19 21:14:27 +0000
@@ -47,6 +47,5 @@
 #define UI_FONT_CLR_BAD_HEX       "bb0000"
 #define UI_FONT_CLR_OK_HEX        "ffe11e"
 #define UI_FONT_CLR_GOOD_HEX      "00bb00"
-#define UI_FONT_CLR_IDLE_HEX      "0090ff"
 
 #endif  // end of include guard: WL_GRAPHIC_TEXT_CONSTANTS_H

=== modified file 'src/logic/productionsite.cc'
--- src/logic/productionsite.cc	2015-02-05 12:11:20 +0000
+++ src/logic/productionsite.cc	2015-02-19 21:14:27 +0000
@@ -311,9 +311,7 @@
 	const unsigned int lastPercOk = (lastOk * 100) / (STATISTICS_VECTOR_LENGTH / 2);
 
 	std::string color;
-	if (percOk > (m_crude_percent / 10000) && percOk - (m_crude_percent / 10000) > 50)
-		color = UI_FONT_CLR_IDLE_HEX;
-	else if (percOk < 33)
+	if (percOk < 33)
 		color = UI_FONT_CLR_BAD_HEX;
 	else if (percOk < 66)
 		color = UI_FONT_CLR_OK_HEX;


Follow ups