Coder Social home page Coder Social logo

Comments (6)

agneszitte avatar agneszitte commented on July 17, 2024 1

@Xiaoy312 Can you try to remove the Shadows property here in the template of the style and set the Shadows only in the visual states please?

https://github.com/unoplatform/Uno.Gallery/blob/4815606be29c9cea97416c7dc72ada03451809b3/Uno.Gallery/Uno.Gallery.Shared/Views/Styles/NeumorphicStyles.xaml#L1588C18-L1588C18

I think there is an issue when the Shadows property is set in the template and needs to be changed in the visual states afterward
But if the Shadows property is not set in the template and only set in the visual states then it is fine

Let's see if the current issue you opened is related to that please

from uno.gallery.

Xiaoy312 avatar Xiaoy312 commented on July 17, 2024

removing default ShadowContainer.Shadows and re-applying it via VisualState.Setters does not work (failed on chip, radio, check)

from uno.gallery.

Xiaoy312 avatar Xiaoy312 commented on July 17, 2024

this issue seems like a resurgence of unoplatform/uno.toolkit.ui#794
but for different platforms, and also 794 is no longer reproducible on latest version (and legacy stable) as of written
([email protected], [email protected])

however, this issue is still reproducible, but can use the same workaround suggested from 794

from uno.gallery.

rafael-rosa-knowcode avatar rafael-rosa-knowcode commented on July 17, 2024

@agneszitte @roubachof
I created a branch (dev/ramr/issue996) in Toolkit.ui that allows you to reproduce the case during Mouser Over, which makes it easier to test and reproduce the error.
Try to add a Breakpoint on the OnSurfacePainted and on the InvalidateCanvasLayoutSize and check the maxBlurRadius variable.

Shadows.on.VisualStates.mp4

The situation occurs due to the visualState event changing the size of the component, in this case becoming larger, and only after the Arrange phase, during the Render phase that Paint is executed and the image is adjusted to the new required image (where there are more BlurRadius).
I believe we will need to validate the size change issue before the Render phase or use the same solution that @Xiaoy312 already used in the workaround, which was to leave the shadows transparent until the new render.

from uno.gallery.

roubachof avatar roubachof commented on July 17, 2024

Will have a look at this one.

from uno.gallery.

Xiaoy312 avatar Xiaoy312 commented on July 17, 2024

I believe we will need to validate the size change issue before the Render phase or use the same solution that @Xiaoy312 already used in the workaround, [which was to leave the shadows transparent until the new render].

thats not what i said or left in the comment.
the issue was caused by switching between shadows that produced different layout (for InvalidateCanvasLayoutSize part)
the workaround was to add a [color=transparent opacity=0] shadow whose blur and spread, so the resulting layout would be the same, while not affecting the final drawing by using an invisible shadow

from uno.gallery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.