UI fixes / improvements (#12513)

* bbl device selector search box

* align file and more menus with its button

* fix multiline inputbox border color on windows

* fix multiline inputbox border color on windows

* preferences: use content width on combobox dropdowns

* about:  match version text size on macOS

* msg dialog improvements

* fix canvas menu overlapping with sliced plates toolbar

* bbl bind dialog button placement

* bbl color picker

* Update StepMeshDialog.cpp

* drop file dialog

* drop dialog revert fonts

* revert windows multiline border

* Update StepMeshDialog.cpp

* update

* Flushing Volumes: match style of combobox

* fix hyperlink color on canvas notifications

* fix possible issues with shared profiles notification
This commit is contained in:
yw4z
2026-05-15 20:12:30 +03:00
committed by GitHub
parent d614917d1d
commit b3bb8604c4
17 changed files with 164 additions and 200 deletions

View File

@@ -13941,7 +13941,6 @@ public:
wxPanel * m_top_line;
wxStaticText *m_fname_title;
wxStaticText *m_fname_f;
wxStaticText *m_fname_s;
StaticBox * m_panel_select;
void on_select_ok(wxCommandEvent &event);
@@ -13951,7 +13950,6 @@ public:
void set_action(int index) { m_action = index; }
wxBoxSizer *create_remember_checkbox(wxString title, wxWindow* parent, wxString tooltip);
wxBoxSizer *create_item_radiobox(wxString title, wxWindow *parent, int select_id, int groupid);
protected:
void on_dpi_changed(const wxRect &suggested_rect) override;
@@ -13969,10 +13967,6 @@ ProjectDropDialog::ProjectDropDialog(const std::string &filename)
// def setting
SetBackgroundColour(m_def_color);
// icon
std::string icon_path = (boost::format("%1%/images/OrcaSlicerTitle.ico") % resources_dir()).str();
SetIcon(wxIcon(encode_path(icon_path.c_str()), wxBITMAP_TYPE_ICO));
wxBoxSizer *m_sizer_main = new wxBoxSizer(wxVERTICAL);
m_top_line = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
@@ -13980,37 +13974,23 @@ ProjectDropDialog::ProjectDropDialog(const std::string &filename)
m_sizer_main->Add(m_top_line, 0, wxEXPAND, 0);
m_sizer_main->Add(0, 0, 0, wxEXPAND | wxTOP, 20);
wxBoxSizer *m_sizer_name = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *m_sizer_fline = new wxBoxSizer(wxHORIZONTAL);
m_sizer_main->AddSpacer(FromDIP(15));
// ORCA use file name on new line to create room for longer names
m_fname_title = new wxStaticText(this, wxID_ANY, _L("Please select an action"), wxDefaultPosition, wxDefaultSize, 0);
m_fname_title->Wrap(-1);
m_fname_title->SetFont(::Label::Body_14);
m_fname_title->SetForegroundColour(wxColour(107, 107, 107));
m_fname_title->SetBackgroundColour(wxColour(255, 255, 255));
m_fname_title->SetForegroundColour(wxColour("#363636"));
m_sizer_fline->Add(m_fname_title, 0, wxALL, 0);
m_sizer_fline->Add(0, 0, 0, wxEXPAND | wxLEFT, 5);
m_fname_f = new wxStaticText(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
m_fname_f = new wxStaticText(this, wxID_ANY, filename);
m_fname_f->SetFont(::Label::Head_14);
m_fname_f->Wrap(-1);
m_fname_f->SetForegroundColour(wxColour(38, 46, 48));
m_fname_f->SetMaxSize(wxSize(FromDIP(300),-1));
m_fname_f->Wrap(FromDIP(300));
m_fname_f->SetForegroundColour(wxColour("#363636"));
m_sizer_fline->Add(m_fname_f, 1, wxALL, 0);
m_sizer_name->Add(m_sizer_fline, 1, wxEXPAND, 0);
m_fname_s = new wxStaticText(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
m_fname_s->SetFont(::Label::Head_14);
m_fname_s->Wrap(-1);
m_fname_s->SetForegroundColour(wxColour(38, 46, 48));
m_sizer_name->Add(m_fname_s, 1, wxALL, 0);
m_sizer_main->Add(m_sizer_name, 1, wxEXPAND | wxLEFT | wxRIGHT, 20);
m_sizer_main->Add(m_fname_title, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(20));
m_sizer_main->AddSpacer(FromDIP(10));
m_sizer_main->Add(m_fname_f , 1, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(20));
m_sizer_main->AddSpacer(FromDIP(10));
auto radio_group = new RadioGroup(this, {
_L("Open as project"), // 0
@@ -14022,9 +14002,9 @@ ProjectDropDialog::ProjectDropDialog(const std::string &filename)
set_action(radio_group->GetSelection() + 1);
});
m_sizer_main->Add(radio_group, 0, wxEXPAND | wxLEFT | wxRIGHT, 20);
m_sizer_main->Add(radio_group, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(20));
m_sizer_main->Add(0, 0, 0, wxEXPAND | wxTOP, 10);
m_sizer_main->AddSpacer(FromDIP(10));
// wxBoxSizer *m_sizer_bottom = new wxBoxSizer(wxHORIZONTAL);
// Orca: hide the "Don't show again" checkbox, people keeps accidentally checked this then forgot
@@ -14048,29 +14028,6 @@ ProjectDropDialog::ProjectDropDialog(const std::string &filename)
Fit();
Centre(wxBOTH);
auto limit_width = m_fname_f->GetSize().GetWidth() - 2;
auto current_width = 0;
auto cut_index = 0;
auto fstring = wxString("");
auto bstring = wxString("");
//auto file_name = from_u8(filename.c_str());
auto file_name = wxString(filename);
for (int x = 0; x < file_name.length(); x++) {
current_width += m_fname_s->GetTextExtent(file_name[x]).GetWidth();
cut_index = x;
if (current_width > limit_width) {
bstring += file_name[x];
} else {
fstring += file_name[x];
}
}
m_fname_f->SetLabel(fstring);
m_fname_s->SetLabel(bstring);
wxGetApp().UpdateDlgDarkUI(this);
}