mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
FIX:fixed macos overwriting title bar text colors
Change-Id: I617c27eebee47f6739532a02038359829245df27
This commit is contained in:
parent
1e857a6e23
commit
b03a93d7fc
5 changed files with 19 additions and 3 deletions
|
@ -742,7 +742,14 @@ void MainFrame::shutdown()
|
|||
|
||||
void MainFrame::update_title()
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
void MainFrame::update_title_colour_after_set_title()
|
||||
{
|
||||
#ifdef __WXOSX__
|
||||
set_title_colour_after_set_title();
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainFrame::show_option(bool show)
|
||||
|
|
|
@ -226,7 +226,8 @@ public:
|
|||
|
||||
void update_title();
|
||||
|
||||
void show_option(bool show);
|
||||
void update_title_colour_after_set_title();
|
||||
void show_option(bool show);
|
||||
void init_tabpanel();
|
||||
void create_preset_tabs();
|
||||
//BBS: GUI refactor
|
||||
|
|
|
@ -5588,6 +5588,7 @@ void Plater::priv::set_project_name(const wxString& project_name)
|
|||
wxGetApp().mainframe->topbar()->SetTitle(m_project_name);
|
||||
#else
|
||||
wxGetApp().mainframe->SetTitle(m_project_name);
|
||||
wxGetApp().mainframe->update_title_colour_after_set_title();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ extern bool mac_dark_mode();
|
|||
extern double mac_max_scaling_factor();
|
||||
extern void set_miniaturizable(void * window);
|
||||
void WKWebView_evaluateJavaScript(void * web, wxString const & script, void (*callback)(wxString const &));
|
||||
|
||||
void set_title_colour_after_set_title();
|
||||
void initGestures(void * view, wxEvtHandler * handler);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -58,6 +58,13 @@ void set_miniaturizable(void * window)
|
|||
}
|
||||
}
|
||||
|
||||
void set_title_colour_after_set_title()
|
||||
{
|
||||
if(mainframe_text_field){
|
||||
[(NSTextField*)mainframe_text_field setTextColor : NSColor.whiteColor];
|
||||
}
|
||||
}
|
||||
|
||||
void WKWebView_evaluateJavaScript(void * web, wxString const & script, void (*callback)(wxString const &))
|
||||
{
|
||||
[(WKWebView*)web evaluateJavaScript:wxCFStringRef(script).AsNSString() completionHandler: ^(id result, NSError *error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue