Commit Graph

17023 Commits

Author SHA1 Message Date
SoftFever
88eb2ab8df reapply wxALIGN_CENTER_VERTICAL 2026-03-27 14:53:56 +08:00
SoftFever
c443129f34 fix build errors on latest xcode 2026-03-27 14:32:40 +08:00
SoftFever
b6184a540e reduce the sidebar's width a bit 2026-03-27 00:27:39 +08:00
SoftFever
fe55b260b4 suppress: gtk_style_context_add_provider: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed 2026-03-26 16:22:07 +08:00
SoftFever
6148ba16b3 Fix GTK negative content width warnings for bitmap toggle buttons
On Linux/GTK, CheckBox, RadioBox, and SwitchButton set their size to
exactly the bitmap size (18x18 or 16x16), but GTK's internal CSS padding
requires additional space, resulting in negative content width warnings.
Use GetBestSize() on GTK to account for theme padding.
2026-03-26 16:05:58 +08:00
SoftFever
e70fe6c1df fix Windows build errors 2026-03-26 14:10:10 +08:00
SoftFever
fd47370c5c fix Windows build errors - wip 2026-03-26 10:17:19 +08:00
SoftFever
80c958d98b Remove macOS text position fudge factors (no longer needed with wx 3.3) 2026-03-25 15:58:39 +08:00
SoftFever
ed88cbe3f5 Use wxWebView::New() factory on macOS (direct ctor removed in wx 3.3) 2026-03-25 12:44:02 +08:00
SoftFever
11a80a1e1c Disambiguate state_handler.attach() call in Button.cpp 2026-03-25 11:35:25 +08:00
SoftFever
2b3328c2b2 Fix char + wstring concat in Search.cpp tooltip builder 2026-03-25 11:34:45 +08:00
SoftFever
1765d296a8 Fix wxArrayString ctor, wstring concat, and wxList::Node for wx 3.3
- Plater: use Add() instead of wxArrayString(size_t, wxString) ctor
- Search: change sep from std::wstring to wxString for concatenation
- SendMultiMachinePage: replace wxList::Node* with compatibility_iterator
  (Node type removed in wx 3.3 with wxUSE_STD_CONTAINERS=ON)
2026-03-25 11:33:50 +08:00
SoftFever
7cbd9bfb3c Fix ambiguous overload, wxScopedCharBuffer comparison, and wxArrayString ctor
- PhysicalPrinterDialog: disambiguate set_values() call with explicit
  std::vector<std::string> (wxArrayString now also matches initializer list)
- Preferences: use ToStdString() instead of mb_str() for std::string comparison
- Plater: use wxString::FromUTF8() for wxArrayString constructor argument
2026-03-25 11:31:44 +08:00
SoftFever
0af0327d60 Fix narrow/wide string concat in SyncAmsInfoDialog.cpp
Same pattern as earlier fixes: const char[] + std::wstring fails in
wx 3.3 where wxUSE_STD_CONTAINERS=ON. Wrap with wxString().
2026-03-25 11:30:21 +08:00
SoftFever
7ea69199fd Fix wxDynamicCast on wxComboPopup for wxWidgets 3.3
wxComboPopup no longer inherits from wxObject in wx 3.3, so
wxDynamicCast (which casts through wxObject) fails. Use dynamic_cast
directly instead.
2026-03-25 11:29:40 +08:00
SoftFever
d9c229ca35 Fix narrow/wide string concatenation errors for wxWidgets 3.3
In wx 3.3 with wxUSE_STD_CONTAINERS=ON, wxString is backed by
std::wstring, so direct concatenation of const char[] with
std::wstring or wxUniCharRef fails. Fix by splitting compound
concatenations into separate += operations on wxString, or by
wrapping the left operand in wxString() to use its operator+.

