mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 00:22:42 +08:00
Fl_Check_Browser didn't draw properly when inactive (STR #681)
src/Fl_Check_Browser.cxx:
- Update item_draw() function to check active_r()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4024 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
CHANGES IN FLTK 1.1.7
|
CHANGES IN FLTK 1.1.7
|
||||||
|
|
||||||
- Documentation fixes (STR #648)
|
- Documentation fixes (STR #648)
|
||||||
|
- Fl_Check_Browser didn't draw properly when inactive
|
||||||
|
(STR #681)
|
||||||
- Removed some redundant code in Fl_Group::handle() (STR
|
- Removed some redundant code in Fl_Group::handle() (STR
|
||||||
#669)
|
#669)
|
||||||
- The file chooser didn't always deactivate the OK
|
- The file chooser didn't always deactivate the OK
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Check_Browser.cxx,v 1.1.2.8 2004/04/11 04:38:57 easysw Exp $"
|
// "$Id$"
|
||||||
//
|
//
|
||||||
// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK).
|
// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -118,11 +118,11 @@ void Fl_Check_Browser::item_draw(void *v, int X, int Y, int, int) const {
|
|||||||
cb_item *i = (cb_item *)v;
|
cb_item *i = (cb_item *)v;
|
||||||
char *s = i->text;
|
char *s = i->text;
|
||||||
int tsize = textsize();
|
int tsize = textsize();
|
||||||
Fl_Color col = textcolor();
|
Fl_Color col = active_r() ? textcolor() : fl_inactive(textcolor());
|
||||||
int cy = Y + (tsize + 1 - CHECK_SIZE) / 2;
|
int cy = Y + (tsize + 1 - CHECK_SIZE) / 2;
|
||||||
X += 2;
|
X += 2;
|
||||||
|
|
||||||
fl_color(FL_BLACK);
|
fl_color(active_r() ? FL_BLACK : fl_inactive(FL_BLACK));
|
||||||
fl_loop(X, cy, X, cy + CHECK_SIZE,
|
fl_loop(X, cy, X, cy + CHECK_SIZE,
|
||||||
X + CHECK_SIZE, cy + CHECK_SIZE, X + CHECK_SIZE, cy);
|
X + CHECK_SIZE, cy + CHECK_SIZE, X + CHECK_SIZE, cy);
|
||||||
if (i->checked) {
|
if (i->checked) {
|
||||||
@@ -266,5 +266,5 @@ void Fl_Check_Browser::check_none() {
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Check_Browser.cxx,v 1.1.2.8 2004/04/11 04:38:57 easysw Exp $".
|
// End of "$Id$".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user