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
path: root/xs/src
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2018-06-26 11:37:36 +0300
committerYuSanka <yusanka@gmail.com>2018-06-26 11:37:36 +0300
commit2fae893af2fd6e6f3e0bcc1d629dc19ee7d108a5 (patch)
treef19bbe1c1e17e60ecfa7e8aea90732192c941504 /xs/src
parent40b327eb116392b80835d28ef43778212a7a14a1 (diff)
Fixed #998
Added detection of gtk2/gtk3 GUI libraries required by Alien::wxWidgets. Added gtk2/gtk3 include paths, so we may call gtk2/3 API directly if needed for some workaround.
Diffstat (limited to 'xs/src')
-rw-r--r--xs/src/slic3r/GUI/OptionsGroup.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/xs/src/slic3r/GUI/OptionsGroup.cpp b/xs/src/slic3r/GUI/OptionsGroup.cpp
index 57659d03d..629a9f3a0 100644
--- a/xs/src/slic3r/GUI/OptionsGroup.cpp
+++ b/xs/src/slic3r/GUI/OptionsGroup.cpp
@@ -150,8 +150,15 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** colored_Label/*
// Build a label if we have it
wxStaticText* label=nullptr;
if (label_width != 0) {
+ long label_style = staticbox ? 0 : wxALIGN_RIGHT;
+#ifdef __WXGTK__
+ // workaround for correct text align of the StaticBox on Linux
+ // flags wxALIGN_RIGHT and wxALIGN_CENTRE don't work when Ellipsize flags are _not_ given.
+ // Text is properly aligned only when Ellipsize is checked.
+ label_style |= staticbox ? 0 : wxST_ELLIPSIZE_END;
+#endif /* __WXGTK__ */
label = new wxStaticText(parent(), wxID_ANY, line.label + (line.label.IsEmpty() ? "" : ":"),
- wxDefaultPosition, wxSize(label_width, -1), staticbox ? 0 : wxALIGN_RIGHT);
+ wxDefaultPosition, wxSize(label_width, -1), label_style);
label->SetFont(label_font);
label->Wrap(label_width); // avoid a Linux/GTK bug
grid_sizer->Add(label, 0, (staticbox ? 0 : wxALIGN_RIGHT | wxRIGHT) | wxALIGN_CENTER_VERTICAL, 5);