mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-28 05:12:27 +00:00
FIX: optimize media file panel
1. disable select when no file 2. disable batch edit button when no selection 3. hide batch edit when no file 4. delete/play/open_folder for downloaded file 5. hide type panel Change-Id: Ida00da366a8f59b2c5028ddcf87e197c20a21e44
This commit is contained in:
@@ -24,7 +24,6 @@ END_EVENT_TABLE()
|
||||
|
||||
Button::Button()
|
||||
: paddingSize(10, 8)
|
||||
, text_color(*wxBLACK)
|
||||
{
|
||||
background_color = StateColor(
|
||||
std::make_pair(0xF0F0F0, (int) StateColor::Disabled),
|
||||
@@ -32,6 +31,9 @@ Button::Button()
|
||||
std::make_pair(0x00AE42, (int) StateColor::Checked),
|
||||
std::make_pair(*wxLIGHT_GREY, (int) StateColor::Hovered),
|
||||
std::make_pair(*wxWHITE, (int) StateColor::Normal));
|
||||
text_color = StateColor(
|
||||
std::make_pair(*wxLIGHT_GREY, (int) StateColor::Disabled),
|
||||
std::make_pair(*wxBLACK, (int) StateColor::Normal));
|
||||
}
|
||||
|
||||
Button::Button(wxWindow* parent, wxString text, wxString icon, long style, int iconSize)
|
||||
|
||||
@@ -18,9 +18,11 @@ END_EVENT_TABLE()
|
||||
|
||||
StaticBox::StaticBox()
|
||||
: state_handler(this)
|
||||
, border_color(0x303A3C)
|
||||
, radius(8)
|
||||
{
|
||||
border_color = StateColor(
|
||||
std::make_pair(*wxLIGHT_GREY, (int) StateColor::Disabled),
|
||||
std::make_pair(0x303A3C, (int) StateColor::Normal));
|
||||
}
|
||||
|
||||
StaticBox::StaticBox(wxWindow* parent,
|
||||
@@ -62,6 +64,12 @@ void StaticBox::SetBorderColor(StateColor const &color)
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void StaticBox::SetBorderColorNormal(wxColor const &color)
|
||||
{
|
||||
border_color.setColorForStates(color, 0);
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void StaticBox::SetBackgroundColor(StateColor const &color)
|
||||
{
|
||||
background_color = color;
|
||||
@@ -69,6 +77,12 @@ void StaticBox::SetBackgroundColor(StateColor const &color)
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void StaticBox::SetBackgroundColorNormal(wxColor const &color)
|
||||
{
|
||||
background_color.setColorForStates(color, 0);
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void StaticBox::SetBackgroundColor2(StateColor const &color)
|
||||
{
|
||||
background_color2 = color;
|
||||
|
||||
@@ -29,8 +29,12 @@ public:
|
||||
|
||||
void SetBorderColor(StateColor const & color);
|
||||
|
||||
void SetBorderColorNormal(wxColor const &color);
|
||||
|
||||
void SetBackgroundColor(StateColor const &color);
|
||||
|
||||
void SetBackgroundColorNormal(wxColor const &color);
|
||||
|
||||
void SetBackgroundColor2(StateColor const &color);
|
||||
|
||||
static wxColor GetParentBackgroundColor(wxWindow * parent);
|
||||
|
||||
Reference in New Issue
Block a user