mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 03:49:00 +08:00
change icon button to text button
This commit is contained in:
parent
119609b5c6
commit
9f3018d829
@ -40,9 +40,6 @@ enum class IconType : unsigned {
|
|||||||
show_support_structure_selected,
|
show_support_structure_selected,
|
||||||
show_support_structure_unselected,
|
show_support_structure_unselected,
|
||||||
show_support_structure_hovered,
|
show_support_structure_hovered,
|
||||||
delete_icon,
|
|
||||||
delete_hovered,
|
|
||||||
delete_disabled,
|
|
||||||
// automatic calc of icon's count
|
// automatic calc of icon's count
|
||||||
_count
|
_count
|
||||||
};
|
};
|
||||||
@ -59,10 +56,6 @@ IconManager::Icons init_icons(IconManager &mng, ImVec2 size = ImVec2{50, 50}) {
|
|||||||
{"support_structure.svg", size, IconManager::RasterType::color}, // show_support_structure_selected
|
{"support_structure.svg", size, IconManager::RasterType::color}, // show_support_structure_selected
|
||||||
{"support_structure.svg", size, IconManager::RasterType::gray_only_data}, // show_support_structure_unselected
|
{"support_structure.svg", size, IconManager::RasterType::gray_only_data}, // show_support_structure_unselected
|
||||||
{"support_structure.svg", size, IconManager::RasterType::color}, // show_support_structure_hovered
|
{"support_structure.svg", size, IconManager::RasterType::color}, // show_support_structure_hovered
|
||||||
|
|
||||||
{"delete.svg", size, IconManager::RasterType::white_only_data}, // delete_icon
|
|
||||||
{"delete.svg", size, IconManager::RasterType::color}, // delete_hovered
|
|
||||||
{"delete.svg", size, IconManager::RasterType::gray_only_data}, // delete_disabled
|
|
||||||
};
|
};
|
||||||
|
|
||||||
assert(init_types.size() == static_cast<size_t>(IconType::_count));
|
assert(init_types.size() == static_cast<size_t>(IconType::_count));
|
||||||
@ -807,13 +800,10 @@ RENDER_AGAIN:
|
|||||||
if (ImGuiPureWrap::button(m_desc.at("auto_generate")))
|
if (ImGuiPureWrap::button(m_desc.at("auto_generate")))
|
||||||
auto_generate();
|
auto_generate();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
remove_all = button(
|
|
||||||
get_icon(m_icons, IconType::delete_icon),
|
m_imgui->disabled_begin(!is_input_enabled() || m_normal_cache.empty());
|
||||||
get_icon(m_icons, IconType::delete_hovered),
|
remove_all = ImGuiPureWrap::button(m_desc.at("remove_all"));
|
||||||
get_icon(m_icons, IconType::delete_disabled),
|
m_imgui->disabled_end();
|
||||||
!is_input_enabled() || m_normal_cache.empty());
|
|
||||||
if (ImGui::IsItemHovered())
|
|
||||||
ImGui::SetTooltip("%s", m_desc.at("remove_all").c_str());
|
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
if (ImGuiPureWrap::button(m_desc.at("manual_editing")))
|
if (ImGuiPureWrap::button(m_desc.at("manual_editing")))
|
||||||
@ -821,10 +811,6 @@ RENDER_AGAIN:
|
|||||||
|
|
||||||
m_imgui->disabled_end();
|
m_imgui->disabled_end();
|
||||||
|
|
||||||
//m_imgui->disabled_begin(!is_input_enabled() || m_normal_cache.empty());
|
|
||||||
//remove_all = ImGuiPureWrap::button(m_desc.at("remove_all"));
|
|
||||||
//m_imgui->disabled_end();
|
|
||||||
|
|
||||||
// ImGuiPureWrap::text("");
|
// ImGuiPureWrap::text("");
|
||||||
// ImGuiPureWrap::text(m_c->m_model_object->sla_points_status == sla::PointsStatus::NoPoints ? _(L("No points (will be autogenerated)")) :
|
// ImGuiPureWrap::text(m_c->m_model_object->sla_points_status == sla::PointsStatus::NoPoints ? _(L("No points (will be autogenerated)")) :
|
||||||
// (m_c->m_model_object->sla_points_status == sla::PointsStatus::AutoGenerated ? _(L("Autogenerated points (no modifications)")) :
|
// (m_c->m_model_object->sla_points_status == sla::PointsStatus::AutoGenerated ? _(L("Autogenerated points (no modifications)")) :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user