We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80eb24a commit ef780b4Copy full SHA for ef780b4
code/launchMVCApp.m
@@ -13,9 +13,6 @@
13
% Rename the figure.
14
f.Name = "Small MVC App";
15
16
-% Respond to theme changes.
17
-f.ThemeChangedFcn = @onThemeChanged;
18
-
19
% Create the layout.
20
g = uigridlayout( ...
21
"Parent", f, ...
@@ -39,7 +36,14 @@
39
36
"Parent", tb, ...
40
37
"Tooltip", "Reset the data", ...
41
38
"ClickedCallback", @onReset );
42
-onThemeChanged()
+
+% Respond to theme changes.
+if isprop( f, "Theme" ) && ~isempty( f.Theme )
+ f.ThemeChangedFcn = @onThemeChanged;
43
+ onThemeChanged()
44
+else
45
+ resetButton.Icon = iconLight;
46
+end % if
47
48
function onReset( ~, ~ )
49
%ONRESET Callback function for the toolbar reset button.
0 commit comments