Skip to content

Commit

Permalink
Fixed minor UI glitch
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreRouma committed Mar 4, 2022
1 parent 7638075 commit e82e89a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/src/gui/menus/module_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace module_manager_menu {
float lheight = ImGui::GetTextLineHeight();
float cellWidth = lheight - (2.0f * cellpad.y);
float hdiff = cellpad.x - cellpad.y;
ImVec2 btnSize = ImVec2(lheight + 1, lheight - 1);
ImVec2 btnSize = ImVec2(lheight, lheight - 1);
ImVec2 textOff = ImVec2(3.0f * style::uiScale, -5.0f * style::uiScale);

if (ImGui::BeginTable("Module Manager Table", 3, ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_ScrollY, ImVec2(0, 200))) {
Expand Down Expand Up @@ -97,8 +97,6 @@ namespace module_manager_menu {

ImGui::TableSetColumnIndex(2);
if (strlen(modName) == 0) { style::beginDisabled(); }
ImVec2 cpos = ImGui::GetCursorPos();
ImGui::SetCursorPos(ImVec2(cpos.x - hdiff, cpos.y));
if (ImGui::Button("+##module_mgr_add_btn", ImVec2(btnSize.x, 0))) {
if (!core::moduleManager.createInstance(modName, modTypes[modTypeId])) {
core::moduleManager.postInit(modName);
Expand Down

0 comments on commit e82e89a

Please sign in to comment.