diff --git a/ChangeLog b/ChangeLog index 4720854beb..51a4b44767 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-01-23 Angus Leeming + + * FormPreferences.C (LoadBrowserLyX): convert unsigned short to + unsigned char correctly and so fix 2 bugs loading/changing colors. + 2001-01-24 Jean-Marc Lasgouttes * src/lyx_gui.C (LyXGUI): force the LC_NUMERIC locale to "C" after diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index c92a65177e..219f606809 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -806,9 +806,9 @@ void FormPreferences::Colors::LoadBrowserLyX() // Note that X stores the RGB values in the range 0 - 65535 // whilst we require them in the range 0 - 255. RGBColor col; - col.r = static_cast(xcol.red); - col.g = static_cast(xcol.green); - col.b = static_cast(xcol.blue); + col.r = xcol.red / 256; + col.g = xcol.green / 256; + col.b = xcol.blue / 256; // Create a valid X11 name of the form "#rrggbb" and change the // LColor X11name to this. Don't want to trigger a redraw,