1. Initilize the sentences in construct function 2. Fix some ui bugs jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I991df343932bb60d5ba86f41f641661f2159da47 (cherry picked from commit 05383187e02cc0dec6a541859d44237a63d01820)
28 lines
628 B
C++
28 lines
628 B
C++
#ifndef CAPSULE_BUTTON_HPP
|
|
#define CAPSULE_BUTTON_HPP
|
|
|
|
#include "wxExtensions.hpp"
|
|
#include "Widgets/Label.hpp"
|
|
|
|
namespace Slic3r { namespace GUI {
|
|
class CapsuleButton : public wxPanel
|
|
{
|
|
public:
|
|
CapsuleButton(wxWindow *parent, wxWindowID id, const wxString &label, bool selected);
|
|
void Select(bool selected);
|
|
protected:
|
|
void OnPaint(wxPaintEvent &event);
|
|
private:
|
|
void OnEnterWindow(wxMouseEvent &event);
|
|
void OnLeaveWindow(wxMouseEvent &event);
|
|
void UpdateStatus();
|
|
|
|
wxBitmapButton *m_btn;
|
|
Label *m_label;
|
|
|
|
bool m_hovered;
|
|
bool m_selected;
|
|
};
|
|
}} // namespace Slic3r::GUI
|
|
|
|
#endif |