Skip to content

Commit

Permalink
Fix #5869 - The button from the toast notification is too small (#5895)
Browse files Browse the repository at this point in the history
* Fix #5869 - The  button from the toast notification is too small

* ButtonToast size change
  • Loading branch information
KrystynaKruchkovska authored and garvankeeley committed Dec 18, 2019
1 parent 5145d0e commit e978760
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Client/Frontend/Browser/ButtonToast.swift
Expand Up @@ -7,7 +7,7 @@ import SnapKit

struct ButtonToastUX {
static let ToastHeight: CGFloat = 55.0
static let ToastPadding: CGFloat = 10.0
static let ToastPadding: CGFloat = 15.0
static let ToastButtonPadding: CGFloat = 10.0
static let ToastDelay = DispatchTimeInterval.milliseconds(900)
static let ToastButtonBorderRadius: CGFloat = 5
Expand Down Expand Up @@ -106,7 +106,8 @@ class ButtonToast: Toast {
button.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(buttonPressed)))

button.snp.makeConstraints { (make) in
make.width.equalTo(button.titleLabel!.intrinsicContentSize.width + 2 * ButtonToastUX.ToastButtonPadding)
make.width.equalTo(button.titleLabel!.intrinsicContentSize.width + 4 * ButtonToastUX.ToastButtonPadding)
make.height.equalTo(button.titleLabel!.intrinsicContentSize.height + 2 * ButtonToastUX.ToastButtonPadding )
}

horizontalStackView.addArrangedSubview(button)
Expand Down

0 comments on commit e978760

Please sign in to comment.