-
Notifications
You must be signed in to change notification settings - Fork 235
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
Visual issue in round shape #598
Comments
It seems that there are some major flaws with the shape creation on some edge cases like this one, so I'll be reworking it to fix the problem. It fails not only when it doesn't have enough space - border/background/shade shapes are also sometimes inconsistent on large components. |
I've already made a local fix, but I'll need to heavily test it because this change affects every single component as most of them use |
I've somewhat finished with the fix, but it will take a bit longer to wrap all changes that I've been working on locally. It shouldn't take more than a few hours though. Here is the result example: Note that in case you "overshoot" with the round it will still look weird: Although shadow and background will now follow border to death. You can even see that background spreads over different bounds on top three buttons which is correct considering all three shapes basically have different bounds. I thought about maybe limiting round to height/width, but then there are still cases when two rounded corners meet on a side - what should happen then? So I'll leave it as it as for now and see if I will find any good solution for it later. There are also some niche cases which might still have problems even after these changes - specifically with shadow - but I was aware of those even before you've pointed out this bug and I'll be ironing them out later. No one discovered those yet anyway and probably won't due to specifics :) |
- All component descriptors have been updated with complete information about component's `Painter`s - Streamlined all UI implementations to use `PainterSupport` instead of custom code and calls - UI implementations do not own `Painter` instance anymore, those are stored in `JComponent`'s client properties only - Removed some unnecessary method bridges from UI implementations, more will be removed in the future commits for v1.2.12 - Streamlined all `SpecificPainter` implementations to implement `ParameterizedPaint` use `PaintParameters` instead of custom setup methods - AbstractDecorationPainter.java, WebBreadcrumb.java - Replaced old way of retrieving component `Painter` - StyleManager.java - Simplified descriptor methods due to generics not being used Shape [ #598 ] - ShapeUtils.java - Moved to `ui` module since it's used exclusively there and can use some of `ui` module classes - ShapeUtils.java - Replaced old `createRoundedShape` with new methods moved from `WebShape` and adjusted to work correctly on some edge cases - WebShape.java - Now uses new `ShapeUtils` methods for creating all kinds of shapes - ComponentHighlighter.java - Adjusted to use new `ShapeUtils` methods RootPane - WebRootPaneUI.java - Removed unnecessary check from `installWindowDecorations ()` method that caused issues with new `Painter` usage - WebFrame.java, WebDialog.java, WebWindow.java - Changed custom `JRootPane` implementations to use `StyleId.auto` for simplicity Accordion - WebAccordionUI.java - Removed redundant control fields FileChooser - WebFileChooserUI.java - Removed duplicate property check OptionPane - WebOptionPaneUI.java - Simplified and refactored code ButtonPopup - WebButtonPopup.java - Removed as deprecated, unfortunately it won't be replaced with any reworked implementation for now HotkeyLabel - hotkeylabel.xml - Improved dark skin colors DemoApplication - ExamplesFrame.java - Both scroll bars now use extending mode - DemoApplication.java - Added runtime information to status bar General - Refactored all affected classes to make use of `@NotNull` and `@Nullable` annotations - Fixed multiple possible NPEs across the affected classes
I've pushed fix for this issue along with other internal changes. Snapshot v1.2.12 build will be available soon. |
When I tested rounding I found this issue. It seems like shadow can't be rounded more than 10 (pixels probably). I also tried to set shadow's rounding value manually, but it didn't change
With shadow
Without shadow
The text was updated successfully, but these errors were encountered: