UI Fixes / Improvements (#15074)

* plates-toolbar-scrollbar-size

* update

* filament grouping dialog

* mixed filament list

* Update StepMeshDialog.cpp

* moves plot scrollbar

* fix position of popups

* printer agent combo box width

* match multiline text control background

* add dots to configure button

* also correct label color for multiline input

* side tools connecting text color

* recenter dialog text color

* preferences experimental features

* upgrade panel hyperlink color + right margin

* fix position of + sign on printer selector

* speed control popup

* bbl fan control window

* AMS materials setting

* monitor > ams section

* match background color of multiline text editor on project page

* Fix SwitchButton colors

* bbl camera popup

* BBL > Send print dialog

* Revert "BBL > Send print dialog"

This reverts commit 128e145897.

* Revert "bbl fan control window"

This reverts commit 4a0db62790.

* Revert "bbl camera popup"

This reverts commit e2301e3237.

* Revert "monitor > ams section"

This reverts commit 66e6894eb1.

* Revert "fix position of + sign on printer selector"

This reverts commit 1523ba24c0.

* Revert "upgrade panel hyperlink color + right margin"

This reverts commit 541f2514c5.

* Revert "side tools connecting text color"

This reverts commit a9ab074247.

* Revert "recenter dialog text color"

This reverts commit f4670d32b2.

* Revert "AMS materials setting"

This reverts commit b12827f9b5.

* Revert "Fix SwitchButton colors"

This reverts commit 2d4f1d1fe9.

* match object list background color

* match compare dialog wxDataViewCtrl background color

* fix centering of iconized buttons on linux

* fix compare dialog background color not applied on linux

* edit gcode dialog components background color

* Update Plater.cpp

* fix dev button font size

* Fix scaling issue on SwitchButton while using 150%

* transfer or discard changes dialog wiki label

* "Transfer or Discard changes" / "Unsaved Changes" dialog header color

* object table colors & header spacing

* progress dialog

* fix progressbar look on linux

* fix build

* fix build

* fix centering of iconized icon again

* fix header background color

* revert bbl fan control

* add includes

---------

Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
yw4z
2026-10-05 19:06:24 +03:00
committed by GitHub
co-authored by Noisyfox
parent 6b8df05d40
commit 1496906939
32 changed files with 190 additions and 105 deletions
+1 -4
View File
@@ -1,4 +1 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="20" height="20" rx="10" fill="#00AF42" fill-opacity="0.2"/>
<path d="M14.0828 8.14395L9.08284 13.144C9.0393 13.1877 8.98755 13.2223 8.93057 13.246C8.87359 13.2696 8.81251 13.2818 8.75081 13.2818C8.68912 13.2818 8.62803 13.2696 8.57105 13.246C8.51408 13.2223 8.46233 13.1877 8.41878 13.144L6.23128 10.9565C6.18768 10.9129 6.15309 10.8611 6.12949 10.8041C6.1059 10.7471 6.09375 10.6861 6.09375 10.6244C6.09375 10.5628 6.1059 10.5017 6.12949 10.4447C6.15309 10.3878 6.18768 10.336 6.23128 10.2924C6.27488 10.2488 6.32665 10.2142 6.38362 10.1906C6.44059 10.167 6.50165 10.1549 6.56331 10.1549C6.62498 10.1549 6.68604 10.167 6.74301 10.1906C6.79998 10.2142 6.85174 10.2488 6.89534 10.2924L8.7512 12.1482L13.4196 7.48067C13.5076 7.39261 13.6271 7.34314 13.7516 7.34314C13.8761 7.34314 13.9956 7.39261 14.0836 7.48067C14.1717 7.56873 14.2212 7.68817 14.2212 7.8127C14.2212 7.93724 14.1717 8.05667 14.0836 8.14473L14.0828 8.14395Z" fill="#00AF42" stroke="#00AF42" stroke-width="0.833333"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10,0h0c5.52,0,10,4.48,10,10h0c0,5.52-4.48,10-10,10h0C4.48,20,0,15.52,0,10h0C0,4.48,4.48,0,10,0Z" style="fill:#009688; isolation:isolate; opacity:.5;"/><polyline points="5.5 10.5 8.62 13.38 14.5 7.5" style="fill:none; stroke:#fff; stroke-linecap:round; stroke-linejoin:round;"/></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 398 B

+1 -3
View File
@@ -1,3 +1 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M28.0424 15.4264C28.6059 15.3044 28.7112 14.8962 28.2789 14.5156L16.5815 4.28496C16.1473 3.90625 15.438 3.9044 15.0038 4.28311L3.26759 14.5156C2.83346 14.8943 2.93876 15.3026 3.5022 15.4245L4.90989 15.7275C5.47333 15.8494 5.93332 16.4202 5.93332 16.9966V26.5216C5.93332 27.0979 6.4044 27.569 6.98077 27.569H11.9354C12.5117 27.569 12.9828 27.0979 12.9828 26.5216V21.9512C12.9828 21.3748 13.4539 20.9038 14.0303 20.9038H17.3721C17.9485 20.9038 18.4196 21.3748 18.4196 21.9512V26.5216C18.4196 27.0979 18.8907 27.569 19.467 27.569H24.5657C25.1421 27.569 25.6132 27.0979 25.6132 26.5216V16.9966C25.6132 16.4202 26.0732 15.8494 26.6366 15.7293L28.0424 15.4264Z" fill="#00AE42" fill-opacity="0.2" stroke="#00AE42" stroke-width="0.784708" stroke-miterlimit="10" stroke-linecap="round"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M4.86,13.27L14.86,5.02c.37-.3.9-.3,1.27,0l10,8.24c.23.19.36.47.36.77v12.53c0,.55-.45,1-1,1h-5c-.55,0-1-.45-1-1v-7c0-.55-.45-1-1-1h-6c-.55,0-1,.45-1,1v7c0,.55-.45,1-1,1h-5c-.55,0-1-.45-1-1v-12.53c0-.3.13-.58.36-.77Z" style="fill:#009688; isolation:isolate; opacity:.5;"/><path d="M4.86,13.27L14.86,5.02c.37-.3.9-.3,1.27,0l10,8.24c.23.19.36.47.36.77v12.53c0,.55-.45,1-1,1h-5c-.55,0-1-.45-1-1v-7c0-.55-.45-1-1-1h-6c-.55,0-1,.45-1,1v7c0,.55-.45,1-1,1h-5c-.55,0-1-.45-1-1v-12.53c0-.3.13-.58.36-.77Z" style="fill:none; stroke:#009688; stroke-linecap:round; stroke-linejoin:round;"/></svg>

Before

Width:  |  Height:  |  Size: 891 B

After

Width:  |  Height:  |  Size: 696 B

+1 -4
View File
@@ -1,4 +1 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.2" d="M5.98183 18.0178C1.49214 10.5356 7.48183 3.05343 20.1981 3.80156C20.9462 16.5216 13.464 22.5075 5.98183 18.0178Z" fill="#00AF42"/>
<path d="M20.9489 3.75655C20.9381 3.57307 20.8604 3.39991 20.7305 3.26994C20.6005 3.13998 20.4273 3.06226 20.2439 3.05155C13.1067 2.63249 7.38979 4.78124 4.95229 8.81249C4.10738 10.1915 3.69103 11.7903 3.75604 13.4062C3.80948 14.8987 4.24448 16.4062 5.04885 17.8922L3.21979 19.7203C3.07906 19.861 3 20.0519 3 20.2509C3 20.4499 3.07906 20.6408 3.21979 20.7815C3.36052 20.9223 3.55139 21.0013 3.75042 21.0013C3.94944 21.0013 4.14031 20.9223 4.28104 20.7815L6.10917 18.9525C7.59417 19.7559 9.1026 20.1909 10.5942 20.2444C10.6985 20.2481 10.8026 20.25 10.9064 20.25C12.4174 20.254 13.8997 19.8379 15.1879 19.0481C19.2192 16.6106 21.3689 10.8947 20.9489 3.75655ZM14.4145 17.7656C12.2817 19.0575 9.75698 19.0781 7.22292 17.8378L15.532 9.52967C15.6017 9.45999 15.6569 9.37727 15.6947 9.28622C15.7324 9.19518 15.7518 9.0976 15.7518 8.99905C15.7518 8.9005 15.7324 8.80292 15.6947 8.71188C15.6569 8.62083 15.6017 8.53811 15.532 8.46842C15.4623 8.39874 15.3796 8.34347 15.2885 8.30575C15.1975 8.26804 15.0999 8.24863 15.0014 8.24863C14.9028 8.24863 14.8052 8.26804 14.7142 8.30575C14.6231 8.34347 14.5404 8.39874 14.4707 8.46842L6.1626 16.7812C4.92604 14.25 4.94385 11.7187 6.23479 9.58967C8.30573 6.17061 13.2285 4.29842 19.4826 4.52155C19.7067 10.7709 17.8335 15.6947 14.4145 17.7656Z" fill="#00AF42"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3.39,15.61C-2,6.97,4.47.5,18.5.5c0,14.03-6.47,20.5-15.11,15.11Z" style="fill:#009688; isolation:isolate; opacity:.5;"/><path d="M3.39,15.61C-2,6.97,4.47.5,18.5.5c0,14.03-6.47,20.5-15.11,15.11Z" style="fill:none; stroke:#009688; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.08px;"/><line x1=".5" y1="18.5" x2="15.5" y2="3.5" style="fill:none; stroke:#009688; stroke-linecap:round; stroke-linejoin:round;"/><line x1="5.5" y1="13.5" x2="10.5" y2="14.5" style="fill:none; stroke:#009688; stroke-linecap:round; stroke-linejoin:round;"/><line x1="4.5" y1="8.5" x2="5.5" y2="13.5" style="fill:none; stroke:#009688; stroke-linecap:round; stroke-linejoin:round;"/><line x1="7.5" y1="5.5" x2="8.5" y2="10.5" style="fill:none; stroke:#009688; stroke-linecap:round; stroke-linejoin:round;"/><line x1="11.5" y1="3.5" x2="12.5" y2="6.5" style="fill:none; stroke:#009688; stroke-linecap:round; stroke-linejoin:round;"/><line x1="8.5" y1="10.5" x2="13.5" y2="11.5" style="fill:none; stroke:#009688; stroke-linecap:round; stroke-linejoin:round;"/><line x1="12.5" y1="6.5" x2="15.5" y2="7.5" style="fill:none; stroke:#009688; stroke-linecap:round; stroke-linejoin:round;"/></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

+2 -2
View File
@@ -2,8 +2,8 @@
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 9.51613C0 9.78336 0.237026 10 0.529412 10C3.55073 10 6 7.76142 6 5C6 2.23858 3.55073 0 0.529412 0C0.237026 0 0 0.216637 0 0.483871C0 0.751105 0.237026 0.967742 0.529412 0.967742C2.96596 0.967742 4.94118 2.77305 4.94118 5C4.94118 7.22695 2.96596 9.03226 0.529412 9.03226C0.237026 9.03226 0 9.24889 0 9.51613Z" fill="url(#paint0_linear_46765_16184)"/>
<defs>
<linearGradient id="paint0_linear_46765_16184" x1="0.622561" y1="9.52006" x2="5.48816e-08" y2="0.52972" gradientUnits="userSpaceOnUse">
<stop stop-color="#00AE42"/>
<stop offset="1" stop-color="#00AE42" stop-opacity="0"/>
<stop stop-color="#009688"/>
<stop offset="1" stop-color="#009688" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 758 B

After

Width:  |  Height:  |  Size: 758 B

+2 -2
View File
@@ -2,8 +2,8 @@
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 9.51613C0 9.78336 0.237026 10 0.529412 10C3.55073 10 6 7.76142 6 5C6 2.23858 3.55073 0 0.529412 0C0.237026 0 0 0.216637 0 0.483871C0 0.751105 0.237026 0.967742 0.529412 0.967742C2.96596 0.967742 4.94118 2.77305 4.94118 5C4.94118 7.22695 2.96596 9.03226 0.529412 9.03226C0.237026 9.03226 0 9.24889 0 9.51613Z" fill="url(#paint0_linear_46765_16184)"/>
<defs>
<linearGradient id="paint0_linear_46765_16184" x1="0.622561" y1="9.52006" x2="0" y2="0.52972" gradientUnits="userSpaceOnUse">
<stop stop-color="#00AE42"/>
<stop offset="1" stop-color="#00AE42" stop-opacity="0"/>
<stop stop-color="#009688"/>
<stop offset="1" stop-color="#009688" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 748 B

After

Width:  |  Height:  |  Size: 748 B

+2 -2
View File
@@ -2,8 +2,8 @@
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.483871 0C0.216637 0 0 0.237026 0 0.529412C0 3.55073 2.23858 6 5 6C7.76142 6 10 3.55073 10 0.529412C10 0.237026 9.78336 0 9.51613 0C9.24889 0 9.03226 0.237026 9.03226 0.529412C9.03226 2.96596 7.22695 4.94118 5 4.94118C2.77305 4.94118 0.967742 2.96596 0.967742 0.529412C0.967742 0.237026 0.751105 0 0.483871 0Z" transform="translate(-2, 2)" fill="url(#paint0_linear_46765_16184)"/>
<defs>
<linearGradient id="paint0_linear_46765_16184" x1="0.52972" y1="0.622561" x2="9.52006" y2="0.622561" gradientUnits="userSpaceOnUse">
<stop stop-color="#00AE42"/>
<stop offset="1" stop-color="#00AE42" stop-opacity="0"/>
<stop stop-color="#009688"/>
<stop offset="1" stop-color="#009688" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 785 B

After

Width:  |  Height:  |  Size: 785 B

+2 -2
View File
@@ -2,8 +2,8 @@
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 0.483871C6 0.216637 5.76297 0 5.47059 0C2.44927 0 0 2.23858 0 5C0 7.76142 2.44927 10 5.47059 10C5.76297 10 6 9.78336 6 9.51613C6 9.24889 5.76297 9.03226 5.47059 9.03226C3.03404 9.03226 1.05882 7.22695 1.05882 5C1.05882 2.77305 3.03404 0.967742 5.47059 0.967742C5.76297 0.967742 6 0.751105 6 0.483871Z" fill="url(#paint0_linear_46765_16184)"/>
<defs>
<linearGradient id="paint0_linear_46765_16184" x1="5.37744" y1="0.47994" x2="6" y2="9.47028" gradientUnits="userSpaceOnUse">
<stop stop-color="#00AE42"/>
<stop offset="1" stop-color="#00AE42" stop-opacity="0"/>
<stop stop-color="#009688"/>
<stop offset="1" stop-color="#009688" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 740 B

After

Width:  |  Height:  |  Size: 740 B

+2 -2
View File
@@ -2,8 +2,8 @@
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.51613 6C9.78336 6 10 5.76297 10 5.47059C10 2.44927 7.76142 0 5 0C2.23858 0 0 2.44927 0 5.47059C0 5.76297 0.216637 6 0.483871 6C0.751105 6 0.967742 5.76297 0.967742 5.47059C0.967742 3.03404 2.77305 1.05882 5 1.05882C7.22695 1.05882 9.03226 3.03404 9.03226 5.47059C9.03226 5.76297 9.24889 6 9.51613 6Z" transform="translate(-4, -2)" fill="url(#paint0_linear_46765_16184)"/>
<defs>
<linearGradient id="paint0_linear_46765_16184" x1="9.47028" y1="5.37744" x2="0.47994" y2="5.37744" gradientUnits="userSpaceOnUse">
<stop stop-color="#00AE42"/>
<stop offset="1" stop-color="#00AE42" stop-opacity="0"/>
<stop stop-color="#009688"/>
<stop offset="1" stop-color="#009688" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 775 B

After

Width:  |  Height:  |  Size: 775 B

+1 -4
View File
@@ -1,4 +1 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.2" d="M20.25 5.25V10.5C20.25 19.5 12 21.75 12 21.75C12 21.75 3.75 19.5 3.75 10.5V5.25C3.75 5.05109 3.82902 4.86032 3.96967 4.71967C4.11032 4.57902 4.30109 4.5 4.5 4.5H19.5C19.6989 4.5 19.8897 4.57902 20.0303 4.71967C20.171 4.86032 20.25 5.05109 20.25 5.25Z" fill="#00AF42"/>
<path d="M19.5 3.75H4.5C4.10218 3.75 3.72064 3.90804 3.43934 4.18934C3.15804 4.47064 3 4.85218 3 5.25V10.5C3 15.4425 5.3925 18.4378 7.39969 20.0803C9.56156 21.8484 11.7122 22.4494 11.8059 22.4738C11.9348 22.5088 12.0708 22.5088 12.1997 22.4738C12.2934 22.4494 14.4413 21.8484 16.6059 20.0803C18.6075 18.4378 21 15.4425 21 10.5V5.25C21 4.85218 20.842 4.47064 20.5607 4.18934C20.2794 3.90804 19.8978 3.75 19.5 3.75ZM19.5 10.5C19.5 13.9753 18.2194 16.7962 15.6937 18.8831C14.5943 19.7885 13.344 20.493 12 20.9644C10.6736 20.5012 9.4387 19.8092 8.35125 18.9197C5.79563 16.8291 4.5 13.9969 4.5 10.5V5.25H19.5V10.5Z" fill="#00AF42"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5.5c-.55,0-1,.45-1,1v5c0,9,8.5,12,8.5,12,0,0,8.5-3,8.5-12V1.5c0-.55-.45-1-1-1H2.5Z" style="fill:#009688; isolation:isolate; opacity:.5;"/><path d="M2.5.5c-.55,0-1,.45-1,1v5c0,9,8.5,12,8.5,12,0,0,8.5-3,8.5-12V1.5c0-.55-.45-1-1-1H2.5Z" style="fill:none; stroke:#009688; stroke-linecap:round; stroke-linejoin:round;"/></svg>

Before

Width:  |  Height:  |  Size: 1023 B

After

Width:  |  Height:  |  Size: 438 B

+1
View File
@@ -1152,6 +1152,7 @@ void AuxiliaryPanel::update_all_cover()
m_sizer_description->Add(m_text_description, 0, wxALIGN_TOP | wxRIGHT, FromDIP(10));
m_input_description = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
wxSize(FromDIP(450), FromDIP(300)), wxTE_MULTILINE | wxTE_PROCESS_ENTER);
m_input_description->SetBackgroundColour(*wxWHITE);
m_input_description->SetFont(::Label::Body_14);
m_sizer_description->Add(m_input_description, 0, wxALIGN_CENTER, 0);
+3
View File
@@ -78,6 +78,7 @@ EditGCodeDialog::EditGCodeDialog(wxWindow* parent, const std::string& key, const
m_search_bar->ShowCancelButton(true);
m_search_bar->SetDescriptiveText(_L("Search G-code placeholders"));
m_search_bar->SetForegroundColour(*wxBLACK);
m_search_bar->SetBackgroundColour(*wxWHITE);
wxGetApp().UpdateDarkUI(m_search_bar);
m_search_bar->Bind(wxEVT_SET_FOCUS, [](wxFocusEvent&) {
@@ -90,6 +91,7 @@ EditGCodeDialog::EditGCodeDialog(wxWindow* parent, const std::string& key, const
param_sizer->Add(m_search_bar, 0, wxEXPAND | wxALL, border);
m_params_list = new ParamsViewCtrl(this, wxDefaultSize);
m_params_list->SetBackgroundColour(*wxWHITE);
m_params_list->SetFont(wxGetApp().code_font());
wxGetApp().UpdateDarkUI(m_params_list);
param_sizer->Add(m_params_list, 1, wxEXPAND | wxALL, border);
@@ -104,6 +106,7 @@ EditGCodeDialog::EditGCodeDialog(wxWindow* parent, const std::string& key, const
);
m_gcode_editor->SetFont(wxGetApp().code_font());
m_gcode_editor->SetBackgroundColour(*wxWHITE);
m_gcode_editor->SetInsertionPointEnd();
wxGetApp().UpdateDarkUI(m_gcode_editor);
+6 -3
View File
@@ -1015,8 +1015,11 @@ void TextCtrl::BUILD() {
if (m_opt.is_code)
temp->SetFont(Slic3r::GUI::wxGetApp().normal_font());
if(m_opt.multiline){
temp->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#262E30"))); // only effects wxTextCtrl
temp->SetBackgroundColour(StateColor::darkModeColorFor(*wxWHITE));
}
temp->SetForegroundColour(StateColor::darkModeColorFor(*wxBLACK));
wxGetApp().UpdateDarkUI(temp);
if (! m_opt.multiline && !wxOSX)
@@ -2505,7 +2508,7 @@ nlohmann::json plugin_overrides_as_json(const std::string& text)
void PluginConfigField::BUILD()
{
m_button = new ::Button(m_parent, _L("Configure"));
m_button = new ::Button(m_parent, _L("Configure") + dots);
// ButtonType::Parameter gives the button the same height as the parameter fields above it.
m_button->SetStyle(ButtonStyle::Regular, ButtonType::Parameter);
@@ -2535,7 +2538,7 @@ void PluginConfigField::update_button_label()
const nlohmann::json entries = plugin_overrides_as_json(m_json);
const size_t count = entries.is_array() ? entries.size() : 0;
m_button->SetLabel(count == 0 ? _L("Configure")
m_button->SetLabel(count == 0 ? _L("Configure" + dots)
: wxString::Format(_L("Configure (%d)"), int(count)));
}
+1 -1
View File
@@ -340,7 +340,7 @@ FilamentMapDialog::FilamentMapDialog(wxWindow *parent,
bottom_sizer->Add(dlg_btns, 0, wxEXPAND);
}
main_sizer->Add(bottom_panel, 0, wxEXPAND);
main_sizer->Add(bottom_panel, 0, wxEXPAND | wxTOP, FromDIP(15));
m_ok_btn->Bind(wxEVT_BUTTON, &FilamentMapDialog::on_ok, this);
m_cancel_btn->Bind(wxEVT_BUTTON, &FilamentMapDialog::on_cancel, this);
+12 -8
View File
@@ -524,22 +524,26 @@ GUI::FilamentMapBtnPanel::FilamentMapBtnPanel(wxWindow *parent, const wxString &
m_btn = new wxBitmapButton(this, wxID_ANY, icon_enabled, wxDefaultPosition, wxDefaultSize, wxNO_BORDER);
m_btn->SetBackgroundStyle(wxBG_STYLE_PAINT);
auto icon_sizer = new wxBoxSizer(wxVERTICAL);
icon_sizer->Add(m_btn , 0, wxLEFT, horizontal_margin);
m_label = new wxStaticText(this, wxID_ANY, label);
m_label->SetFont(Label::Head_14);
m_label->SetForegroundColour(TextNormalBlackColor);
auto label_sizer = new wxBoxSizer(wxHORIZONTAL);
label_sizer->AddStretchSpacer();
label_sizer->Add(m_btn, 0, wxEXPAND | wxLEFT, FromDIP(1));
label_sizer->Add(m_label, 0, wxEXPAND| wxALL, FromDIP(3));
label_sizer->AddStretchSpacer();
auto label_sizer = new wxBoxSizer(wxVERTICAL);
label_sizer->Add(m_label, 0, wxLEFT, horizontal_margin);
m_disable_tip = new Label(this, _L("(Sync with printer)"));
m_disable_tip->SetFont(Label::Body_12);
label_sizer->AddSpacer(FromDIP(2));
label_sizer->Add(m_disable_tip, 0, wxLEFT, horizontal_margin);
sizer->AddSpacer(FromDIP(32));
sizer->AddSpacer(FromDIP(15));
sizer->Add(icon_sizer, 0, wxEXPAND);
sizer->AddSpacer(FromDIP(10));
sizer->Add(label_sizer, 0, wxEXPAND);
sizer->Add(m_disable_tip, 0, wxALIGN_CENTER);
sizer->AddSpacer(FromDIP(3));
sizer->AddSpacer(FromDIP(6));
auto detail_sizer = new wxBoxSizer(wxHORIZONTAL);
m_detail = new Label(this, detail);
+8 -1
View File
@@ -675,7 +675,14 @@ void GCodeViewer::SequentialView::Marker::render_position_window(const libvgcode
ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, ImVec2(9.f, 1.f) * m_scale);
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.f, 0.f));
ImVec4 scroll_col = ImVec4(0.77f, 0.77f, 0.77f, m_is_dark ? .6f : 1.0f); // same color with sliced plates toolbar scrollbar
ImGui::PushStyleColor(ImGuiCol_ScrollbarBg, ImVec4(0.f, 0.f, 0.f, 0.f)); // ORCA using background color with opacity creates a second color. This prevents secondary color
ImGui::PushStyleColor(ImGuiCol_ScrollbarGrabActive, scroll_col);
ImGui::PushStyleColor(ImGuiCol_ScrollbarGrabHovered, scroll_col);
ImGui::PushStyleColor(ImGuiCol_ScrollbarGrab, scroll_col);
ImGui::PushStyleColor(ImGuiCol_HeaderHovered , style.Colors[ImGuiCol_TableHeaderBg]);
const int hover_id = m_actual_speed_imgui_widget.plot("##ActualSpeedProfile", { -1.f, plot_height});
const ImGuiTableFlags table_flags = ImGuiTableFlags_Borders | (needs_scroll ? ImGuiTableFlags_ScrollY : 0);
if (ImGui::BeginTable("ToolPositionTable", 2, table_flags, ImVec2(0.0f, needs_scroll ? table_view_h : 0.0f))) {
@@ -703,7 +710,7 @@ void GCodeViewer::SequentialView::Marker::render_position_window(const libvgcode
ImGui::EndTable();
}
ImGui::PopStyleVar(2);
ImGui::PopStyleColor(1);
ImGui::PopStyleColor(5);
imgui.end();
}
+3 -3
View File
@@ -9627,7 +9627,7 @@ void GLCanvas3D::_render_imgui_select_plate_toolbar()
int item_count = m_sel_plate_toolbar.m_items.size() + (m_sel_plate_toolbar.show_stats_item ? 1 : 0);
float window_height_calc = (item_count * (button_height + (margin_size + button_margin) * 2.0f) + (item_count - 1) * ImGui::GetStyle().ItemSpacing.y + ImGui::GetStyle().WindowPadding.y * 2.0f);
bool show_scroll = m_sel_plate_toolbar.is_display_scrollbar && (window_height_calc > window_height_max);
float scrollbar_size = 10.0f * f_scale ;
float scrollbar_size = 14.0f * f_scale;
float window_height = std::min(window_height_calc, window_height_max);
float window_width = button_width + (margin_size + button_margin + ImGui::GetStyle().WindowPadding.x) * 2 + (show_scroll ? scrollbar_size : 0);
@@ -9653,7 +9653,7 @@ void GLCanvas3D::_render_imgui_select_plate_toolbar()
ImGui::PushStyleVar(ImGuiStyleVar_ScrollbarSize, scrollbar_size);
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, show_scroll ? (4.0f * f_scale) : (button_radius + margin_size + frame_padding + ImGui::GetStyle().WindowPadding.x));
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, show_scroll ? (6.f * f_scale) : (button_radius + margin_size + frame_padding + ImGui::GetStyle().WindowPadding.x));
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, button_radius + margin_size);
imgui.set_next_window_pos(canvas_w * 0 + 5.0f * f_scale, canvas_h * 0 + y_offset, ImGuiCond_Always, 0, 0); // ORCA Add slight gap on left edge so toolbar looks like floating and it creates separation with sidebar
@@ -10132,7 +10132,7 @@ void GLCanvas3D::_render_canvas_toolbar()
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding , ImVec2(4.f, 10.f) * sc);
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing , ImVec2(0.f, 8.f ) * sc);
if (ImGui::BeginPopup("CanvasToolbarMenu")) {
if (ImGui::BeginPopup("CanvasToolbarMenu", ImGuiWindowFlags_NoMove)) {
ImGui::PushItemFlag(ImGuiItemFlags_SelectableDontClosePopup, true);
Plater* p = wxGetApp().plater();
+11 -5
View File
@@ -2938,10 +2938,10 @@ void ObjectTablePanel::load_data()
m_object_grid->SetColLabelValue(ObjectGridTable::col_printable, _L("Printable"));
m_object_grid->SetColLabelValue(ObjectGridTable::col_printable_reset, "");
m_object_grid->SetColLabelValue(ObjectGridTable::col_plate_index, wxString::Format("%S%S", _L("Plate"), wxString::FromUTF8("\u2191\u2193")));
m_object_grid->SetColLabelValue(ObjectGridTable::col_plate_index, wxString::Format("%S %S", _L("Plate"), wxString::FromUTF8("\u2191\u2193")));
/*m_object_grid->SetColLabelValue(ObjectGridTable::col_assemble_name, L("Module"));*/
m_object_grid->SetColLabelValue(ObjectGridTable::col_name, wxString::Format("%S%S", _L("Name"), wxString::FromUTF8("\u2191\u2193")));
m_object_grid->SetColLabelValue(ObjectGridTable::col_filaments, wxString::Format("%S%S", _L("Filament"), wxString::FromUTF8("\u2191\u2193")));
m_object_grid->SetColLabelValue(ObjectGridTable::col_name, wxString::Format("%S %S", _L("Name"), wxString::FromUTF8("\u2191\u2193")));
m_object_grid->SetColLabelValue(ObjectGridTable::col_filaments, wxString::Format("%S %S", _L("Filament"), wxString::FromUTF8("\u2191\u2193")));
m_object_grid->SetColLabelValue(ObjectGridTable::col_filaments_reset, "");
m_object_grid->SetColLabelValue(ObjectGridTable::col_layer_height, _L("Layer height"));
m_object_grid->SetColLabelValue(ObjectGridTable::col_layer_height_reset, "");
@@ -2956,8 +2956,8 @@ void ObjectTablePanel::load_data()
m_object_grid->SetColLabelValue(ObjectGridTable::col_speed_perimeter, _L("Outer wall speed"));
m_object_grid->SetColLabelValue(ObjectGridTable::col_speed_perimeter_reset, "");
m_object_grid->SetLabelFont(Label::Head_13);
m_object_grid->SetLabelTextColour(StateColor::darkModeColorFor(wxColour("#303A3C")));
m_object_grid->SetLabelBackgroundColour( wxColour("#FFFFFF"));
m_object_grid->SetLabelTextColour(StateColor::darkModeColorFor(wxColour("#363636")));
m_object_grid->SetLabelBackgroundColour( StateColor::darkModeColorFor(wxColour("#D9D9D9")));
#else
m_object_grid->HideColLabels();
#endif
@@ -2996,6 +2996,12 @@ void ObjectTablePanel::load_data()
//m_object_grid->SetSelectionForeground(wxColour(0xDB,0xFD,0xE7));
//m_object_grid->SetSelectionBackground(*wxWHITE);
m_object_grid->SetDefaultCellBackgroundColour(StateColor::darkModeColorFor(*wxWHITE));
m_object_grid->SetSelectionBackground(StateColor::darkModeColorFor(wxColour("#BFE1DE"))); // its not fully working since background of control's covers cell
m_object_grid->SetCellHighlightColour(StateColor::darkModeColorFor(wxColour("#009688")));
m_object_grid->SetCellHighlightPenWidth(FromDIP(1));
m_object_grid->SetCellHighlightROPenWidth(FromDIP(1)); // Highlight for read-only cells
for (int col = 0; col < cols; col++)
{
ObjectGridTable::ObjectGridCol* grid_col = m_object_grid_table->get_grid_col(col);
+36
View File
@@ -665,6 +665,42 @@ void RemoveInputBorder(wxWindow* win)
);
#endif
}
void SetGaugeColor(wxGauge* gauge, const wxString& barColor, const wxString& troughColor)
{
GtkWidget* widget = gauge->GetHandle(); // native GtkWidget*
if (!widget) return;
#if GTK_CHECK_VERSION(3, 0, 0)
// GTK3+: use CSS provider
GtkCssProvider* provider = gtk_css_provider_new();
wxString css = wxString::Format(
"progressbar trough { background-color: %s; }"
"progressbar progress { background-color: %s; background-image: none; }",
troughColor,
barColor
);
#if GTK_CHECK_VERSION(4, 0, 0)
// GTK4
gtk_css_provider_load_from_data(provider, css.utf8_str(), -1);
#else
// GTK3
gtk_css_provider_load_from_data(provider, css.utf8_str(), -1, nullptr);
#endif
GtkStyleContext* ctx = gtk_widget_get_style_context(widget);
gtk_style_context_add_provider(
ctx,
GTK_STYLE_PROVIDER(provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
);
g_object_unref(provider);
#endif
}
#endif // __WXGTK__
#ifdef __linux__
+5
View File
@@ -37,6 +37,10 @@
#include "libslic3r/Utils.hpp"
#include "libslic3r/Color.hpp"
#ifdef __WXGTK__
#include "wx/gauge.h"
#endif
class wxCheckBox;
class wxTopLevelWindow;
@@ -495,6 +499,7 @@ void set_window_corner_radius(wxWindow* win, int radius);
#ifdef __WXGTK__
void RemoveButtonBorder(wxWindow* win); // for wxButton/wxBitmapToggleButton based controls (SwitchButton, CheckBox)
void RemoveInputBorder(wxWindow* win); // for TextCtrl based controls (TextInput, ComboBox, SpinInput..)
void SetGaugeColor(wxGauge* gauge, const wxString& barColor, const wxString& troughColor);
#endif
#if defined(__WXOSX__) || defined(__linux__)
@@ -1055,7 +1055,7 @@ void GLGizmoMmuSegmentation::render_filament_remap_ui(float window_width, float
ImGui::PushStyleColor(ImGuiCol_PopupBg, ImGui::GetStyleColorVec4(ImGuiCol_WindowBg));
ImGui::PushStyleColor(ImGuiCol_Border , ImGui::ColorConvertFloat4ToU32(ImGuiWrapper::COL_ORCA));
if (ImGui::BeginPopup(pop_id.c_str())) {
if (ImGui::BeginPopup(pop_id.c_str(), ImGuiWindowFlags_NoMove)) {
m_imgui->text(_L("To:"));
+2 -2
View File
@@ -1524,7 +1524,7 @@ void IMSlider::render_add_menu()
ImGui::OpenPopup("slider_add_menu_popup");
m_show_menu = false;
}
if (ImGui::BeginPopup("slider_add_menu_popup")) {
if (ImGui::BeginPopup("slider_add_menu_popup", ImGuiWindowFlags_NoMove)) {
bool menu_item_enable = m_draw_mode != dmSequentialFffPrint;
bool hovered = false;
{
@@ -1579,7 +1579,7 @@ void IMSlider::render_edit_menu(const TickCode& tick)
ImGui::OpenPopup("slider_edit_menu_popup");
m_show_menu = false;
}
if (ImGui::BeginPopup("slider_edit_menu_popup")) {
if (ImGui::BeginPopup("slider_edit_menu_popup", ImGuiWindowFlags_NoMove)) {
switch (tick.type)
{
case CustomGCode::PausePrint:
+16 -12
View File
@@ -936,7 +936,7 @@ struct Sidebar::priv
// that Orca's sidebar has no counterpart for, so these are parented to p->scrolled.
wxPanel* m_btn_add_mixed_filament{nullptr}; // "+ Add Mixed Filament" full-width button
wxPanel* m_panel_mixed_title{nullptr}; // title row: "Mixed Filament" + add/del buttons
wxStaticText* m_text_mixed_title{nullptr};
StaticLine* m_text_mixed_title{nullptr};
ScalableButton* m_btn_mixed_add{nullptr};
ScalableButton* m_btn_mixed_del{nullptr};
wxScrolledWindow* m_mixed_scroll_area{nullptr}; // independent scrollbar for mixed rows
@@ -3436,10 +3436,10 @@ Sidebar::Sidebar(Plater *parent)
p->m_panel_mixed_title->SetBackgroundColour(StateColor::darkModeColorFor(*wxWHITE));
{
auto* title_sizer = new wxBoxSizer(wxHORIZONTAL);
p->m_text_mixed_title = new wxStaticText(p->m_panel_mixed_title, wxID_ANY, _L("Mixed Filament"));
p->m_text_mixed_title = new StaticLine(p->m_panel_mixed_title, false, _L("Mixed Filament"));
p->m_text_mixed_title->SetFont(::Label::Head_14);
title_sizer->Add(p->m_text_mixed_title, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(SidebarProps::TitlebarMargin()));
title_sizer->AddStretchSpacer();
p->m_text_mixed_title->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636")));
title_sizer->Add(p->m_text_mixed_title, 1, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(SidebarProps::TitlebarMargin()));
p->m_btn_mixed_del = new ScalableButton(p->m_panel_mixed_title, wxID_ANY, "delete_filament");
p->m_btn_mixed_del->SetToolTip(_L("Remove last mixed filament"));
@@ -3579,6 +3579,7 @@ Sidebar::Sidebar(Plater *parent)
search_sizer->Fit(p->m_search_bar);
p->m_object_list = new ObjectList(p->scrolled);
p->m_object_list->SetBackgroundColour(*wxWHITE);
p->m_object_list->Bind(wxCUSTOMEVT_EXIT_SEARCH, [this](wxCommandEvent&) {
#ifdef __WXGTK__
this->p->m_search_item->Enable(true);
@@ -4306,7 +4307,7 @@ void Sidebar::update_mixed_filament_list()
wxWindowUpdateLocker noUpdates(this);
const wxColour mc_bg = StateColor::darkModeColorFor(*wxWHITE);
const wxColour mc_border = StateColor::darkModeColorFor(wxColour("#CECECE"));
const wxColour mc_border = StateColor::darkModeColorFor(wxColour("#DBDBDB")); // same color with filament combo box border
const wxColour mc_text = StateColor::darkModeColorFor(wxColour("#262E30"));
const wxColour mc_dim = StateColor::darkModeColorFor(wxColour("#ACACAC"));
@@ -4420,8 +4421,9 @@ void Sidebar::update_mixed_filament_list()
for (size_t i = 0; i < mixed_indices.size(); ++i) {
size_t cfg_idx = mixed_indices[i];
auto* combo_and_btn_sizer = new wxBoxSizer(wxHORIZONTAL);
combo_and_btn_sizer->Add(FromDIP(10), 0, 0, 0, 0);
if (i == 0 || i % 2 == 0) // dont add left margin for right column items so all horizontal margins will be equal like on filaments section
combo_and_btn_sizer->AddSpacer(FromDIP(SidebarProps::ContentMargin()));
// Parse components and ratios from config strings (supports 2-N components)
std::vector<unsigned int> comp_ids;
@@ -4511,10 +4513,12 @@ void Sidebar::update_mixed_filament_list()
dc.DrawText(txt, (sz.GetWidth() - txt_sz.GetWidth()) / 2,
(sz.GetHeight() - txt_sz.GetHeight()) / 2);
});
combo_and_btn_sizer->Add(grad_panel, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(4));
grad_panel->Bind(wxEVT_LEFT_UP, [this, i](wxMouseEvent&) { edit_mixed_filament(i); }); // ORCA also open edit color dialog with clicking swatch
combo_and_btn_sizer->Add(grad_panel, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(SidebarProps::ElementSpacing()) - FromDIP(2)); // ElementSpacing - 2 (from combo box))
} else {
combo_and_btn_sizer->Add(make_swatch_panel(p->m_panel_mixed_content, mix_col, mix_num),
0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(4));
auto swatch_panel = make_swatch_panel(p->m_panel_mixed_content, mix_col, mix_num);
swatch_panel->Bind(wxEVT_LEFT_UP, [this, i](wxMouseEvent&) { edit_mixed_filament(i); }); // ORCA also open edit color dialog with clicking swatch
combo_and_btn_sizer->Add(swatch_panel, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(SidebarProps::ElementSpacing()) - FromDIP(2)); // ElementSpacing - 2 (from combo box))
}
auto* content_panel = new wxPanel(p->m_panel_mixed_content, wxID_ANY);
@@ -4738,9 +4742,9 @@ void Sidebar::update_mixed_filament_list()
PopupMenu(&menu);
});
combo_and_btn_sizer->Add(menu_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(4));
combo_and_btn_sizer->Add(menu_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(SidebarProps::ElementSpacing()) - FromDIP(2)); // ElementSpacing - 2 (from combo box))
combo_and_btn_sizer->Add(FromDIP(16), 0, 0, 0, 0);
combo_and_btn_sizer->Add(FromDIP(SidebarProps::ContentMargin()), 0, 0, 0, 0);
int side = i % 2;
auto* col = (side == 0) ? left_col : right_col;
+6 -6
View File
@@ -2305,18 +2305,18 @@ void PreferencesDialog::create_items()
auto item_show_unsupported = create_item_checkbox(_L("Show unsupported presets"), _L("Show incompatible/unsupported presets in the printer and filament dropdown lists. These presets cannot be selected."), "show_unsupported_presets");
g_sizer->Add(item_show_unsupported);
auto item_plugin_printer_agents = create_item_checkbox(
_L("(Experimental) Use printer agents instead of print hosts"), _L(
"Route print jobs for non-Bambu printers through printer plug-in agents instead of the classic print-host upload flow.\nWhen disabled, OrcaSlicer uses the legacy print-host behavior."),
"use_printer_agents");
g_sizer->Add(item_plugin_printer_agents);
//// DEVELOPER > Experimental Features
g_sizer->Add(create_item_title(_L("Experimental Features")), 1, wxEXPAND);
auto item_keep_painting = create_item_checkbox(_L("Keep painted feature after mesh change"), _L("Attempt to keep painted features (color/seam/support/fuzzy etc.) after changing the object mesh (such as cut/reload from disk/simplify/fix etc.)\nHighly experimental! Slow and may create artifact."), "keep_painting");
g_sizer->Add(item_keep_painting);
auto item_plugin_printer_agents = create_item_checkbox(
_L("Use printer agents instead of print hosts"), _L(
"Route print jobs for non-Bambu printers through printer plug-in agents instead of the classic print-host upload flow.\nWhen disabled, OrcaSlicer uses the legacy print-host behavior."),
"use_printer_agents");
g_sizer->Add(item_plugin_printer_agents);
//// DEVELOPER > Storage
g_sizer->Add(create_item_title(_L("Storage")), 1, wxEXPAND);
+7 -16
View File
@@ -22,15 +22,16 @@
#include "GUI_App.hpp"
#include "wxExtensions.hpp"
#include "Widgets/Button.hpp"
#include "Widgets/DialogButtons.hpp"
#include "libslic3r/Utils.hpp"
namespace Slic3r { namespace GUI {
static const wxColour BgNormalColor = wxColour("#FFFFFF");
static const wxColour BgSelectColor = wxColour("#EBF9F0");
static const wxColour BgSelectColor = wxColour("#E5F0EE");
static const wxColour BorderNormalColor = wxColour("#CECECE");
static const wxColour BorderSelectedColor = wxColour("#00AE42");
static const wxColour BorderSelectedColor = wxColour("#009688");
static const wxColour TextNormalBlackColor = wxColour("#262E30");
static const wxColour TextNormalGreyColor = wxColour("#6B6B6B");
@@ -41,8 +42,6 @@ PurgeModeDialog::PurgeModeDialog(wxWindow *parent, PurgeModeDialogType dialog_ty
SetBackgroundColour(*wxWHITE);
SetMinSize(wxSize(FromDIP(520), FromDIP(320)));
SetMaxSize(wxSize(FromDIP(520), FromDIP(320)));
std::string icon_path = (boost::format("%1%/images/OrcaSlicerTitle.ico") % resources_dir()).str();
SetIcon(wxIcon(encode_path(icon_path.c_str()), wxBITMAP_TYPE_ICO));
auto main_sizer = new wxBoxSizer(wxVERTICAL);
@@ -87,18 +86,10 @@ PurgeModeDialog::PurgeModeDialog(wxWindow *parent, PurgeModeDialogType dialog_ty
auto btn_sizer = new wxBoxSizer(wxHORIZONTAL);
btn_sizer->AddStretchSpacer();
auto ok_btn = new Button(this, _L("Confirm"));
ok_btn->SetStyle(ButtonStyle::Confirm, ButtonType::Compact);
ok_btn->SetId(wxID_OK);
auto dlg_btns = new DialogButtons(this, {"OK", "Cancel"});
dlg_btns->GetOK()->SetLabel(_L("Confirm"));
auto cancel_btn = new Button(this, _L("Cancel"));
cancel_btn->SetStyle(ButtonStyle::Regular, ButtonType::Compact);
cancel_btn->SetId(wxID_CANCEL);
btn_sizer->Add(ok_btn, 0, wxRIGHT, FromDIP(12));
btn_sizer->Add(cancel_btn, 0);
main_sizer->Add(btn_sizer, 0, wxEXPAND | wxALL, FromDIP(20));
main_sizer->Add(dlg_btns, 0, wxEXPAND);
SetSizer(main_sizer);
Fit();
@@ -128,7 +119,7 @@ void PurgeModeDialog::on_dpi_changed(const wxRect &suggested_rect)
{
const int &em = em_unit();
msw_buttons_rescale(this, em, {wxID_OK, wxID_CANCEL});
//msw_buttons_rescale(this, em, {wxID_OK, wxID_CANCEL});
const wxSize &size = wxSize(70 * em, 32 * em);
SetMinSize(size);
+2
View File
@@ -279,6 +279,8 @@ StepMeshDialog::StepMeshDialog(wxWindow* parent, Slic3r::Step& file, double line
mesh_face_number_sizer->Add(mesh_face_number_text, 0, wxALIGN_LEFT);
bSizer->Add(mesh_face_number_sizer, 0, wxEXPAND | wxALL, LEFT_RIGHT_PADING);
bSizer->AddSpacer(FromDIP(10));
wxBoxSizer* save_default_sizer = new wxBoxSizer(wxHORIZONTAL);
m_save_default_checkbox = new wxCheckBox(this, wxID_ANY, _L("Save these settings as default"), wxDefaultPosition, wxDefaultSize, 0);
m_save_default_checkbox->SetFont(::Label::Body_14);
+1 -1
View File
@@ -5177,7 +5177,7 @@ void TabPrinter::build_fff()
{
option = optgroup->get_option("printer_agent");
option.opt.gui_type = ConfigOptionDef::GUIType::printer_agent_select;
option.opt.width = 3 * Field::def_width_wider() / 2;
option.opt.width = Field::def_width_wider();
option.opt.tooltip = L("Select the network agent implementation for printer communication. "
"Available agents are registered at startup.");
optgroup->append_single_option_line(option);
+8 -7
View File
@@ -622,6 +622,7 @@ DiffViewCtrl::DiffViewCtrl(wxWindow* parent, wxSize size)
),
m_em_unit(em_unit(parent))
{
SetBackgroundColour(wxColour("#FFFFFF"));
wxGetApp().UpdateDVCDarkUI(this);
model = new DiffModel(parent);
@@ -896,7 +897,7 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection *dependent_
m_action_line = new wxStaticText(this, wxID_ANY, wxEmptyString, wxDefaultPosition, UNSAVE_CHANGE_DIALOG_ACTION_LINE_SIZE, 0);
m_action_line->SetFont(::Label::Body_13);
m_action_line->SetForegroundColour(GREY900);
m_action_line->SetForegroundColour(wxColour("#363636"));
m_action_line->Wrap(-1);
m_sizer_main->Add(m_action_line, 0, wxLEFT | wxRIGHT, 20);
@@ -909,11 +910,11 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection *dependent_
}
m_panel_tab = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(UNSAVE_CHANGE_DIALOG_SCROLL_WINDOW_SIZE.x, -1), wxTAB_TRAVERSAL);
m_panel_tab->SetBackgroundColour(GREY200);
m_panel_tab->SetBackgroundColour(wxColour("#D9D9D9"));
wxBoxSizer *m_sizer_tab = new wxBoxSizer(wxVERTICAL);
m_table_top = new wxPanel(m_panel_tab, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
m_table_top->SetBackgroundColour(wxColour(107, 107, 107));
m_table_top->SetBackgroundColour(wxColour("#D9D9D9"));
wxBoxSizer *m_sizer_top = new wxBoxSizer(wxHORIZONTAL);
@@ -925,7 +926,7 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection *dependent_
static_temp_title = new wxStaticText(m_panel_temp, wxID_ANY, _L("Settings"), wxDefaultPosition, wxDefaultSize, 0);
static_temp_title->SetFont(::Label::Body_13);
static_temp_title->Wrap(-1);
static_temp_title->SetForegroundColour(*wxWHITE);
static_temp_title->SetForegroundColour(wxColour("#363636"));
top_title_temp_h->Add(static_temp_title, 0, wxALIGN_CENTER | wxBOTTOM | wxTOP, 5);
top_title_temp_v->Add(top_title_temp_h, 1, wxALIGN_CENTER, 0);
m_panel_temp->SetSizer(top_title_temp_v);
@@ -944,7 +945,7 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection *dependent_
static_oldv_title = new wxStaticText(m_panel_oldv, wxID_ANY, params ? _L(DevPrinterConfigUtil::get_toolhead_display_name(ucd_pt, DEPUTY_EXTRUDER_ID, ToolHeadComponent::Nozzle, ToolHeadNameCase::SentenceCase)) + ": " + get_nozzle_volume_type_name(params->nozzle) : _L("Old Value"), wxDefaultPosition, wxDefaultSize, 0);
static_oldv_title->SetFont(::Label::Body_13);
static_oldv_title->Wrap(-1);
static_oldv_title->SetForegroundColour(params && params->left_to_right ? wxGetApp().get_label_clr_modified() : *wxWHITE);
static_oldv_title->SetForegroundColour(params && params->left_to_right ? wxGetApp().get_label_clr_modified() : wxColour("#363636"));
top_title_oldv_h->Add(static_oldv_title, 0, wxALIGN_CENTER | wxBOTTOM | wxTOP, 5);
top_title_oldv->Add(top_title_oldv_h, 1, wxALIGN_CENTER, 0);
m_panel_oldv->SetSizer(top_title_oldv);
@@ -964,7 +965,7 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection *dependent_
wxDefaultPosition, wxDefaultSize, 0);
static_newv_title->SetFont(::Label::Body_13);
static_newv_title->Wrap(-1);
static_newv_title->SetForegroundColour(params && !params->left_to_right ? wxGetApp().get_label_clr_modified() : *wxWHITE);
static_newv_title->SetForegroundColour(params && !params->left_to_right ? wxGetApp().get_label_clr_modified() : wxColour("#363636"));
top_title_newv_h->Add(static_newv_title, 0, wxALIGN_CENTER | wxBOTTOM | wxTOP, 5);
@@ -1014,7 +1015,7 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection *dependent_
checkbox_sizer->Show(bool(m_buttons & REMEMBER_CHOISE));
if (dependent_presets != nullptr) {
auto wiki = new HyperLink(this, _L("Help"), "https://www.orcaslicer.com/wiki/transfer_discard_changes");
auto wiki = new HyperLink(this, _L("Wiki Guide"), "https://www.orcaslicer.com/wiki/transfer_discard_changes");
m_sizer_button->Add(wiki, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(22));
}
+4 -3
View File
@@ -315,7 +315,7 @@ void Button::render(wxDC& dc)
auto szContent = textSize;
// Whether the measured content reserved the text/icon gap. macOS measures an empty label
// as 0-high, so the gap is skipped there; the dot must not advance past it in that case.
const bool gap_reserved = szContent.y > 0;
const bool gap_reserved = !text.IsEmpty(); // ORCA check empty string instead text size. fixes icon centering on linux
if (icon.bmp().IsOk()) {
if (gap_reserved) {
// BBS norrow size between text and icon
@@ -409,10 +409,11 @@ void Button::messureSize()
if (this->active_icon.bmp().IsOk()) {
if (szContent.y > 0) {
// BBS narrow size between text and icon
int spacing_after_icon = !GetLabel().IsEmpty() ? 0 : m_icon_spacing; // ORCA check empty string instead text size. fixes icon centering on linux
if (vertical)
szContent.y += m_icon_spacing;
szContent.y += spacing_after_icon;
else
szContent.x += m_icon_spacing;
szContent.x += spacing_after_icon;
}
wxSize szIcon = this->active_icon.GetBmpSize();
if (vertical) {
+15 -1
View File
@@ -32,6 +32,11 @@
#include "wx/evtloop.h"
#include "Label.hpp"
#ifdef __WXGTK__
#include "slic3r/GUI/Widgets/StateColor.hpp"
#include "slic3r/GUI/GUI_Utils.hpp"
#endif
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
@@ -237,10 +242,19 @@ bool ProgressDialog::Create(const wxString &title, const wxString &message, int
if (!HasPDFlag(wxPD_NO_PROGRESS)) {
m_gauge = new wxGauge(this, wxID_ANY, maximum, wxDefaultPosition, PROGRESSDIALOG_GAUGE_SIZE, gauge_style);
#ifdef __WXGTK__
SetGaugeColor(m_gauge,
StateColor::darkModeColorFor(wxColour("#009688")).GetAsString(),
StateColor::darkModeColorFor(wxColour("#D9D9D9")).GetAsString()
);
m_gauge->SetValue(0);
#else
m_gauge->Pulse(); // colors not applied without this. probably it switches to a dc painted version of progressbar
m_gauge->SetValue(0);
m_gauge->SetForegroundColour(wxColour("#009688"));
m_gauge->SetBackgroundColour(wxColour("#D9D9D9"));
wxGetApp().UpdateDarkUI(m_gauge);
#endif
m_sizer_main->Add(m_gauge, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(28));
}
@@ -837,7 +851,7 @@ ProgressDialog::~ProgressDialog()
void ProgressDialog::DoSetSize(int x, int y, int width, int height, int sizeFlags /*= wxSIZE_AUTO*/)
{
if (m_button_cancel != nullptr) { m_button_cancel->SetMinSize(PROGRESSDIALOG_CANCEL_BUTTON_SIZE); }
//if (m_button_cancel != nullptr) { m_button_cancel->SetMinSize(PROGRESSDIALOG_CANCEL_BUTTON_SIZE); }
#ifdef __WXMSW__
//if (m_block_left != nullptr && m_block_right != nullptr) {
+1 -1
View File
@@ -30,7 +30,7 @@ class WXDLLIMPEXP_FWD_CORE wxStaticText;
class WXDLLIMPEXP_FWD_CORE wxWindowDisabler;
#define PROGRESSDIALOG_SIMPLEBOOK_SIZE wxSize(FromDIP(320),FromDIP(38))
#define PROGRESSDIALOG_GAUGE_SIZE wxSize(FromDIP(320), FromDIP(6))
#define PROGRESSDIALOG_GAUGE_SIZE wxSize(FromDIP(320), FromDIP(8))
#define PROGRESSDIALOG_CANCEL_BUTTON_SIZE wxSize(FromDIP(60), FromDIP(24))
#define PROGRESSDIALOG_DEF_BK wxColour(255,255,255)
#define PROGRESSDIALOG_GREY_700 wxColour(54,54,54) // #363636 label color
+1 -1
View File
@@ -48,7 +48,7 @@ static std::map<wxColour, wxColour> gDarkColors{
{"#2B3436", "#808080"}, // rgb(43, 52, 54) Not Used anymore // Leftover from BBS. Was used as main fill color of icons
{"#ABABAB", "#ABABAB"},
{"#D9D9D9", "#27272A"}, // rgb(217, 217, 217) Sidebar > Toggle button track color
{"#FFFEFE", "#D9D9D9"}, // rgb(255, 254, 254) Sidebar > Toggle button thumb color
{"#FFFEFE", "#D8D9D9"}, // rgb(255, 254, 254) Sidebar > Toggle button thumb color
{"#EBF9F0", "#293F34"},
//{"#F0F0F0", "#4C4C54"},
// ORCA
+26 -8
View File
@@ -14,6 +14,7 @@
#include <wx/image.h>
#include <cstring>
#include <wx/dc.h>
#include <cmath>
#include <vector>
#include "slic3r/GUI/Widgets/StateHandler.hpp"
#include <wx/scrolwin.h>
@@ -158,17 +159,16 @@ void SwitchButton::Rescale()
}
for (int i = 0; i < 2; ++i) {
wxMemoryDC memdc(&dc);
#ifdef __WXMSW__
wxBitmap bmp(trackSize.x, trackSize.y);
memdc.SelectObject(bmp);
memdc.SetBackground(wxBrush(GetBackgroundColour()));
memdc.Clear();
#else
wxImage image(trackSize);
#ifndef __WXMSW__ // DrawText doesn't work properly on Windows with Alpha channel
image.InitAlpha();
memset(image.GetAlpha(), 0, trackSize.GetWidth() * trackSize.GetHeight());
#endif
wxBitmap bmp(std::move(image));
memdc.SelectObject(bmp);
#ifdef __WXMSW__
memdc.SetBackground(wxBrush(GetBackgroundColour()));
memdc.Clear();
#endif
memdc.SetFont(dc.GetFont());
#ifdef __WXMSW__
@@ -276,6 +276,7 @@ ModeSwitchButton::ModeSwitchButton(wxWindow* parent, wxWindowID id)
StaticBox::Create(parent, id, wxDefaultPosition, wxDefaultSize, 0);
SetBackgroundColour(StaticBox::GetParentBackgroundColor(parent));
SetCursor(wxCursor(wxCURSOR_HAND));
SetFont(Label::Body_12);
m_tooltips[0] = _L("Simple settings");
m_tooltips[1] = _L("Advanced settings");
@@ -374,6 +375,14 @@ void ModeSwitchButton::doRender(wxDC& dc)
}
}
else { // Developer mode
double scale = 1.00;
#ifdef __WXOSX__
scale = Slic3r::GUI::mac_max_scaling_factor();
dc.SetFont(dc.GetFont().Scaled(scale));
#elif defined(__WXMSW__)
scale = m_parent->GetDPIScaleFactor();
dc.SetFont(dc.GetFont().Scaled(scale));
#endif
wxString str = "DEV";
int kerning = 3; // pixels between chars
dc.SetTextForeground(text_color.colorForStates(states));
@@ -383,8 +392,17 @@ void ModeSwitchButton::doRender(wxDC& dc)
totalWidth += dc.GetTextExtent(wxString(c)).x + kerning;
totalWidth -= kerning;
wxCoord x = bounds.x + (bounds.width - totalWidth) / 2;
wxCoord y = bounds.y + (bounds.height - dc.GetTextExtent(str).y) / 2 - 1;
wxCoord x = bounds.x + (bounds.width - totalWidth) * 0.50;
wxFontMetrics fm = dc.GetFontMetrics();
int lineHeight = fm.ascent + fm.descent + fm.internalLeading;
double y_offset = scale;
#if defined(__WXGTK__)
y_offset = 0;
#endif
wxCoord y = std::floor(v_center - lineHeight * 0.50 - y_offset);
for (char c : str) {
wxString ch(c);