Uno.Themes icon indicating copy to clipboard operation
Uno.Themes copied to clipboard

[Bug] FAB "natural" dimensions is not correct, compared to Figma

Open carldebilly opened this issue 3 years ago • 9 comments

Steps to reproduce

  1. Add a FAB to a frame in figma, leave its dimensions to "Hug". Its natural dimension is 56x56
  2. Generate a preview in the Uno Plugin
  3. Observe the dimension took by the control is 64x64

Image

carldebilly avatar Jan 10 '23 16:01 carldebilly

Also, when changing dimensions:

<Button Margin="10" VerticalAlignment="Center" HorizontalAlignment="Center" Width="145" Height="134" Style="{StaticResource FabStyle}">    <um:ControlExtensions.Icon>      <PathIcon Data="{StaticResource Icon_Add}" />    </um:ControlExtensions.Icon>  </Button>

image

SOLVED!!!

iurycarlos avatar Feb 15 '23 12:02 iurycarlos

Now it is better, however, the shadow / light direction is different:

Image

iurycarlos avatar May 25 '23 18:05 iurycarlos

@NVLudwig @kazo0

What do you think?

iurycarlos avatar May 25 '23 18:05 iurycarlos

? Sorry I don't understand ? What is the final measurement and is it the same?

NVLudwig avatar May 25 '23 20:05 NVLudwig

@NVLudwig Iury is saying the direction of shadow cast is different between:

  • figma: // direction: straight down image
  • and, the preview result (uno.material implementation): // direction: diagonal bottom-right image

asking which is correct?

Xiaoy312 avatar May 25 '23 22:05 Xiaoy312

Exactly :) ! Thanks Xiao!

But Ludwig is seeing another considerable issue (which i wasn't mentioning):

Having shadows in our controls changes the "position" of them in relation to their parents. We can see the button is not centered in the Frame 78 as we expect it to be, based on Figma document. This happens everywhere. But if i`m not wrong it was already discussed in Themes/Toolkit project.

iurycarlos avatar May 26 '23 10:05 iurycarlos

Ah Sorry I assumed the Plugin was taking the directions from the Figma file itself instead of a hard coded reference so the question made no sense to me, so I scrolled up and saw the issue was about the Size...

Anyways the answer is "straight down" image Elevation level 3 except when pressed Level 1

NVLudwig avatar May 26 '23 13:05 NVLudwig

The fab buttons are the correct size. A simple way to see that is that a corner radius of 28 will make the default fab button with this icon perfectly round, and if you compare it to another control of the same size, the control does take 56 points of space. The problem is that the shadow is part of the dimensions taken when in .net, while it's excluded in the figma file. I'm not sure if there's anything we can do about that. @kazo0 @carldebilly

Marc-Antoine-Soucy avatar Dec 01 '23 16:12 Marc-Antoine-Soucy

image

Marc-Antoine-Soucy avatar Dec 01 '23 16:12 Marc-Antoine-Soucy