Added widget visibilit indicator to Fluid (STR #2669).
This commit is contained in:
parent
c97990e517
commit
f4dd9c5199
@ -102,6 +102,7 @@ Changes in FLTK 1.4.0 Released: ??? ?? 2019
|
||||
Other Improvements
|
||||
|
||||
- (add new items here)
|
||||
- Added widget visibilit indicator to Fluid (STR #2669).
|
||||
- Added Fl_Input_::append() method (STR #2953).
|
||||
- Fix for STR#3473 (and its duplicate STR#3507) to restore configure-based
|
||||
builds on recent Linux/Unix distributions where the freetype-config
|
||||
|
||||
@ -41,10 +41,12 @@
|
||||
#include <FL/Fl_Pixmap.H>
|
||||
#include "pixmaps/lock.xpm"
|
||||
#include "pixmaps/protected.xpm"
|
||||
#include "pixmaps/invisible.xpm"
|
||||
//#include "pixmaps/unlock.xpm"
|
||||
|
||||
static Fl_Pixmap lock_pixmap(lock_xpm);
|
||||
static Fl_Pixmap protected_pixmap(protected_xpm);
|
||||
static Fl_Pixmap protected_pixmap(protected_xpm);
|
||||
static Fl_Pixmap invisible_pixmap(invisible_xpm);
|
||||
//static Fl_Pixmap unlock_pixmap(unlock_xpm);
|
||||
|
||||
#include "pixmaps/flWindow.xpm"
|
||||
@ -389,6 +391,10 @@ void Widget_Browser::item_draw(void *v, int X, int Y, int, int) const {
|
||||
case 0: lock_pixmap.draw(X - 17, Y); break;
|
||||
case 2: protected_pixmap.draw(X - 17, Y); break;
|
||||
}
|
||||
|
||||
if (l->is_widget() && ((Fl_Widget_Type*)l)->o && !((Fl_Widget_Type*)l)->o->visible()) {
|
||||
invisible_pixmap.draw(X - 17, Y);
|
||||
}
|
||||
|
||||
// Indent=12 per level: Now write the text that comes after the graphics representation
|
||||
Y += comment_incr;
|
||||
|
||||
@ -940,7 +940,10 @@ void visible_cb(Fl_Light_Button* i, void* v) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mod) set_modflag(1);
|
||||
if (mod) {
|
||||
set_modflag(1);
|
||||
redraw_browser();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
29
fluid/pixmaps/invisible.xpm
Normal file
29
fluid/pixmaps/invisible.xpm
Normal file
@ -0,0 +1,29 @@
|
||||
/* XPM */
|
||||
static const char *invisible_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"16 16 6 1",
|
||||
/* colors */
|
||||
"` c #000000",
|
||||
"a c #80c080",
|
||||
"b c #c0ffc0",
|
||||
"c c none",
|
||||
"M c #e0e0e0",
|
||||
"e c #408040",
|
||||
/* pixels */
|
||||
"cccccccccccccccc",
|
||||
"cccccccccccccccc",
|
||||
"cccccccccccccccc",
|
||||
"cccccccccccccccc",
|
||||
"cccccccccccccccc",
|
||||
"cccccccccccccccc",
|
||||
"ccMMMccccccccccc",
|
||||
"ccM`Mccccccccccc",
|
||||
"MMMMMccccccccccc",
|
||||
"M```Mccccccccccc",
|
||||
"MMM`Mccccccccccc",
|
||||
"ccM`Mccccccccccc",
|
||||
"MMM`MMMccccccccc",
|
||||
"M`````Mccccccccc",
|
||||
"MMMMMMMccccccccc",
|
||||
"cccccccccccccccc"
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user