ENH:When software is full screen in mac, the sub frame uses the wxSTAYBON_TOP style
jira: STUDIO-11046 Change-Id: Ie1b85e4ac5a5698ec42870349f688924cdf30e21
This commit is contained in:
parent
ab26fb71a5
commit
b28b9c49b2
|
@ -137,6 +137,12 @@ bool BaseTransparentDPIFrame::Show(bool 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)
|
||||
{
|
||||
m_button_ok->Rescale();
|
||||
|
|
|
@ -33,7 +33,7 @@ public:
|
|||
void on_hide();
|
||||
void clear_timer_count();
|
||||
bool Show(bool show = true) override;
|
||||
|
||||
void on_full_screen(IntEvent &);
|
||||
virtual void deal_ok();
|
||||
virtual void deal_cancel();
|
||||
virtual void on_timer(wxTimerEvent &event);
|
||||
|
|
|
@ -26,6 +26,10 @@ ImageDPIFrame::ImageDPIFrame()
|
|||
SetMinSize(wxSize(FromDIP(width), -1));
|
||||
SetMaxSize(wxSize(FromDIP(width), -1));
|
||||
SetBackgroundColour(wxColour(242, 242, 242, 255));
|
||||
#ifdef __APPLE__
|
||||
SetWindowStyleFlag(GetWindowStyleFlag() | wxSTAY_ON_TOP);
|
||||
#endif
|
||||
|
||||
m_sizer_main = new wxBoxSizer(wxVERTICAL);
|
||||
auto image_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
auto imgsize = FromDIP(width);
|
||||
|
|
|
@ -242,6 +242,8 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
|
|||
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();
|
||||
});
|
||||
#endif
|
||||
|
|
|
@ -195,7 +195,7 @@ wxDEFINE_EVENT(EVT_ADD_FILAMENT, SimpleEvent);
|
|||
wxDEFINE_EVENT(EVT_DEL_FILAMENT, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_ADD_CUSTOM_FILAMENT, ColorEvent);
|
||||
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_SMALL (wxSize(FromDIP(32), FromDIP(32)))
|
||||
#define PRINTER_PANEL_SIZE_SMALL (wxSize(FromDIP(98), FromDIP(68)))
|
||||
|
@ -2955,6 +2955,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)
|
||||
{
|
||||
size =btn_sync->GetSize();
|
||||
|
@ -4329,6 +4334,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||
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_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_FILAMENT, &priv::on_add_filament, this);
|
||||
this->q->Bind(EVT_DEL_FILAMENT, &priv::on_delete_filament, this);
|
||||
this->q->Bind(EVT_ADD_CUSTOM_FILAMENT, &priv::on_add_custom_filament, this);
|
||||
|
|
|
@ -111,6 +111,7 @@ wxDECLARE_EVENT(EVT_MODIFY_FILAMENT, SimpleEvent);
|
|||
wxDECLARE_EVENT(EVT_ADD_FILAMENT, SimpleEvent);
|
||||
wxDECLARE_EVENT(EVT_DEL_FILAMENT, SimpleEvent);
|
||||
wxDECLARE_EVENT(EVT_NOTICE_CHILDE_SIZE_CHANGED, SimpleEvent);
|
||||
wxDECLARE_EVENT(EVT_NOTICE_FULL_SCREEN_CHANGED, IntEvent);
|
||||
using ColorEvent = Event<wxColour>;
|
||||
wxDECLARE_EVENT(EVT_ADD_CUSTOM_FILAMENT, ColorEvent);
|
||||
const wxString DEFAULT_PROJECT_NAME = "Untitled";
|
||||
|
@ -182,6 +183,7 @@ public:
|
|||
void update_sync_status(const MachineObject* obj);
|
||||
int get_sidebar_pos_right_x();
|
||||
void on_size(SimpleEvent &e);
|
||||
void on_full_screen(IntEvent &);
|
||||
void get_big_btn_sync_pos_size(wxPoint &pt, wxSize &size);
|
||||
void get_small_btn_sync_pos_size(wxPoint &pt, wxSize &size);
|
||||
|
||||
|
|
Loading…
Reference in New Issue