mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-11 19:17:33 +00:00
UI fixes / improvements (#11617)
* fix margins on titlebar fold * update * Update Plater.cpp * update * Update toolbar_double_directional_arrow.svg * Update toolbar_double_directional_arrow.svg * object list variable height icon * Update tab_multi_active.svg * update ams icons * match popup border color * Update param_advanced.svg * Update custom-gcode_advanced.svg * match label & parameter box width on object table * revert changes for orange colors * match sizes of radio buttons on widgets * Update GLGizmoSVG.cpp
This commit is contained in:
@@ -802,6 +802,10 @@ void GLGizmoBrimEars::show_tooltip_information(float x, float y)
|
||||
caption_max += m_imgui->calc_text_size(": "sv).x + 35.f;
|
||||
|
||||
float scale = m_parent.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, 0}); // ORCA: Dont add padding
|
||||
|
||||
@@ -224,6 +224,8 @@ GLGizmoCut3D::GLGizmoCut3D(GLCanvas3D& parent, const std::string& icon_filename,
|
||||
{"Width" , _u8L("Width")},
|
||||
{"Flap Angle" , _u8L("Flap Angle")},
|
||||
{"Groove Angle" , _u8L("Groove Angle")},
|
||||
{"Cut position" , _u8L("Cut position")}, // ORCA
|
||||
{"Build Volume" , _u8L("Build Volume")}, // ORCA
|
||||
};
|
||||
|
||||
// update_connector_shape();
|
||||
@@ -660,10 +662,11 @@ bool GLGizmoCut3D::render_reset_button(const std::string& label_id, const std::s
|
||||
const ImGuiStyle &style = ImGui::GetStyle();
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, {1, style.ItemSpacing.y});
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0); // ORCA match button style
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, {0.25f, 0.25f, 0.25f, 0.0f});
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, {0.4f, 0.4f, 0.4f, 1.0f});
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, {0.4f, 0.4f, 0.4f, 1.0f});
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, {0, 0, 0, 0}); // ORCA match button style
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, {0, 0, 0, 0}); // ORCA match button style
|
||||
|
||||
const bool revert = m_imgui->button(wxString(ImGui::RevertBtn) + "##" + wxString::FromUTF8(label_id));
|
||||
|
||||
@@ -672,7 +675,7 @@ bool GLGizmoCut3D::render_reset_button(const std::string& label_id, const std::s
|
||||
if (ImGui::IsItemHovered())
|
||||
m_imgui->tooltip(tooltip.c_str(), ImGui::GetFontSize() * 20.0f);
|
||||
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopStyleVar(2); // ORCA
|
||||
|
||||
return revert;
|
||||
}
|
||||
@@ -2254,7 +2257,7 @@ void GLGizmoCut3D::render_connectors_input_window(CutConnectors &connectors, flo
|
||||
render_flip_plane_button(m_connectors_editing && connectors.empty());
|
||||
|
||||
m_imgui->text(m_labels_map["Type"]);
|
||||
ImGuiWrapper::push_radio_style();
|
||||
ImGuiWrapper::push_radio_style(m_parent.get_scale()); // ORCA
|
||||
bool type_changed = render_connect_type_radio_button(CutConnectorType::Plug);
|
||||
type_changed |= render_connect_type_radio_button(CutConnectorType::Dowel);
|
||||
type_changed |= render_connect_type_radio_button(CutConnectorType::Snap);
|
||||
@@ -2334,18 +2337,14 @@ void GLGizmoCut3D::render_connectors_input_window(CutConnectors &connectors, flo
|
||||
|
||||
void GLGizmoCut3D::render_build_size()
|
||||
{
|
||||
double koef = m_imperial_units ? GizmoObjectManipulation::mm_to_in : 1.0;
|
||||
wxString unit_str = " " + (m_imperial_units ? _L("in") : _L("mm"));
|
||||
|
||||
Vec3d tbb_sz = m_transformed_bounding_box.size();
|
||||
wxString size = "X: " + double_to_string(tbb_sz.x() * koef, 2) + unit_str +
|
||||
", Y: " + double_to_string(tbb_sz.y() * koef, 2) + unit_str +
|
||||
", Z: " + double_to_string(tbb_sz.z() * koef, 2) + unit_str;
|
||||
double koef = m_imperial_units ? GizmoObjectManipulation::mm_to_in : 1.0;
|
||||
wxString unit_str = m_imperial_units ? _L("in") : _L("mm");
|
||||
Vec3d tbb_sz = m_transformed_bounding_box.size() * koef; // ORCA
|
||||
|
||||
ImGui::AlignTextToFramePadding();
|
||||
m_imgui->text(_L("Build Volume"));
|
||||
ImGui::SameLine();
|
||||
m_imgui->text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, size);
|
||||
ImGui::SameLine(m_label_width);
|
||||
ImGui::Text("%.2f x %.2f x %.2f %s", tbb_sz.x(), tbb_sz.y(), tbb_sz.z(), unit_str.ToUTF8().data()); // ORCA use regular text color and simplify format
|
||||
}
|
||||
|
||||
void GLGizmoCut3D::reset_cut_plane()
|
||||
@@ -2650,8 +2649,8 @@ void GLGizmoCut3D::render_cut_plane_input_window(CutConnectors &connectors, floa
|
||||
render_build_size();
|
||||
|
||||
ImGui::AlignTextToFramePadding();
|
||||
m_imgui->text(_L("Cut position") + ": ");
|
||||
ImGui::SameLine();
|
||||
m_imgui->text(_L("Cut position"));
|
||||
ImGui::SameLine(m_label_width);
|
||||
render_move_center_input(Z);
|
||||
ImGui::SameLine();
|
||||
|
||||
@@ -2933,6 +2932,10 @@ void GLGizmoCut3D::show_tooltip_information(float x, float y)
|
||||
caption_max += m_imgui->calc_text_size(std::string_view{": "}).x + 35.f;
|
||||
|
||||
float scale = m_parent.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, 0}); // ORCA: Dont add padding
|
||||
|
||||
@@ -1535,7 +1535,7 @@ void GLGizmoEmboss::draw_text_input()
|
||||
float width = ImGui::GetContentRegionAvailWidth();
|
||||
const ImVec2& padding = style.FramePadding;
|
||||
ImVec2 icon_pos(width - m_gui_cfg->icon_width - scrollbar_width + padding.x,
|
||||
cursor.y - m_gui_cfg->icon_width - scrollbar_height - 2*padding.y);
|
||||
cursor.y - 2 * m_gui_cfg->icon_width - scrollbar_height - 2*padding.y); // ORCA fix vertical position
|
||||
|
||||
ImGui::SetCursorPos(icon_pos);
|
||||
draw(get_icon(m_icons, IconType::exclamation, IconState::hovered));
|
||||
@@ -1646,7 +1646,7 @@ void GLGizmoEmboss::draw_font_list_line()
|
||||
bool exist_change_in_font = m_style_manager.is_font_changed();
|
||||
const std::string& font_text = m_gui_cfg->translations.font;
|
||||
if (exist_change_in_font || !exist_stored_style)
|
||||
ImGuiWrapper::text_colored(ImGuiWrapper::COL_ORCA, font_text);
|
||||
ImGuiWrapper::text_colored(ImGuiWrapper::COL_MODIFIED, font_text); // ORCA match color
|
||||
else
|
||||
ImGuiWrapper::text(font_text);
|
||||
|
||||
@@ -1673,7 +1673,8 @@ void GLGizmoEmboss::draw_font_list_line()
|
||||
EmbossStyle &style = m_style_manager.get_style();
|
||||
if (exist_change_in_font) {
|
||||
ImGui::SameLine(ImGui::GetStyle().WindowPadding.x);
|
||||
if (draw_button(m_icons, IconType::undo)) {
|
||||
auto r_icon = get_icon(m_icons, IconType::undo, IconState::hovered);
|
||||
if (Slic3r::GUI::button(r_icon, r_icon, r_icon)) { // ORCA draw bottom with same orange color
|
||||
const EmbossStyle *stored_style = m_style_manager.get_stored_style();
|
||||
|
||||
style.path = stored_style->path;
|
||||
@@ -1848,7 +1849,7 @@ void GLGizmoEmboss::draw_model_type()
|
||||
ModelVolumeType type = m_volume->type();
|
||||
|
||||
//TRN EmbossOperation
|
||||
ImGuiWrapper::push_radio_style();
|
||||
ImGuiWrapper::push_radio_style(m_parent.get_scale()); // ORCA
|
||||
if (ImGui::RadioButton(_u8L("Join").c_str(), type == part))
|
||||
new_type = part;
|
||||
else if (ImGui::IsItemHovered())
|
||||
@@ -2405,7 +2406,7 @@ bool GLGizmoEmboss::revertible(const std::string &name,
|
||||
ImGui::AlignTextToFramePadding();
|
||||
bool changed = exist_change(value, default_value);
|
||||
if (changed || default_value == nullptr)
|
||||
ImGuiWrapper::text_colored(ImGuiWrapper::COL_ORCA, name);
|
||||
ImGuiWrapper::text_colored(ImGuiWrapper::COL_MODIFIED, name); // ORCA Match color
|
||||
else
|
||||
ImGuiWrapper::text(name);
|
||||
|
||||
@@ -2414,7 +2415,8 @@ bool GLGizmoEmboss::revertible(const std::string &name,
|
||||
ImGuiWindow *window = ImGui::GetCurrentWindow();
|
||||
float prev_x = window->DC.CursorPosPrevLine.x;
|
||||
ImGui::SameLine(undo_offset); // change cursor postion
|
||||
if (draw_button(m_icons, IconType::undo)) {
|
||||
auto r_icon = get_icon(m_icons, IconType::undo, IconState::hovered);
|
||||
if (Slic3r::GUI::button(r_icon, r_icon, r_icon)) { // ORCA draw bottom with same orange color
|
||||
value = *default_value;
|
||||
|
||||
// !! Fix to detect change of value after revert of float-slider
|
||||
@@ -2717,7 +2719,8 @@ void GLGizmoEmboss::draw_advanced()
|
||||
else if (draw_button(icons, IconType::align_horizontal_right)) { align.first=FontProp::HorizontalAlign::right; is_change = true; }
|
||||
else if (ImGui::IsItemHovered()) m_imgui->tooltip(_CTX_utf8(L_CONTEXT("Right", "Alignment"), "Alignment"), m_gui_cfg->max_tooltip_width);
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::SameLine(0, ImGui::GetStyle().ItemSpacing.x * 2.f); // ORCA use wider spacing for separation between horizontal / vertical alignment
|
||||
|
||||
if (align.second==FontProp::VerticalAlign::top) draw(get_icon(icons, IconType::align_vertical_top, IconState::hovered));
|
||||
else if (draw_button(icons, IconType::align_vertical_top)) { align.second=FontProp::VerticalAlign::top; is_change = true; }
|
||||
else if (ImGui::IsItemHovered()) m_imgui->tooltip(_CTX_utf8(L_CONTEXT("Top", "Alignment"), "Alignment"), m_gui_cfg->max_tooltip_width);
|
||||
|
||||
@@ -479,6 +479,10 @@ void GLGizmoFdmSupports::show_tooltip_information(float caption_max, float x, fl
|
||||
caption_max += m_imgui->calc_text_size(std::string_view{": "}).x + 15.f;
|
||||
|
||||
float scale = m_parent.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, 0}); // ORCA: Dont add padding
|
||||
|
||||
@@ -88,6 +88,10 @@ void GLGizmoFuzzySkin::show_tooltip_information(float caption_max, float x, floa
|
||||
caption_max += m_imgui->calc_text_size(std::string_view{": "}).x + 15.f;
|
||||
|
||||
float scale = m_parent.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, 0}); // ORCA: Dont add padding
|
||||
|
||||
@@ -2231,6 +2231,10 @@ void GLGizmoMeasure::show_tooltip_information(float caption_max, float x, float
|
||||
caption_max += m_imgui->calc_text_size(": "sv).x + 35.f;
|
||||
|
||||
float scale = m_parent.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, { 0, 0 }); // ORCA: Dont add padding
|
||||
|
||||
@@ -287,6 +287,10 @@ void GLGizmoMmuSegmentation::show_tooltip_information(float caption_max, float x
|
||||
caption_max += m_imgui->calc_text_size(std::string_view{": "}).x + 15.f;
|
||||
|
||||
float scale = m_parent.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, 0}); // ORCA: Dont add padding
|
||||
|
||||
@@ -436,7 +436,8 @@ bool reset_button(const IconManager::VIcons &icons)
|
||||
//btn_label += ImGui::RevertButton;
|
||||
//return ImGui::Button((btn_label + "##" + label_id).c_str());
|
||||
|
||||
return draw_clickable(icons, IconType::reset_value);
|
||||
auto icon = get_icon(icons, IconType::reset_value, IconState::hovered);
|
||||
return clickable(icon, icon); // ORCA use orange color for both states
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -1666,7 +1667,9 @@ void GLGizmoSVG::draw_depth()
|
||||
void GLGizmoSVG::draw_size()
|
||||
{
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGuiWrapper::text(m_gui_cfg->translations.size);
|
||||
bool can_reset = m_scale_width.has_value() || m_scale_height.has_value();
|
||||
ImVec4 text_color = can_reset ? ImGuiWrapper::COL_MODIFIED : ImGui::GetStyleColorVec4(ImGuiCol_Text); // ORCA use modified color on text
|
||||
ImGuiWrapper::text_colored(text_color, m_gui_cfg->translations.size);
|
||||
if (ImGui::IsItemHovered()){
|
||||
size_t count_points = 0;
|
||||
for (const auto &s : m_volume_shape.shapes_with_ids)
|
||||
@@ -1770,7 +1773,7 @@ void GLGizmoSVG::draw_size()
|
||||
|
||||
|
||||
// reset button
|
||||
bool can_reset = m_scale_width.has_value() || m_scale_height.has_value();
|
||||
//bool can_reset = m_scale_width.has_value() || m_scale_height.has_value(); // ORCA update variable above if condition change
|
||||
if (can_reset) {
|
||||
if (reset_button(m_icons)) {
|
||||
new_relative_scale = Vec3d(1./m_scale_width.value_or(1.f), 1./m_scale_height.value_or(1.f), 1.);
|
||||
@@ -1838,7 +1841,8 @@ void GLGizmoSVG::draw_distance()
|
||||
ScopeGuard sg([imgui = m_imgui]() { imgui->disabled_end(); });
|
||||
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGuiWrapper::text(m_gui_cfg->translations.distance);
|
||||
ImVec4 text_color = m_distance.has_value() ? ImGuiWrapper::COL_MODIFIED : ImGui::GetStyleColorVec4(ImGuiCol_Text); // ORCA use modified color on text
|
||||
ImGuiWrapper::text_colored(text_color, m_gui_cfg->translations.distance);
|
||||
ImGui::SameLine(m_gui_cfg->input_offset);
|
||||
ImGui::SetNextItemWidth(m_gui_cfg->input_width);
|
||||
|
||||
@@ -1881,7 +1885,8 @@ void GLGizmoSVG::draw_distance()
|
||||
void GLGizmoSVG::draw_rotation()
|
||||
{
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGuiWrapper::text(m_gui_cfg->translations.rotation);
|
||||
ImVec4 text_color = m_angle.has_value() ? ImGuiWrapper::COL_MODIFIED : ImGui::GetStyleColorVec4(ImGuiCol_Text); // ORCA use modified color on text
|
||||
ImGuiWrapper::text_colored(text_color, m_gui_cfg->translations.rotation);
|
||||
ImGui::SameLine(m_gui_cfg->input_offset);
|
||||
ImGui::SetNextItemWidth(m_gui_cfg->input_width);
|
||||
|
||||
@@ -2001,7 +2006,7 @@ void GLGizmoSVG::draw_model_type()
|
||||
ModelVolumeType type = m_volume->type();
|
||||
|
||||
//TRN EmbossOperation
|
||||
ImGuiWrapper::push_radio_style();
|
||||
ImGuiWrapper::push_radio_style(m_parent.get_scale()); //ORCA
|
||||
if (ImGui::RadioButton(_u8L("Join").c_str(), type == part))
|
||||
new_type = part;
|
||||
else if (ImGui::IsItemHovered())
|
||||
|
||||
@@ -109,6 +109,10 @@ void GLGizmoSeam::show_tooltip_information(float caption_max, float x, float y)
|
||||
caption_max += m_imgui->calc_text_size(std::string_view{": "}).x + 35.f;
|
||||
|
||||
float scale = m_parent.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, 0}); // ORCA: Dont add padding
|
||||
|
||||
@@ -251,22 +251,22 @@ bool GLGizmosManager::init_icon_textures()
|
||||
ImTextureID texture_id;
|
||||
|
||||
icon_list.clear();
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_reset.svg", 14, 14, texture_id))
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_reset.svg", 16, 16, texture_id))
|
||||
icon_list.insert(std::make_pair((int)IC_TOOLBAR_RESET, texture_id));
|
||||
else
|
||||
return false;
|
||||
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_reset_hover.svg", 14, 14, texture_id))
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_reset_hover.svg", 16, 16, texture_id))
|
||||
icon_list.insert(std::make_pair((int)IC_TOOLBAR_RESET_HOVER, texture_id));
|
||||
else
|
||||
return false;
|
||||
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_reset_zero.svg", 14, 14, texture_id))
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_reset_zero.svg", 16, 16, texture_id))
|
||||
icon_list.insert(std::make_pair((int) IC_TOOLBAR_RESET_ZERO, texture_id));
|
||||
else
|
||||
return false;
|
||||
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_reset_zero_hover.svg", 14, 14, texture_id))
|
||||
if (IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/toolbar_reset_zero_hover.svg", 16, 16, texture_id))
|
||||
icon_list.insert(std::make_pair((int) IC_TOOLBAR_RESET_ZERO_HOVER, texture_id));
|
||||
else
|
||||
return false;
|
||||
|
||||
@@ -644,8 +644,12 @@ bool GizmoObjectManipulation::reset_button(ImGuiWrapper *imgui_wrapper, float ca
|
||||
ImTextureID normal_id = m_glcanvas.get_gizmos_manager().get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_RESET);
|
||||
ImTextureID hover_id = m_glcanvas.get_gizmos_manager().get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_RESET_HOVER);
|
||||
|
||||
float font_size = ImGui::GetFontSize();
|
||||
ImVec2 button_size = ImVec2(font_size, font_size);
|
||||
float scale = m_glcanvas.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(16 * scale, 16 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
|
||||
@@ -661,8 +665,12 @@ bool GizmoObjectManipulation::reset_zero_button(ImGuiWrapper *imgui_wrapper, flo
|
||||
ImTextureID normal_id = m_glcanvas.get_gizmos_manager().get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_RESET_ZERO);
|
||||
ImTextureID hover_id = m_glcanvas.get_gizmos_manager().get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_RESET_ZERO_HOVER);
|
||||
|
||||
float font_size = ImGui::GetFontSize() * 1.1;
|
||||
ImVec2 button_size = ImVec2(font_size, font_size);
|
||||
float scale = m_glcanvas.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(16 * scale, 16 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
|
||||
@@ -719,6 +727,10 @@ void GizmoObjectManipulation::show_move_tooltip_information(ImGuiWrapper *imgui_
|
||||
caption_max += imgui_wrapper->calc_text_size(": "sv).x + 35.f;
|
||||
|
||||
float scale = m_glcanvas.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, ImGui::GetStyle().FramePadding.y});
|
||||
@@ -747,6 +759,10 @@ void GizmoObjectManipulation::show_rotate_tooltip_information(ImGuiWrapper *imgu
|
||||
caption_max += imgui_wrapper->calc_text_size(": "sv).x + 35.f;
|
||||
|
||||
float scale = m_glcanvas.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, ImGui::GetStyle().FramePadding.y});
|
||||
@@ -775,6 +791,10 @@ void GizmoObjectManipulation::show_scale_tooltip_information(ImGuiWrapper *imgui
|
||||
caption_max += imgui_wrapper->calc_text_size(": "sv).x + 35.f;
|
||||
|
||||
float scale = m_glcanvas.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, ImGui::GetStyle().FramePadding.y});
|
||||
|
||||
Reference in New Issue
Block a user