From df06a09c6c93c0b0cd1af4ac7ea0ca0f8b97792f Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sun, 7 Dec 2008 23:19:18 +0000 Subject: [PATCH] tweak dlg size --- Fltk/fileDialogs.cpp | 67 +++++++++++++++++++++++-------------------- Fltk/menuWindow.cpp | 2 +- Post/adaptiveData.cpp | 2 +- 3 files changed, 38 insertions(+), 33 deletions(-) diff --git a/Fltk/fileDialogs.cpp b/Fltk/fileDialogs.cpp index 1ab0198643..57946f56cc 100644 --- a/Fltk/fileDialogs.cpp +++ b/Fltk/fileDialogs.cpp @@ -618,31 +618,32 @@ int pos_dialog(const char *name) static _pos_dialog *dialog = NULL; int _fontsize = GetFontSize(); + int BBB = BB + 9; // labels too long if(!dialog){ dialog = new _pos_dialog; - int h = 3 * WB + 8 * BH, w = 2 * BB + 3 * WB, y = WB; + int h = 3 * WB + 8 * BH, w = 2 * BBB + 3 * WB, y = WB; // not a "dialogWindow" since it is modal dialog->window = new Fl_Double_Window(w, h, "POS Options"); dialog->window->box(GMSH_WINDOW_BOX); dialog->b[0] = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Save all (ignore physical groups)"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Save all (ignore physical groups)"); y += BH; dialog->b[1] = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Print elementary tags"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Print elementary tags"); y += BH; dialog->b[2] = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Print element numbers"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Print element numbers"); y += BH; dialog->b[3] = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Print Gamma quality measure"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Print Gamma quality measure"); y += BH; dialog->b[4] = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Print Eta quality measure"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Print Eta quality measure"); y += BH; dialog->b[5] = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Print Rho quality measure"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Print Rho quality measure"); y += BH; dialog->b[6] = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Print Disto quality measure"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Print Disto quality measure"); y += BH; for(int i = 0; i < 6; i++) dialog->b[i]->type(FL_TOGGLE_BUTTON); - dialog->ok = new Fl_Return_Button(WB, y + WB, BB, BH, "OK"); - dialog->cancel = new Fl_Button(2 * WB + BB, y + WB, BB, BH, "Cancel"); + dialog->ok = new Fl_Return_Button(WB, y + WB, BBB, BH, "OK"); + dialog->cancel = new Fl_Button(2 * WB + BBB, y + WB, BBB, BH, "Cancel"); dialog->window->set_modal(); dialog->window->end(); dialog->window->hotspot(dialog->window); @@ -703,24 +704,25 @@ int msh_dialog(const char *name) }; int _fontsize = GetFontSize(); + int BBB = BB + 9; // labels too long if(!dialog){ dialog = new _msh_dialog; - int h = 3 * WB + 4 * BH, w = 2 * BB + 3 * WB, y = WB; + int h = 3 * WB + 4 * BH, w = 2 * BBB + 3 * WB, y = WB; // not a "dialogWindow" since it is modal dialog->window = new Fl_Double_Window(w, h, "MSH Options"); dialog->window->box(GMSH_WINDOW_BOX); - dialog->c = new Fl_Choice(WB, y, BB + BB / 2, BH, "Format"); y += BH; + dialog->c = new Fl_Choice(WB, y, BBB + BBB / 2, BH, "Format"); y += BH; dialog->c->menu(formatmenu); dialog->c->align(FL_ALIGN_RIGHT); dialog->b = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Save all (ignore physical groups)"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Save all (ignore physical groups)"); y += BH; dialog->b->type(FL_TOGGLE_BUTTON); dialog->p = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Save Parametric Coordinates"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Save Parametric Coordinates"); y += BH; dialog->p->type(FL_TOGGLE_BUTTON); - dialog->ok = new Fl_Return_Button(WB, y + WB, BB, BH, "OK"); - dialog->cancel = new Fl_Button(2 * WB + BB, y + WB, BB, BH, "Cancel"); + dialog->ok = new Fl_Return_Button(WB, y + WB, BBB, BH, "OK"); + dialog->cancel = new Fl_Button(2 * WB + BBB, y + WB, BBB, BH, "Cancel"); dialog->window->set_modal(); dialog->window->end(); dialog->window->hotspot(dialog->window); @@ -768,21 +770,22 @@ int unv_dialog(const char *name) static _unv_dialog *dialog = NULL; int _fontsize = GetFontSize(); + int BBB = BB + 9; // labels too long if(!dialog){ dialog = new _unv_dialog; - int h = 3 * WB + 3 * BH, w = 2 * BB + 3 * WB, y = WB; + int h = 3 * WB + 3 * BH, w = 2 * BBB + 3 * WB, y = WB; // not a "dialogWindow" since it is modal dialog->window = new Fl_Double_Window(w, h, "UNV Options"); dialog->window->box(GMSH_WINDOW_BOX); dialog->b[0] = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Save all (ignore physical groups)"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Save all (ignore physical groups)"); y += BH; dialog->b[0]->type(FL_TOGGLE_BUTTON); dialog->b[1] = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Save groups of nodes"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Save groups of nodes"); y += BH; dialog->b[1]->type(FL_TOGGLE_BUTTON); - dialog->ok = new Fl_Return_Button(WB, y + WB, BB, BH, "OK"); - dialog->cancel = new Fl_Button(2 * WB + BB, y + WB, BB, BH, "Cancel"); + dialog->ok = new Fl_Return_Button(WB, y + WB, BBB, BH, "OK"); + dialog->cancel = new Fl_Button(2 * WB + BBB, y + WB, BBB, BH, "Cancel"); dialog->window->set_modal(); dialog->window->end(); dialog->window->hotspot(dialog->window); @@ -834,21 +837,22 @@ int bdf_dialog(const char *name) }; int _fontsize = GetFontSize(); + int BBB = BB + 9; // labels too long if(!dialog){ dialog = new _bdf_dialog; - int h = 3 * WB + 3 * BH, w = 2 * BB + 3 * WB, y = WB; + int h = 3 * WB + 3 * BH, w = 2 * BBB + 3 * WB, y = WB; // not a "dialogWindow" since it is modal dialog->window = new Fl_Double_Window(w, h, "BDF Options"); dialog->window->box(GMSH_WINDOW_BOX); - dialog->c = new Fl_Choice(WB, y, BB + BB / 2, BH, "Format"); y += BH; + dialog->c = new Fl_Choice(WB, y, BBB + BBB / 2, BH, "Format"); y += BH; dialog->c->menu(formatmenu); dialog->c->align(FL_ALIGN_RIGHT); dialog->b = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Save all (ignore physical groups)"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Save all (ignore physical groups)"); y += BH; dialog->b->type(FL_TOGGLE_BUTTON); - dialog->ok = new Fl_Return_Button(WB, y + WB, BB, BH, "OK"); - dialog->cancel = new Fl_Button(2 * WB + BB, y + WB, BB, BH, "Cancel"); + dialog->ok = new Fl_Return_Button(WB, y + WB, BBB, BH, "OK"); + dialog->cancel = new Fl_Button(2 * WB + BBB, y + WB, BBB, BH, "Cancel"); dialog->window->set_modal(); dialog->window->end(); dialog->window->hotspot(dialog->window); @@ -899,21 +903,22 @@ int generic_mesh_dialog(const char *name, const char *title, int format, }; int _fontsize = GetFontSize(); + int BBB = BB + 9; // labels too long if(!dialog){ dialog = new _generic_mesh_dialog; - int h = 3 * WB + 3 * BH, w = 2 * BB + 3 * WB, y = WB; + int h = 3 * WB + 3 * BH, w = 2 * BBB + 3 * WB, y = WB; // not a "dialogWindow" since it is modal dialog->window = new Fl_Double_Window(w, h); dialog->window->box(GMSH_WINDOW_BOX); - dialog->c = new Fl_Choice(WB, y, BB + BB / 2, BH, "Format"); y += BH; + dialog->c = new Fl_Choice(WB, y, BBB + BBB / 2, BH, "Format"); y += BH; dialog->c->menu(formatmenu); dialog->c->align(FL_ALIGN_RIGHT); dialog->b = new Fl_Check_Button - (WB, y, 2 * BB + WB, BH, "Save all (ignore physical groups)"); y += BH; + (WB, y, 2 * BBB + WB, BH, "Save all (ignore physical groups)"); y += BH; dialog->b->type(FL_TOGGLE_BUTTON); - dialog->ok = new Fl_Return_Button(WB, y + WB, BB, BH, "OK"); - dialog->cancel = new Fl_Button(2 * WB + BB, y + WB, BB, BH, "Cancel"); + dialog->ok = new Fl_Return_Button(WB, y + WB, BBB, BH, "OK"); + dialog->cancel = new Fl_Button(2 * WB + BBB, y + WB, BBB, BH, "Cancel"); dialog->window->set_modal(); dialog->window->end(); dialog->window->hotspot(dialog->window); diff --git a/Fltk/menuWindow.cpp b/Fltk/menuWindow.cpp index 6b4566ba4c..27a5b12f33 100644 --- a/Fltk/menuWindow.cpp +++ b/Fltk/menuWindow.cpp @@ -2353,7 +2353,7 @@ contextItem menu_mesh[] = { {"Partition", (Fl_Callback *)mesh_partition_cb} , #endif #if defined(HAVE_FOURIER_MODEL) - {"Reparameterize", (Fl_Callback *)mesh_parameterize_cb} , + //{"Reparameterize", (Fl_Callback *)mesh_parameterize_cb} , #endif {"Reclassify", (Fl_Callback *)mesh_classify_cb} , {"Save", (Fl_Callback *)mesh_save_cb} , diff --git a/Post/adaptiveData.cpp b/Post/adaptiveData.cpp index 92b10137d4..d821604fb3 100644 --- a/Post/adaptiveData.cpp +++ b/Post/adaptiveData.cpp @@ -956,7 +956,7 @@ void adaptiveElements<T>::_changeResolution(int level, GMSH_Post_Plugin *plug, i else T::GSF(p->x, p->y, p->z, sf); for(int k = 0; k < _posX->size2(); k++) - (*_geometry) (kk, k) = sf[k]; + (*_geometry)(kk, k) = sf[k]; kk++; } -- GitLab