Skip to content

Commit 35aa5a1

Browse files
author
Martin Plieske
committed
added tooltip to Project Label
1 parent 3fadd68 commit 35aa5a1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/de/doubleslash/keeptime/view/ProjectsListViewController.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import javafx.scene.control.Spinner;
4141
import javafx.scene.control.SpinnerValueFactory.IntegerSpinnerValueFactory;
4242
import javafx.scene.control.TextField;
43+
import javafx.scene.control.Tooltip;
4344
import javafx.scene.effect.Bloom;
4445
import javafx.scene.input.MouseButton;
4546
import javafx.scene.layout.GridPane;
@@ -374,6 +375,10 @@ protected void updateItem(final Project item, final boolean empty) {
374375
if (item == null || empty) {
375376
setGraphic(null);
376377
} else {
378+
LOG.debug("Adding tooltip to Project Label.");
379+
final Pane pane = (Pane) projectSelectionNodeMap.get(item);
380+
final Label projectNameLabel = (Label) pane.getChildren().get(0);
381+
projectNameLabel.setTooltip(new Tooltip(item.getName()));
377382
LOG.trace("Item: '{}' -> '{}'", item.getName(), projectSelectionNodeMap.get(item));
378383
setGraphic(projectSelectionNodeMap.get(item));
379384
}

0 commit comments

Comments
 (0)