Skip to content

Commit

Permalink
fix: Flyout positioning (#1182)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdlukaa authored Feb 7, 2025
2 parents 34a6a25 + 5ffd757 commit f40b86f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/src/controls/flyouts/flyout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ class _FlyoutPositionDelegate extends SingleChildLayoutDelegate {

final horizontalTopY = clampVertical(topY + flyoutSize.height);
final horizontalY = clampVertical(
topY + flyoutSize.height + flyoutSize.height / 4,
targetOffset.dy - targetSize.height / 2 - flyoutSize.height / 2,
);
final horizontalBottomY = clampVertical(bottomY - flyoutSize.height);

Expand Down
4 changes: 2 additions & 2 deletions lib/src/controls/flyouts/teaching_tip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -264,16 +264,16 @@ class TeachingTip extends StatelessWidget {
},
left: switch (flyout.placementMode) {
FlyoutPlacementMode.rightTop ||
FlyoutPlacementMode.rightCenter ||
FlyoutPlacementMode.rightBottom =>
horizontalPadding,
FlyoutPlacementMode.rightCenter => verticalPadding,
_ => 0.0,
},
right: switch (flyout.placementMode) {
FlyoutPlacementMode.leftTop ||
FlyoutPlacementMode.leftCenter ||
FlyoutPlacementMode.leftBottom =>
horizontalPadding,
FlyoutPlacementMode.leftCenter => verticalPadding,
_ => 0.0,
},
),
Expand Down

0 comments on commit f40b86f

Please sign in to comment.