UI details

This commit is contained in:
Bruno
2021-06-07 00:03:06 +02:00
parent 5ea056a483
commit 7dcfc97f33
3 changed files with 11 additions and 9 deletions

View File

@@ -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);

View File

@@ -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())

View File

@@ -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