Skip to content

Commit

Permalink
Added visible/hidden images
Browse files Browse the repository at this point in the history
Issue: #4473
  • Loading branch information
buchen committed Jan 17, 2025
1 parent 3554035 commit f5406ba
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
Binary file added name.abuchen.portfolio.ui/icons/hidden.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added name.abuchen.portfolio.ui/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added name.abuchen.portfolio.ui/icons/visible.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added name.abuchen.portfolio.ui/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ public enum Images
RED_ARROW("red_arrow.png"), //$NON-NLS-1$
GREEN_ARROW("green_arrow.png"), //$NON-NLS-1$

VISIBLE("visible.png"), //$NON-NLS-1$
HIDDEN("hidden.png"), //$NON-NLS-1$

// 3rd party logos

POEDITOR_LOGO("poeditor-logo.png"), //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,13 +704,12 @@ public void addButtons(ToolBarManager toolBar)
{
chart.getChartToolsManager().addButtons(toolBar);

SimpleAction actionHideMarkings = new SimpleAction(null, IAction.AS_CHECK_BOX, Messages.LabelHideMarkings, a -> {
SimpleAction actionHideMarkings = new SimpleAction(Messages.LabelHideMarkings, a -> {
this.showMarkings = !this.showMarkings;
a.setChecked(this.showMarkings);
a.setImageDescriptor(this.showMarkings ? Images.HIDDEN.descriptor() : Images.VISIBLE.descriptor());
updateChart();
});
actionHideMarkings.setImageDescriptor(Images.NEW_TRANSACTION.descriptor());
actionHideMarkings.setChecked(this.showMarkings);
actionHideMarkings.setImageDescriptor(Images.HIDDEN.descriptor());
toolBar.add(actionHideMarkings);

toolBar.add(new Separator());
Expand Down

0 comments on commit f5406ba

Please sign in to comment.