Fix gui size

This commit is contained in:
Filip Sykala 2021-07-21 11:58:01 +02:00
parent 6bcc576b5f
commit 0079091a8c
2 changed files with 53 additions and 23 deletions

View file

@ -66,8 +66,21 @@ private:
wanted_count = static_cast<uint32_t>(
std::round(triangle_count * wanted_percent / 100.f));
}
} c;
// This configs holds GUI layout size given by translated texts.
// etc. When language changes, GUI is recreated and this class constructed again,
// so the change takes effect. (info by GLGizmoFdmSupports.hpp)
struct GuiCfg
{
int top_left_width = 100;
int bottom_left_width = 100;
int input_width = 100;
int input_small_width = 80;
int window_offset = 100;
};
Configuration c;
std::optional<GuiCfg> gui_cfg;
void create_gui_cfg();
};
} // namespace GUI