diff --git a/resources/icons/edit_button_white.svg b/resources/icons/edit_button.svg similarity index 93% rename from resources/icons/edit_button_white.svg rename to resources/icons/edit_button.svg index 9f5cda9c9..25f338b40 100644 --- a/resources/icons/edit_button_white.svg +++ b/resources/icons/edit_button.svg @@ -9,7 +9,7 @@ viewBox="0 0 348.882 348.882" style="enable-background:new 0 0 348.882 348.882;" xml:space="preserve" - sodipodi:docname="edit_button_2.svg" + sodipodi:docname="edit_button_mod.svg" inkscape:version="1.1 (c68e22c387, 2021-05-23)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" @@ -28,8 +28,8 @@ inkscape:pagecheckerboard="0" showgrid="false" inkscape:zoom="2.3274346" - inkscape:cx="4.9410626" - inkscape:cy="174.65582" + inkscape:cx="89.583614" + inkscape:cy="140.28321" inkscape:window-width="1920" inkscape:window-height="1001" inkscape:window-x="-9" @@ -39,10 +39,10 @@ + style="fill:#808080;fill-opacity:1" /> diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index edd1ed2d9..32fe71f67 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -52,7 +52,7 @@ static const std::map font_icons = { {ImGui::PreferencesButton , "notification_preferences" }, {ImGui::PreferencesHoverButton , "notification_preferences_hover"}, #if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT - {ImGui::SliderFloatEditBtnIcon, "edit_button_white" }, + {ImGui::SliderFloatEditBtnIcon, "edit_button" }, #endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT }; static const std::map font_icons_large = { @@ -500,10 +500,14 @@ bool ImGuiWrapper::slider_float(const char* label, float* v, float v_min, float std::wstring btn_name; btn_name = ImGui::SliderFloatEditBtnIcon + boost::nowide::widen(std::string(label)); + ImGui::PushStyleColor(ImGuiCol_Button, { 0.25f, 0.25f, 0.25f, 1.0f }); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, { 0.5f, 0.5f, 0.5f, 1.0f }); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, { 0.5f, 0.5f, 0.5f, 1.0f }); if (ImGui::Button(into_u8(btn_name).c_str())) { ImGui::SetKeyboardFocusHere(-1); this->set_requires_extra_frame(); } + ImGui::PopStyleColor(3); if (ImGui::IsItemHovered()) this->tooltip(into_u8(_L("Edit")).c_str(), max_tooltip_width);