Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2021-01-06 14:23:42 +0300
committerYuSanka <yusanka@gmail.com>2021-01-06 14:24:00 +0300
commit939d08af196f1e3d443046d62098b648a8a71ef4 (patch)
treef46fdf28b993a6b04713f549b35c47f0d3d94f0f
parent67256d6bb01e1ffc46d3b60d1dc3c5801eb1ad0e (diff)
Fix of #4532 - "Send G-Code to printer host" dialog box blanks out text on Linux
-rw-r--r--src/slic3r/GUI/PrintHostDialogs.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/slic3r/GUI/PrintHostDialogs.cpp b/src/slic3r/GUI/PrintHostDialogs.cpp
index a9343767f..75f6d265d 100644
--- a/src/slic3r/GUI/PrintHostDialogs.cpp
+++ b/src/slic3r/GUI/PrintHostDialogs.cpp
@@ -80,6 +80,17 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, bool can_start_pr
Fit();
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 &) {
// Another similar case where the function only works with EVT_SHOW + CallAfter,
// this time on Mac.