all repos — fluxbox @ aeac1b334441a348a411fc01a1568ece74b76a2f

custom fork of the fluxbox windowmanager

scaling color values so that they have the right intensity
markt markt
commit

aeac1b334441a348a411fc01a1568ece74b76a2f

parent

590b6c93d922a9940cb4c3d78d21509b289bd643

2 files changed, 9 insertions(+), 9 deletions(-)

jump to
M src/FbTk/Color.ccsrc/FbTk/Color.cc

@@ -148,9 +148,9 @@ setPixel(col_copy.pixel());

return; } - allocate(col_copy.red()*0xFF, - col_copy.green()*0xFF, - col_copy.blue()*0xFF, + allocate(col_copy.red()*0x101, + col_copy.green()*0x101, + col_copy.blue()*0x101, col_copy.m_screen); }
M src/FbTk/Texture.ccsrc/FbTk/Texture.cc

@@ -118,15 +118,15 @@

xcol.red = (unsigned int) (m_color.red() + (m_color.red() >> 1)); if (xcol.red >= 0xff) xcol.red = 0xffff; - else xcol.red *= 0xff; + else xcol.red *= 0x101; xcol.green = (unsigned int) (m_color.green() + (m_color.green() >> 1)); if (xcol.green >= 0xff) xcol.green = 0xffff; - else xcol.green *= 0xff; + else xcol.green *= 0x101; xcol.blue = (unsigned int) (m_color.blue() + (m_color.blue() >> 1)); if (xcol.blue >= 0xff) xcol.blue = 0xffff; - else xcol.blue *= 0xff; + else xcol.blue *= 0x101; if (! XAllocColor(disp, colm, &xcol)) xcol.pixel = 0;

@@ -135,13 +135,13 @@ m_hicolor.setPixel(xcol.pixel);

xcol.red = (unsigned int) ((m_color.red() >> 2) + - (m_color.red() >> 1)) * 0xff; + (m_color.red() >> 1)) * 0x101; xcol.green = (unsigned int) ((m_color.green() >> 2) + - (m_color.green() >> 1)) * 0xff; + (m_color.green() >> 1)) * 0x101; xcol.blue = (unsigned int) ((m_color.blue() >> 2) + - (m_color.blue() >> 1)) * 0xff; + (m_color.blue() >> 1)) * 0x101; if (! XAllocColor(disp, colm, &xcol)) xcol.pixel = 0;