mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-28 21:03:12 +08:00
ENH: update dark mode supports of print option
jira: [STUDIO-12188] Change-Id: I0d38bcab502415dd733d9b58835e1e50dd00bd22
This commit is contained in:
parent
bab463f1f5
commit
2b8edfccc8
BIN
resources/images/print_options_bg_dark.png
Normal file
BIN
resources/images/print_options_bg_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 318 B |
BIN
resources/images/print_options_bg_disabled_dark.png
Normal file
BIN
resources/images/print_options_bg_disabled_dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 310 B |
@ -4752,9 +4752,9 @@ void PrintOption::enable(bool en)
|
|||||||
m_printoption_item->enable(en);
|
m_printoption_item->enable(en);
|
||||||
|
|
||||||
if (en) {
|
if (en) {
|
||||||
m_printoption_title->SetForegroundColour("#262E30");
|
m_printoption_title->SetForegroundColour(StateColor::darkModeColorFor("#262E30"));
|
||||||
} else {
|
} else {
|
||||||
m_printoption_title->SetForegroundColour(wxColour(144, 144, 144));
|
m_printoption_title->SetForegroundColour(StateColor::darkModeColorFor(wxColour(144, 144, 144)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4827,7 +4827,9 @@ PrintOptionItem::PrintOptionItem(wxWindow* parent, std::vector<POItem> ops, std:
|
|||||||
Bind(wxEVT_LEFT_DOWN, &PrintOptionItem::on_left_down, this);
|
Bind(wxEVT_LEFT_DOWN, &PrintOptionItem::on_left_down, this);
|
||||||
|
|
||||||
m_selected_bk = ScalableBitmap(this, "print_options_bg", 22);
|
m_selected_bk = ScalableBitmap(this, "print_options_bg", 22);
|
||||||
m_selected_disbabled_bk = ScalableBitmap(this, "print_options_bg_disabled", 22);
|
m_selected_bk_dark = ScalableBitmap(this, "print_options_bg_dark", 22);
|
||||||
|
m_selected_disabled_bk = ScalableBitmap(this, "print_options_bg_disabled", 22);
|
||||||
|
m_selected_disabled_bk_dark = ScalableBitmap(this, "print_options_bg_disabled_dark", 22);
|
||||||
|
|
||||||
// update the options
|
// update the options
|
||||||
update_options(ops);
|
update_options(ops);
|
||||||
@ -4914,9 +4916,18 @@ void PrintOptionItem::doRender(wxDC& dc)
|
|||||||
/*selected*/
|
/*selected*/
|
||||||
auto selected_left = selected * PRINT_OPT_WIDTH + FromDIP(4);
|
auto selected_left = selected * PRINT_OPT_WIDTH + FromDIP(4);
|
||||||
if (m_enable) {
|
if (m_enable) {
|
||||||
dc.DrawBitmap(m_selected_bk.bmp(), selected_left, (size.y - m_selected_bk.GetBmpHeight()) / 2);
|
if (!wxGetApp().dark_mode()) {
|
||||||
|
dc.DrawBitmap(m_selected_bk.bmp(), selected_left, (size.y - m_selected_bk.GetBmpHeight()) / 2);
|
||||||
|
} else {
|
||||||
|
dc.DrawBitmap(m_selected_bk_dark.bmp(), selected_left, (size.y - m_selected_bk_dark.GetBmpHeight()) / 2);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
dc.DrawBitmap(m_selected_disbabled_bk.bmp(), selected_left, (size.y - m_selected_disbabled_bk.GetBmpHeight()) / 2);
|
if (!wxGetApp().dark_mode()) {
|
||||||
|
dc.DrawBitmap(m_selected_disabled_bk.bmp(), selected_left, (size.y - m_selected_disabled_bk.GetBmpHeight()) / 2);
|
||||||
|
} else {
|
||||||
|
dc.DrawBitmap(m_selected_bk_dark.bmp(), selected_left, (size.y - m_selected_bk_dark.GetBmpHeight()) / 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto it = m_ops.begin(); it != m_ops.end(); ++it)
|
for (auto it = m_ops.begin(); it != m_ops.end(); ++it)
|
||||||
|
@ -177,7 +177,9 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ScalableBitmap m_selected_bk;
|
ScalableBitmap m_selected_bk;
|
||||||
ScalableBitmap m_selected_disbabled_bk;
|
ScalableBitmap m_selected_bk_dark;
|
||||||
|
ScalableBitmap m_selected_disabled_bk;
|
||||||
|
ScalableBitmap m_selected_disabled_bk_dark;
|
||||||
std::vector<POItem> m_ops;
|
std::vector<POItem> m_ops;
|
||||||
std::string selected_key;
|
std::string selected_key;
|
||||||
std::string m_param;
|
std::string m_param;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user