Files fixed:
- AuxiliaryDataViewModel.cpp: split "\\" + wxString/wstring chains
- AboutDialog.cpp: split std::string("\n") + wxUniCharRef
- Auxiliary.cpp: wrap dir.wstring() in wxString(), split "/" + wstring
2026-03-25 11:28:00 +08:00
SoftFever
5f365b5c6b Fix BitmapComboBox for wxWidgets 3.3 (wxBitmap -> wxBitmapBundle)
In wxWidgets 3.3, wxBitmapComboBoxBase::OnAddBitmap changed its
parameter from const wxBitmap& to const wxBitmapBundle&, and m_bitmaps
was replaced by m_bitmapbundles. Update OnAddBitmap signature and
OnDrawItem to use wxBitmapBundle, extracting wxBitmap via
GetBitmap(GetDefaultSize()) where needed.
2026-03-25 11:26:32 +08:00
SoftFever
85390a9da0 Guard wxToolTip::GetToolTipCtrl() for wx 3.3 and add explicit wx/utils.h includes
- Wrap GetToolTipCtrl() call in GUI_App.cpp with #if wxVERSION_NUMBER < 3300
  guard, as this API may not be accessible in wxWidgets 3.3. The dark tooltip
  theming is cosmetic and non-critical.

- Add explicit #include <wx/utils.h> to 7 source files that use functions from
  that header (wxGetMousePosition, wxLaunchDefaultBrowser, wxGetDisplaySize,
  wxBell) but relied on transitive includes. This preempts breakage from
  wxWidgets 3.3 reducing transitive includes.

Files with wx/utils.h added: BBLTopbar.cpp, CreatePresetsDialog.cpp,
CameraPopup.cpp, GLCanvas3D.cpp, GCodeViewer.cpp, GUI_ObjectList.cpp,
FilamentMapPanel.cpp.

Skipped BindDialog.cpp and FilamentPickerDialog.cpp as they already include
wx/wx.h which provides wx/utils.h transitively.

Part of wxWidgets 3.1.5 -> 3.3.2 upgrade.
2026-03-24 21:02:37 +08:00
SoftFever
ba867cc534 Add Show() before Raise() calls for wxWidgets 3.3 compatibility
In wxWidgets 3.3, wxWindow::Raise() no longer implies Show(). Add
explicit Show() before Raise() in two event handlers that activate the
main frame from another instance (load model, start download), and swap
the Show/Raise order in bring_instance_forward() so Show() precedes
Raise().
2026-03-24 20:57:58 +08:00
SoftFever
026b105dcb Remove wxTRANSPARENT_WINDOW flag for wxWidgets 3.3 compatibility
wxTRANSPARENT_WINDOW is removed in wxWidgets 3.3. Remove all 3
occurrences in MainFrame.cpp:

- ResizeEdgePanel constructor: already uses wxBG_STYLE_TRANSPARENT
  via SetBackgroundStyle(), so the flag was redundant
- slice_panel and print_panel: drop the style parameter entirely
  (defaults to 0)
2026-03-24 20:56:04 +08:00
SoftFever
1065d85dbc Fix wxEXPAND | wxALIGN_* sizer flag conflicts for wxWidgets 3.2+
wxWidgets 3.2+ asserts on invalid sizer flag combinations where
wxEXPAND (which fills the entire space in the secondary direction)
is combined with wxALIGN_* flags (which are meaningless when expanding).
Remove the conflicting wxALIGN_* flags from all 112 occurrences across
21 files, keeping wxEXPAND and any non-conflicting flags intact.
2026-03-24 20:50:44 +08:00
SoftFever
024d5dc64d Remove wxCHECK_VERSION(3,1,x) guards and legacy wxinit.h macros
Since we now target wxWidgets 3.3, all wxCHECK_VERSION(3,1,N) checks
are always true. Remove the guards keeping only the true branches:

- I18N.hpp: Remove version guard around _wxGetTranslation_ctx macro
- ExtraRenderers.hpp, GUI_App.hpp: Simplify SUPPORTS_MARKUP to check
  only wxUSE_MARKUP (version check always true)
- ConfigWizard.cpp: Remove manual wxArrayInt comparison fallback
- SendSystemInfoDialog.cpp: Simplify display scaling guard to _WIN32 only
- GUI_Utils.cpp: Remove IsDark() fallback using luma approximation
- wxinit.h: Remove legacy wxEVT_BUTTON and wxEVT_HTML_LINK_CLICKED
  compat macros (these event names exist natively in wx 3.3)
