Skip to content

Commit

Permalink
Fixed paddings
Browse files Browse the repository at this point in the history
  • Loading branch information
mitryp committed May 26, 2023
1 parent 05f37a0 commit d873e26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions lib/utils/mistake_popup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,10 @@ class LanguageToolMistakePopup extends StatelessWidget {
const _replacementButtonsSpacing = 10.0;

const padding = 10.0;
const paddingCount = 4;
const paddingSum = padding * paddingCount;

final availableSpace = _calculateAvailableSpace(
context,
paddings: paddingSum,
paddings: defaultPopupVerticalPadding + defaultPopupHorizontalPadding,
);

return Container(
Expand Down
8 changes: 4 additions & 4 deletions lib/utils/popup_overlay_renderer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import 'package:flutter/material.dart';
const defaultPopupWidth = 250.0;

/// defaultHorizontalPadding
const defaultHorizontalPadding = 10.0;
const defaultPopupHorizontalPadding = 10.0;

/// defaultVerticalMargin
const defaultVerticalPadding = 30.0;
const defaultPopupVerticalPadding = 30.0;

/// Renderer used to show popup window overlay
class PopupOverlayRenderer {
Expand Down Expand Up @@ -79,8 +79,8 @@ class PopupOverlayLayoutDelegate extends SingleChildLayoutDelegate {
const PopupOverlayLayoutDelegate(
this.position, {
this.width = defaultPopupWidth,
this.horizontalPadding = defaultHorizontalPadding,
this.verticalPadding = defaultVerticalPadding,
this.horizontalPadding = defaultPopupHorizontalPadding,
this.verticalPadding = defaultPopupVerticalPadding,
});

@override
Expand Down

0 comments on commit d873e26

Please sign in to comment.