-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Class for RadioGroup & LabeledStaticBox and improvements for Calibration Dialogs, Windows with wxStaticBoxSizer #9797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
at last someone who really understands about gui was able to solve the calibration error. |
thanks still i'm trying to fix main UI elements and is assume 1 passed. icons, margins, colors, components etc.. but UI improved nicely and worth the effort |
also looks like LabeledStaticBox not rendering correctly. i will check when i got time |
should i switch to wxWindow for LabeledStaticBox instead dealing with wxStaticBox. i think border will always be a problem on linux. looks like paint event didnt even used i assume creating a sizer in that wxWindow and using that will get job done
will look like but might require a bit more change on various areas
i assume dc.clear() also cleans other elements except icons on RadioGroup for linux |
What does |
Is there any function like |
last commit should fix problems for RadioGroup What you think about LabeledStaticBox |
Maybe use wxPanel instead as suggested in https://forums.wxwidgets.org/viewtopic.php?t=25978 |
it catches wxEVT_SET_FOCUS and wxEVT_KILL_FOCUS but looks like m_focus_rect not updating, at least we got better results compared to previous one do you this SetDoubleBuffered(true); can cause this or it tries to refresh before defining m_focus_rect . maybe adding a condition will fix that |
switched wxPanel to wxWindow for RadioGroup
|
last commit should fix LabeledStaticBox for macOS |
what a rabbit hole :) LabeledStaticBox RadioGroup what you suggest? i dont want to annoy you for each commit i found this for macOS to edit control margins
|
I'll try doing some debugging on Linux in the next few days. |
I actually think it works well enough on Linux. I'll focus on macOS first. |
Great, events needs some fine tuning on linux for RadioGroup but it completely ignores painting on LabeledStaticBox. i saw some recommends using GTK styling. not sure how to do that |
Hmmmm wait... You didn't use wxpanel as the parent of the new static box. This should already been applied then? |
nope i didnt switched that because it broke combability with OptionGroup.cpp. i assume we have to use wxStaticBox to keep things working otherwise we have to fix new problems. i read ContentViewMargin defaults to (5,5) after creation maybe we have to override it second time here i added required changes to a separate branch because changes makes impossible to revert if we want to https://github.com/yw4z/OrcaSlicer/tree/staticbox-as-window main...yw4z:OrcaSlicer:staticbox-as-window Currently i only corrected parents for Junction Deviation Dialog. other dialogs will not work properly i think we have to change parents of controls automatically when they added to sizer to make OptionGroup work |
I think you could try using wxpanel instead of wxwindow as the parent? |
looks like macOS adding extra spacing inside staticbox to all edges . normally title and contents aligns on left. looks great anyway Problems starts to appear when using LabeledStaticBox(based on wxPanel) on OptionGroup do you think we really need to make that switch because it completely broke controls generated by option group macOS looks ok but i cant comment about linux |
I think current impl looks good enough, since issues on macOS has now been fixed. |
yep thats why i asked. should we exclude paint event from linux |
i can simplify code calibration dialogs with using wxFlexGridSizer for layout. that will remove requirement of calculating text width , simplifies margins and removes unnecessary sizers
with wxFlexGridSizer(row_count, 2, FromDIP(4) , FromDIP(20));
|
I haven't looked at that yet. Will give it a look tonight. |
I don't know why LabeledStaticBox paint event is not fired on Linux. I guess we could leave it there. |
i read some gtk controls not create paint events. i think it draws natively |
I don't think so because the native box will clip its child. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
Updated images with new style from commit 8fff1ca (pr: SoftFever#9797)
Updated images with new style from commit 8fff1ca (pr: SoftFever#9797)
RADIOGROUP CLASS
• Fully featured RadioButton class for hustle free UI creation. just requires a list
m_rbFilamentType = new RadioGroup(this, { _L("PLA"), _L("ABS/ASA"), _L("PETG"), _L("PCTG"), _L("TPU"), _L("PA-CF"), _L("PET-CF"), _L("Custom") }, wxVERTICAL, 2);
• Supports dark mode, keyboard input, hover effects and focus rectangle
• Supports direction for vertical or horizontal orientation
• Supports optional item count limit for row / column. switches to new row / column after given limit reaches depends on choosen direction / orientation
• Supports choosing item with clicking on text
• Matches look between platforms
LABELEDSTATICBOX CLASS
• Adds new LabeledStaticBox class for modernizing wxStaticBoxSizer with to fix dark mode related problems
CALIBRATION DIALOGS
COMMON CHANGES
• Simplifies and matches code format on all calibration dialogs
• Fixes margin and spacing related problems
• Fixes all dark mode problems
• Matches font size
• Parameter boxes > Matches width
• Parameter boxes > Aligns text to left instead center
TEMPERATURE CALIBRATION DIALOG
• No specific changes
Before-After

PRESSURE ADVANCE CALIBRATION DIALOG
• Used horizontal orientation for radio groups
• aligned checkbox with parameter boxes like on sidebar. ant that required so much changes. thats why i removed create_item_checkbox()
Before-After

RETRACTION CALIBRATION DIALOG
• Fixed side text on parameter box for "step: ". previously that used "mm/mm". that was confusing
• Used uppercase for first letter on "Step:" . Not requires new translation
Before-After

INPUT SHAPER FREQUENCY TEST DIALOG
• used single text for X and Y "Start / End" and used parameter boxes alongside like on Printer or Filament settings window. this change requires new translation
• Used lowercase for side text."hz" instead "HZ" . this matches with other parameter boxes
Before-After

INPUT SHAPER DAMP TEST DIALOG
• used single text for "Frequency X / Y" and used parameter boxes alongside like on Printer or Filament settings window. this change requires new translation
• used single text for "Damp Start / End" and used parameter boxes alongside like on Printer or Filament settings window. this change requires new translation
• Used lowercase for side text."hz" instead "HZ" . this matches with other parameter boxes
Before-After

MAX VOLUMETRIC SPEED DIALOG
• Used uppercase for first letter on "Step:" . Not requires new translation
Before-After

VFA TEST DIALOG*
• Used uppercase for first letter on "Step:" . Not requires new translation
Before-After

JUNCTION DEVIATION TEST DIALOG
• No specific changes
Before-After

BED SHAPE DIALOG
Before-After


PHYSICAL PRINTER DIALOG
Before-After


UNSAVED CHANGES DIALOG > FullCompareDialog
Couldnt find how to open this dialog
SAVE PRESET DIALOG
Couldnt find how to open this dialog