ENH:fixed some issues with dark mode

jira:[STUDIO-8303]

Change-Id: Iac3cf0a62c40b1a7950d14f630c4a6c3c1ff21f3
This commit is contained in:
tao wang 2024-11-05 17:50:45 +08:00 committed by Lane.Wei
parent 4d4883953d
commit 566b2e61fe
3 changed files with 9 additions and 3 deletions

View File

@ -0,0 +1,3 @@
<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.346 0.361999H5.068V3.078H7.77V4.786H5.068V7.502H3.346V4.786H0.63V3.078H3.346V0.361999Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 214 B

View File

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 214 B

View File

@ -4846,8 +4846,6 @@ void EditDevNameDialog::on_edit_name(wxCommandEvent &e)
SetMinSize(SELECT_MACHINE_ITEM_SIZE);
m_type = type;
m_bitmap = ScalableBitmap(this, "bind_device_ping_code",10);
this->Bind(wxEVT_ENTER_WINDOW, &PinCodePanel::on_mouse_enter, this);
this->Bind(wxEVT_LEAVE_WINDOW, &PinCodePanel::on_mouse_leave, this);
this->Bind(wxEVT_LEFT_UP, &PinCodePanel::on_mouse_left_up, this);
@ -4883,9 +4881,14 @@ void EditDevNameDialog::on_edit_name(wxCommandEvent &e)
void PinCodePanel::doRender(wxDC& dc)
{
auto size = GetSize();
//m_bitmap = ScalableBitmap(this, "bind_device_ping_code",10);
m_bitmap = ScalableBitmap(this, wxGetApp().dark_mode() ? "bind_device_ping_code_dark" : "bind_device_ping_code_light", 10);
dc.DrawBitmap(m_bitmap.bmp(), wxPoint(FromDIP(12), (size.y - m_bitmap.GetBmpSize().y) / 2));
dc.SetFont(::Label::Head_13);
dc.SetTextForeground(wxColour(38, 46, 48));
dc.SetTextForeground(StateColor::darkModeColorFor(SELECT_MACHINE_GREY900));
wxString txt;
if (m_type == 0) { txt = _L("Bind with Pin Code"); }
else if (m_type == 1) { txt = _L("Bind with Access Code"); }