summaryrefslogtreecommitdiff
path: root/fluid/Fl_Type.h
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-03-20 21:27:20 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-03-20 21:27:20 +0000
commit0919d57c330ce6be113a3651bf4ed0ef8a35f784 (patch)
treef01ad8ee388a87120ff95ec06aebadae58a52ef8 /fluid/Fl_Type.h
parent0bc98fd29efa40f4828813fd490c2afe6e2e7c4f (diff)
Template panel for "new" and "save template" actions, complete with
preview images that are generated when you save the template. Use @INSTANCE@ anywhere you want to substitute an instance name. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4148 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Type.h')
-rw-r--r--fluid/Fl_Type.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h
index 03f7ed3d5..107460094 100644
--- a/fluid/Fl_Type.h
+++ b/fluid/Fl_Type.h
@@ -561,6 +561,8 @@ public:
Fl_Widget_Type::ideal_size(w, h);
w += 2 * ((o->labelsize() - 3) & ~1) + o->labelsize() - 4;
h = (h / 5) * 5;
+ if (h < 15) h = 15;
+ if (w < (15 + h)) w = 15 + h;
}
virtual const char *type_name() {return "Fl_Menu_Button";}
Fl_Widget *widget(int X,int Y,int W,int H) {
@@ -582,6 +584,8 @@ public:
if (w1 < 1) w1 = 1;
w += 2 * w1 + o->labelsize() - 4;
h = (h / 5) * 5;
+ if (h < 15) h = 15;
+ if (w < (15 + h)) w = 15 + h;
}
virtual const char *type_name() {return "Fl_Choice";}
Fl_Widget *widget(int X,int Y,int W,int H) {
@@ -614,6 +618,8 @@ public:
w = o->w() - 20 - Fl::box_dw(o->box());
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + 20 + Fl::box_dw(o->box());
+ if (h < 15) h = 15;
+ if (w < (15 + h)) w = 15 + h;
}
virtual const char *type_name() {return "Fl_Input_Choice";}
Fl_Widget *widget(int X,int Y,int W,int H) {