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> 2001-01-21 Dekel Tsur <dekelts@tau.ac.il>
* FormRef.C (update): Do not update dialog_->{ref,name,type} * 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 // Note that X stores the RGB values in the range 0 - 65535
// whilst we require them in the range 0 - 255. // whilst we require them in the range 0 - 255.
RGBColor col; RGBColor col;
col.r = static_cast<unsigned char>(xcol.red); col.r = xcol.red / 256;
col.g = static_cast<unsigned char>(xcol.green); col.g = xcol.green / 256;
col.b = static_cast<unsigned char>(xcol.blue); col.b = xcol.blue / 256;
// Create a valid X11 name of the form "#rrggbb" and change the // Create a valid X11 name of the form "#rrggbb" and change the
// LColor X11name to this. Don't want to trigger a redraw, // LColor X11name to this. Don't want to trigger a redraw,

View File

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

View File

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