FIX: add the translation
jira: [STUDIO-9148] Change-Id: I937b0fb93be39bd7567a5049a2fd1ed5f0aad9d2
This commit is contained in:
parent
b47885b137
commit
a039401683
|
@ -78,6 +78,7 @@ src/slic3r/GUI/MainFrame.cpp
|
|||
src/slic3r/GUI/MediaPlayCtrl.cpp
|
||||
src/slic3r/GUI/MediaFilePanel.cpp
|
||||
src/slic3r/GUI/ImageGrid.cpp
|
||||
src/slic3r/GUI/ImageSwitchButton.cpp
|
||||
src/slic3r/GUI/Printer/PrinterFileSystem.cpp
|
||||
src/slic3r/GUI/Mouse3DController.cpp
|
||||
src/slic3r/GUI/SelectMachinePop.cpp
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "StaticBox.hpp"
|
||||
#include "../wxExtensions.hpp"
|
||||
|
||||
#include "slic3r/GUI/I18N.hpp"
|
||||
#include <wx/dcclient.h>
|
||||
#include <wx/dcgraph.h>
|
||||
|
||||
|
@ -113,7 +114,7 @@ void ImageSwitchButton::render(wxDC& dc)
|
|||
wxSize szIcon;
|
||||
wxSize szContent = textSize;
|
||||
ScalableBitmap &icon = GetValue() ? m_on : m_off;
|
||||
|
||||
|
||||
int content_height = icon.GetBmpHeight() + textSize.y + m_padding;
|
||||
|
||||
wxPoint pt = wxPoint((size.x - icon.GetBmpWidth()) / 2, (size.y - content_height) / 2);
|
||||
|
@ -129,9 +130,9 @@ void ImageSwitchButton::render(wxDC& dc)
|
|||
dc.SetTextForeground(text_color.colorForStates(states));
|
||||
|
||||
auto fina_txt = GetValue() ? labels[0] : labels[1];
|
||||
if (dc.GetTextExtent(fina_txt).x > size.x) {
|
||||
if (dc.GetTextExtent(fina_txt).x > size.x) {
|
||||
wxString forment_txt = wxEmptyString;
|
||||
for (auto i = 0; i < fina_txt.length(); i++) {
|
||||
for (auto i = 0; i < fina_txt.length(); i++) {
|
||||
forment_txt = fina_txt.SubString(0, i) + "...";
|
||||
if (dc.GetTextExtent(forment_txt).x > size.x) {
|
||||
pt.x = (size.x - dc.GetTextExtent(forment_txt).x) / 2;
|
||||
|
@ -141,7 +142,7 @@ void ImageSwitchButton::render(wxDC& dc)
|
|||
}
|
||||
} else {
|
||||
dc.DrawText(fina_txt, pt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ImageSwitchButton::Rescale()
|
||||
|
@ -287,7 +288,7 @@ void FanSwitchButton::render(wxDC& dc)
|
|||
pt.x += icon.GetBmpWidth() + FromDIP(9);
|
||||
}
|
||||
|
||||
wxString fan_txt = "Fan";
|
||||
wxString fan_txt = _L("Fan");
|
||||
dc.SetFont(::Label::Head_15);
|
||||
pt.y = FromDIP(9);
|
||||
dc.DrawText(fan_txt, pt);
|
||||
|
|
Loading…
Reference in New Issue