Skip to content

Commit

Permalink
[Dock] Update for Bordered API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
codyd51 committed Feb 12, 2024
1 parent 66143a9 commit 44256ea
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions rust_programs/dock/src/main.rs
Expand Up @@ -309,6 +309,14 @@ fn lerp(a: f64, b: f64, factor: f64) -> f64 {
}

impl Bordered for GradientView {
fn outer_border_insets(&self) -> RectInsets {
RectInsets::new(0, 1, 0, 0)
}

fn inner_border_insets(&self) -> RectInsets {
RectInsets::new(0, 1, 0, 0)
}

fn draw_inner_content(&self, outer_frame: Rect, onto: &mut Box<dyn LikeLayerSlice>) {
// TODO(PT): Time this

Expand Down Expand Up @@ -355,10 +363,6 @@ impl Bordered for GradientView {

self.view.draw_subviews();
}

fn border_insets(&self) -> RectInsets {
RectInsets::new(0, 2, 0, 0)
}
}

impl UIElement for GradientView {
Expand Down

0 comments on commit 44256ea

Please sign in to comment.