summaryrefslogtreecommitdiff
path: root/fluid/Fl_Window_Type.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-03-08 13:46:31 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-03-08 13:46:31 +0000
commit29e022cc46b35da484592af581a1c16bfd5f1530 (patch)
tree003d50fbd3e145169bab85d04c8207b54d816481 /fluid/Fl_Window_Type.cxx
parent8769b2f7fa5c7fe195338e9cc70b89aa3edeff32 (diff)
Use grid size for window resizing.
Save work on project settings dialog. Ideal spacing for group-derived widgets is 10 pixels, except for tabs which has a Y spacing of 25 (for the normal label size) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Window_Type.cxx')
-rw-r--r--fluid/Fl_Window_Type.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx
index 231ee9c42..230b52b05 100644
--- a/fluid/Fl_Window_Type.cxx
+++ b/fluid/Fl_Window_Type.cxx
@@ -105,9 +105,9 @@ void grid_cb(Fl_Input *i, long v) {
for (p = Fl_Type::first; p; p = p->next) {
if (p->is_window()) {
w = (Fl_Window_Type *)p;
- ((Fl_Window *)(w->o))->size_range(gridx * snap, gridy * snap,
+ ((Fl_Window *)(w->o))->size_range(gridx, gridy,
Fl::w(), Fl::h(),
- gridx * snap, gridy * snap, 0);
+ gridx, gridy, 0);
}
}
}
@@ -281,9 +281,9 @@ Fl_Type *Fl_Window_Type::make() {
}
// Set the size ranges for this window; in order to avoid opening the
// X display we use an arbitrary maximum size...
- ((Fl_Window *)(this->o))->size_range(gridx * snap, gridy * snap,
+ ((Fl_Window *)(this->o))->size_range(gridx, gridy,
3072, 2048,
- gridx * snap, gridy * snap, 0);
+ gridx, gridy, 0);
myo->factory = this;
myo->drag = 0;
myo->numselected = 0;
@@ -333,8 +333,7 @@ void Fl_Window_Type::open() {
w->resizable(p);
}
- w->size_range(gridx * snap, gridy * snap, Fl::w(), Fl::h(),
- gridx * snap, gridy * snap, 0);
+ w->size_range(gridx, gridy, Fl::w(), Fl::h(), gridx, gridy, 0);
}
// control panel items:
@@ -407,7 +406,7 @@ void Overlay_Window::resize(int X,int Y,int W,int H) {
// nearest multiple of gridsize, and snap to original position
void Fl_Window_Type::newdx() {
int mydx, mydy;
- if (Fl::event_state(FL_ALT)) {
+ if (Fl::event_state(FL_ALT) || !snap) {
mydx = mx-x1;
mydy = my-y1;
} else {