Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom background color of widget should be set upon reloading app in AppDesigner #72

Open
slootsjj opened this issue Apr 19, 2024 · 0 comments · May be fixed by #73
Open

Custom background color of widget should be set upon reloading app in AppDesigner #72

slootsjj opened this issue Apr 19, 2024 · 0 comments · May be fixed by #73

Comments

@slootsjj
Copy link
Contributor

Recreate issue
Create app in AppDesigner
Add widget to app
Change background color to blue
Save and close app.
Load app again in AppDesigner.
--> Background of widget appears as default color.

Proposed fix
Listen to 'PostUpdate' event in BackgroundColorable mixin class to ensure a widget's custom background color appears in AppDesinger upon reloading the app. Changing the background color of the widget will trigger the widget's update method as well.

function listenForBackgroundChange(obj)

    % Establish Listener for Background Color Change
    if isempty(obj.BackgroundColorListener)
        obj.BackgroundColorListener = ...
            addlistener(obj,'PostUpdate',...
            @(h,e)obj.updateBackgroundColorableComponents());
    end

end %function
@slootsjj slootsjj linked a pull request Apr 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant