From 05cc70bdbdb98ef981bee91854873aa58ff0d058 Mon Sep 17 00:00:00 2001 From: Bruno Date: Mon, 7 Jun 2021 00:03:06 +0200 Subject: [PATCH] UI details --- ImGuiVisitor.cpp | 12 ++++++------ UserInterfaceManager.cpp | 7 ++++--- defines.h | 1 + 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ImGuiVisitor.cpp b/ImGuiVisitor.cpp index 390d2c8..1260172 100644 --- a/ImGuiVisitor.cpp +++ b/ImGuiVisitor.cpp @@ -563,7 +563,7 @@ void ImGuiVisitor::visit (MediaSource& s) if ( s.playable() ) { ImVec2 pos = ImGui::GetCursorPos(); ImGui::SameLine(0, 0); - ImGui::SameLine(0, ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); + ImGui::SameLine(0, 10.f + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player")) UserInterface::manager().showSourceEditor(&s); ImGui::SetCursorPos(pos); @@ -598,7 +598,7 @@ void ImGuiVisitor::visit (SessionFileSource& s) if ( s.playable() ) { ImVec2 pos = ImGui::GetCursorPos(); ImGui::SameLine(0, 0); - ImGui::SameLine(0, ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); + ImGui::SameLine(0, 10.f + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player")) UserInterface::manager().showSourceEditor(&s); ImGui::SetCursorPos(pos); @@ -653,7 +653,7 @@ void ImGuiVisitor::visit (SessionGroupSource& s) if ( s.playable() ) { ImVec2 pos = ImGui::GetCursorPos(); ImGui::SameLine(0, 0); - ImGui::SameLine(0, ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); + ImGui::SameLine(0, 10.f + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player")) UserInterface::manager().showSourceEditor(&s); ImGui::SetCursorPos(pos); @@ -700,7 +700,7 @@ void ImGuiVisitor::visit (PatternSource& s) if ( s.playable() ) { ImVec2 pos = ImGui::GetCursorPos(); ImGui::SameLine(0, 0); - ImGui::SameLine(0, ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); + ImGui::SameLine(0, 10.f + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player")) UserInterface::manager().showSourceEditor(&s); ImGui::SetCursorPos(pos); @@ -739,7 +739,7 @@ void ImGuiVisitor::visit (DeviceSource& s) if ( s.playable() ) { ImVec2 pos = ImGui::GetCursorPos(); ImGui::SameLine(0, 0); - ImGui::SameLine(0, ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); + ImGui::SameLine(0, 10.f + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player")) UserInterface::manager().showSourceEditor(&s); ImGui::SetCursorPos(pos); @@ -783,7 +783,7 @@ void ImGuiVisitor::visit (NetworkSource& s) if ( s.playable() ) { ImVec2 pos = ImGui::GetCursorPos(); ImGui::SameLine(0, 0); - ImGui::SameLine(0, ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); + ImGui::SameLine(0, 10.f + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player")) UserInterface::manager().showSourceEditor(&s); ImGui::SetCursorPos(pos); diff --git a/UserInterfaceManager.cpp b/UserInterfaceManager.cpp index a0b4d95..f2514ab 100644 --- a/UserInterfaceManager.cpp +++ b/UserInterfaceManager.cpp @@ -1702,7 +1702,7 @@ void UserInterface::RenderAbout(bool* p_open) ImGui::Columns(3, "abouts"); ImGui::Separator(); - ImGui::Text("- Dear ImGui"); + ImGui::Text("Dear ImGui"); ImGui::PushID("dearimguiabout"); if ( ImGui::Button("More info", ImVec2(ImGui::GetContentRegionAvail().x, 0))) show_imgui_about = true; @@ -1710,7 +1710,7 @@ void UserInterface::RenderAbout(bool* p_open) ImGui::NextColumn(); - ImGui::Text("- GStreamer"); + ImGui::Text("GStreamer"); ImGui::PushID("gstreamerabout"); if ( ImGui::Button("More info", ImVec2(ImGui::GetContentRegionAvail().x, 0))) show_gst_about = true; @@ -1718,7 +1718,7 @@ void UserInterface::RenderAbout(bool* p_open) ImGui::NextColumn(); - ImGui::Text("- OpenGL"); + ImGui::Text("OpenGL"); ImGui::PushID("openglabout"); if ( ImGui::Button("More info", ImVec2(ImGui::GetContentRegionAvail().x, 0))) show_opengl_about = true; @@ -3904,6 +3904,7 @@ void Navigator::RenderMainPannelVimix() ImGuiToolkit::PushFont(ImGuiToolkit::FONT_LARGE); std::string tooltip_ = ""; + ImGui::SameLine(0, 20); if ( ImGuiToolkit::IconButton( Rendering::manager().mainWindow().isFullscreen() ? ICON_FA_COMPRESS_ALT : ICON_FA_EXPAND_ALT ) ) Rendering::manager().mainWindow().toggleFullscreen(); if (ImGui::IsItemHovered()) diff --git a/defines.h b/defines.h index a7b8bb3..a2ddab9 100644 --- a/defines.h +++ b/defines.h @@ -73,6 +73,7 @@ #define IMGUI_RIGHT_ALIGN -3.5f * ImGui::GetTextLineHeightWithSpacing() #define IMGUI_TOP_ALIGN 10 #define IMGUI_COLOR_OVERLAY IM_COL32(5, 5, 5, 150) +#define IMGUI_COLOR_LIGHT_OVERLAY IM_COL32(5, 5, 5, 50) #define IMGUI_COLOR_RECORD 1.0, 0.05, 0.05 #define IMGUI_COLOR_STREAM 0.05, 0.8, 1.0 #define IMGUI_NOTIFICATION_DURATION 2.5f