Skip to content

ENH: Update Preferences UI to split settings to multiple page.#11459

Closed
mpaperno wants to merge 2 commits into
bambulab:masterfrom
mpaperno:np/enh_properties_dialog
Closed

ENH: Update Preferences UI to split settings to multiple page.#11459
mpaperno wants to merge 2 commits into
bambulab:masterfrom
mpaperno:np/enh_properties_dialog

Conversation

@mpaperno

@mpaperno mpaperno commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This is a full re-work of the Preferences dialog.

Properties-General-windows-dark

There is also a lot of code cleanup and refactoring involved, primarily to eliminate a lot of duplication and verbosity. In fact there are negative lines of code in the Preferences class changes, even though I added a lot of line breaks and such for easier reading.

Please see the commit notes for more technical details.

Pages and property sorting

How to organize & sort all the options and what to name the pages and section titles is of course very subjective. I did put thought and time into this, with quite a few iterations. But I'm completely open to suggestions and changes here! What I think is logical may seem chaotic to others. Of course this will evolve over time anyway, but the more sensible it is to start with, the better.

The good news is that it is very easy to re-organize anything as desired. Each individual setting is contained in one block of code (both creation and insertion into the layout). Each "page" can also easily be embedded into another page, w/out needing to move code around.

Navigation style choice

I decided to utilize the existing Tabbook control for the paging and navigation, though this required making it more flexible for styling (it is otherwise used as the pager/nav on Device and Calibration pages). So the first commit in this branch does that (the appearance on Device/Calibration pages is unchanged). This could be re-used again in the shortcuts dialog, for example. The styling is basically copied from that shortcuts dialog, in fact.

At first I did try to use wxListBook and wxTreeBook but the styling options for the navigation buttons were severely limited... I was spending more time fighting the default styles than anything. They just look and act like data lists, not menus. No way to add padding, etc.

I chose the sidebar design vs. horizontal tabs across the top because this will be a lot more flexible. Tabs are quickly limiting horizontally, and scrolling or stacking tabs is just awkward. The navigation sidebar will already scroll vertically if needed, so we're not limited in that regard either.

Modified strings

I did end up changing some label texts (grammar, capitalization, inconsistent line endings)... I'm not sure if this was really a great idea because I realize it invalidates translations. I don't know what BL considers "best practices" in these cases. I'm going to assemble a list of modified strings, and post it here for review. I could then revert those changes in the code and perhaps make them in the English translation file instead. There are also a lot of new strings to translate (page names & tips, new section titles, etc). Please advise on best way forward here.

