diff --git a/rsc/images/icons.dds b/rsc/images/icons.dds index 585a7e0..8c393e0 100644 Binary files a/rsc/images/icons.dds and b/rsc/images/icons.dds differ diff --git a/src/ImGuiVisitor.cpp b/src/ImGuiVisitor.cpp index 6c1ea29..042993a 100644 --- a/src/ImGuiVisitor.cpp +++ b/src/ImGuiVisitor.cpp @@ -666,9 +666,8 @@ void ImGuiVisitor::visit (Source& s) void ImGuiVisitor::visit (MediaSource& s) { - ImVec2 _top = ImGui::GetCursorPos(); - _top.x = 0.5f * ImGui::GetFrameHeight() + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN; - ImVec2 top = _top; + ImVec2 top = ImGui::GetCursorPos(); + top.x = 0.5f * ImGui::GetFrameHeight() + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN; // Media info ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN); @@ -684,6 +683,15 @@ void ImGuiVisitor::visit (MediaSource& s) if ( !s.failed() ) { // icon (>) to open player if ( s.playable() ) { + ImGui::SetCursorPos(top); + std::string decoder = s.mediaplayer()->decoderName(); + if ( decoder.compare("software") != 0) { + decoder = "Hardware decoder\n" + decoder; + ImGuiToolkit::Indication(decoder.c_str(), 13, 2); + } + else + ImGuiToolkit::Indication("Software decoder", 14, 2); + top.x += ImGui::GetFrameHeight(); ImGui::SetCursorPos(top); std::string msg = s.playing() ? "Open Player\n(source is playing)" : "Open Player\n(source is paused)"; if (ImGuiToolkit::IconButton( s.playing() ? ICON_FA_PLAY_CIRCLE : ICON_FA_PAUSE_CIRCLE, msg.c_str())) @@ -695,16 +703,6 @@ void ImGuiVisitor::visit (MediaSource& s) if (ImGuiToolkit::IconButton(ICON_FA_FOLDER_OPEN, "Show in finder")) SystemToolkit::open(SystemToolkit::path_filename(s.path())); - // Icon to inform hardware decoding - std::string decoder = s.mediaplayer()->decoderName(); - if ( decoder.compare("software") != 0) { - top = _top; - top.y += ImGui::GetFrameHeight(); - ImGui::SetCursorPos(top); - decoder = "Hardware decoder\n" + decoder; - ImGuiToolkit::Indication(decoder.c_str(), ICON_FA_MICROCHIP); - } - ImGui::SetCursorPos(botom); } else {