Skip to content

Commit

Permalink
YaruLandscapeLayout: use DividerTheme (#283)
Browse files Browse the repository at this point in the history
Use DividerTheme instead of hardcoded color to be aligned with the compact layout.
  • Loading branch information
Jupi007 committed Oct 11, 2022
1 parent a7fe3bd commit d6a01a7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/src/pages/layouts/yaru_landscape_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ class _YaruLandscapeLayoutState extends State<YaruLandscapeLayout> {
);
}

Color get _separatorColor => Colors.black.withOpacity(0.1);

Widget _maybeBuildGlobalMouseRegion(Widget child) {
if (widget.allowLeftPaneResize) {
return MouseRegion(
Expand Down Expand Up @@ -150,10 +148,9 @@ class _YaruLandscapeLayoutState extends State<YaruLandscapeLayout> {
}

Widget _buildVerticalSeparator() {
return VerticalDivider(
return const VerticalDivider(
thickness: 1,
width: 1,
color: _separatorColor,
);
}

Expand Down Expand Up @@ -188,8 +185,9 @@ class _YaruLandscapeLayoutState extends State<YaruLandscapeLayout> {
return Positioned(
child: AnimatedContainer(
duration: _kLeftPaneResizingRegionAnimationDuration,
color:
_isHovering || _isDragging ? _separatorColor : Colors.transparent,
color: _isHovering || _isDragging
? DividerTheme.of(context).color
: Colors.transparent,
child: MouseRegion(
cursor: SystemMouseCursors.resizeColumn,
onEnter: (event) => setState(() {
Expand Down

0 comments on commit d6a01a7

Please sign in to comment.