Skip to content

Commit

Permalink
clang-format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelarius committed Feb 23, 2024
1 parent 5f6c581 commit 667ac4a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions example/color_node_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ class ColorNodeEditor
// These are driven by the user, so we place this code before rendering the nodes
{
const bool open_popup = ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) &&
ImNodes::IsEditorHovered() &&
ImGui::IsKeyReleased(ImGuiKey_A);
ImNodes::IsEditorHovered() && ImGui::IsKeyReleased(ImGuiKey_A);

ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(8.f, 8.f));
if (!ImGui::IsAnyItemHovered() && open_popup)
Expand Down
2 changes: 1 addition & 1 deletion imnodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,7 @@ static inline void CalcMiniMapLayout()
const ImVec2 grid_content_size = editor.GridContentBounds.IsInverted()
? max_size
: ImFloor(editor.GridContentBounds.GetSize());
const float grid_content_aspect_ratio = grid_content_size.x / grid_content_size.y;
const float grid_content_aspect_ratio = grid_content_size.x / grid_content_size.y;
mini_map_size = ImFloor(
grid_content_aspect_ratio > max_size_aspect_ratio
? ImVec2(max_size.x, max_size.x / grid_content_aspect_ratio)
Expand Down
7 changes: 3 additions & 4 deletions imnodes_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ struct ImNodesEditorContext
// Relative origins of selected nodes for snapping of dragged nodes
ImVector<ImVec2> SelectedNodeOffsets;
// Offset of the primary node origin relative to the mouse cursor.
ImVec2 PrimaryNodeOffset;
ImVec2 PrimaryNodeOffset;

ImClickInteractionState ClickInteraction;

Expand All @@ -285,9 +285,8 @@ struct ImNodesEditorContext
ImNodesEditorContext()
: Nodes(), Pins(), Links(), Panning(0.f, 0.f), SelectedNodeIndices(), SelectedLinkIndices(),
SelectedNodeOffsets(), PrimaryNodeOffset(0.f, 0.f), ClickInteraction(),
MiniMapEnabled(false), MiniMapSizeFraction(0.0f),
MiniMapNodeHoveringCallback(NULL), MiniMapNodeHoveringCallbackUserData(NULL),
MiniMapScaling(0.0f)
MiniMapEnabled(false), MiniMapSizeFraction(0.0f), MiniMapNodeHoveringCallback(NULL),
MiniMapNodeHoveringCallbackUserData(NULL), MiniMapScaling(0.0f)
{
}
};
Expand Down

0 comments on commit 667ac4a

Please sign in to comment.