2026-03-24 20:44:32 +08:00
SoftFever
5be5185d17 Remove OSX 10.9.5 crash workaround (dead code with wxWidgets 3.3+)
wxWidgets 3.3 requires macOS 10.11+, making the 10.9.5-specific crash
workaround in OpenGLManager impossible to trigger. Remove:
- OSInfo struct and s_os_info static member from the header
- OS version recording in init_glcontext()
- Conditional wxGLContext deletion in the destructor (now always deletes)
- Unused #include <wx/platinfo.h>

The MacDarkMode.hpp include is retained as mac_max_scaling_factor() is
still used by GLInfo::get_max_tex_size().
2026-03-24 20:39:45 +08:00
SoftFever
8dcc3cd20d Remove const_cast workarounds for wxExecute (wxWidgets 3.1+)
wxWidgets 3.1+ accepts const argv arrays (const wchar_t* const* and
const char* const*) in wxExecute(), making the const_casts unnecessary.
Remove all 14 const_cast<char**>/const_cast<wchar_t**> wrappers around
wxExecute calls and their associated FIXME comments across GUI.cpp,
NotificationManager.cpp, and Downloader.cpp.
2026-03-24 20:34:32 +08:00
SoftFever
5f13f0893c Remove remaining pre-3.1.3 DPI dead code in GUI_Utils.hpp
Remove scale_win_font() and scale_controls_fonts() functions along
with the #if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3) guard in
rescale(). Since wx >= 3.1.3 is now guaranteed, this code could
never execute and the functions had no other callers.
2026-03-24 20:30:40 +08:00
SoftFever
195d22d5cb Remove pre-wxWidgets 3.1.3 DPI fallback code
Since we now target wxWidgets 3.3, the custom DPI change event
workaround (DpiChangedEvent, EVT_DPI_CHANGED_SLICER,
register_win32_dpi_event) is dead code. wxWidgets 3.1.3+ provides
native wxEVT_DPI_CHANGED / wxDPIChangedEvent which is already
wired up in the "true" branch of the version guards.

Removes:
- DpiChangedEvent struct and EVT_DPI_CHANGED_SLICER declaration/definition
- register_win32_dpi_event() function and its call site
- All associated #if !wxVERSION_EQUAL_OR_GREATER_THAN(3,1,3) guards
2026-03-24 20:28:12 +08:00
SoftFever
2d7e26292b Update build system for wxWidgets 3.1.5 → 3.3.2 upgrade
- deps/wxWidgets/wxWidgets.cmake: Add GIT_TAG v3.3.2 to track the
  correct branch; remove -DwxUSE_UNICODE=ON (unicode-only in 3.3,
  option removed)
- src/CMakeLists.txt: Bump find_package minimum version from 3.0/3.1
  to 3.3; remove SLIC3R_WX_STABLE conditional (3.0 no longer supported)
- CMakeLists.txt: Remove SLIC3R_WX_STABLE option definition
- scripts/flatpak/com.orcaslicer.OrcaSlicer.yml: Update wxWidgets
  source URL to v3.3.2 branch archive; remove sha256 (placeholder
  TODO); remove -DwxUSE_UNICODE=ON
