Add native CSS support for radial gradients in RoundRectBorder#4332
Conversation
Enabled `RoundRectBorder` to utilize native Codename One gradient support when the CSS background is a valid CN1 gradient (e.g. `radial-gradient`). Fixed parsing logic for `radial-gradient` position coordinates to correctly map to CN1 relative X/Y values (removing inverted coordinate calculation). Ensured safety when casting style properties in `canBeAchievedWithRoundRectBorder`.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This change enables native CSS support for radial gradients, specifically targeting cases like
radial-gradient(circle at left, ...), allowing them to be rendered natively byRoundRectBorderinstead of falling back to image generation via browser screenshots.Modifications:
CodenameOneDesigner/src/com/codename1/designer/css/CSSTheme.java:canBeAchievedWithRoundRectBorderto allow gradients if they are valid native CN1 gradients.instanceof ScaledUnitbefore casting background property.CN1Gradient.parseRadialGradientto maprelX/relYdirectly togradientX/gradientYinstead of inverting them (1-relX), fixing the positioning of gradients (e.g. "at left").PR created automatically by Jules for task 4910613380527917041 started by @shai-almog