Fix of #4532 - "Send G-Code to printer host" dialog box blanks out text on Linux
This commit is contained in:
parent
67256d6bb0
commit
939d08af19
@ -80,6 +80,17 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, bool can_start_pr
|
|||||||
Fit();
|
Fit();
|
||||||
CenterOnParent();
|
CenterOnParent();
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
// On Linux with GTK2 when text control lose the focus then selection (colored background) disappears but text color stay white
|
||||||
|
// and as a result the text is invisible with light mode
|
||||||
|
// see https://github.com/prusa3d/PrusaSlicer/issues/4532
|
||||||
|
// Workaround: Unselect text selection explicitly on kill focus
|
||||||
|
txt_filename->Bind(wxEVT_KILL_FOCUS, [this](wxEvent& e) {
|
||||||
|
e.Skip();
|
||||||
|
txt_filename->SetInsertionPoint(txt_filename->GetLastPosition());
|
||||||
|
}, txt_filename->GetId());
|
||||||
|
#endif /* __linux__ */
|
||||||
|
|
||||||
Bind(wxEVT_SHOW, [=](const wxShowEvent &) {
|
Bind(wxEVT_SHOW, [=](const wxShowEvent &) {
|
||||||
// Another similar case where the function only works with EVT_SHOW + CallAfter,
|
// Another similar case where the function only works with EVT_SHOW + CallAfter,
|
||||||
// this time on Mac.
|
// this time on Mac.
|
||||||
|
Loading…
Reference in New Issue
Block a user