diff --git a/src/DisplaysView.cpp b/src/DisplaysView.cpp index 001902a..d6e5adf 100644 --- a/src/DisplaysView.cpp +++ b/src/DisplaysView.cpp @@ -112,7 +112,11 @@ DisplaysView::DisplaysView() : View(DISPLAYS) output_selected_=true; output_overlays_->setActive(1); output_mode_->setActive(0); + output_monitor_ = ""; + update_pending_ = false; + // display actions : 0 = move output, 1 paint, 2 erase + display_action_ = 0; } void DisplaysView::update(float dt) @@ -176,7 +180,7 @@ void DisplaysView::recenter () Group *f = new Group; f->copyTransform(m); frame = new Frame(Frame::SHARP, Frame::THIN, Frame::NONE); - frame->color = glm::vec4( COLOR_MONITOR, 0.4f ); + frame->color = glm::vec4( COLOR_MONITOR, 0.2f ); f->attach(frame); scene.fg()->attach(f); @@ -222,33 +226,35 @@ void DisplaysView::draw() output_visible_->visible_ = Settings::application.render.disabled; - if ( Settings::application.windows[1].fullscreen ) { - output_mode_->setActive( 1 ); + // if user is not manipulating output frame + // update the output frame to match the window dimensions + if (!current_action_ongoing_ && !update_pending_) { + // TODO Mutex for multithread access with changed flag - glm::ivec4 rect = Rendering::manager().monitors()[Settings::application.windows[1].monitor]; + if ( Settings::application.windows[1].fullscreen ) { + // output overlay for fullscreen + output_mode_->setActive( 1 ); - output_->scale_.x = rect.p * 0.5f * DISPLAYS_UNIT; - output_->scale_.y = rect.q * 0.5f * DISPLAYS_UNIT; - output_->translation_.x = rect.x * DISPLAYS_UNIT + output_->scale_.x; - output_->translation_.y = -rect.y * DISPLAYS_UNIT - output_->scale_.y; + glm::ivec4 rect = Rendering::manager().monitors()[Settings::application.windows[1].monitor]; + output_->scale_.x = rect.p * 0.5f * DISPLAYS_UNIT; + output_->scale_.y = rect.q * 0.5f * DISPLAYS_UNIT; + output_->translation_.x = rect.x * DISPLAYS_UNIT + output_->scale_.x; + output_->translation_.y = -rect.y * DISPLAYS_UNIT - output_->scale_.y; - } - else { - output_mode_->setActive( 0 ); - - if (!current_action_ongoing_) { - - // TODO Mutex for multithread access with changed flag + } + else { + // output overlay for window + output_mode_->setActive( 0 ); output_->scale_.x = Settings::application.windows[1].w * 0.5f * DISPLAYS_UNIT; output_->scale_.y = Settings::application.windows[1].h * 0.5f * DISPLAYS_UNIT; output_->translation_.x = Settings::application.windows[1].x * DISPLAYS_UNIT + output_->scale_.x; output_->translation_.y = -Settings::application.windows[1].y * DISPLAYS_UNIT - output_->scale_.y; - } + } - + // rendering of framebuffer in window if (Settings::application.windows[1].scaled) { output_render_->scale_ = glm::vec3(1.f, 1.f, 1.f); } @@ -263,8 +269,189 @@ void DisplaysView::draw() } } + // main call to draw the view View::draw(); + update_pending_ = false; +// // Render the UI +// if (output_render_ != nullptr){ + +// // display interface +// // Locate window at upper left corner +// glm::vec2 P = glm::vec2(- 0.02f, 0.01 ); +// P = Rendering::manager().project(glm::vec3(P, 0.f), scene.root()->transform_, false); +// // Set window position depending on icons size +// ImGuiToolkit::PushFont(ImGuiToolkit::FONT_LARGE); +// ImGui::SetNextWindowPos(ImVec2(P.x, P.y - 1.5f * ImGui::GetFrameHeight() ), ImGuiCond_Always); +// if (ImGui::Begin("##DisplaysMaskOptions", NULL, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoBackground +// | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings +// | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoBringToFrontOnFocus )) +// { + +// // style grey +// ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(COLOR_MONITOR, 1.0f)); // 1 +// ImGui::PushStyleColor(ImGuiCol_PopupBg, ImVec4(0.14f, 0.14f, 0.14f, 0.9f)); +// ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.14f, 0.14f, 0.14f, 0.f)); +// ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImVec4(0.24f, 0.24f, 0.24f, 0.46f)); +// ImGui::PushStyleColor(ImGuiCol_SliderGrab, ImVec4(0.85f, 0.85f, 0.85f, 0.86f)); +// ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, ImVec4(0.95f, 0.95f, 0.95f, 1.00f)); +// ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.00f, 0.00f, 0.00f, 0.00f)); +// ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.24f, 0.24f, 0.24f, 0.46f)); +// ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0.36f, 0.36f, 0.36f, 0.9f)); +// ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.36f, 0.36f, 0.36f, 0.5f)); +// ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImVec4(0.88f, 0.88f, 0.88f, 0.73f)); +// ImGui::PushStyleColor(ImGuiCol_Tab, ImVec4(0.83f, 0.83f, 0.84f, 0.78f)); +// ImGui::PushStyleColor(ImGuiCol_TabHovered, ImVec4(0.53f, 0.53f, 0.53f, 0.60f)); +// ImGui::PushStyleColor(ImGuiCol_TabActive, ImVec4(0.40f, 0.40f, 0.40f, 1.00f)); // 14 colors + +// // GUI for drawing + +// // select cursor +// static bool on = true; +// ImGui::SameLine(0, 60); +// on = display_action_ == 0; +// if (ImGuiToolkit::ButtonToggle(ICON_FA_MOUSE_POINTER, &on)) { +// output_selected_=true; +// display_action_ = 0; +// } + +// ImGui::SameLine(); +// on = display_action_ == 1; +// if (ImGuiToolkit::ButtonToggle(ICON_FA_PAINT_BRUSH, &on)) { +// output_selected_=false; +// display_action_ = 1; +// } + +// ImGui::SameLine(); +// on = display_action_ == 2; +// if (ImGuiToolkit::ButtonToggle(ICON_FA_ERASER, &on)) { +// output_selected_=false; +// display_action_ = 2; +// } + +// if (display_action_ > 0) { + +// ImGui::SameLine(0, 50); +// ImGui::SetNextItemWidth( ImGui::GetTextLineHeight() * 2.6); +// const char* items[] = { ICON_FA_CIRCLE, ICON_FA_SQUARE }; +// static int item = 0; +// item = (int) round(Settings::application.brush.z); +// if(ImGui::Combo("##DisplayBrushShape", &item, items, IM_ARRAYSIZE(items))) { +// Settings::application.brush.z = float(item); +// } + +// ImGui::SameLine(); +//// show_cursor_forced_ = false; +// if (ImGui::Button(ICON_FA_DOT_CIRCLE ICON_FA_SORT_DOWN )) +// ImGui::OpenPopup("display_brush_size_popup"); +// if (ImGui::BeginPopup("display_brush_size_popup", ImGuiWindowFlags_NoMove)) +// { +//// int pixel_size_min = int(0.05 * edit_source_->frame()->height() ); +//// int pixel_size_max = int(2.0 * edit_source_->frame()->height() ); +//// int pixel_size = int(Settings::application.brush.x * edit_source_->frame()->height() ); +//// show_cursor_forced_ = true; +//// ImGuiToolkit::PushFont(ImGuiToolkit::FONT_DEFAULT); +//// ImGuiToolkit::Indication("Large ", 16, 1, ICON_FA_ARROW_RIGHT); +//// if (ImGui::VSliderInt("##BrushSize", ImVec2(30,260), &pixel_size, pixel_size_min, pixel_size_max, "") ){ +//// Settings::application.brush.x = CLAMP(float(pixel_size) / edit_source_->frame()->height(), BRUSH_MIN_SIZE, BRUSH_MAX_SIZE); +//// } +//// if (ImGui::IsItemHovered() || ImGui::IsItemActive() ) { +//// ImGui::BeginTooltip(); +//// ImGui::Text("%d px", pixel_size); +//// ImGui::EndTooltip(); +//// } +//// ImGuiToolkit::Indication("Small ", 15, 1, ICON_FA_ARROW_LEFT); +//// ImGui::PopFont(); +// ImGui::EndPopup(); +// } +// // make sure the visual brush is up to date +//// glm::vec2 s = glm::vec2(Settings::application.brush.x); +//// mask_cursor_circle_->scale_ = glm::vec3(s * 1.16f, 1.f); +//// mask_cursor_square_->scale_ = glm::vec3(s * 1.75f, 1.f); + +// ImGui::SameLine(); +// if (ImGui::Button(ICON_FA_FEATHER_ALT ICON_FA_SORT_DOWN )) +// ImGui::OpenPopup("display_brush_pressure_popup"); +// if (ImGui::BeginPopup("display_brush_pressure_popup", ImGuiWindowFlags_NoMove)) +// { +//// ImGuiToolkit::PushFont(ImGuiToolkit::FONT_DEFAULT); +//// ImGuiToolkit::Indication("Light ", ICON_FA_FEATHER_ALT, ICON_FA_ARROW_UP); +//// ImGui::VSliderFloat("##BrushPressure", ImVec2(30,260), &Settings::application.brush.y, BRUSH_MAX_PRESS, BRUSH_MIN_PRESS, "", 0.3f); +//// if (ImGui::IsItemHovered() || ImGui::IsItemActive() ) { +//// ImGui::BeginTooltip(); +//// ImGui::Text("%.1f%%", Settings::application.brush.y * 100.0); +//// ImGui::EndTooltip(); +//// } +//// ImGuiToolkit::Indication("Heavy ", ICON_FA_WEIGHT_HANGING, ICON_FA_ARROW_DOWN); +//// ImGui::PopFont(); +// ImGui::EndPopup(); +// } + +//// // store mask if changed, reset after applied +//// if (edit_source_->maskShader()->effect > 0) +//// edit_source_->storeMask(); +//// edit_source_->maskShader()->effect = 0; + +// // menu for effects +// ImGui::SameLine(0, 60); +// if (ImGui::Button(ICON_FA_MAGIC ICON_FA_SORT_DOWN )) +// ImGui::OpenPopup( "display_brush_menu_popup" ); +// if (ImGui::BeginPopup( "display_brush_menu_popup" )) +// { +//// ImGuiToolkit::PushFont(ImGuiToolkit::FONT_DEFAULT); +//// std::ostringstream oss; +//// oss << edit_source_->name(); +//// int e = 0; +//// if (ImGui::Selectable( ICON_FA_BACKSPACE "\tClear")) { +//// e = 1; +//// oss << ": Clear " << MASK_PAINT_ACTION_LABEL; +//// } +//// if (ImGui::Selectable( ICON_FA_ADJUST "\tInvert")) { +//// e = 2; +//// oss << ": Invert " << MASK_PAINT_ACTION_LABEL; +//// } +//// if (ImGui::Selectable( ICON_FA_WAVE_SQUARE "\tEdge")) { +//// e = 3; +//// oss << ": Edge " << MASK_PAINT_ACTION_LABEL; +//// } +//// if (e>0) { +//// edit_source_->maskShader()->effect = e; +//// edit_source_->maskShader()->cursor = glm::vec4(100.0, 100.0, 0.f, 0.f); +//// edit_source_->touch(); +//// Action::manager().store(oss.str()); +//// } +//// ImGui::PopFont(); +// ImGui::EndPopup(); +// } + +// static DialogToolkit::OpenImageDialog display_mask_dialog("Select Image"); + +// ImGui::SameLine(); +// if (ImGui::Button(ICON_FA_FOLDER_OPEN)) +// display_mask_dialog.open(); +// if (display_mask_dialog.closed() && !display_mask_dialog.path().empty()) +// { +// FrameBufferImage *img = new FrameBufferImage(display_mask_dialog.path()); +//// if (edit_source_->maskbuffer_->fill( img )) { +//// // apply mask filled +//// edit_source_->storeMask(); +//// // store history +//// std::ostringstream oss; +//// oss << edit_source_->name() << ": Mask fill with " << maskdialog.path(); +//// Action::manager().store(oss.str()); +//// } +// } + + +// } + +// ImGui::PopStyleColor(14); // 14 colors +// ImGui::End(); +// } +// ImGui::PopFont(); + +// } + // display popup menu if (show_output_menu_) { ImGui::OpenPopup( "DisplaysOutputContextMenu" ); @@ -275,16 +462,27 @@ void DisplaysView::draw() ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(COLOR_FRAME_LIGHT, 1.f)); ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(COLOR_MENU_HOVERED, 0.5f)); - if (ImGui::MenuItem( ICON_FA_EYE_SLASH " Disable", nullptr, &Settings::application.render.disabled )){ + ImGui::MenuItem( MENU_OUTPUTDISABLE, SHORTCUT_OUTPUTDISABLE, &Settings::application.render.disabled); - } - if (ImGui::MenuItem( ICON_FA_EXPAND_ARROWS_ALT " Scaled", nullptr, &Settings::application.windows[1].scaled )){ + ImGui::MenuItem( ICON_FA_EXPAND_ARROWS_ALT " Scaled", nullptr, &Settings::application.windows[1].scaled ); + if (ImGui::MenuItem( ICON_FA_VECTOR_SQUARE " Reset" )){ + // reset resolution to 1:1 + glm::ivec4 rect = outputCoordinates(); + rect.p = Mixer::manager().session()->frame()->width(); + rect.q = Mixer::manager().session()->frame()->height(); + Rendering::manager().outputWindow().setCoordinates( rect ); + // reset attributes + Settings::application.windows[1].scaled = false; + Rendering::manager().outputWindow().exitFullscreen(); } + ImGui::Separator(); bool _windowed = !Settings::application.windows[1].fullscreen; - if (ImGui::MenuItem( ICON_FA_WINDOW_RESTORE " Windowed", nullptr, &_windowed)){ + if (ImGui::MenuItem( ICON_FA_WINDOW_RESTORE " Window", nullptr, &_windowed)){ Rendering::manager().outputWindow().exitFullscreen(); + // not fullscreen on a monitor + output_monitor_ = ""; } int index = 1; std::map _monitors = Rendering::manager().monitors(); @@ -295,7 +493,8 @@ void DisplaysView::draw() Settings::application.windows[1].monitor == monitor_iter->first; std::string menutext = std::string( ICON_FA_TV " Fullscreen ") + std::to_string(index); if (ImGui::MenuItem( menutext.c_str(), nullptr, _fullscreen )){ - Rendering::manager().outputWindow().setFullscreen( monitor_iter->first ); + output_monitor_ = monitor_iter->first; + Rendering::manager().outputWindow().setFullscreen( output_monitor_ ); } } ImGui::PopStyleColor(2); @@ -310,19 +509,23 @@ std::pair DisplaysView::pick(glm::vec2 P) std::pair pick = View::pick(P); // ignore pick on render surface: it's the same as output surface - if (pick.first == output_render_) + if (pick.first == output_render_ || pick.first == output_fullscreen_) pick.first = output_surface_; + // detect clic on menu if (pick.first == output_menu_) show_output_menu_ = true; - // activate / deactivate output frame + // activate / deactivate output if clic on any element of it output_selected_ = (pick.first == output_surface_) || (pick.first == output_handles_) || - (pick.first == output_fullscreen_) || (pick.first == output_menu_); output_overlays_->setActive(output_selected_ ? 1 : 0); + // ignore anything else than selected output + if (!output_selected_) + pick.first = nullptr; + return pick; } @@ -343,7 +546,6 @@ void DisplaysView::select(glm::vec2 A, glm::vec2 B) output_selected_ = !pv.empty(); output_overlays_->setActive(output_selected_ ? 0 : 1); - } void DisplaysView::initiate() @@ -365,8 +567,15 @@ void DisplaysView::terminate(bool force) // terminate pending action if (current_action_ongoing_ || force) { - Rendering::manager().outputWindow().setCoordinates( outputCoordinates() ); - + if (Settings::application.windows[1].fullscreen) { + // Apply change of fullscreen monitor + if ( output_monitor_.compare(Settings::application.windows[1].monitor) != 0 ) + Rendering::manager().outputWindow().setFullscreen( output_monitor_ ); + } + else { + // Apply coordinates to actual output window + Rendering::manager().outputWindow().setCoordinates( outputCoordinates() ); + } // reset indicators output_handles_->overlayActiveCorner(glm::vec2(0.f, 0.f)); @@ -374,6 +583,7 @@ void DisplaysView::terminate(bool force) // terminated current_action_ = ""; current_action_ongoing_ = false; + update_pending_ = true; } } @@ -390,7 +600,12 @@ glm::ivec4 DisplaysView::outputCoordinates() const return rect; } -View::Cursor DisplaysView::grab (Source *s, glm::vec2 from, glm::vec2 to, std::pair pick) +std::string DisplaysView::outputFullscreenMonitor() const +{ + return output_monitor_; +} + +View::Cursor DisplaysView::grab (Source *, glm::vec2 from, glm::vec2 to, std::pair pick) { std::ostringstream info; View::Cursor ret = Cursor(); @@ -400,8 +615,9 @@ View::Cursor DisplaysView::grab (Source *s, glm::vec2 from, glm::vec2 to, std::p glm::vec3 scene_to = Rendering::manager().unProject(to, scene.root()->transform_); glm::vec3 scene_translation = scene_to - scene_from; - // No source should be given - if (!s) { + // grab only works if not fullscreen + if (!Settings::application.windows[1].fullscreen) { + // grab surface to move if ( pick.first == output_surface_ ){ @@ -420,11 +636,7 @@ View::Cursor DisplaysView::grab (Source *s, glm::vec2 from, glm::vec2 to, std::p // Show move cursor output_handles_->overlayActiveCorner(glm::vec2(-1.f, 1.f)); ret.type = Cursor_ResizeAll; - info << "Position " << r.x << ", " << r.y << " px"; - - // apply to settings - Settings::application.windows[2].x = r.x; - Settings::application.windows[2].y = r.y; + info << "Window position " << r.x << ", " << r.y << " px"; } // grab handle to resize else if ( pick.first == output_handles_ ){ @@ -496,15 +708,44 @@ View::Cursor DisplaysView::grab (Source *s, glm::vec2 from, glm::vec2 to, std::p ret.type = corner.x * corner.y > 0.f ? Cursor_ResizeNESW : Cursor_ResizeNWSE; rect = outputCoordinates(); - info << "Dimensions " << rect.p << " x " << rect.q << " px"; - - // apply to settings - Settings::application.windows[2].x = rect.x; - Settings::application.windows[2].y = rect.y; - Settings::application.windows[2].w = rect.p; - Settings::application.windows[2].h = rect.q; + info << "Window size " << rect.p << " x " << rect.q << " px"; } + } + else { + // grab fullscreen output + if ( pick.first == output_surface_ ){ + + // convert mouse cursor coordinates to displays coordinates + scene_to *= glm::vec3(1.f/DISPLAYS_UNIT, -1.f/DISPLAYS_UNIT, 1.f); + + // loop over all monitors + std::map _monitors = Rendering::manager().monitors(); + int index = 1; + for (auto monitor_iter = _monitors.begin(); + monitor_iter != _monitors.end(); ++monitor_iter, ++index) { + + // if the mouse cursor is over a monitor + glm::ivec4 r = monitor_iter->second; + if (scene_to.x > r.x && scene_to.x < r.x + r.p + && scene_to.y > r.y && scene_to.y < r.y + r.q) { + + // show output frame on top of that monitor + output_->scale_.x = r.p * 0.5f * DISPLAYS_UNIT; + output_->scale_.y = r.q * 0.5f * DISPLAYS_UNIT; + output_->translation_.x = r.x * DISPLAYS_UNIT + output_->scale_.x; + output_->translation_.y = -r.y * DISPLAYS_UNIT - output_->scale_.y; + + // remember the output monitor selected + output_monitor_ = monitor_iter->first; + + // Show cursor + ret.type = Cursor_Hand; + info << "Fullscreen Monitor " << index << " (" << output_monitor_ << ")\n "<< + r.p << " x " << r.q << " px"; + } + } + } } // update cursor diff --git a/src/DisplaysView.h b/src/DisplaysView.h index f37d411..439a20e 100644 --- a/src/DisplaysView.h +++ b/src/DisplaysView.h @@ -26,6 +26,7 @@ public: void arrow (glm::vec2) override; glm::ivec4 outputCoordinates() const; + std::string outputFullscreenMonitor() const; private: @@ -33,27 +34,19 @@ private: Group *output_status_; Surface *output_surface_; Surface *output_render_; - Switch *output_overlays_; - Switch *output_mode_; + Switch *output_overlays_; + Switch *output_mode_; Handles *output_handles_; Handles *output_menu_; Handles *output_visible_; - Symbol *output_fullscreen_; + Symbol *output_fullscreen_; bool output_selected_; bool show_output_menu_; + int display_action_; + bool update_pending_; -// Node *overlay_position_; -// Node *overlay_position_cross_; -// Symbol *overlay_rotation_; -// Symbol *overlay_rotation_fix_; -// Group *overlay_rotation_clock_; -// Symbol *overlay_rotation_clock_tic_; -// Node *overlay_rotation_clock_hand_; -// Symbol *overlay_scaling_; -// Symbol *overlay_scaling_cross_; -// Node *overlay_scaling_grid_; -// Node *overlay_crop_; + std::string output_monitor_; }; diff --git a/src/RenderingManager.cpp b/src/RenderingManager.cpp index 5c115d1..ca6c48a 100644 --- a/src/RenderingManager.cpp +++ b/src/RenderingManager.cpp @@ -859,6 +859,14 @@ bool RenderingWindow::init(int index, GLFWwindow *share) glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); glfwWindowHint(GLFW_AUTO_ICONIFY, GLFW_FALSE); + if (master_ != nullptr) { + // special window type for output + glfwWindowHint(GLFW_DECORATED, GLFW_FALSE); + glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); +// glfwSetWindowAttrib( window_, GLFW_DECORATED, GLFW_FALSE); +// glfwSetWindowAttrib( window_, GLFW_RESIZABLE, GLFW_FALSE); + } + // create the window window_ = glfwCreateWindow(winset.w, winset.h, winset.name.c_str(), NULL, master_); if (window_ == NULL){ @@ -914,11 +922,6 @@ bool RenderingWindow::init(int index, GLFWwindow *share) // if not main window if ( master_ != NULL ) { - - // special window type - glfwSetWindowAttrib( window_, GLFW_DECORATED, GLFW_FALSE); - glfwSetWindowAttrib( window_, GLFW_RESIZABLE, GLFW_FALSE); - // Enable vsync on output window glfwSwapInterval(Settings::application.render.vsync); // no need for multisampling diff --git a/src/UserInterfaceManager.cpp b/src/UserInterfaceManager.cpp index 9a6a64e..b93dd14 100644 --- a/src/UserInterfaceManager.cpp +++ b/src/UserInterfaceManager.cpp @@ -359,10 +359,7 @@ void UserInterface::handleKeyboard() Mixer::manager().paste(clipboard); } else if (ImGui::IsKeyPressed( Control::layoutKey(GLFW_KEY_F), false )) { - if (shift_modifier_active) - Rendering::manager().mainWindow().toggleFullscreen(); - else - Rendering::manager().outputWindow().toggleFullscreen(); + Rendering::manager().mainWindow().toggleFullscreen(); } else if (ImGui::IsKeyPressed( Control::layoutKey(GLFW_KEY_M), false )) { Settings::application.widget.stats = !Settings::application.widget.stats; @@ -1931,8 +1928,6 @@ void HelperToolbox::Render() ImGui::Text(MENU_RECORD " Output"); ImGui::NextColumn(); ImGui::Text(SHORTCUT_RECORDCONT); ImGui::NextColumn(); ImGui::Text(MENU_RECORDCONT " recording"); ImGui::NextColumn(); - ImGui::Text(SHORTCUT_OUTPUTFULLSCREEN); ImGui::NextColumn(); - ImGui::Text(MENU_OUTPUTFULLSCREEN " output window"); ImGui::NextColumn(); ImGui::Text(SHORTCUT_OUTPUTDISABLE); ImGui::NextColumn(); ImGui::Text(MENU_OUTPUTDISABLE " output window"); ImGui::NextColumn(); ImGui::Separator(); @@ -4004,12 +3999,6 @@ void OutputPreview::Render() if ( ImGui::MenuItem( ICON_FA_WINDOW_RESTORE " Show window") ) Rendering::manager().outputWindow().show(); - bool isfullscreen = Rendering::manager().outputWindow().isFullscreen(); - if ( ImGui::MenuItem( MENU_OUTPUTFULLSCREEN, SHORTCUT_OUTPUTFULLSCREEN, &isfullscreen) ) { - Rendering::manager().outputWindow().show(); - Rendering::manager().outputWindow().toggleFullscreen(); - } - ImGui::MenuItem( MENU_OUTPUTDISABLE, SHORTCUT_OUTPUTDISABLE, &Settings::application.render.disabled); // output manager menu @@ -4306,7 +4295,7 @@ void OutputPreview::Render() if (Settings::application.render.disabled) { ImGui::SetCursorScreenPos(ImVec2(draw_pos.x + r, draw_pos.y + imagesize.y - 2.f*r)); - ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(IMGUI_COLOR_RECORD, 0.8f)); + ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(COLOR_FRAME, 0.8f)); ImGui::Text(ICON_FA_EYE_SLASH); ImGui::PopStyleColor(1); } @@ -7820,7 +7809,7 @@ void Navigator::RenderMainPannelVimix() ImGuiToolkit::PushFont(ImGuiToolkit::FONT_LARGE); ImGui::SameLine(0, 0.5f * ImGui::GetTextLineHeight()); - if ( ImGuiToolkit::IconButton( ICON_FA_CROW ) ) + if ( ImGuiToolkit::IconButton( ICON_FA_LAPTOP ) ) UserInterface::manager().outputcontrol.setVisible(!Settings::application.widget.preview); if (ImGui::IsItemHovered()) tooltip_ = { TOOLTIP_OUTPUT, SHORTCUT_OUTPUT}; @@ -8060,7 +8049,7 @@ void Navigator::RenderMainPannelSettings() void Navigator::RenderTransitionPannel() { - if (Settings::application.current_view < View::TRANSITION) { + if (Settings::application.current_view != View::TRANSITION) { hidePannel(); return; } diff --git a/src/UserInterfaceManager.h b/src/UserInterfaceManager.h index 305bdca..2e6ba9e 100644 --- a/src/UserInterfaceManager.h +++ b/src/UserInterfaceManager.h @@ -28,7 +28,7 @@ #define IMGUI_TITLE_HELP ICON_FA_LIFE_RING " Help" #define IMGUI_TITLE_TOOLBOX ICON_FA_HAMSA " Guru Toolbox" #define IMGUI_TITLE_SHADEREDITOR ICON_FA_CODE " Shader Editor" -#define IMGUI_TITLE_PREVIEW ICON_FA_CROW " Output" +#define IMGUI_TITLE_PREVIEW ICON_FA_LAPTOP " Display" #define MENU_NEW_FILE ICON_FA_FILE " New" #define SHORTCUT_NEW_FILE CTRL_MOD "W" @@ -68,8 +68,6 @@ #define SHORTCUT_CAPTUREFRAME "F11" #define MENU_OUTPUTDISABLE ICON_FA_EYE_SLASH " Disable" #define SHORTCUT_OUTPUTDISABLE "F12" -#define MENU_OUTPUTFULLSCREEN ICON_FA_EXPAND_ALT " Fullscreen window" -#define SHORTCUT_OUTPUTFULLSCREEN CTRL_MOD "F" #define MENU_CLOSE ICON_FA_TIMES " Close" #define TOOLTIP_NOTE "New sticky note " @@ -78,7 +76,7 @@ #define SHORTCUT_METRICS CTRL_MOD "M" #define TOOLTIP_PLAYER "Player " #define SHORTCUT_PLAYER CTRL_MOD "P" -#define TOOLTIP_OUTPUT "Output " +#define TOOLTIP_OUTPUT "Display " #define SHORTCUT_OUTPUT CTRL_MOD "D" #define TOOLTIP_TIMER "Timer " #define SHORTCUT_TIMER CTRL_MOD "T" @@ -87,7 +85,7 @@ #define TOOLTIP_SHADEREDITOR "Shader Editor " #define SHORTCUT_SHADEREDITOR CTRL_MOD "E" #define TOOLTIP_FULLSCREEN "Fullscreen " -#define SHORTCUT_FULLSCREEN CTRL_MOD "Shift+F" +#define SHORTCUT_FULLSCREEN CTRL_MOD "F" #define TOOLTIP_MAIN "Main menu " #define SHORTCUT_MAIN "HOME" #define TOOLTIP_NEW_SOURCE "New source "