mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-28 09:24:15 -04:00
add border padding for notifications
This commit is contained in:
parent
eaf6a7d4c3
commit
03f819dac5
1 changed files with 3 additions and 2 deletions
|
@ -42,6 +42,7 @@ public class Notification extends Overlay<Notification> {
|
||||||
private boolean hasBeenDisplayed;
|
private boolean hasBeenDisplayed;
|
||||||
private boolean autoClose;
|
private boolean autoClose;
|
||||||
private Timer autoCloseTimer;
|
private Timer autoCloseTimer;
|
||||||
|
private static final int BORDER_PADDING = 10;
|
||||||
|
|
||||||
public Notification() {
|
public Notification() {
|
||||||
width = 413; // 320 visible bg because of insets
|
width = 413; // 320 visible bg because of insets
|
||||||
|
@ -205,8 +206,8 @@ public class Notification extends Overlay<Notification> {
|
||||||
Window window = owner.getScene().getWindow();
|
Window window = owner.getScene().getWindow();
|
||||||
double titleBarHeight = window.getHeight() - owner.getScene().getHeight();
|
double titleBarHeight = window.getHeight() - owner.getScene().getHeight();
|
||||||
double shadowInset = 44;
|
double shadowInset = 44;
|
||||||
stage.setX(Math.round(window.getX() + window.getWidth() + shadowInset - stage.getWidth()));
|
stage.setX(Math.round(window.getX() + window.getWidth() + shadowInset - stage.getWidth() - BORDER_PADDING));
|
||||||
stage.setY(Math.round(window.getY() + titleBarHeight - shadowInset));
|
stage.setY(Math.round(window.getY() + titleBarHeight - shadowInset + BORDER_PADDING));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue