Refine badged static box

This commit is contained in:
Noisyfox
2025-10-05 21:45:49 +08:00
parent a8482a1138
commit 687286ccac
3 changed files with 7 additions and 73 deletions

View File

@@ -3,30 +3,17 @@
#include "../wxExtensions.hpp"
#include <wx/statbox.h>
#include "LabeledStaticBox.hpp"
class StaticGroup : public wxStaticBox
class StaticGroup : public LabeledStaticBox
{
public:
StaticGroup(wxWindow *parent, wxWindowID id, const wxString &label);
public:
void ShowBadge(bool show);
void SetBorderColor(const wxColour &color);
private:
#ifdef __WXMSW__
void OnPaint(wxPaintEvent &evt);
void PaintForeground(wxDC &dc, const struct tagRECT &rc) override;
#endif
private:
#ifdef __WXMSW__
void DrawBorderAndLabel(wxDC& dc) override;
ScalableBitmap badge;
#endif
#ifdef __WXOSX__
ScalableButton * badge { nullptr };
#endif
wxColour borderColor_;
};
#endif // !slic3r_GUI_StaticGroup_hpp_