Skip to content

Commit

Permalink
Formatting pass
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmcgrath committed Aug 1, 2023
1 parent 33624e9 commit 8e23e31
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions examples/animation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

use cacao::color::Color;
use cacao::layout::{Layout, LayoutConstraint, LayoutConstraintAnimatorProxy};
use cacao::view::{View, ViewAnimatorProxy, LayerContentsRedrawPolicy};
use cacao::view::{LayerContentsRedrawPolicy, View, ViewAnimatorProxy};

use cacao::appkit::menu::Menu;
use cacao::appkit::window::{Window, WindowConfig, WindowDelegate};
Expand Down Expand Up @@ -104,10 +104,14 @@ impl WindowDelegate for AppWindow {
window.set_title("Animation Example (Use W/A/S/D to change state!)");
window.set_minimum_content_size(300., 300.);

self.blue.set_contents_redraw_policy(LayerContentsRedrawPolicy::OnSetNeedsDisplay);
self.red.set_contents_redraw_policy(LayerContentsRedrawPolicy::OnSetNeedsDisplay);
self.green.set_contents_redraw_policy(LayerContentsRedrawPolicy::OnSetNeedsDisplay);
self.content.set_contents_redraw_policy(LayerContentsRedrawPolicy::OnSetNeedsDisplay);
self.blue
.set_contents_redraw_policy(LayerContentsRedrawPolicy::OnSetNeedsDisplay);
self.red
.set_contents_redraw_policy(LayerContentsRedrawPolicy::OnSetNeedsDisplay);
self.green
.set_contents_redraw_policy(LayerContentsRedrawPolicy::OnSetNeedsDisplay);
self.content
.set_contents_redraw_policy(LayerContentsRedrawPolicy::OnSetNeedsDisplay);

window.set_content_view(&self.content);

Expand Down

0 comments on commit 8e23e31

Please sign in to comment.