Removed MARGIN, so we have a little space when displaying notification

This commit is contained in:
Robinson 2023-11-25 22:07:53 +01:00
parent c6766052ec
commit 543ba0ec62
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -145,11 +145,10 @@ internal class DesktopNotify(override val notification: Notify) : JWindow(), Not
val gc = ScreenUtil.getMonitorAtLocation(point)?.defaultConfiguration ?: return 0
val screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(gc)
// " - Notify.MARGIN" is required BECAUSE each entry is offset by the margin, and we want the notification to be touching the edge!!
return if (showFromTop) {
screenInsets.top - Notify.MARGIN
screenInsets.top
} else {
-(screenInsets.bottom - Notify.MARGIN)
-(screenInsets.bottom)
}
}