-
Notifications
You must be signed in to change notification settings - Fork 26
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
[WinUI/ShadowContainer] ShadowContainer content not stretching by default #708 #716
[WinUI/ShadowContainer] ShadowContainer content not stretching by default #708 #716
Conversation
ea73f9d
to
c69a44a
Compare
Careful to not look the ShadowContainer as a classic layout. It's supposed to be shadows for 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.
Can you add some tests for these changes please @rafael-rosa-knowcode ?
@roubachof |
Using a
structure seems hacky to me Since the grid clips the shadows, to make it work, it means the grid should have the same size as the shadows whereas it should have the same size as its child. Maybe a possible structure could be then:
This way the grid will have the same size of its child but the shadows will not be clipped. |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
4534032
to
2620370
Compare
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
2 similar comments
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
@rafael-rosa-knowcode Can I have a update on why you decided not to implement the suggested implementation, and went with Grid root layout. |
@roubachof With regard to the space of shadows and Container, I was unable to resolve the issue of spacing exceeding the grid margin. So i add a margin on the conteiner (panel) to the shadows use. So I would need guidance on that. |
@rafael-rosa-knowcode LMK if you need help with the merge conflict. I can unify the changes from both sides. |
9f30290
to
bcc22d2
Compare
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
1 similar comment
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
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.
Two nested grids seemed to be used instead of one.
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
1 similar comment
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
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.
just two small comments about the code
samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.Shared/Converters/HexToColorConverter.cs
Outdated
Show resolved
Hide resolved
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
1 similar comment
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
3 similar comments
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
|
||
<utu:Shadow x:Key="DefaultShadow" | ||
BlurRadius="20" | ||
OffsetX="10" | ||
OffsetY="10" | ||
Opacity="0.5" | ||
Spread="0" | ||
Color="{StaticResource UnoColor}" /> | ||
Color="{StaticResource UnoPink}" /> |
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.
Is the pink a marker color for tests? or just debugging colors?
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.
can you comment here to confirm? cause i think this is just for debugging, and shouldnt be here
} | ||
|
||
private void OnShadowSizeChanged() | ||
{ | ||
if (_currentContent != null && _currentContent.ActualWidth > 0 && _currentContent.ActualHeight > 0) | ||
{ | ||
UpdateCanvasSize(_currentContent.ActualWidth, _currentContent.ActualHeight, Shadows); | ||
InvalidateFromShadowPropertyChange(); | ||
this.GetDispatcherCompat().Schedule(() => UpdateCanvasSize(Shadows)); |
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.
Won't this cause two schedules? One from the UpdateShadows
call, and one here?
25668b4
to
a0cf8d7
Compare
Co-Authored-By: Pedro Jesus <pedrojesus.cefet@gmail.com> Co-Authored-By: Agnès ZITTE <16295702+agneszitte@users.noreply.github.com>
a0cf8d7
to
7d42a8c
Compare
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@Mergifyio backport legacy/3x release/stable/3.1 |
✅ Backports have been created
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-716.eastus2.azurestaticapps.net |
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.
looks about right, minus the code alignment
but we will take a blind eye that for now
GitHub Issue (If applicable): closes #708
PR Type
What kind of change does this PR introduce?
What is the current behavior?
ShadowContainer content not stretching by default
What is the new behavior?
ShadowContainer content should stretch by default to allow controls inside to properly stretch also if needed
NeumorphismHollow
![image](https://private-user-images.githubusercontent.com/116665025/259895355-e35aafac-e2e4-4d71-8fef-367ea3f584ea.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3OTQxMjEsIm5iZiI6MTcyNDc5MzgyMSwicGF0aCI6Ii8xMTY2NjUwMjUvMjU5ODk1MzU1LW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AwJlgtQW16LVNpZ25hdHVyZT0wNmRjMjM1MGIwOGY1NmU0NGFhM2EyNjMyN2U5YmNhMDM2M2FiMWY2ZTJmZDc4MjdiNzE4YzgyMDg3NmE2NzRiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.gAIOvbC5vngI9ZQLcXmRk-BGrFxiiKBOhKi5kqhIjXM)
PR Checklist
Please check if your PR fulfills the following requirements:
Other information
Internal Issue (If applicable):