mirror of
https://github.com/fltk/fltk.git
synced 2026-05-27 19:10:24 +08:00
Fluid: no grid on window resizing. (#399)
This commit is contained in:
@@ -674,10 +674,6 @@ void x_cb(Fluid_Coord_Input *i, void *v) {
|
|||||||
i->variables(widget_vars, o);
|
i->variables(widget_vars, o);
|
||||||
w->resize((int)i->value(), w->y(), w->w(), w->h());
|
w->resize((int)i->value(), w->y(), w->w(), w->h());
|
||||||
if (w->window()) w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
if (o->is_window()) {
|
|
||||||
((Fl_Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(),
|
|
||||||
gridx, gridy, 0);
|
|
||||||
}
|
|
||||||
widget_i++;
|
widget_i++;
|
||||||
mod = 1;
|
mod = 1;
|
||||||
}
|
}
|
||||||
@@ -702,10 +698,6 @@ void y_cb(Fluid_Coord_Input *i, void *v) {
|
|||||||
i->variables(widget_vars, o);
|
i->variables(widget_vars, o);
|
||||||
w->resize(w->x(), (int)i->value(), w->w(), w->h());
|
w->resize(w->x(), (int)i->value(), w->w(), w->h());
|
||||||
if (w->window()) w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
if (o->is_window()) {
|
|
||||||
((Fl_Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(),
|
|
||||||
gridx, gridy, 0);
|
|
||||||
}
|
|
||||||
widget_i++;
|
widget_i++;
|
||||||
mod = 1;
|
mod = 1;
|
||||||
}
|
}
|
||||||
@@ -730,10 +722,6 @@ void w_cb(Fluid_Coord_Input *i, void *v) {
|
|||||||
i->variables(widget_vars, o);
|
i->variables(widget_vars, o);
|
||||||
w->resize(w->x(), w->y(), (int)i->value(), w->h());
|
w->resize(w->x(), w->y(), (int)i->value(), w->h());
|
||||||
if (w->window()) w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
if (o->is_window()) {
|
|
||||||
((Fl_Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(),
|
|
||||||
gridx, gridy, 0);
|
|
||||||
}
|
|
||||||
widget_i++;
|
widget_i++;
|
||||||
mod = 1;
|
mod = 1;
|
||||||
}
|
}
|
||||||
@@ -758,10 +746,6 @@ void h_cb(Fluid_Coord_Input *i, void *v) {
|
|||||||
i->variables(widget_vars, o);
|
i->variables(widget_vars, o);
|
||||||
w->resize(w->x(), w->y(), w->w(), (int)i->value());
|
w->resize(w->x(), w->y(), w->w(), (int)i->value());
|
||||||
if (w->window()) w->window()->redraw();
|
if (w->window()) w->window()->redraw();
|
||||||
if (o->is_window()) {
|
|
||||||
((Fl_Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(),
|
|
||||||
gridx, gridy, 0);
|
|
||||||
}
|
|
||||||
widget_i++;
|
widget_i++;
|
||||||
mod = 1;
|
mod = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,9 +99,7 @@ void grid_cb(Fl_Int_Input *i, long v) {
|
|||||||
for (p = Fl_Type::first; p; p = p->next) {
|
for (p = Fl_Type::first; p; p = p->next) {
|
||||||
if (p->is_window()) {
|
if (p->is_window()) {
|
||||||
w = (Fl_Window_Type *)p;
|
w = (Fl_Window_Type *)p;
|
||||||
((Fl_Window *)(w->o))->size_range(gridx, gridy,
|
((Fl_Window *)(w->o))->size_range(gridx, gridy, Fl::w(), Fl::h());
|
||||||
Fl::w(), Fl::h(),
|
|
||||||
gridx, gridy, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -406,9 +404,7 @@ Fl_Type *Fl_Window_Type::make(Strategy strategy) {
|
|||||||
}
|
}
|
||||||
// Set the size ranges for this window; in order to avoid opening the
|
// Set the size ranges for this window; in order to avoid opening the
|
||||||
// X display we use an arbitrary maximum size...
|
// X display we use an arbitrary maximum size...
|
||||||
((Fl_Window *)(this->o))->size_range(gridx, gridy,
|
((Fl_Window *)(this->o))->size_range(gridx, gridy, 6144, 4096);
|
||||||
3072, 2048,
|
|
||||||
gridx, gridy, 0);
|
|
||||||
myo->factory = this;
|
myo->factory = this;
|
||||||
myo->drag = 0;
|
myo->drag = 0;
|
||||||
myo->numselected = 0;
|
myo->numselected = 0;
|
||||||
@@ -460,7 +456,7 @@ void Fl_Window_Type::open() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
w->image(Fl::scheme_bg_);
|
w->image(Fl::scheme_bg_);
|
||||||
w->size_range(gridx, gridy, Fl::w(), Fl::h(), gridx, gridy, 0);
|
w->size_range(gridx, gridy, Fl::w(), Fl::h());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read an image of the window
|
// Read an image of the window
|
||||||
@@ -1553,9 +1549,7 @@ Fl_Type *Fl_Widget_Class_Type::make(Strategy strategy) {
|
|||||||
}
|
}
|
||||||
// Set the size ranges for this window; in order to avoid opening the
|
// Set the size ranges for this window; in order to avoid opening the
|
||||||
// X display we use an arbitrary maximum size...
|
// X display we use an arbitrary maximum size...
|
||||||
((Fl_Window *)(this->o))->size_range(gridx, gridy,
|
((Fl_Window *)(this->o))->size_range(gridx, gridy, 6144, 4096);
|
||||||
3072, 2048,
|
|
||||||
gridx, gridy, 0);
|
|
||||||
myo->factory = this;
|
myo->factory = this;
|
||||||
myo->drag = 0;
|
myo->drag = 0;
|
||||||
myo->numselected = 0;
|
myo->numselected = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user