-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue 5152, tooltip and icon added to group cell #5191
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ class MainTableColumnFactory { | |
private final CellFactory cellFactory; | ||
private final UndoManager undoManager; | ||
private final DialogService dialogService; | ||
|
||
|
||
public MainTableColumnFactory(BibDatabaseContext database, ColumnPreferences preferences, ExternalFileTypes externalFileTypes, UndoManager undoManager, DialogService dialogService) { | ||
this.database = Objects.requireNonNull(database); | ||
|
@@ -77,6 +77,8 @@ public MainTableColumnFactory(BibDatabaseContext database, ColumnPreferences pre | |
} | ||
|
||
public List<TableColumn<BibEntryTableViewModel, ?>> createColumns() { | ||
|
||
|
||
List<TableColumn<BibEntryTableViewModel, ?>> columns = new ArrayList<>(); | ||
|
||
columns.add(createGroupColumn()); | ||
|
@@ -116,8 +118,11 @@ public MainTableColumnFactory(BibDatabaseContext database, ColumnPreferences pre | |
|
||
private TableColumn<BibEntryTableViewModel, ?> createGroupColumn() { | ||
TableColumn<BibEntryTableViewModel, List<AbstractGroup>> column = new TableColumn<>(); | ||
column.getStyleClass().add(GROUP_COLUMN); | ||
setExactWidth(column, 20); | ||
Node headerGraphic = IconTheme.JabRefIcons.DEFAULT_GROUP_ICON.getGraphicNode(); | ||
Tooltip.install(headerGraphic, new Tooltip(Localization.lang("Group color"))); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you need to put the key "Group color" into the english language resource file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cheers for your feedback. I just wonder why codecov/project test failed on the second attempt. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codecov is also a mystery to me. It somehow displays the test coverage of the code, but I have no clue how it calculates. I had an PR where i just changed one line and the coverage changed for about 0.07% from fail to pass. But I think it can be ignored for the most gui-stuff. At least the core developers did not bring it up yet. 😁 |
||
column.setGraphic(headerGraphic); | ||
column.getStyleClass().add(ICON_COLUMN); | ||
setExactWidth(column, GUIGlobals.WIDTH_ICON_COL); | ||
column.setCellValueFactory(cellData -> cellData.getValue().getMatchedGroups(database)); | ||
new ValueTableCellFactory<BibEntryTableViewModel, List<AbstractGroup>>() | ||
.withGraphic(this::createGroupColorRegion) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkstyle is failing because of one empty line after another