Skip to content

Commit

Permalink
Small Inspector Tweaks (#6006)
Browse files Browse the repository at this point in the history
- Modified layout of solid background layer row to fit the inspector
better.
- Changed alpha label to the Greek character and removed the increment
controls.
- Use the 12x12 minus icon and fix the column size for it to 12px so
that it aligns better.
  • Loading branch information
seanparsons authored Jun 20, 2024
1 parent edc6e47 commit a120fef
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const SolidBackgroundLayer = React.memo<SolidBackgroundLayerProps>((props
tall
alignItems='start'
padded={false}
variant='<--------auto-------->|--45px--|'
variant='<-------1fr------>|----80px----|'
>
<StringBackgroundColorControl
id={`background-layer-gradient-${props.index}`}
Expand All @@ -162,12 +162,13 @@ export const SolidBackgroundLayer = React.memo<SolidBackgroundLayerProps>((props
onTransientSubmitValue={onAlphaTransientSubmitValue}
onForcedSubmitValue={onAlphaSubmitValue}
controlStatus={props.controlStatus}
DEPRECATED_labelBelow='alpha'
DEPRECATED_labelBelow={<span style={{ fontSize: 12 }}>α</span>}
minimum={0}
maximum={1}
stepSize={0.01}
inputProps={{ onMouseDown: stopPropagation }}
defaultUnitToHide={null}
incrementControls={false}
/>
</UIGridRow>
</UIGridRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const TextShadowItem = React.memo<TextShadowItemProps>((props) => {
<PropertyRow
key={props.index}
style={{
gridTemplateColumns: '12px 28px repeat(3, 1fr) 20px',
gridTemplateColumns: '12px 28px repeat(3, 1fr) 12px',
gridColumnGap: 8,
}}
>
Expand Down Expand Up @@ -244,8 +244,8 @@ const TextShadowItem = React.memo<TextShadowItemProps>((props) => {
numberType='Length'
defaultUnitToHide={'px'}
/>
<SquareButton highlight onMouseDown={removeShadow} style={{ marginTop: 1 }}>
<Icons.Minus />
<SquareButton highlight onMouseDown={removeShadow} style={{ marginTop: 1, width: 12 }}>
<Icons.Minus width={12} height={12} />
</SquareButton>
</PropertyRow>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ const SingleLengthItem = React.memo<SingleLengthItemProps>((props) => {
<PropertyRow
key={props.index}
style={{
gridTemplateColumns: '12px 1fr 46px 20px',
gridTemplateColumns: '12px 1fr 46px 12px',
gridColumnGap: 8,
}}
>
Expand Down Expand Up @@ -360,8 +360,8 @@ const SingleLengthItem = React.memo<SingleLengthItemProps>((props) => {
controlStatus={props.controlStatus}
defaultUnitToHide={controlMetadata.defaultUnitToHide}
/>
<SquareButton highlight onMouseDown={removeTransformItem} style={{ marginTop: 1 }}>
<Icn category='semantic' type='minus' color='secondary' width={16} height={16} />
<SquareButton highlight onMouseDown={removeTransformItem} style={{ marginTop: 1, width: 12 }}>
<Icons.Minus width={12} height={12} />
</SquareButton>
</PropertyRow>
)
Expand Down Expand Up @@ -443,7 +443,7 @@ const DoubleLengthItem = React.memo<DoubleLengthItemProps>((props) => {
<PropertyRow
key={props.index}
style={{
gridTemplateColumns: '12px 1fr 46px 46px 20px',
gridTemplateColumns: '12px 1fr 46px 46px 12px',
gridColumnGap: 8,
}}
>
Expand Down Expand Up @@ -510,8 +510,8 @@ const DoubleLengthItem = React.memo<DoubleLengthItemProps>((props) => {
controlStatus={props.controlStatus}
defaultUnitToHide={controlMetadata.defaultUnitToHide}
/>
<SquareButton highlight onMouseDown={removeTransformItem} style={{ marginTop: 1 }}>
<Icn category='semantic' type='minus' color='secondary' width={16} height={16} />
<SquareButton highlight onMouseDown={removeTransformItem} style={{ marginTop: 1, width: 12 }}>
<Icons.Minus width={12} height={12} />
</SquareButton>
</PropertyRow>
)
Expand Down

0 comments on commit a120fef

Please sign in to comment.