mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
Fix rendering of Fl_Light_Button with the plastic scheme.
The "none" and "base" schemes map to no scheme (standard FLTK look-n-feel) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2119 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
CHANGES IN FLTK 1.1.0rc1
|
CHANGES IN FLTK 1.1.0rc1
|
||||||
|
|
||||||
|
- Fixed rendering of Fl_Light_Button with the plastic
|
||||||
|
scheme.
|
||||||
- Fixed a bug in the MacOS font enumeration code.
|
- Fixed a bug in the MacOS font enumeration code.
|
||||||
- Now show a "locked" icon next to static/private
|
- Now show a "locked" icon next to static/private
|
||||||
elements in FLUID, and "unlocked" icon next to
|
elements in FLUID, and "unlocked" icon next to
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.13 2002/04/11 10:46:19 easysw Exp $"
|
// "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.14 2002/04/27 19:35:18 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Lighted button widget for the Fast Light Tool Kit (FLTK).
|
// Lighted button widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -92,7 +92,13 @@ void Fl_Light_Button::draw() {
|
|||||||
int ww = W/2+1;
|
int ww = W/2+1;
|
||||||
int xx = dx;
|
int xx = dx;
|
||||||
if (w()<ww+2*xx) xx = (w()-ww)/2;
|
if (w()<ww+2*xx) xx = (w()-ww)/2;
|
||||||
|
if (Fl::scheme()) {
|
||||||
|
col = active_r() ? selection_color() : fl_inactive(selection_color());
|
||||||
|
fl_color(value() ? col : fl_color_average(col, FL_BLACK, 0.5f));
|
||||||
|
fl_pie(x()+xx, y()+dy+1, ww, hh, 0, 360);
|
||||||
|
} else {
|
||||||
draw_box(FL_THIN_DOWN_BOX, x()+xx, y()+dy+1, ww, hh, col);
|
draw_box(FL_THIN_DOWN_BOX, x()+xx, y()+dy+1, ww, hh, col);
|
||||||
|
}
|
||||||
dx = (ww + 2 * dx - W) / 2;
|
dx = (ww + 2 * dx - W) / 2;
|
||||||
}
|
}
|
||||||
draw_label(x()+W+2*dx, y(), w()-W-2*dx, h());
|
draw_label(x()+W+2*dx, y(), w()-W-2*dx, h());
|
||||||
@@ -116,5 +122,5 @@ Fl_Light_Button::Fl_Light_Button(int x, int y, int w, int h, const char* l)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.13 2002/04/11 10:46:19 easysw Exp $".
|
// End of "$Id: Fl_Light_Button.cxx,v 1.4.2.3.2.14 2002/04/27 19:35:18 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.8 2002/04/13 22:17:46 easysw Exp $"
|
// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.9 2002/04/27 19:35:18 easysw Exp $"
|
||||||
//
|
//
|
||||||
// System color support for the Fast Light Tool Kit (FLTK).
|
// System color support for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -223,7 +223,7 @@ int Fl::scheme(const char *s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (s) {
|
if (s) {
|
||||||
if (!strcasecmp(s, "none") || !*s) s = 0;
|
if (!strcasecmp(s, "none") || !strcasecmp(s, "base") || !*s) s = 0;
|
||||||
else s = strdup(s);
|
else s = strdup(s);
|
||||||
}
|
}
|
||||||
if (scheme_) free((void*)scheme_);
|
if (scheme_) free((void*)scheme_);
|
||||||
@@ -316,5 +316,5 @@ int Fl::reload_scheme() {
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.8 2002/04/13 22:17:46 easysw Exp $".
|
// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.9 2002/04/27 19:35:18 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user