fix loading of colors bug in FormPreferences

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1371 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2001-01-23 13:36:23 +00:00
parent 75f555e7c0
commit baa8ca981f
4 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2001-01-23 Angus Leeming <a.leeming@ic.ac.uk>
* FormPreferences.C (LoadBrowserLyX): convert unsigned short to
unsigned char correctly and so fix 2 bugs loading/changing colors.
2001-01-21 Dekel Tsur <dekelts@tau.ac.il>
* FormRef.C (update): Do not update dialog_->{ref,name,type}

View File

@ -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<unsigned char>(xcol.red);
col.g = static_cast<unsigned char>(xcol.green);
col.b = static_cast<unsigned char>(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,

View File

@ -1,3 +1,4 @@
makefile
*.c
*.h
*.C

View File

@ -42,15 +42,14 @@ all:
test: clean $(OBJS)
updatesrc: test
for fil in *.C *.h; \
do cmp -s $$fil ../$$fil || mv $$fil ..; \
done
for fil in *.C *.h; do cmp -s $$fil ../$$fil || mv $$fil ..; done
rm -f *.[hHcC] *.bak
.fd.C:
${SHELL} ./fdfix.sh $<
clean:
rm -f *.[hHcC] *.bak
rm -f *.[hHcC] *.bak fdfixc_modified.sed
distclean: clean
rm -f *.orig *.rej *~