diff --git a/resources/icons/edit_gcode.svg b/resources/icons/edit_gcode.svg index 694e106cc2..e2b7279ea7 100644 --- a/resources/icons/edit_gcode.svg +++ b/resources/icons/edit_gcode.svg @@ -4,7 +4,7 @@ viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve"> - + - + - + diff --git a/resources/icons/error_tick_f.svg b/resources/icons/error_tick_f.svg index adf876e3c6..7e86945c83 100644 --- a/resources/icons/error_tick_f.svg +++ b/resources/icons/error_tick_f.svg @@ -3,7 +3,7 @@ - + diff --git a/resources/icons/pause_print.svg b/resources/icons/pause_print.svg index a905b1ea12..300331ff13 100644 --- a/resources/icons/pause_print.svg +++ b/resources/icons/pause_print.svg @@ -4,7 +4,7 @@ viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve"> - + - + tick); //draw tick icon-buttons @@ -286,7 +286,7 @@ void DSForLayers::draw_colored_band(const ImRect& groove, const ImRect& slideabl if (m_ticks.empty() || m_draw_mode == dmSequentialFffPrint) return; - ImVec2 blank_padding = ImVec2(5.0f, 2.0f) * m_scale; + ImVec2 blank_padding = ImVec2(0.5f * m_ctrl.GetGrooveRect().GetWidth(), 2.0f * m_scale); float blank_width = 1.0f * m_scale; ImRect blank_rect = ImRect(groove.GetCenter().x - blank_width, groove.Min.y, groove.GetCenter().x + blank_width, groove.Max.y); @@ -627,7 +627,7 @@ void DSForLayers::Render(const int canvas_width, const int canvas_height, float ImVec2 pos; pos.x = canvas_width - VERTICAL_SLIDER_WIDTH * m_scale - tick_icon_side; - pos.y = 1.f * action_btn_sz; + pos.y = 1.5f * action_btn_sz; if (m_allow_editing) pos.y += 2.f; @@ -648,13 +648,13 @@ void DSForLayers::Render(const int canvas_width, const int canvas_height, float const float groove_center_x = m_ctrl.GetGrooveRect().GetCenter().x; - ImVec2 btn_pos = ImVec2(groove_center_x - 0.5f * action_btn_sz, pos.y - 0.25f * action_btn_sz); + ImVec2 btn_pos = ImVec2(groove_center_x - 0.5f * action_btn_sz, pos.y - 0.75f * action_btn_sz); if (!m_ticks.empty() && m_allow_editing && render_button(ImGui::DSRevert, ImGui::DSRevertHovered, "revert", btn_pos, fiRevertIcon)) discard_all_thicks(); - btn_pos.y += 0.1f * action_btn_sz + size.y; + btn_pos.y += 0.5f * action_btn_sz + size.y; const bool is_one_layer = m_ctrl.IsCombineThumbs(); if (render_button(is_one_layer ? ImGui::Lock : ImGui::Unlock, is_one_layer ? ImGui::LockHovered : ImGui::UnlockHovered, "one_layer", btn_pos, fiOneLayerIcon)) ChangeOneLayerLock(); diff --git a/src/slic3r/GUI/ImGuiDoubleSlider.cpp b/src/slic3r/GUI/ImGuiDoubleSlider.cpp index f70af66e2b..d78a47e634 100644 --- a/src/slic3r/GUI/ImGuiDoubleSlider.cpp +++ b/src/slic3r/GUI/ImGuiDoubleSlider.cpp @@ -285,7 +285,7 @@ void ImGuiControl::draw_background(const ImRect& slideable_region) void ImGuiControl::draw_label(std::string label, const ImRect& thumb) { - if (label.empty()) + if (label.empty() || label == "ErrVal") return; const ImVec2 thumb_center = thumb.GetCenter(); @@ -313,9 +313,9 @@ void ImGuiControl::draw_label(std::string label, const ImRect& thumb) void ImGuiControl::draw_thumb(const ImVec2& center, bool mark/* = false*/) { - const float line_width = 2.0f * m_draw_opts.scale; - const float line_offset = 9.0f * m_draw_opts.scale; + const float line_width = 1.5f * m_draw_opts.scale; const float radius = m_draw_opts.thumb_radius(); + const float line_offset = 0.5f * radius; const float hexagon_angle = is_horizontal() ? 0.f : IM_PI * 0.5f; diff --git a/src/slic3r/GUI/ImGuiDoubleSlider.hpp b/src/slic3r/GUI/ImGuiDoubleSlider.hpp index db3318706f..97f7b00739 100644 --- a/src/slic3r/GUI/ImGuiDoubleSlider.hpp +++ b/src/slic3r/GUI/ImGuiDoubleSlider.hpp @@ -98,14 +98,14 @@ private: struct DrawOptions { float scale { 1.f }; // used for Retina on osx - ImVec2 dummy_sz() const { return ImVec2(24.0f, 44.0f) * scale; } + ImVec2 dummy_sz() const { return ImVec2(24.0f, 22.0f) * scale; } ImVec2 thumb_dummy_sz() const { return ImVec2(17.0f, 17.0f) * scale; } - ImVec2 groove_sz() const { return ImVec2(10.0f, 8.0f) * scale; } - ImVec2 draggable_region_sz()const { return ImVec2(40.0f, 19.0f) * scale; } + ImVec2 groove_sz() const { return ImVec2(4.0f, 4.0f) * scale; } + ImVec2 draggable_region_sz()const { return ImVec2(20.0f, 19.0f) * scale; } ImVec2 text_dummy_sz() const { return ImVec2(50.0f, 34.0f) * scale; } ImVec2 text_padding() const { return ImVec2( 5.0f, 2.0f) * scale; } - float thumb_radius() const { return 14.0f * scale; } + float thumb_radius() const { return 10.0f * scale; } float thumb_border() const { return 2.0f * scale; } float rounding() const { return 2.0f * scale; } @@ -235,6 +235,7 @@ public: void Show(bool show = true) { m_ctrl.Show(show); } void Hide() { m_ctrl.Show(false); } + bool IsShown() { return m_ctrl.IsShown(); } void SetEmUnit(int em_unit) { m_em = em_unit; } void ShowLowerThumb(bool show) { m_ctrl.ShowLowerThumb(show); } diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index 25f3e342cd..61e8dd7fa9 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -75,15 +75,6 @@ static const std::map font_icons = { {ImGui::SnapMarker , "snap" }, {ImGui::HorizontalHide , "horizontal_hide" }, {ImGui::HorizontalShow , "horizontal_show" }, - - {ImGui::ErrorTick , "error_tick" }, - {ImGui::ErrorTickHovered , "error_tick_f" }, - {ImGui::PausePrint , "pause_print" }, - {ImGui::PausePrintHovered , "pause_print_f" }, - {ImGui::EditGCode , "edit_gcode" }, - {ImGui::EditGCodeHovered , "edit_gcode_f" }, - {ImGui::RemoveTick , "colorchange_del" }, - {ImGui::RemoveTickHovered , "colorchange_del_f" }, }; static const std::map font_icons_large = { @@ -134,6 +125,15 @@ static const std::map font_icons_medium = { {ImGui::DSRevertHovered , "undo_f" }, {ImGui::DSSettings , "cog" }, {ImGui::DSSettingsHovered , "cog_f" }, + + {ImGui::ErrorTick , "error_tick" }, + {ImGui::ErrorTickHovered , "error_tick_f" }, + {ImGui::PausePrint , "pause_print" }, + {ImGui::PausePrintHovered , "pause_print_f" }, + {ImGui::EditGCode , "edit_gcode" }, + {ImGui::EditGCodeHovered , "edit_gcode_f" }, + {ImGui::RemoveTick , "colorchange_del" }, + {ImGui::RemoveTickHovered , "colorchange_del_f" }, }; static const std::map font_icons_extra_large = {