Skip to content

Commit

Permalink
style fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Busse committed Jul 17, 2023
1 parent 83b6c93 commit 30c61c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ui/flowgraphitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ void FlowGraphItem::drawNewBlockDialog(FlowGraph *fg) {
return {};
}
return std::pair{ it.second.get(), it.first };
});
});
m_selectedBlockType = ret ? ret.value().first : nullptr;

if (ImGuiUtils::drawDialogButtons() == ImGuiUtils::DialogButton::Ok) {
Expand Down Expand Up @@ -696,7 +696,7 @@ void FlowGraphItem::drawAddSourceDialog(FlowGraph *fg) {
querySignalFilters.drawFilters();

float windowWidth = ImGui::GetWindowWidth();
float buttonPosX = windowWidth - ImGui::GetStyle().ItemSpacing.x - ImGui::GetStyle().FramePadding.x - ImGui::CalcTextSize("Add Filter").x;
float buttonPosX = windowWidth - ImGui::GetStyle().ItemSpacing.x - ImGui::GetStyle().FramePadding.x - ImGui::CalcTextSize("Add Filter").x;
ImGui::SetCursorPosX(buttonPosX);
if (ImGui::Button("Add Filter")) {
querySignalFilters.emplace_back(QueryFilterElement{ querySignalFilters });
Expand Down
3 changes: 1 addition & 2 deletions src/ui/flowgraphitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ class FlowGraphItem {
refl::util::for_each(refl::reflect<opencmw::service::dns::QueryEntry>().members, [&entry](auto m) {
auto value = m(entry);
ImGui::TableNextColumn();
if constexpr (std::is_integral_v<decltype(value)>
|| std::is_floating_point_v<decltype(value)>) {
if constexpr (std::is_integral_v<decltype(value)> || std::is_floating_point_v<decltype(value)>) {
ImGui::Text(std::to_string(m(entry)).c_str());
} else {
ImGui::Text(value.c_str());
Expand Down

0 comments on commit 30c61c1

Please sign in to comment.