Open holmes1d opened 4 weeks ago
Describe the bug When the network variable is added to a horizontal config it will always appear on a new row and not inline.
List relevant hardware/software information
To Reproduce Steps to reproduce the behavior:
Expected behavior I would expect the network information to appear in the same horizontal bar if space is available
Screenshots Network forced to new row If network changed to code below
Additional context Changed the hub_elements.cpp to the following for fix
void HudElements::network() { #ifdef __linux__ if (HUDElements.net && HUDElements.net->should_reset) HUDElements.net.reset(new Net); if (!HUDElements.net) HUDElements.net = std::make_unique<Net>(); for (auto& iface : HUDElements.net->interfaces){ ImguiNextColumnFirstItem(); HUDElements.TextColored(HUDElements.colors.network, "%.8s", iface.name.c_str()); ImguiNextColumnOrNewRow(); right_aligned_text(HUDElements.colors.text, HUDElements.ralign_width, "%.0f", iface.txBps / 1000.f); ImGui::SameLine(0,1.0f); ImGui::PushFont(HUDElements.sw_stats->font1); HUDElements.TextColored(HUDElements.colors.text, "KB/s %s", ICON_FK_ARROW_UP); ImGui::PopFont(); ImguiNextColumnOrNewRow(); right_aligned_text(HUDElements.colors.text, HUDElements.ralign_width, "%.0f", iface.rxBps / 1000.f); ImGui::SameLine(0,1.0f); ImGui::PushFont(HUDElements.sw_stats->font1); HUDElements.TextColored(HUDElements.colors.text, "KB/s %s", ICON_FK_ARROW_DOWN); ImGui::PopFont(); } #endif }
Your changes look good, feel free to make a PR
Describe the bug When the network variable is added to a horizontal config it will always appear on a new row and not inline.
List relevant hardware/software information
To Reproduce Steps to reproduce the behavior:
Expected behavior I would expect the network information to appear in the same horizontal bar if space is available
Screenshots Network forced to new row If network changed to code below
Additional context Changed the hub_elements.cpp to the following for fix