Move merit and stake column to the right

For better usability I moved the column next to the result.
This commit is contained in:
chimp1984 2020-08-06 11:42:57 -05:00
parent 0931792fd4
commit bc0284ba0b
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3

View File

@ -285,29 +285,6 @@ public class ProposalResultsWindow extends TabbedOverlay<ProposalResultsWindow>
}); });
votesTableView.getColumns().add(column); votesTableView.getColumns().add(column);
column = new AutoTooltipTableColumn<>(Res.get("dao.results.votes.table.header.stakeAndMerit"));
column.setSortable(false);
column.setMinWidth(100);
column.setCellValueFactory((item) -> new ReadOnlyObjectWrapper<>(item.getValue()));
column.setCellFactory(
new Callback<>() {
@Override
public TableCell<VoteListItem, VoteListItem> call(
TableColumn<VoteListItem, VoteListItem> column) {
return new TableCell<>() {
@Override
public void updateItem(final VoteListItem item, boolean empty) {
super.updateItem(item, empty);
if (item != null)
setText(item.getMeritAndStake());
else
setText("");
}
};
}
});
votesTableView.getColumns().add(column);
column = new AutoTooltipTableColumn<>(Res.get("dao.results.votes.table.header.merit")); column = new AutoTooltipTableColumn<>(Res.get("dao.results.votes.table.header.merit"));
column.setSortable(false); column.setSortable(false);
column.setMinWidth(100); column.setMinWidth(100);
@ -354,6 +331,29 @@ public class ProposalResultsWindow extends TabbedOverlay<ProposalResultsWindow>
}); });
votesTableView.getColumns().add(column); votesTableView.getColumns().add(column);
column = new AutoTooltipTableColumn<>(Res.get("dao.results.votes.table.header.stakeAndMerit"));
column.setSortable(false);
column.setMinWidth(100);
column.setCellValueFactory((item) -> new ReadOnlyObjectWrapper<>(item.getValue()));
column.setCellFactory(
new Callback<>() {
@Override
public TableCell<VoteListItem, VoteListItem> call(
TableColumn<VoteListItem, VoteListItem> column) {
return new TableCell<>() {
@Override
public void updateItem(final VoteListItem item, boolean empty) {
super.updateItem(item, empty);
if (item != null)
setText(item.getMeritAndStake());
else
setText("");
}
};
}
});
votesTableView.getColumns().add(column);
column = new AutoTooltipTableColumn<>(Res.get("dao.results.votes.table.header.vote")); column = new AutoTooltipTableColumn<>(Res.get("dao.results.votes.table.header.vote"));
column.setSortable(false); column.setSortable(false);
column.setMinWidth(50); column.setMinWidth(50);