Skip to content

Commit

Permalink
Fix notifications that overlap task bar (#8775)
Browse files Browse the repository at this point in the history
* Fix notifications that overlap task bar by adding threshold

* Fix notifications that overlap bottom task bar by setting window owner

* Update fixes from using dependancy injection, localize language of notification title of threshold

* Update collapsed notification and add keys into l10n file

* Work on text

* Adjut text

* checkstyle and l10n

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>
  • Loading branch information
3 people authored May 15, 2022
1 parent 6dc4646 commit c38d18b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/main/java/org/jabref/gui/JabRefDialogService.java
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,18 @@ public void notify(String message) {

DefaultTaskExecutor.runInJavaFXThread(() -> {
Notifications.create()
.text(message)
.position(Pos.BOTTOM_CENTER)
.hideAfter(TOAST_MESSAGE_DISPLAY_TIME)
.hideCloseButton()
.show();
.text(message)
.position(Pos.BOTTOM_CENTER)
.hideAfter(TOAST_MESSAGE_DISPLAY_TIME)
.owner(mainWindow)
.threshold(5,
Notifications.create()
.title(Localization.lang("Last notification"))
.text(
"(" + Localization.lang("Check the event log to see all notifications") + ")"
+ "\n\n" + message))
.hideCloseButton()
.show();
});
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,8 @@ Issue\ report\ successful=Issue report successful
Your\ issue\ was\ reported\ in\ your\ browser.=Your issue was reported in your browser.
The\ log\ and\ exception\ information\ was\ copied\ to\ your\ clipboard.=The log and exception information was copied to your clipboard.
Please\ paste\ this\ information\ (with\ Ctrl+V)\ in\ the\ issue\ description.=Please paste this information (with Ctrl+V) in the issue description.
Last\ notification=Last notification
Check\ the\ event\ log\ to\ see\ all\ notifications=Check the event log to see all notifications
Host=Host
Port=Port
Expand Down

0 comments on commit c38d18b

Please sign in to comment.