mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
ENH:When software is full screen in mac, the sub frame uses the wxSTAYBON_TOP style
jira: none Change-Id: I338576d77e61a436615e70372b4564c38be0c7dc (cherry picked from commit 645d843dd97949fb6a73e93fc61ffa4a255b20f3)
This commit is contained in:
@@ -246,6 +246,9 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
|
|||||||
m_reset_title_text_colour_timer->Stop();
|
m_reset_title_text_colour_timer->Stop();
|
||||||
m_reset_title_text_colour_timer->Start(500);
|
m_reset_title_text_colour_timer->Start(500);
|
||||||
}
|
}
|
||||||
|
m_mac_fullscreen = false;
|
||||||
|
} else {
|
||||||
|
m_mac_fullscreen = true;
|
||||||
}
|
}
|
||||||
auto int_event = new IntEvent(EVT_NOTICE_FULL_SCREEN_CHANGED, e.IsFullScreen() ? 1 : 0);
|
auto int_event = new IntEvent(EVT_NOTICE_FULL_SCREEN_CHANGED, e.IsFullScreen() ? 1 : 0);
|
||||||
wxQueueEvent(wxGetApp().plater(), int_event);
|
wxQueueEvent(wxGetApp().plater(), int_event);
|
||||||
|
|||||||
@@ -91,6 +91,9 @@ protected:
|
|||||||
|
|
||||||
class MainFrame : public DPIFrame
|
class MainFrame : public DPIFrame
|
||||||
{
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
|
bool m_mac_fullscreen{false};
|
||||||
|
#endif
|
||||||
bool m_loaded {false};
|
bool m_loaded {false};
|
||||||
wxTimer* m_reset_title_text_colour_timer{ nullptr };
|
wxTimer* m_reset_title_text_colour_timer{ nullptr };
|
||||||
|
|
||||||
@@ -205,7 +208,9 @@ protected:
|
|||||||
public:
|
public:
|
||||||
MainFrame();
|
MainFrame();
|
||||||
~MainFrame() = default;
|
~MainFrame() = default;
|
||||||
|
#ifdef __APPLE__
|
||||||
|
bool get_mac_full_screen() { return m_mac_fullscreen; }
|
||||||
|
#endif
|
||||||
//BBS GUI refactor
|
//BBS GUI refactor
|
||||||
enum TabPosition
|
enum TabPosition
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -755,6 +755,11 @@ void SecondaryCheckDialog::update_text(wxString text)
|
|||||||
|
|
||||||
void SecondaryCheckDialog::on_show()
|
void SecondaryCheckDialog::on_show()
|
||||||
{
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
|
if (wxGetApp().mainframe && wxGetApp().mainframe->get_mac_full_screen()) {
|
||||||
|
SetWindowStyleFlag(GetWindowStyleFlag() | wxSTAY_ON_TOP);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
wxGetApp().UpdateFrameDarkUI(this);
|
wxGetApp().UpdateFrameDarkUI(this);
|
||||||
// recover button color
|
// recover button color
|
||||||
wxMouseEvent evt_ok(wxEVT_LEFT_UP);
|
wxMouseEvent evt_ok(wxEVT_LEFT_UP);
|
||||||
@@ -763,7 +768,7 @@ void SecondaryCheckDialog::on_show()
|
|||||||
m_button_cancel->GetEventHandler()->ProcessEvent(evt_cancel);
|
m_button_cancel->GetEventHandler()->ProcessEvent(evt_cancel);
|
||||||
|
|
||||||
this->Show();
|
this->Show();
|
||||||
//this->Raise();
|
this->Raise();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SecondaryCheckDialog::on_hide()
|
void SecondaryCheckDialog::on_hide()
|
||||||
|
|||||||
Reference in New Issue
Block a user