Commit 14893759 authored by daniel_e's avatar daniel_e
Browse files

(scale_to_8bit): Don't try to round to the nearest value. This fixes

a fun bug that caused the orange color of the current match to become
slightly brighter on each config load/save cycle.
parent 3da5304e
2002-12-27 Daniel Elstner <daniel.elstner@gmx.net>
* src/stringutils.cc (scale_to_8bit): Don't try to round to the
nearest value. This fixes a fun bug that caused the orange color
of the current match to become slightly brighter on each config
load/save cycle.
2002-12-27 Daniel Elstner <daniel.elstner@gmx.net>
* pixmaps/Makefile.am (stockimages.h): Beautify by printing the
......
......@@ -66,9 +66,10 @@ bool IsSignificantEncodingChar::operator()(char c) const
return true;
}
inline
unsigned int scale_to_8bit(unsigned int value)
{
return std::min(255u, (value + 128) / 256);
return (value >> 8) & 0xFF;
}
inline
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment