mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-14 12:39:30 -07:00
1. Optimize performance with pop up 2. Optimize display in dark mode jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Ic0f72a42e791fb58b84e7a88d7a34ced3a9e8c38 (cherry picked from commit 481ebc4a4b9353d8c9ef9d6bf64cb0006364e839)
29 lines
No EOL
679 B
C++
29 lines
No EOL
679 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);
|
|
bool IsSelected() const { return m_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 |