diff --git a/app/core/+mag/+app/+manage/ToolbarManager.m b/app/core/+mag/+app/+manage/ToolbarManager.m index 734affc..f65801b 100644 --- a/app/core/+mag/+app/+manage/ToolbarManager.m +++ b/app/core/+mag/+app/+manage/ToolbarManager.m @@ -29,23 +29,29 @@ function instantiate(this, parent) % Create Toolbar. this.Toolbar = uitoolbar(parent); + if isprop(parent, "Theme") + theme = parent.Theme.BaseColorStyle; + else + theme = "light"; + end + % Create MissionPushTool. this.MissionPushTool = uipushtool(this.Toolbar); this.MissionPushTool.Tooltip = "Change mission"; this.MissionPushTool.ClickedCallback = @(~, ~) this.missionPushToolClicked(); - this.MissionPushTool.Icon = fullfile(this.IconsPath, "mission.png"); + this.MissionPushTool.Icon = this.getIconPath("mission", theme); % Create ImportPushTool. this.ImportPushTool = uipushtool(this.Toolbar); this.ImportPushTool.Tooltip = "Import existing analysis"; this.ImportPushTool.ClickedCallback = @(~, ~) this.importPushToolClicked(); - this.ImportPushTool.Icon = fullfile(this.IconsPath, "import.png"); + this.ImportPushTool.Icon = this.getIconPath("import", theme); this.ImportPushTool.Separator = "on"; % Create DebugToggleTool. this.DebugToggleTool = uitoggletool(this.Toolbar); this.DebugToggleTool.Tooltip = "Set break point at last error source"; - this.DebugToggleTool.Icon = fullfile(this.IconsPath, "debug.png"); + this.DebugToggleTool.Icon = this.getIconPath("debug", theme); this.DebugToggleTool.Separator = "on"; this.DebugToggleTool.OffCallback = @(~, ~) this.debugToggleToolOff(); this.DebugToggleTool.OnCallback = @(~, ~) this.debugToggleToolOn(); @@ -54,7 +60,7 @@ function instantiate(this, parent) this.HelpPushTool = uipushtool(this.Toolbar); this.HelpPushTool.Tooltip = "Share debugging information with development"; this.HelpPushTool.ClickedCallback = @(~, ~) this.helpPushToolClicked(); - this.HelpPushTool.Icon = fullfile(this.IconsPath, "help.png"); + this.HelpPushTool.Icon = this.getIconPath("help", theme); end function reset(~) @@ -93,6 +99,10 @@ function modelChangedCallback(~, ~, ~) methods (Access = private) + function iconPath = getIconPath(this, iconName, theme) + iconPath = fullfile(this.IconsPath, compose("%s_%s.png", iconName, theme)); + end + function missionPushToolClicked(this) this.App.selectMission(); end diff --git a/app/icons/debug_dark.png b/app/icons/debug_dark.png new file mode 100644 index 0000000..4181907 Binary files /dev/null and b/app/icons/debug_dark.png differ diff --git a/app/icons/debug.png b/app/icons/debug_light.png similarity index 100% rename from app/icons/debug.png rename to app/icons/debug_light.png diff --git a/app/icons/help_dark.png b/app/icons/help_dark.png new file mode 100644 index 0000000..1ae09af Binary files /dev/null and b/app/icons/help_dark.png differ diff --git a/app/icons/help.png b/app/icons/help_light.png similarity index 100% rename from app/icons/help.png rename to app/icons/help_light.png diff --git a/app/icons/import_dark.png b/app/icons/import_dark.png new file mode 100644 index 0000000..3e37116 Binary files /dev/null and b/app/icons/import_dark.png differ diff --git a/app/icons/import.png b/app/icons/import_light.png similarity index 100% rename from app/icons/import.png rename to app/icons/import_light.png diff --git a/app/icons/mission_dark.png b/app/icons/mission_dark.png new file mode 100644 index 0000000..70c4ff6 Binary files /dev/null and b/app/icons/mission_dark.png differ diff --git a/app/icons/mission.png b/app/icons/mission_light.png similarity index 100% rename from app/icons/mission.png rename to app/icons/mission_light.png diff --git a/resources/release-notes.md b/resources/release-notes.md index a760f61..3ced184 100644 --- a/resources/release-notes.md +++ b/resources/release-notes.md @@ -1,6 +1,6 @@ # App -- Add support for dark mode in mission selection background +- Add support for dark mode in toolbar icons and mission selection background - Add checkbox in IMAP AT/SFT visualization options to show spectrograms - Reduce duplication in definition of supported view-controllers for each mission - Disable toolbar when selecting a mission