mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
FIX: add the translation
jira: [STUDIO-9148] Change-Id: I937b0fb93be39bd7567a5049a2fd1ed5f0aad9d2 (cherry picked from commit a039401683f136257262d51dcfb66f86f8c06df0)
This commit is contained in:
@@ -77,6 +77,7 @@ src/slic3r/GUI/MainFrame.cpp
|
|||||||
src/slic3r/GUI/MediaPlayCtrl.cpp
|
src/slic3r/GUI/MediaPlayCtrl.cpp
|
||||||
src/slic3r/GUI/MediaFilePanel.cpp
|
src/slic3r/GUI/MediaFilePanel.cpp
|
||||||
src/slic3r/GUI/ImageGrid.cpp
|
src/slic3r/GUI/ImageGrid.cpp
|
||||||
|
src/slic3r/GUI/ImageSwitchButton.cpp
|
||||||
src/slic3r/GUI/Printer/PrinterFileSystem.cpp
|
src/slic3r/GUI/Printer/PrinterFileSystem.cpp
|
||||||
src/slic3r/GUI/Mouse3DController.cpp
|
src/slic3r/GUI/Mouse3DController.cpp
|
||||||
src/slic3r/GUI/SelectMachinePop.cpp
|
src/slic3r/GUI/SelectMachinePop.cpp
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "StaticBox.hpp"
|
#include "StaticBox.hpp"
|
||||||
#include "../wxExtensions.hpp"
|
#include "../wxExtensions.hpp"
|
||||||
|
|
||||||
|
#include "slic3r/GUI/I18N.hpp"
|
||||||
#include <wx/dcclient.h>
|
#include <wx/dcclient.h>
|
||||||
#include <wx/dcgraph.h>
|
#include <wx/dcgraph.h>
|
||||||
|
|
||||||
@@ -110,7 +111,7 @@ void ImageSwitchButton::render(wxDC& dc)
|
|||||||
wxSize szIcon;
|
wxSize szIcon;
|
||||||
wxSize szContent = textSize;
|
wxSize szContent = textSize;
|
||||||
ScalableBitmap &icon = GetValue() ? m_on : m_off;
|
ScalableBitmap &icon = GetValue() ? m_on : m_off;
|
||||||
|
|
||||||
int content_height = icon.GetBmpHeight() + textSize.y + m_padding;
|
int content_height = icon.GetBmpHeight() + textSize.y + m_padding;
|
||||||
|
|
||||||
wxPoint pt = wxPoint((size.x - icon.GetBmpWidth()) / 2, (size.y - content_height) / 2);
|
wxPoint pt = wxPoint((size.x - icon.GetBmpWidth()) / 2, (size.y - content_height) / 2);
|
||||||
@@ -126,9 +127,9 @@ void ImageSwitchButton::render(wxDC& dc)
|
|||||||
dc.SetTextForeground(text_color.colorForStates(states));
|
dc.SetTextForeground(text_color.colorForStates(states));
|
||||||
|
|
||||||
auto fina_txt = GetValue() ? labels[0] : labels[1];
|
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;
|
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) + "...";
|
forment_txt = fina_txt.SubString(0, i) + "...";
|
||||||
if (dc.GetTextExtent(forment_txt).x > size.x) {
|
if (dc.GetTextExtent(forment_txt).x > size.x) {
|
||||||
pt.x = (size.x - dc.GetTextExtent(forment_txt).x) / 2;
|
pt.x = (size.x - dc.GetTextExtent(forment_txt).x) / 2;
|
||||||
@@ -138,7 +139,7 @@ void ImageSwitchButton::render(wxDC& dc)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dc.DrawText(fina_txt, pt);
|
dc.DrawText(fina_txt, pt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImageSwitchButton::Rescale()
|
void ImageSwitchButton::Rescale()
|
||||||
@@ -280,7 +281,7 @@ void FanSwitchButton::render(wxDC& dc)
|
|||||||
pt.x += icon.GetBmpWidth() + FromDIP(9);
|
pt.x += icon.GetBmpWidth() + FromDIP(9);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString fan_txt = "Fan";
|
wxString fan_txt = _L("Fan");
|
||||||
dc.SetFont(::Label::Head_15);
|
dc.SetFont(::Label::Head_15);
|
||||||
pt.y = FromDIP(9);
|
pt.y = FromDIP(9);
|
||||||
dc.DrawText(fan_txt, pt);
|
dc.DrawText(fan_txt, pt);
|
||||||
|
|||||||
Reference in New Issue
Block a user