Skip to content

Commit c3fd4eb

Browse files
committed
some graphics adjustments
1 parent f1591ef commit c3fd4eb

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

src/core/imgui_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static void ObjectInfo(const char* desc, const char* url, float retinaScale=1.0f
176176
ImGui::Spacing();
177177
ImGui::Separator();
178178
ImGui::Spacing();
179-
ImGui::InvisibleButton("empty",ImVec2(160*retinaScale,1)); // fix widget width
179+
ImGui::InvisibleButton("empty",ImVec2(224*retinaScale,1)); // fix widget width
180180
if (ImGui::CollapsingHeader("INFO", ImGuiTreeNodeFlags_None)){
181181
ImGui::TextWrapped("%s",desc);
182182
ImGui::Spacing();

src/core/imgui_node_canvas.cpp

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -388,19 +388,11 @@ bool ImGuiEx::NodeCanvas::BeginNode( int nId, const char* _id, std::string name,
388388
}
389389

390390
// Draw HeaderBar BG
391-
if(nId == activeNode){
392-
nodeDrawList->AddRectFilled(
393-
curNodeData.outerContentBox.Min,
394-
curNodeData.outerContentBox.Min+ImVec2(curNodeData.outerContentBox.GetSize().x, IMGUI_EX_NODE_HEADER_HEIGHT*scaleFactor),
395-
IM_COL32(90,90,90,200)
396-
);
397-
}else{
398-
nodeDrawList->AddRectFilled(
399-
curNodeData.outerContentBox.Min,
400-
curNodeData.outerContentBox.Min+ImVec2(curNodeData.outerContentBox.GetSize().x, IMGUI_EX_NODE_HEADER_HEIGHT*scaleFactor),
401-
ImGui::GetColorU32(ImGuiCol_Header)
402-
);
403-
}
391+
nodeDrawList->AddRectFilled(
392+
curNodeData.outerContentBox.Min,
393+
curNodeData.outerContentBox.Min+ImVec2(curNodeData.outerContentBox.GetSize().x, IMGUI_EX_NODE_HEADER_HEIGHT*scaleFactor),
394+
ImGui::GetColorU32(ImGuiCol_Header)
395+
);
404396

405397
// Draw footer
406398
nodeDrawList->AddRectFilled(
@@ -414,7 +406,11 @@ bool ImGuiEx::NodeCanvas::BeginNode( int nId, const char* _id, std::string name,
414406

415407
// Header info
416408
ImGui::SetCursorScreenPos( curNodeData.outerContentBox.Min+ImVec2(5, ((IMGUI_EX_NODE_HEADER_HEIGHT*scaleFactor)-ImGui::CalcTextSize("").y)*.5f) );//canvasView.translation+pos+ImVec2(5,4));
417-
ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(255,255,255,255));
409+
if(nId == activeNode){
410+
ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(255,255,255,255));
411+
}else{
412+
ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(0,0,0,255));
413+
}
418414
ImGui::Text("%s", name.c_str()); // title
419415
ImGui::PopStyleColor();
420416

0 commit comments

Comments
 (0)