Skip to content

Commit

Permalink
[prmr#538] Add dark mode menu item and icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkcoding7 committed May 6, 2024
1 parent 88de08a commit a002793
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Binary file added icons/16x16/dark-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/org/jetuml/JetUML.properties
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ view.verbose_tooltips.mnemonic=T
view.autoedit_node.text=Auto Edit Node
view.autoedit_node.mnemonic=A
view.autoedit_node.icon=16x16/document-edit.png
view.dark_mode.text=Dark Mode
view.dark_mode.mnemonic=A
view.dark_mode.icon=16x16/dark-mode.png
view.diagram_size.text=Set Diagram Size
view.diagram_size.mnemonic=D
view.diagram_size.icon=16x16/zoom-fit-width.png
Expand Down
2 changes: 1 addition & 1 deletion src/org/jetuml/application/UserPreferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public final class UserPreferences
public enum BooleanPreference
{
showGrid(true), showToolHints(false), autoEditNode(false), verboseToolTips(false),
showTips(true);
showTips(true), darkMode(false);

private boolean aDefault;

Expand Down
5 changes: 5 additions & 0 deletions src/org/jetuml/gui/EditorFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ private void createViewMenu(MenuBar pMenuBar)
UserPreferences.instance().getBoolean(BooleanPreference.autoEditNode),
event -> UserPreferences.instance().setBoolean(BooleanPreference.autoEditNode,
((CheckMenuItem) event.getSource()).isSelected())),

factory.createCheckMenuItem("view.dark_mode", false,
UserPreferences.instance().getBoolean(BooleanPreference.darkMode),
event -> UserPreferences.instance().setBoolean(BooleanPreference.darkMode,
((CheckMenuItem) event.getSource()).isSelected())),

factory.createMenuItem("view.diagram_size", false, event -> new DiagramSizeDialog(aMainStage).show()),
factory.createMenuItem("view.font", false, event -> new FontDialog(aMainStage).show()),
Expand Down

0 comments on commit a002793

Please sign in to comment.