mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-28 11:21:30 +00:00
ENH:When software is full screen in mac, the sub frame uses the wxSTAYBON_TOP style
jira: STUDIO-11046 Change-Id: Ie1b85e4ac5a5698ec42870349f688924cdf30e21 (cherry picked from commit b28b9c49b208b4269563f59b42ac671fca8035be)
This commit is contained in:
@@ -137,6 +137,12 @@ bool BaseTransparentDPIFrame::Show(bool show)
|
|||||||
return DPIFrame::Show(show);
|
return DPIFrame::Show(show);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BaseTransparentDPIFrame::on_full_screen(IntEvent &e) {
|
||||||
|
#ifdef __APPLE__
|
||||||
|
SetWindowStyleFlag(GetWindowStyleFlag() | wxSTAY_ON_TOP);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void BaseTransparentDPIFrame::on_dpi_changed(const wxRect &suggested_rect)
|
void BaseTransparentDPIFrame::on_dpi_changed(const wxRect &suggested_rect)
|
||||||
{
|
{
|
||||||
m_button_ok->Rescale();
|
m_button_ok->Rescale();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public:
|
|||||||
void on_hide();
|
void on_hide();
|
||||||
void clear_timer_count();
|
void clear_timer_count();
|
||||||
bool Show(bool show = true) override;
|
bool Show(bool show = true) override;
|
||||||
|
void on_full_screen(IntEvent &);
|
||||||
virtual void deal_ok();
|
virtual void deal_ok();
|
||||||
virtual void deal_cancel();
|
virtual void deal_cancel();
|
||||||
virtual void on_timer(wxTimerEvent &event);
|
virtual void on_timer(wxTimerEvent &event);
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ ImageDPIFrame::ImageDPIFrame()
|
|||||||
SetMinSize(wxSize(FromDIP(width), -1));
|
SetMinSize(wxSize(FromDIP(width), -1));
|
||||||
SetMaxSize(wxSize(FromDIP(width), -1));
|
SetMaxSize(wxSize(FromDIP(width), -1));
|
||||||
SetBackgroundColour(wxColour(242, 242, 242, 255));
|
SetBackgroundColour(wxColour(242, 242, 242, 255));
|
||||||
|
#ifdef __APPLE__
|
||||||
|
SetWindowStyleFlag(GetWindowStyleFlag() | wxSTAY_ON_TOP);
|
||||||
|
#endif
|
||||||
|
|
||||||
m_sizer_main = new wxBoxSizer(wxVERTICAL);
|
m_sizer_main = new wxBoxSizer(wxVERTICAL);
|
||||||
auto image_sizer = new wxBoxSizer(wxVERTICAL);
|
auto image_sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
auto imgsize = FromDIP(width);
|
auto imgsize = FromDIP(width);
|
||||||
|
|||||||
@@ -247,6 +247,8 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
|
|||||||
m_reset_title_text_colour_timer->Start(500);
|
m_reset_title_text_colour_timer->Start(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
auto int_event = new IntEvent(EVT_NOTICE_FULL_SCREEN_CHANGED, e.IsFullScreen() ? 1 : 0);
|
||||||
|
wxQueueEvent(wxGetApp().plater(), int_event);
|
||||||
e.Skip();
|
e.Skip();
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ wxDEFINE_EVENT(EVT_ADD_FILAMENT, SimpleEvent);
|
|||||||
wxDEFINE_EVENT(EVT_DEL_FILAMENT, SimpleEvent);
|
wxDEFINE_EVENT(EVT_DEL_FILAMENT, SimpleEvent);
|
||||||
wxDEFINE_EVENT(EVT_ADD_CUSTOM_FILAMENT, ColorEvent);
|
wxDEFINE_EVENT(EVT_ADD_CUSTOM_FILAMENT, ColorEvent);
|
||||||
wxDEFINE_EVENT(EVT_NOTICE_CHILDE_SIZE_CHANGED, SimpleEvent);
|
wxDEFINE_EVENT(EVT_NOTICE_CHILDE_SIZE_CHANGED, SimpleEvent);
|
||||||
|
wxDEFINE_EVENT(EVT_NOTICE_FULL_SCREEN_CHANGED, IntEvent);
|
||||||
#define PRINTER_THUMBNAIL_SIZE (wxSize(FromDIP(48), FromDIP(48)))
|
#define PRINTER_THUMBNAIL_SIZE (wxSize(FromDIP(48), FromDIP(48)))
|
||||||
#define PRINTER_THUMBNAIL_SIZE_SMALL (wxSize(FromDIP(32), FromDIP(32)))
|
#define PRINTER_THUMBNAIL_SIZE_SMALL (wxSize(FromDIP(32), FromDIP(32)))
|
||||||
#define PRINTER_PANEL_SIZE_SMALL (wxSize(FromDIP(98), FromDIP(68)))
|
#define PRINTER_PANEL_SIZE_SMALL (wxSize(FromDIP(98), FromDIP(68)))
|
||||||
@@ -2821,6 +2821,11 @@ void Sidebar::on_size(SimpleEvent &e) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Sidebar::on_full_screen(IntEvent &e) {
|
||||||
|
if (m_sna_dialog) { m_sna_dialog->on_full_screen(e); }
|
||||||
|
if (m_fna_dialog) { m_fna_dialog->on_full_screen(e); }
|
||||||
|
}
|
||||||
|
|
||||||
void Sidebar::get_big_btn_sync_pos_size(wxPoint &pt, wxSize &size)
|
void Sidebar::get_big_btn_sync_pos_size(wxPoint &pt, wxSize &size)
|
||||||
{
|
{
|
||||||
size =btn_sync->GetSize();
|
size =btn_sync->GetSize();
|
||||||
@@ -4201,6 +4206,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||||||
this->q->Bind(EVT_CREATE_FILAMENT, &priv::on_create_filament, this);
|
this->q->Bind(EVT_CREATE_FILAMENT, &priv::on_create_filament, this);
|
||||||
this->q->Bind(EVT_MODIFY_FILAMENT, &priv::on_modify_filament, this);
|
this->q->Bind(EVT_MODIFY_FILAMENT, &priv::on_modify_filament, this);
|
||||||
this->q->Bind(EVT_NOTICE_CHILDE_SIZE_CHANGED, &Sidebar::on_size, sidebar);
|
this->q->Bind(EVT_NOTICE_CHILDE_SIZE_CHANGED, &Sidebar::on_size, sidebar);
|
||||||
|
this->q->Bind(EVT_NOTICE_FULL_SCREEN_CHANGED, &Sidebar::on_full_screen, sidebar);
|
||||||
this->q->Bind(EVT_ADD_CUSTOM_FILAMENT, &priv::on_add_custom_filament, this);
|
this->q->Bind(EVT_ADD_CUSTOM_FILAMENT, &priv::on_add_custom_filament, this);
|
||||||
main_frame->m_tabpanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGING, &priv::on_tab_selection_changing, this);
|
main_frame->m_tabpanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGING, &priv::on_tab_selection_changing, this);
|
||||||
|
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ wxDECLARE_EVENT(EVT_MODIFY_FILAMENT, SimpleEvent);
|
|||||||
wxDECLARE_EVENT(EVT_ADD_FILAMENT, SimpleEvent);
|
wxDECLARE_EVENT(EVT_ADD_FILAMENT, SimpleEvent);
|
||||||
wxDECLARE_EVENT(EVT_DEL_FILAMENT, SimpleEvent);
|
wxDECLARE_EVENT(EVT_DEL_FILAMENT, SimpleEvent);
|
||||||
wxDECLARE_EVENT(EVT_NOTICE_CHILDE_SIZE_CHANGED, SimpleEvent);
|
wxDECLARE_EVENT(EVT_NOTICE_CHILDE_SIZE_CHANGED, SimpleEvent);
|
||||||
|
wxDECLARE_EVENT(EVT_NOTICE_FULL_SCREEN_CHANGED, IntEvent);
|
||||||
using ColorEvent = Event<wxColour>;
|
using ColorEvent = Event<wxColour>;
|
||||||
wxDECLARE_EVENT(EVT_ADD_CUSTOM_FILAMENT, ColorEvent);
|
wxDECLARE_EVENT(EVT_ADD_CUSTOM_FILAMENT, ColorEvent);
|
||||||
const wxString DEFAULT_PROJECT_NAME = "Untitled";
|
const wxString DEFAULT_PROJECT_NAME = "Untitled";
|
||||||
@@ -191,6 +192,7 @@ public:
|
|||||||
void update_sync_status(const MachineObject* obj);
|
void update_sync_status(const MachineObject* obj);
|
||||||
int get_sidebar_pos_right_x();
|
int get_sidebar_pos_right_x();
|
||||||
void on_size(SimpleEvent &e);
|
void on_size(SimpleEvent &e);
|
||||||
|
void on_full_screen(IntEvent &);
|
||||||
void get_big_btn_sync_pos_size(wxPoint &pt, wxSize &size);
|
void get_big_btn_sync_pos_size(wxPoint &pt, wxSize &size);
|
||||||
void get_small_btn_sync_pos_size(wxPoint &pt, wxSize &size);
|
void get_small_btn_sync_pos_size(wxPoint &pt, wxSize &size);
|
||||||
// Orca
|
// Orca
|
||||||
|
|||||||
Reference in New Issue
Block a user