ADDED: Here is the list of modified strings.
This list only includes changes to strings that were and are still being used in the Preferences UI. Not all the additions and removals (though I have that as well, if it helps). Fuzzy matching would probably cover most of these (if that's being utilized).

Details
- Auto plate type
+ Remember plate type

- Auto-fill previously logged-in accounts.
+ Auto-fill previously logged-in accounts

- Enable gamma correction for the imported obj file
+ Enable gamma correction for imported OBJ files

- Filament Manager
+ Enable Filament Manager

- Improve rendering performance by lod
+ Improve rendering performance by LOD

- Keep liveview when printing.
+ Keep liveview when printing

- Multi-device Management(Take effect after restarting Studio).
+ Multi-device Management

- No warnings when loading 3MF with modified G-codes
+ Warn when loading 3MF with modified G-codes

- Open full screen camera view on active monitor only.
+ Open full screen camera view on active monitor only

- Perform gamma correction on color after importing the obj model.
+ Perform gamma correction on color after importing the OBJ model.

- Remove the restriction on mixed printing of high and low temperature filaments.
+ Remove the restriction on mixed printing of high and low temperature filaments

- Set grabber size for move,rotate,scale tool.
+ Set grabber size for move, rotate, and scale tools.

- Show history on the home page
+ Show MakerWorld history

- Show online staff-picked models on the home page
+ Show online staff-picked models

- Show the step mesh parameter setting dialog.
+ Show the STEP mesh parameter setting dialog

- Support beta version update.
+ Support beta version update

- Take effect after restarting Studio
+ Takes effect after restarting Studio.

Compatibility

Tested on all 3 major OSs -- Win 10 & 11, MacOS 26, Linux... only on 1 Debian-based distro (Manjaro) with Ubuntu-24 build from GitHub CI -- Flatpack not tested. I was pleasantly surprised about how consistent it looks across all those systems though.

Although there's a lot of refactoring, and the Preferences.cpp diff certainly reflects that (sorry!), there really should be no functional changes (except as mentioned in the commit notes). Most of the refactor was just removing literally duplicated code (like creating the same UI element types over and over). Not saying a regression issue is impossible here, but this was all done very carefully and deliberately.

More screenshots here

Windows:
Properties-General-windows-light
Properties-online-windows-dark
Properties-Projects-windows-dark
Properties-Filess-windows-dark
Properties-3Dview-windows-dark

This is from an "internal" build so it's showing the extra options (see below from a release build):
Properties-Advanced-internal-windows-dark

Showing button hover highlight with tooltip:

Properties-General-tooltip-windows-light

MacOS:

Properties-General-macos-dark Properties-Projects-macos-dark Properties-Advanced-macos-dark

Linux (Manjaro Cinnamon dark theme, running Ubuntu-24.04 build from GitHub CI):

Properties-General-linux-dark Properties-Online-linux-dark Properties-3Dview-linux-dark

Example of adding a new page

This change, while overdue, was especially inspired by the conversation in #10234 and how that adds a lot of new options to the already-long list.

So here's what it looks like now in my other development version: Properties-Camera-windows-dark

The "Camera" section currently with one option in the "3D View" page moves here entirely.

Thanks for your consideration!
-Max

mpaperno added 2 commits July 9, 2026 00:42
…flexibility for usability in more UI situations:

* Add more control over button styling, including having no icon, background and border colors, padding, border, and overall sizes;
* Add optional scrolling support for the button list control (`TabButtonsListCtrl`);
* Add option for nav button tool tips;
* Add option for top padding in list control;
* Clean up unused and redundant code in `TabButtonsListCtrl` (eg. `OnPaint()` method was never used);
* Add & enhance error/safety checks in `TabButtonsListCtrl` (eg. proper array bounds checks) while eliminating redundancy with checks by `Tabbook` itself;
* Refactor `TabButton` to eliminate redundancy with features already provided by the base `StaticBox` class (eg. border colors and painting);
* Add `TabButton` selection functionality (`SetSelected()`/`GetSelected()`) so it can draw in its own style based on selection status using existing state handler functionality (avoid further redundancy);
* Allow specifying `TabButton` minimum size and padding per dimension, with fallback to default sizes as per wxWidgets convention;
* `GUI::StateColor`: mark getter methods as `const`.
… sidebar navigation and re-organized items into more sub-categories; Also major refactor for more efficient and safer code, with no redundancies;

Overall changes:
* Use customized `GUI:Tabbook` for paging and navigation;
* Split/move all properties into logical pages and sub-groups by subject;
* Dialog is now resizable, with scroll bars appearing if needed (also in the sidebar nav), and much shorter default size to fit all contents by default w/out scrolling;
* Remembers and restores the last used properties page between uses (until application restart);
* Normalize/centralize many design aspects for consistency and DRY;
* Horizontal rules on sections titles now properly show up in dark mode;
* Remove reams of redundant code and optimize many aspects -- negative LoC while adding functionality and improving readability in many places (eg. line breaks & more separation of content);

Specific property changes:
* Convert all "clear my choice" buttons into direct settings, eg. selecting "Prompt/Always Save/Never Save" when closing project with unsaved changes, or directly en/disabling warnings with a checkbox;
* Reversed language on "no_warn_when_modified_gcodes" property label so the prompt is positive, matching the other settings ("Warn when..." vs. "Don't warn when...");
* When switching LOD setting with unsaved project changes, user is prompted to save only if they accept the LOD change warning prompt, vs. prompting first and then asking to confirm LOD change;
* Remove extraneous "Cancel" button on mixed temperature filament warning prompt & add line break before info link;
* Browsing to set the download folder location now starts from the currently configured path instead of always the default;
* Some labels and tips were updated and new texts were added.
@tonghao-bbl

Copy link
Copy Markdown
Contributor

Hi @mpaperno Thank you again for this great PR. we wanted this for a long time and we just got some time to work on this.
So we have planed this since last sprint, and finally did it just days ago. The QA team is testing on this and everything goes well. I hope you will like the new UI of the preference page. Please let us know if you have any suggestions on the new UI when its shipped.

as said we can not merge this PR. we should have a roadmap for this project.

@mpaperno

Copy link
Copy Markdown
Contributor Author

Hi @tonghao-bbl ,

Well, thanks for letting me know, but... Bummer. I hope you cleaned it all up as well. It was a mess of redundancy. I hope your team can at least get some ideas from my changes. And I just pushed a minor update too.

I hope you will like the new UI of the preference page. Please let us know if you have any suggestions on the new UI when its shipped.

Seems a bit late at that point. Like this PR. :)

we should have a roadmap for this project.

Indeed. Quite frustrating, especially since I had specifically asked if anyone was working on it (in the camera settings PR, which is being ignored after getting encouraged). This is the 2nd time that has happened (that I've asked before doing anything).

-Max

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants