Skip to content

Commit

Permalink
Changed resizable table dragger hover color
Browse files Browse the repository at this point in the history
  • Loading branch information
sunarya-thito committed Nov 26, 2024
1 parent ea9d9e3 commit 2351598
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/src/components/layout/table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ class _CellResizerState extends State<_CellResizer> {
final tableData = Data.of<_ResizableTableData>(context);
final widthMode = tableData.cellWidthResizeMode;
final heightMode = tableData.cellHeightResizeMode;
final theme = Theme.of(context);
return Stack(
children: [
// top
Expand Down Expand Up @@ -603,7 +604,8 @@ class _CellResizerState extends State<_CellResizer> {
return Container(
color: hover?.index == row - 1 &&
hover?.direction == Axis.horizontal
? widget.theme?.resizerColor ?? Colors.blue
? widget.theme?.resizerColor ??
theme.colorScheme.primary
: null,
);
},
Expand Down Expand Up @@ -648,7 +650,8 @@ class _CellResizerState extends State<_CellResizer> {
return Container(
color: hover?.index == row + rowSpan - 1 &&
hover?.direction == Axis.horizontal
? widget.theme?.resizerColor ?? Colors.blue
? widget.theme?.resizerColor ??
theme.colorScheme.primary
: null,
);
},
Expand Down Expand Up @@ -691,7 +694,8 @@ class _CellResizerState extends State<_CellResizer> {
return Container(
color: hover?.index == column - 1 &&
hover?.direction == Axis.vertical
? widget.theme?.resizerColor ?? Colors.blue
? widget.theme?.resizerColor ??
theme.colorScheme.primary
: null,
);
},
Expand Down Expand Up @@ -739,7 +743,8 @@ class _CellResizerState extends State<_CellResizer> {
return Container(
color: hover?.index == column + columnSpan - 1 &&
hover?.direction == Axis.vertical
? widget.theme?.resizerColor ?? Colors.blue
? widget.theme?.resizerColor ??
theme.colorScheme.primary
: null,
);
},
Expand Down Expand Up @@ -1381,7 +1386,6 @@ class RenderTableLayout extends RenderBox
bool hitTestChildren(BoxHitTestResult result, {required Offset position}) {
// reverse hit test traversal so that the first child is hit tested last
// important for column and row spans

RenderBox? child = firstChild;
while (child != null) {
final parentData = child.parentData as TableParentData;
Expand Down

0 comments on commit 2351598

Please sign in to comment.