mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Icon labels have pseudo-shadow.
Other stuff I forgot.
This commit is contained in:
parent
cbc6571b77
commit
186b594f2d
@ -38,7 +38,6 @@
|
|||||||
// label offset from icon y()+h(), so selection box can be drawn nicely
|
// label offset from icon y()+h(), so selection box can be drawn nicely
|
||||||
#define LABEL_OFFSET 2
|
#define LABEL_OFFSET 2
|
||||||
|
|
||||||
|
|
||||||
DesktopIcon::DesktopIcon(GlobalIconSettings* gs, IconSettings* is, int bg) :
|
DesktopIcon::DesktopIcon(GlobalIconSettings* gs, IconSettings* is, int bg) :
|
||||||
Fl_Widget(is->x, is->y, ICONSIZE, ICONSIZE) {
|
Fl_Widget(is->x, is->y, ICONSIZE, ICONSIZE) {
|
||||||
|
|
||||||
@ -120,8 +119,8 @@ void DesktopIcon::update_label_size(void) {
|
|||||||
|
|
||||||
fl_measure(label(), lwidth, lheight, align());
|
fl_measure(label(), lwidth, lheight, align());
|
||||||
|
|
||||||
lwidth += 8;
|
lwidth += 12;
|
||||||
lheight += 4;
|
lheight += 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopIcon::drag(int x, int y, bool apply) {
|
void DesktopIcon::drag(int x, int y, bool apply) {
|
||||||
@ -217,6 +216,10 @@ void DesktopIcon::draw(void) {
|
|||||||
fl_rectf(X, Y, lwidth, lheight);
|
fl_rectf(X, Y, lwidth, lheight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// pseudo-shadow
|
||||||
|
fl_color(FL_BLACK);
|
||||||
|
fl_draw(label(), X+1, Y+1, lwidth, lheight, align(), 0, 0);
|
||||||
|
|
||||||
fl_color(globals->label_foreground);
|
fl_color(globals->label_foreground);
|
||||||
fl_draw(label(), X, Y, lwidth, lheight, align(), 0, 0);
|
fl_draw(label(), X, Y, lwidth, lheight, align(), 0, 0);
|
||||||
|
|
||||||
@ -225,9 +228,8 @@ void DesktopIcon::draw(void) {
|
|||||||
* draw focused box on our way so later
|
* draw focused box on our way so later
|
||||||
* this can be used to draw customised boxes
|
* this can be used to draw customised boxes
|
||||||
*/
|
*/
|
||||||
fl_line_style(FL_DOT);
|
|
||||||
|
|
||||||
fl_color(globals->label_foreground);
|
fl_color(globals->label_foreground);
|
||||||
|
fl_line_style(FL_DOT);
|
||||||
|
|
||||||
fl_push_matrix();
|
fl_push_matrix();
|
||||||
fl_begin_loop();
|
fl_begin_loop();
|
||||||
|
@ -528,8 +528,6 @@ void Wallpaper::draw(void) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//#include <FL/Fl.h>
|
|
||||||
|
|
||||||
int Wallpaper::handle(int event) {
|
int Wallpaper::handle(int event) {
|
||||||
switch(event) {
|
switch(event) {
|
||||||
/*
|
/*
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
Wallpaper = /home/foo/xxx/baz/tax
|
Wallpaper = /home/foo/xxx/baz/tax
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
Label Background = 216
|
Label Background = 827223040
|
||||||
Label Foreground = 7
|
Label Foreground = 7
|
||||||
Label Fontsize = 10
|
Label Fontsize = 10
|
||||||
Label Maxwidth = 55
|
Label Maxwidth = 55
|
||||||
|
Loading…
Reference in New Issue
Block a user