mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
QoL: Make sidebar collapsible, resizable, movable, floatable and dockable (#2972)
* Add sidebar docking * Fix sidebar initial size * Fix sidebar collapse * Hide floating sidebar when switch away from model view * Add option to reset window layout * Save & load window layout * Fix a small issue with gcode toggle * Properly save & restore sidebar state * Show collapse icon based on sidebar docking state * Adjust toolbar position based on docking position * Fix return toolbar position * Fix plate list position
This commit is contained in:
parent
3d2ab8e2e2
commit
7cfa4f3bcd
7 changed files with 317 additions and 119 deletions
|
@ -122,6 +122,11 @@ class Sidebar : public wxPanel
|
|||
{
|
||||
ConfigOptionMode m_mode;
|
||||
public:
|
||||
enum DockingState
|
||||
{
|
||||
None, Left, Right
|
||||
};
|
||||
|
||||
Sidebar(Plater *parent);
|
||||
Sidebar(Sidebar &&) = delete;
|
||||
Sidebar(const Sidebar &) = delete;
|
||||
|
@ -313,8 +318,13 @@ public:
|
|||
bool is_view3D_overhang_shown() const;
|
||||
void show_view3D_overhang(bool show);
|
||||
|
||||
bool is_sidebar_enabled() const;
|
||||
void enable_sidebar(bool enabled);
|
||||
bool is_sidebar_collapsed() const;
|
||||
void collapse_sidebar(bool show);
|
||||
void collapse_sidebar(bool collapse);
|
||||
Sidebar::DockingState get_sidebar_docking_state() const;
|
||||
|
||||
void reset_window_layout();
|
||||
|
||||
// Called after the Preferences dialog is closed and the program settings are saved.
|
||||
// Update the UI based on the current preferences.
|
||||
|
@ -541,7 +551,6 @@ public:
|
|||
#endif
|
||||
|
||||
bool init_collapse_toolbar();
|
||||
void enable_collapse_toolbar(bool enable);
|
||||
|
||||
const Camera& get_camera() const;
|
||||
Camera& get_camera();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue