Use 16x16 KDE icon images by default.

Tweek plastic boxtypes (didn't draw to the edge of the bounding box)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2205 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-05-10 00:18:37 +00:00
parent c56bb65a97
commit ad9546204c
4 changed files with 37 additions and 24 deletions

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_File_Icon.H,v 1.1.2.5 2002/01/01 15:11:27 easysw Exp $"
// "$Id: Fl_File_Icon.H,v 1.1.2.6 2002/05/10 00:18:37 easysw Exp $"
//
// Fl_File_Icon definitions.
//
@ -95,6 +95,7 @@ class Fl_File_Icon //// Icon data
FL_EXPORT void load(const char *f);
FL_EXPORT int load_fti(const char *fti);
FL_EXPORT int load_image(const char *i);
Fl_File_Icon *next() { return (next_); }
const char *pattern() { return (pattern_); }
int size() { return (num_data_); }
int type() { return (type_); }
@ -108,5 +109,5 @@ class Fl_File_Icon //// Icon data
#endif // !_Fl_Fl_File_Icon_H_
//
// End of "$Id: Fl_File_Icon.H,v 1.1.2.5 2002/01/01 15:11:27 easysw Exp $".
// End of "$Id: Fl_File_Icon.H,v 1.1.2.6 2002/05/10 00:18:37 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_File_Icon2.cxx,v 1.1.2.13 2002/03/25 21:08:41 easysw Exp $"
// "$Id: Fl_File_Icon2.cxx,v 1.1.2.14 2002/05/10 00:18:37 easysw Exp $"
//
// Fl_File_Icon system icon routines.
//
@ -650,8 +650,18 @@ Fl_File_Icon::load_system_icons(void)
{
// Load KDE icons...
icon = new Fl_File_Icon("*", Fl_File_Icon::PLAIN);
if (!access("/usr/share/icons/hicolor/32x32/mimetypes/unknown.png", F_OK))
icon->load_image("/usr/share/icons/hicolor/32x32/mimetypes/unknown.png");
if (!access("/usr/share/icons/hicolor/16x16/mimetypes/unknown.png", F_OK))
icon->load_image("/usr/share/icons/hicolor/16x16/mimetypes/unknown.png");
else
icon->load_image("/usr/share/icons/unknown.xpm");
icon = new Fl_File_Icon("*", Fl_File_Icon::LINK);
if (!access("/usr/share/icons/hicolor/16x16/mimetypes/unknown.png", F_OK))
icon->load_image("/usr/share/icons/hicolor/16x16/mimetypes/unknown.png");
else
icon->load_image("/usr/share/icons/unknown.xpm");
if (!access("/usr/share/icons/hicolor/16x16/filesystems/link.png", F_OK))
icon->load_image("/usr/share/icons/hicolor/16x16/filesystems/link.png");
else
icon->load_image("/usr/share/icons/unknown.xpm");
@ -823,11 +833,11 @@ load_kde_mimelnk(const char *filename)
// KDE 2.x icons
int i; // Looping var
static const char *paths[] = { // Subdirs to look in...
"32x32/actions",
"32x32/apps",
"32x32/devices",
"32x32/filesystems",
"32x32/mimetypes",
"16x16/actions",
"16x16/apps",
"16x16/devices",
"16x16/filesystems",
"16x16/mimetypes",
"22x22/actions",
"22x22/apps",
@ -835,11 +845,11 @@ load_kde_mimelnk(const char *filename)
"22x22/filesystems",
"22x22/mimetypes",
"16x16/actions",
"16x16/apps",
"16x16/devices",
"16x16/filesystems",
"16x16/mimetypes"
"32x32/actions",
"32x32/apps",
"32x32/devices",
"32x32/filesystems",
"32x32/mimetypes"
};
for (i = 0; i < (int)(sizeof(paths) / sizeof(paths[0])); i ++) {
@ -931,5 +941,5 @@ get_kde_val(char *str,
//
// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.13 2002/03/25 21:08:41 easysw Exp $".
// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.14 2002/05/10 00:18:37 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Group.cxx,v 1.8.2.8.2.12 2002/04/09 17:20:23 easysw Exp $"
// "$Id: Fl_Group.cxx,v 1.8.2.8.2.13 2002/05/10 00:18:37 easysw Exp $"
//
// Group widget for the Fast Light Tool Kit (FLTK).
//
@ -247,7 +247,9 @@ int Fl_Group::handle(int event) {
if (children()) {
for (int j = i;;) {
if (send(a[j], event)) return 1;
if (a[j]->takesevents() || event != FL_MOUSEWHEEL) {
if (send(a[j], event)) return 1;
}
j++;
if (j >= children()) j = 0;
if (j == i) break;
@ -587,5 +589,5 @@ void Fl_Group::draw_outside_label(const Fl_Widget& w) const {
}
//
// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.12 2002/04/09 17:20:23 easysw Exp $".
// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.13 2002/05/10 00:18:37 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: fl_plastic.cxx,v 1.1.2.11 2002/04/11 11:52:43 easysw Exp $"
// "$Id: fl_plastic.cxx,v 1.1.2.12 2002/05/10 00:18:37 easysw Exp $"
//
// "Plastic" drawing routines for the Fast Light Tool Kit (FLTK).
//
@ -45,7 +45,7 @@ static void shade_frame(int x, int y, int w, int h, const char *c, Fl_Color bc)
uchar *g = fl_gray_ramp();
int b = strlen(c) / 4 + 1;
for (x += b, y += b, w -= 2 * b + 1, h -= 2 * b + 1; b > 1; b --)
for (x += b, y += b, w -= 2 * b, h -= 2 * b; b > 1; b --)
{
// Draw lines around the perimeter of the button, 4 colors per
// circuit.
@ -84,7 +84,7 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc)
// Draw the bottom line and points...
fl_color(shade_color(g[c[clen - i]], bc));
fl_xyline(x + 1, y + h - 1 - i, x + w - 1);
fl_xyline(x + 1, y + h - i, x + w - 1);
fl_color(shade_color(g[c[clen - i] - 2], bc));
fl_point(x, y + h - i);
@ -95,7 +95,7 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc)
i = chalf / cstep;
fl_color(shade_color(g[c[chalf]], bc));
fl_rectf(x + 1, y + i, w - 2, h - 2 * i);
fl_rectf(x + 1, y + i, w - 2, h - 2 * i + 1);
fl_color(shade_color(g[c[chalf] - 2], bc));
fl_yxline(x, y + i, y + h - i);
@ -173,5 +173,5 @@ Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX() {
//
// End of "$Id: fl_plastic.cxx,v 1.1.2.11 2002/04/11 11:52:43 easysw Exp $".
// End of "$Id: fl_plastic.cxx,v 1.1.2.12 2002/05/10 00:18:37 easysw Exp $".
//