mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-30 12:50:50 -07:00
FIX: fail to translate in filamnet group pop up
1. Initilize the sentences in construct function 2. Fix some ui bugs jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I991df343932bb60d5ba86f41f641661f2159da47 (cherry picked from commit 05383187e02cc0dec6a541859d44237a63d01820)
This commit is contained in:
parent
a378afde0b
commit
b2e587ce47
10 changed files with 112 additions and 60 deletions
|
|
@ -2,7 +2,6 @@
|
|||
#include "CapsuleButton.hpp"
|
||||
#include "wx/graphics.h"
|
||||
#include "Widgets/Label.hpp"
|
||||
#include "wx/dcgraph.h"
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
CapsuleButton::CapsuleButton(wxWindow *parent, wxWindowID id, const wxString &label, bool selected) : wxPanel(parent, id)
|
||||
|
|
@ -61,10 +60,11 @@ void CapsuleButton::OnPaint(wxPaintEvent &event)
|
|||
gc->DrawRoundedRectangle(0, 0, rect.width, rect.height, 0);
|
||||
wxColour bg_color = m_selected ? wxColour("#EBF9F0") : wxColour("#FFFFFF");
|
||||
wxColour border_color = m_hovered || m_selected ? wxColour("#00AE42") : wxColour("#CECECE");
|
||||
int cornerRadius = 5;
|
||||
bg_color = StateColor::darkModeColorFor(bg_color);
|
||||
border_color = StateColor::darkModeColorFor(border_color);
|
||||
gc->SetBrush(wxBrush(bg_color));
|
||||
gc->SetPen(wxPen(border_color, 2));
|
||||
gc->DrawRoundedRectangle(1, 1, rect.width - 2, rect.height - 2, cornerRadius);
|
||||
gc->DrawRoundedRectangle(1, 1, rect.width - 2, rect.height - 2, 5);
|
||||
delete gc;
|
||||
}
|
||||
}
|
||||
|
|
@ -99,8 +99,8 @@ void CapsuleButton::OnLeaveWindow(wxMouseEvent &event)
|
|||
|
||||
void CapsuleButton::UpdateStatus()
|
||||
{
|
||||
const wxColour selected_color = wxColour("#EBF9F0");
|
||||
const wxColour normal_color = wxColour("#FFFFFF");
|
||||
wxColour selected_color = StateColor::darkModeColorFor(wxColour("#EBF9F0"));
|
||||
wxColour normal_color = StateColor::darkModeColorFor(wxColour("#FFFFFF"));
|
||||
|
||||
std::string icon_name = m_selected ? "capsule_tag_on" : "capsule_tag_off";
|
||||
auto bmp = create_scaled_bitmap(icon_name, nullptr, FromDIP(16));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue