Merge branch 'main' into UI-changes

This commit is contained in:
SoftFever
2026-10-12 12:17:21 +08:00
18304 changed files with 2587362 additions and 722036 deletions
+21 -1
View File
@@ -1,16 +1,33 @@
#include "DropDown.hpp"
#include "Label.hpp"
#include <cassert>
#include <algorithm>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <cstdio>
#include "slic3r/GUI/Widgets/PopupWindow.hpp"
#include <vector>
#include <utility>
#include <iterator>
#include <wx/dc.h>
#include <wx/dcclient.h>
#include <wx/display.h>
#include <wx/dcbuffer.h>
#include <wx/dcgraph.h>
#include <wx/event.h>
#include <wx/popupwin.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/window.h>
#ifdef __WXGTK__
#include <gtk/gtk.h>
#endif
#include <set>
#include "slic3r/GUI/Widgets/StateColor.hpp"
#include "slic3r/GUI/Widgets/StateHandler.hpp"
#include "slic3r/GUI/wxExtensions.hpp"
wxDEFINE_EVENT(EVT_DISMISS, wxCommandEvent);
wxDEFINE_EVENT(EVT_DROPDOWN_ITEM_ACTION, wxCommandEvent);
@@ -469,7 +486,10 @@ void DropDown::render(wxDC &dc)
}
pt.y += (rcContent.height - textSize.y) / 2;
dc.SetFont(GetFont());
dc.SetTextForeground(text_color.colorForStates(states2));
// Dimmed items stay selectable, so they only borrow the disabled text tone rather
// than taking the disabled state itself.
const int text_states = (item.style & DD_ITEM_STYLE_DIMMED) ? (states2 & ~StateColor::Enabled) : states2;
dc.SetTextForeground(text_color.colorForStates(text_states));
dc.DrawText(text, pt);
if (group.IsEmpty() && !item.group_key.IsEmpty()) {
auto szBmp = arrow_bitmap.GetBmpSize();