mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-23 21:05:31 -07:00
Styling management for buttons and matching all button styles (#8184)
* Add button styling * Fix dark mode compability * printable area button * Connection dialog icons * Add aligment control * Fix alignment * add new styles * Update BedShapeDialog.cpp * Use darker text color on dark mode * update code * Update * update * Update * Update WipeTowerDialog.cpp * update * Update Button.cpp * update * Update Button.cpp * add enums for style and type * update * Update Button.cpp * fix * update * Update DialogButtons.cpp * Update UnsavedChangesDialog.cpp * update * update * update * Update Button.cpp * cleanup --------- Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
parent
37d8bec3e1
commit
e9e069c167
17 changed files with 199 additions and 583 deletions
|
|
@ -56,21 +56,20 @@ NetworkTestDialog::NetworkTestDialog(wxWindow* parent, wxWindowID id, const wxSt
|
|||
|
||||
wxBoxSizer* NetworkTestDialog::create_top_sizer(wxWindow* parent)
|
||||
{
|
||||
StateColor btn_bg(std::pair<wxColour, int>(wxColour(0, 137, 123), StateColor::Pressed), std::pair<wxColour, int>(wxColour(38, 166, 154), StateColor::Hovered), std::pair<wxColour, int>(wxColour(255, 255, 255), StateColor::Enabled));
|
||||
auto sizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
auto line_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn_start = new Button(this, _L("Start Test Multi-Thread"));
|
||||
btn_start->SetBackgroundColor(btn_bg);
|
||||
btn_start->SetStyle(ButtonStyle::Confirm, ButtonType::Window);
|
||||
line_sizer->Add(btn_start, 0, wxALL, 5);
|
||||
|
||||
btn_start_sequence = new Button(this, _L("Start Test Single-Thread"));
|
||||
btn_start_sequence->SetBackgroundColor(btn_bg);
|
||||
btn_start_sequence->SetStyle(ButtonStyle::Regular, ButtonType::Window);
|
||||
|
||||
line_sizer->Add(btn_start_sequence, 0, wxALL, 5);
|
||||
|
||||
btn_download_log = new Button(this, _L("Export Log"));
|
||||
btn_download_log->SetBackgroundColor(btn_bg);
|
||||
btn_download_log->SetStyle(ButtonStyle::Regular, ButtonType::Window);
|
||||
line_sizer->Add(btn_download_log, 0, wxALL, 5);
|
||||
btn_download_log->Hide();
|
||||
|
||||
|
|
@ -138,31 +137,30 @@ wxBoxSizer* NetworkTestDialog::create_content_sizer(wxWindow* parent)
|
|||
grid_sizer->SetFlexibleDirection(wxBOTH);
|
||||
grid_sizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
|
||||
|
||||
StateColor btn_bg(std::pair<wxColour, int>(wxColour(0, 137, 123), StateColor::Pressed),std::pair<wxColour, int>(wxColour(38, 166, 154), StateColor::Hovered), std::pair<wxColour, int>(wxColour(255,255,255), StateColor::Enabled));
|
||||
btn_link = new Button(this, _L("Test OrcaSlicer (GitHub)"));
|
||||
btn_link->SetBackgroundColor(btn_bg);
|
||||
btn_link->SetStyle(ButtonStyle::Regular, ButtonType::Window);
|
||||
grid_sizer->Add(btn_link, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
text_link_title = new wxStaticText(this, wxID_ANY, _L("Test OrcaSlicer (GitHub):"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
text_link_title->Wrap(-1);
|
||||
grid_sizer->Add(text_link_title, 0, wxALIGN_RIGHT | wxALL, 5);
|
||||
grid_sizer->Add(text_link_title, 0, wxALIGN_RIGHT | wxALL | wxALIGN_CENTER_VERTICAL, 5);
|
||||
|
||||
text_link_val = new wxStaticText(this, wxID_ANY, _L("N/A"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
text_link_val->Wrap(-1);
|
||||
grid_sizer->Add(text_link_val, 0, wxALL, 5);
|
||||
grid_sizer->Add(text_link_val, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);
|
||||
|
||||
btn_bing = new Button(this, _L("Test bing.com"));
|
||||
btn_bing->SetBackgroundColor(btn_bg);
|
||||
btn_bing->SetStyle(ButtonStyle::Regular, ButtonType::Window);
|
||||
grid_sizer->Add(btn_bing, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
text_bing_title = new wxStaticText(this, wxID_ANY, _L("Test bing.com:"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
|
||||
text_bing_title->Wrap(-1);
|
||||
grid_sizer->Add(text_bing_title, 0, wxALIGN_RIGHT | wxALL, 5);
|
||||
grid_sizer->Add(text_bing_title, 0, wxALIGN_RIGHT | wxALL | wxALIGN_CENTER_VERTICAL, 5);
|
||||
|
||||
text_bing_val = new wxStaticText(this, wxID_ANY, _L("N/A"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
text_bing_val->Wrap(-1);
|
||||
grid_sizer->Add(text_bing_val, 0, wxALL, 5);
|
||||
grid_sizer->Add(text_bing_val, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);
|
||||
sizer->Add(grid_sizer, 1, wxEXPAND, 5);
|
||||
|
||||
btn_link->Bind(wxEVT_BUTTON, [this](wxCommandEvent& evt) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue