UI fixes / improvements (#11413)
Some checks failed
Build all / Build Linux (push) Has been cancelled
Build all / Build Non-Linux (push) Has been cancelled
Build all / Flatpak (push) Has been cancelled
Publish docs to Wiki / Publish docs to Wiki (push) Has been cancelled
Shellcheck / Shellcheck (push) Has been cancelled
Build all / Unit Tests (push) Has been cancelled

* init

* flushing volumes

* vertical margins

* fix titlebar scaling

* fix filament section

* flushing volumes

---------

Co-authored-by: Ioannis Giannakas <59056762+igiannakas@users.noreply.github.com>
This commit is contained in:
yw4z 2025-11-22 17:54:36 +03:00 committed by GitHub
parent f48a438b27
commit 9304cc35db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 29 additions and 50 deletions

View file

@ -1,10 +1 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_21527_27811)">
<path d="M6.99988 12.2021C8.37959 12.2021 9.70279 11.654 10.6784 10.6784C11.654 9.70279 12.2021 8.37959 12.2021 6.99988C12.2021 5.62017 11.654 4.29697 10.6784 3.32137C9.70279 2.34576 8.37959 1.79768 6.99988 1.79768C5.62017 1.79768 4.29697 2.34576 3.32137 3.32137C2.34576 4.29697 1.79768 5.62017 1.79768 6.99988C1.79768 8.37959 2.34576 9.70279 3.32137 10.6784C4.29697 11.654 5.62017 12.2021 6.99988 12.2021ZM6.99988 0.597168C8.69798 0.597168 10.3265 1.27174 11.5273 2.47248C12.728 3.67322 13.4026 5.30177 13.4026 6.99988C13.4026 8.69798 12.728 10.3265 11.5273 11.5273C10.3265 12.728 8.69798 13.4026 6.99988 13.4026C5.30177 13.4026 3.67322 12.728 2.47248 11.5273C1.27174 10.3265 0.597168 8.69798 0.597168 6.99988C0.597168 5.30177 1.27174 3.67322 2.47248 2.47248C3.67322 1.27174 5.30177 0.597168 6.99988 0.597168ZM7.80022 6.99988C7.80022 7.21214 7.7159 7.41571 7.5658 7.5658C7.41571 7.7159 7.21214 7.80022 6.99988 7.80022C6.78761 7.80022 6.58405 7.7159 6.43395 7.5658C6.28386 7.41571 6.19954 7.21214 6.19954 6.99988C6.19954 6.78761 6.28386 6.58405 6.43395 6.43395C6.58405 6.28386 6.78761 6.19954 6.99988 6.19954C7.21214 6.19954 7.41571 6.28386 7.5658 6.43395C7.7159 6.58405 7.80022 6.78761 7.80022 6.99988ZM9.40089 6.19954C9.61316 6.19954 9.81673 6.28386 9.96682 6.43395C10.1169 6.58405 10.2012 6.78761 10.2012 6.99988C10.2012 7.21214 10.1169 7.41571 9.96682 7.5658C9.81673 7.7159 9.61316 7.80022 9.40089 7.80022C9.18863 7.80022 8.98506 7.7159 8.83497 7.5658C8.68488 7.41571 8.60056 7.21214 8.60056 6.99988C8.60056 6.78761 8.68488 6.58405 8.83497 6.43395C8.98506 6.28386 9.18863 6.19954 9.40089 6.19954ZM5.3992 6.99988C5.3992 7.21214 5.31488 7.41571 5.16479 7.5658C5.01469 7.7159 4.81112 7.80022 4.59886 7.80022C4.3866 7.80022 4.18303 7.7159 4.03294 7.5658C3.88284 7.41571 3.79852 7.21214 3.79852 6.99988C3.79852 6.78761 3.88284 6.58405 4.03294 6.43395C4.18303 6.28386 4.3866 6.19954 4.59886 6.19954C4.81112 6.19954 5.01469 6.28386 5.16479 6.43395C5.31488 6.58405 5.3992 6.78761 5.3992 6.99988Z" fill="#262E30"/>
</g>
<defs>
<clipPath id="clip0_21527_27811">
<rect width="14" height="14" fill="white"/>
</clipPath>
</defs>
</svg>
<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><circle cx="8" cy="8" r="7.5" style="fill:none; stroke:#949494; stroke-linecap:round; stroke-linejoin:round;"/><circle cx="4" cy="8" r="1" style="fill:#949494;"/><circle cx="8" cy="8" r="1" style="fill:#949494;"/><circle cx="12" cy="8" r="1" style="fill:#949494;"/></svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 399 B

Before After
Before After

View file

@ -486,15 +486,15 @@ void BBLTopbar::Rescale() {
item = this->FindTool(wxID_UNDO);
item->SetBitmap(create_scaled_bitmap("topbar_undo", this, TOPBAR_ICON_SIZE));
item->SetDisabledBitmap(create_scaled_bitmap("topbar_undo_inactive", nullptr, TOPBAR_ICON_SIZE));
item->SetDisabledBitmap(create_scaled_bitmap("topbar_undo_inactive", this, TOPBAR_ICON_SIZE));
item = this->FindTool(wxID_REDO);
item->SetBitmap(create_scaled_bitmap("topbar_redo", this, TOPBAR_ICON_SIZE));
item->SetDisabledBitmap(create_scaled_bitmap("topbar_redo_inactive", nullptr, TOPBAR_ICON_SIZE));
item->SetDisabledBitmap(create_scaled_bitmap("topbar_redo_inactive", this, TOPBAR_ICON_SIZE));
item = this->FindTool(ID_CALIB);
item->SetBitmap(create_scaled_bitmap("calib_sf", nullptr, TOPBAR_ICON_SIZE));
item->SetDisabledBitmap(create_scaled_bitmap("calib_sf_inactive", nullptr, TOPBAR_ICON_SIZE));
item->SetBitmap(create_scaled_bitmap("calib_sf", this, TOPBAR_ICON_SIZE));
item->SetDisabledBitmap(create_scaled_bitmap("calib_sf_inactive", this, TOPBAR_ICON_SIZE));
item = this->FindTool(ID_TITLE);

View file

@ -59,8 +59,8 @@ MsgDialog::MsgDialog(wxWindow *parent, const wxString &title, const wxString &he
m_dsa_sizer = new wxBoxSizer(wxHORIZONTAL);
btn_sizer->Add(0, 0, 0, wxLEFT, FromDIP(120));
btn_sizer->AddStretchSpacer();
btn_sizer->Add(m_dsa_sizer, 0, wxEXPAND);
btn_sizer->AddStretchSpacer();
main_sizer->Add(btn_sizer, 0, wxBOTTOM | wxRIGHT | wxEXPAND | wxTOP, FromDIP(10));
apply_style(style);

View file

@ -64,10 +64,10 @@ PhysicalPrinterDialog::PhysicalPrinterDialog(wxWindow* parent) :
auto input_sizer = new wxBoxSizer(wxVERTICAL);
wxStaticText *label_top = new wxStaticText(this, wxID_ANY, from_u8((boost::format(_utf8(L("Save %s as"))) % into_u8(tab->title())).str()));
label_top->SetFont(::Label::Body_13);
label_top->SetFont(::Label::Body_14);
label_top->SetForegroundColour(wxColour(38,46,48));
m_input_area = new RoundedRectangle(this, wxColor(172, 172, 172), wxDefaultPosition, wxSize(-1,-1), 3, 1);
m_input_area = new RoundedRectangle(this, StateColor::darkModeColorFor(wxColour("#DBDBDB")), wxDefaultPosition, wxSize(-1,-1), 3, 1);
m_input_area->SetMinSize(wxSize(FromDIP(360), FromDIP(32)));
wxBoxSizer *input_sizer_h = new wxBoxSizer(wxHORIZONTAL);
@ -87,9 +87,9 @@ PhysicalPrinterDialog::PhysicalPrinterDialog(wxWindow* parent) :
m_valid_label = new wxStaticText(this, wxID_ANY, "");
m_valid_label->SetForegroundColour(wxColor(255, 111, 0));
input_sizer->Add(label_top, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, BORDER_W);
input_sizer->Add(m_input_area, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, BORDER_W);
input_sizer->Add(m_valid_label, 0, wxEXPAND | wxLEFT | wxRIGHT, BORDER_W);
input_sizer->Add(label_top, 0, wxEXPAND | wxLEFT, BORDER_W);
input_sizer->Add(m_input_area, 0, wxEXPAND | wxTOP, BORDER_W);
input_sizer->Add(m_valid_label, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, BORDER_W);
m_config = &wxGetApp().preset_bundle->printers.get_edited_preset().config;

View file

@ -348,11 +348,6 @@ enum class ActionButtonType : int {
abSendGCode
};
int SidebarProps::TitlebarMargin() { return 8; } // Use as side margins on titlebar. Has less margin on sides to create separation with its content
int SidebarProps::ContentMargin() { return 12; } // Use as side margins contents of title
int SidebarProps::IconSpacing() { return 10; } // Use on main elements
int SidebarProps::ElementSpacing() { return 5; } // Use if elements has relation between them like edit button for combo box etc.
struct ExtruderGroup : StaticGroup
{
ExtruderGroup(wxWindow * parent, int index, wxString const &title);
@ -547,9 +542,9 @@ void Sidebar::priv::layout_printer(bool isBBL, bool isDual)
hsizer_printer->Add(panel_nozzle_dia , 0, wxLEFT, FromDIP(4));
hsizer_printer->Add(panel_printer_bed, 0, wxLEFT, FromDIP(4));
//hsizer_printer->Add(btn_sync_printer , 0, wxLEFT, FromDIP(4));
vsizer_printer->AddSpacer(FromDIP(8));
vsizer_printer->AddSpacer(FromDIP(SidebarProps::ContentMarginV()));
vsizer_printer->Add(hsizer_printer, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(SidebarProps::ContentMargin()));
vsizer_printer->AddSpacer(FromDIP(8));
vsizer_printer->AddSpacer(FromDIP(SidebarProps::ContentMarginV()));
// Printer - extruder
// double
@ -2099,16 +2094,14 @@ Sidebar::Sidebar(Plater *parent)
//bSizer_filament_content->Add(p->sizer_filaments, 1, wxALIGN_CENTER | wxALL);
wxSizer *sizer_filaments2 = new wxBoxSizer(wxVERTICAL);
sizer_filaments2->AddSpacer(FromDIP(16));
sizer_filaments2->Add(p->sizer_filaments, 0, wxEXPAND, 0);
sizer_filaments2->AddSpacer(FromDIP(16));
p->m_panel_filament_content->SetSizer(sizer_filaments2);
p->m_panel_filament_content->Layout();
auto min_size = sizer_filaments2->GetMinSize();
if (min_size.y > p->m_panel_filament_content->GetMaxHeight())
min_size.y = p->m_panel_filament_content->GetMaxHeight();
p->m_panel_filament_content->SetMinSize(min_size);
scrolled_sizer->Add(p->m_panel_filament_content, 0, wxEXPAND, 0);
scrolled_sizer->Add(p->m_panel_filament_content, 0, wxEXPAND | wxTOP | wxBOTTOM, FromDIP(SidebarProps::ContentMarginV())); // ORCA use vertical margin on parent otherwise it shows scrollbar even on 1 filament
}
{
@ -2769,6 +2762,8 @@ void Sidebar::msw_rescale()
p->m_bpButton_ams_filament->msw_rescale();
p->m_bpButton_set_filament->msw_rescale();
p->m_flushing_volume_btn->Rescale();
set_flushing_volume_warning(is_flush_config_modified()); // ORCA reapply appearance
//BBS
p->left_extruder->Rescale();
p->right_extruder->Rescale();
@ -2849,6 +2844,7 @@ void Sidebar::sys_color_changed()
p->m_bpButton_ams_filament->msw_rescale();
p->m_bpButton_set_filament->msw_rescale();
p->m_flushing_volume_btn->Rescale();
set_flushing_volume_warning(is_flush_config_modified()); // ORCA reapply appearance
// BBS
#if 0
@ -3565,21 +3561,12 @@ wxButton* Sidebar::get_wiping_dialog_button()
void Sidebar::set_flushing_volume_warning(const bool flushing_volume_modify)
{
if (flushing_volume_modify){
p->m_flushing_volume_btn->SetBorderColor(wxColour(255, 111, 0));
p->m_flushing_volume_btn->SetTextColor(wxColour(255, 111, 0));
}
else {
StateColor flush_fg_col(std::pair<wxColour, int>(wxColour(107, 107, 106), StateColor::Pressed),
std::pair<wxColour, int>(wxColour(107, 107, 106), StateColor::Hovered),
std::pair<wxColour, int>(wxColour(107, 107, 106), StateColor::Normal));
StateColor flush_bd_col(std::pair<wxColour, int>(wxColour(0, 174, 66), StateColor::Pressed),
std::pair<wxColour, int>(wxColour(0, 174, 66), StateColor::Hovered),
std::pair<wxColour, int>(wxColour(172, 172, 172), StateColor::Normal));
p->m_flushing_volume_btn->SetBorderColor(flush_bd_col);
p->m_flushing_volume_btn->SetTextColor(flush_fg_col);
if(flushing_volume_modify){
p->m_flushing_volume_btn->SetStyle(ButtonStyle::Regular, ButtonType::Compact);
p->m_flushing_volume_btn->SetBorderColor(wxColour("#FF6F00"));
}
else
p->m_flushing_volume_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Compact);
}
void Sidebar::enable_buttons(bool enable)

View file

@ -118,10 +118,11 @@ const wxString DEFAULT_PROJECT_NAME = "Untitled";
class SidebarProps
{
public:
static int TitlebarMargin();
static int ContentMargin();
static int IconSpacing();
static int ElementSpacing();
static int TitlebarMargin(){ return 8 ;} // Use as side margins on titlebar. Has less margin on sides to create separation with its content
static int ContentMargin() { return 12;} // Use as side margins contents of title
static int ContentMarginV(){ return 9 ;} // Use as vertical margins contents of title
static int IconSpacing() { return 10;} // Use on main elements
static int ElementSpacing(){ return 5 ;} // Use if elements has relation between them like edit button for combo box etc.
};
class Sidebar : public wxPanel

View file

@ -1095,7 +1095,7 @@ void PreferencesDialog::create()
m_pref_tabs->SelectItem(0);
m_sizer_body->Add(m_pref_tabs, 0, wxEXPAND | wxBOTTOM, FromDIP(5));
m_sizer_body->Add(m_pref_tabs, 0, wxEXPAND | wxBOTTOM | wxTOP, FromDIP(5));
m_sizer_body->Add(m_parent, 1, wxEXPAND);
SetSizer(m_sizer_body);

View file

@ -403,7 +403,7 @@ void Tab::create_preset_tab()
m_top_sizer->SetMinSize(-1, 3 * m_em_unit);
m_top_panel->SetSizer(m_top_sizer);
if (m_presets_choice)
m_main_sizer->Add(m_top_panel, 0, wxEXPAND | wxUP | wxDOWN, m_em_unit);
m_main_sizer->Add(m_top_panel, 0, wxEXPAND | wxUP | wxDOWN, FromDIP(SidebarProps::ContentMarginV()));
else
m_top_panel->Hide();