Skip to content

Commit

Permalink
Fix stretched yaru togglables (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jupi007 committed Jan 11, 2023
1 parent 96051ba commit c16a14b
Showing 1 changed file with 32 additions and 27 deletions.
59 changes: 32 additions & 27 deletions lib/src/controls/yaru_togglable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -250,33 +250,38 @@ abstract class YaruTogglableState<S extends YaruTogglable> extends State<S>

return _buildSemantics(
child: _buildEventDetectors(
child: SizedBox(
width: togglableSize.width + activableAreaPadding.horizontal,
height: togglableSize.height + activableAreaPadding.vertical,
child: Padding(
padding: activableAreaPadding,
child: CustomPaint(
size: togglableSize,
painter: painter
..interactive = widget.interactive
..hover = _hover
..focus = _focus
..active = _active
..checked = widget.checked
..oldChecked = _oldChecked
..position = _position
..sizePosition = _sizePosition
..indicatorPosition = _indicatorPosition
..uncheckedColor = uncheckedColor
..uncheckedBorderColor = uncheckedBorderColor
..checkedColor = checkedColor
..checkmarkColor = checkmarkColor
..disabledUncheckedColor = uncheckedDisabledColor
..disabledUncheckedBorderColor = uncheckedDisabledBorderColor
..disabledCheckedColor = checkedDisabledColor
..disabledCheckmarkColor = checkmarkDisabledColor
..hoverIndicatorColor = hoverIndicatorColor
..focusIndicatorColor = focusIndicatorColor,
child: Padding(
padding: activableAreaPadding,
child: SizedBox(
width: togglableSize.width,
height: togglableSize.height,
child: Center(
child: RepaintBoundary(
child: CustomPaint(
size: togglableSize,
painter: painter
..interactive = widget.interactive
..hover = _hover
..focus = _focus
..active = _active
..checked = widget.checked
..oldChecked = _oldChecked
..position = _position
..sizePosition = _sizePosition
..indicatorPosition = _indicatorPosition
..uncheckedColor = uncheckedColor
..uncheckedBorderColor = uncheckedBorderColor
..checkedColor = checkedColor
..checkmarkColor = checkmarkColor
..disabledUncheckedColor = uncheckedDisabledColor
..disabledUncheckedBorderColor =
uncheckedDisabledBorderColor
..disabledCheckedColor = checkedDisabledColor
..disabledCheckmarkColor = checkmarkDisabledColor
..hoverIndicatorColor = hoverIndicatorColor
..focusIndicatorColor = focusIndicatorColor,
),
),
),
),
),
Expand Down

0 comments on commit c16a14b

Please sign in to comment.