From c3e0456017fc49ee2093f4b1337f4bae7763f667 Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Thu, 3 Apr 2025 17:17:01 +0800 Subject: [PATCH] ENH:Picture text adaptive height for combobox menu jira: STUDIO-11330 Change-Id: I5948dad4811747258b96e6ac1bf95379640c9cd4 (cherry picked from commit 4824f1f5ce76bc28502cd3fc8de97e082e6f3ad1) --- src/slic3r/GUI/wxExtensions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index 3524289833..d4d1a76a91 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -17,7 +17,7 @@ #include "BitmapComboBox.hpp" #include "Widgets/StaticBox.hpp" #include "Widgets/Label.hpp" - +#include "../Utils/WxFontUtils.hpp" #ifndef __linux__ // msw_menuitem_bitmaps is used for MSW and OSX static std::map msw_menuitem_bitmaps; @@ -572,6 +572,7 @@ wxBitmap *get_extruder_color_icon(std::string color, std::string label, int icon wxMemoryDC dc(&cdc); #endif dc.SetFont(::Label::Body_12); + Slic3r::GUI::WxFontUtils::get_suitable_font_size(icon_height - 2, dc); dc.SelectObject(*bitmap); if (clr.Alpha() == 0) { int size = icon_height * 2;