2026-03-24 20:22:19 +08:00
SoftFever
73be083ac5 update flatpak app id and add migration code (#12879)
* update flatpak app id and add migration code

* tweak some text
2026-03-22 23:49:23 +08:00
Kiss Lorand
c02ccecc3a Follow-up for PR #12773 (#12800)
Adapt language files to PR #12773

- Language files are adapated for the new msgid from PR #12773
- changes from PR #12773 applied to APPLE build also
2026-03-20 22:04:46 +08:00
SoftFever
be5741d822 Security fix: path traversal in 3MF import (#12860) 2026-03-20 17:11:22 +08:00
SoftFever
991464ed95 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-18 17:52:24 +08:00
SoftFever
eb5082f37b Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-18 17:51:29 +08:00
SoftFever
70b9bedf94 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-18 17:50:39 +08:00
SoftFever
13b08385c8 check precise_z_height and enable_prime_tower conflicts in print validate 2026-03-18 16:59:20 +08:00
SoftFever
bcd89aba5e Skip flushing volume validation for multi-tool printers
Flushing volumes only apply to SEMM and BBL printers. Multi-tool printers don't perform filament purging between tool changes, so the zero-volume warning was being incorrectly triggered.
2026-03-18 15:39:07 +08:00
SoftFever
62ffbfd33d revist fixes for wipe tower pos issues 2026-03-18 14:42:40 +08:00
SoftFever
6399d88015 Revert "Fix wipe tower loaded outside of plate boundaries (#12191)"
This reverts commit e14e186bb7.
2026-03-17 19:16:09 +08:00
SoftFever
c8070b67d5 Revert "Fix wipe tower placed outside bed boundary on first slice (#12777)"
This reverts commit 494601eea5, reversing
changes made to d28e964e04.
2026-03-17 19:14:50 +08:00
SoftFever
c224b3f94b Ensure slice / print buttons visible on frame (Accordion tabs) (#12772)
Fixes
https://github.com/OrcaSlicer/OrcaSlicer/issues/12723#issuecomment-4033223440

## NOTES
• Icons easy to discern so its not an issue
• User will explore this feature while resizing window so its ok as well
• maybe will add a tooltip while button compacted on future

## PROBLEM
print / slice buttons not visible in frame and not usable. bbl machines
uses much more tabs and issue gets worse

**regular printer on minimum window size**
<img width="766" height="96" alt="Screenshot-20260315014602"
src="https://github.com/user-attachments/assets/965e72d2-64d6-462e-abbf-f3c355783da0"
/>

**bbl printer on minimum size**
<img width="764" height="93" alt="Screenshot-20260315014708"
src="https://github.com/user-attachments/assets/1250afd1-45c3-42d9-bda3-334671ec7dc5"
/>

## SOLUTION
tabs uses only icons to reduce space usage dynamically depends on
available space

**regular printer**

![explorer_PoszqO4wyw](https://github.com/user-attachments/assets/848331ee-0206-41a8-961f-e65e68ca5f56)

**bbl printer with multi device enabled**

![explorer_WznxxHVgIJ](https://github.com/user-attachments/assets/3e3a0414-71c2-436d-be3d-d1f380d5d299)

**worst case scenario without issue. (minimum window width + multi
device + Export sliced plate button)**
<img width="772" height="97" alt="Screenshot-20260315015216"
src="https://github.com/user-attachments/assets/8b21d693-4119-4f91-b16d-d734e4633b87"
/>

**adapts automatically to used layout**

![firefox_W80FMQaHee](https://github.com/user-attachments/assets/3f9eed31-2f8d-4763-8911-bf765175d30d)
2026-03-17 18:34:59 +08:00
SoftFever
9e32aec938 Support longer project names on title and fix window buttons not visible on minimum window size (#12730)
fixes https://github.com/OrcaSlicer/OrcaSlicer/issues/12723

tested on windows, ubuntu

## CHANGES
• Created a painted control because AddLabel method has fixed size.
**new control expands and uses all available space**
• removed invisible publish button to get perfect center. i assume this
feature already not in use on orca

## WINDOW BUTTONS NOT VISIBLE ON MINIMUM WINDOW WIDTH
• This issue only exist on windows

**Before**- causes window buttons not fitting to frame. 
**After** - all fits to frame
<img width="759" height="203" alt="Screenshot-20260311141345"
src="https://github.com/user-attachments/assets/99da00ea-48f9-449b-9dd0-0bd023e041d8"
/>

## ADDS SUPPORT FOR LONGER PROJECT NAMES
**Before** - title not showing all name because it has a fixed size with
300px
**After** - shows all name because it uses all available space
<img width="1263" height="216" alt="Screenshot-20260311141612"
src="https://github.com/user-attachments/assets/f0b4d16a-882f-46c0-8918-d0b8a7c34007"
/>

## ELLIPSIZES LONG NAMES WHEN REQURIED
**Before** - method was static

![explorer_6M2Lqu7Sla](https://github.com/user-attachments/assets/b0aedc44-6bb8-4b25-a4e3-8e3fea25fd44)

**After** - supports longer names and ellipsizes end dynamically

![explorer_l92JNSeq3v](https://github.com/user-attachments/assets/aa0b3ff1-c155-46b5-abc8-cf8167db18a7)

## FIXES THIN TITLEBAR ON LINUX
Left windows Right one Linux
**Before - Linux titlebar uses less height for titlebar**
<img width="806" height="84" alt="Screenshot-20260312013547"
src="https://github.com/user-attachments/assets/3507016c-e46b-4fb1-86de-29978ee48e2b"
/>
**After- Heights almost matches**
<img width="819" height="110" alt="Screenshot-20260312013531"
src="https://github.com/user-attachments/assets/3b28d32b-d054-406e-85bc-939609ba1aef"
/>
2026-03-17 18:28:00 +08:00
yw4z
3eac0a86e4 update 2026-03-16 15:10:36 +03:00
SoftFever
ba18b67e12 small tweak 2026-03-16 18:56:17 +08:00
SoftFever
55ddf158e5 Merge branch 'main' into feature/wipetower-option 2026-03-16 17:41:00 +08:00
SoftFever
d7a3091b70 Flow ratio instead flow rate calib (#12773)
# Description

Point II - 5 of #12684


# Screenshots/Recordings/Graphs

<img width="558" height="265" alt="image"
src="https://github.com/user-attachments/assets/fe8212b2-3062-4f21-8912-a9aaa87b3df1"
/>
2026-03-16 17:39:55 +08:00
SoftFever
14c40d7120 Fix height calculation for preferred filament area height (#12660)
## FIXES
• Corrects area height on windows while using 125% and 175% scaling. it
shows scrollbar when it incorrectly set. i have used directly size of
combobox this time instead static number

## IMPROVEMENTS
• Removes restriction for restarting orca when setting changed
2026-03-16 15:06:14 +08:00
SoftFever
d0d0440b8e Fix plurals on some GUI strings (#12681)
# Description
Some terms were singular and should be plural, and vice-versa.
2026-03-16 14:53:51 +08:00
SoftFever
8168d0a4e0 fix crash when opening preference dialog 2026-03-16 00:18:39 +08:00
SoftFever
112bec6bd2 Fix calibration dialogs not sizes properly on linux (#12752)
Fixes https://github.com/OrcaSlicer/OrcaSlicer/issues/12737 and
confirmed in here
https://github.com/OrcaSlicer/OrcaSlicer/issues/12737#issuecomment-4050896603

Only occurs on X11. tested on mint

`v_sizer->SetSizeHints(this);` was the real fix

issue starts to appear when dialog height higher then 280px
Removed height limitation on creating dialog as solution since dialogs
already resized with its content

• also fixes clipped text on bottom
|BEFORE|AFTER|
|---|---|
|<img width="330" height="456" alt="Screenshot-20260312203213"
src="https://github.com/user-attachments/assets/c6b0e577-f1e1-4da7-ba02-808d157ebee6"
/>|<img width="342" height="443" alt="Screenshot-20260313010726"
src="https://github.com/user-attachments/assets/a78605fa-ed75-4b42-a484-a2376d1b2982"
/>|

|BEFORE|AFTER|
|---|---|
|<img width="263" height="365" alt="Screenshot-20260312204651"
src="https://github.com/user-attachments/assets/ff04692e-3fd6-4fe1-bb6e-90594599c459"
/>|<img width="261" height="393" alt="Screenshot-20260313011644"
src="https://github.com/user-attachments/assets/be01936d-753a-4b95-99cb-c16228f8706f"
/>|
2026-03-15 23:21:51 +08:00
SoftFever
1a7f5d4f98 Fix infinite loop with zero top solid infill density (#12762)
# Description

This pull request fixes the bug where Orca Slicer enters an infinite
loop when a density of zero is introduced for the top layer solid infill

# Screenshots/Recordings/Graphs

<img width="2560" height="1392" alt="image"
src="https://github.com/user-attachments/assets/5bf5c220-a398-483f-9f69-63dadbc888af"
/>

Note: For bottom solid infill, this is not a problem because the minimum
density is 10%.
2026-03-15 23:20:47 +08:00
SoftFever
13c267936a Fix non-bbl printer filament grouping by mapping all filaments/tools to group 0 (#12767)
Makes sure all non-bbl printers go through the same filament reordering
code so custom filament sequence is properly handled, while skipping the
filament grouping part by mapping all filaments to group 0.

This is the same method used by BBL printer to calculate the optimal
filament grouping so should be robust.

Fix #12449
Fix #12766
2026-03-15 23:19:47 +08:00