mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-23 19:02:10 +00:00
ENH: modify the UI of filament map dialog
jira: none Change-Id: I513a518de4509fb7adbc81d9fc3b0fc43fb3244a (cherry picked from commit 631baa3999ece2540c66cbf1488c55b64cadaf8e)
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
class ColorPanel;
|
||||
class DragDropPanel : public wxPanel
|
||||
{
|
||||
@@ -27,14 +26,37 @@ public:
|
||||
void set_is_draging(bool is_draging) { m_is_draging = is_draging; }
|
||||
bool is_draging() const { return m_is_draging; }
|
||||
|
||||
std::vector<ColorPanel *> get_filament_blocks() const { return m_filament_blocks; }
|
||||
|
||||
private:
|
||||
wxBoxSizer *m_sizer;
|
||||
wxGridSizer *m_grid_item_sizer;
|
||||
bool m_is_auto;
|
||||
|
||||
std::vector<ColorPanel *> m_filament_blocks;
|
||||
private:
|
||||
bool m_is_draging = false;
|
||||
};
|
||||
|
||||
/////////////// ColorPanel start ////////////////////////
|
||||
// The UI panel of drag item
|
||||
class ColorPanel : public wxPanel
|
||||
{
|
||||
public:
|
||||
ColorPanel(DragDropPanel *parent, const wxColour &color, int filament_id);
|
||||
|
||||
wxColour GetColor() const { return GetBackgroundColour(); }
|
||||
int GetFilamentId() const { return m_filament_id; }
|
||||
|
||||
private:
|
||||
void OnLeftDown(wxMouseEvent &event);
|
||||
void OnLeftUp(wxMouseEvent &event);
|
||||
void OnPaint(wxPaintEvent &event);
|
||||
|
||||
DragDropPanel *m_parent;
|
||||
wxColor m_color;
|
||||
int m_filament_id;
|
||||
};
|
||||
}} // namespace Slic3r::GUI
|
||||
|
||||
#endif /* slic3r_DragDropPanel_hpp_ */
|
||||
|
||||
Reference in New Issue
Block a user