From 44256ea2de9b03483cf156c6c3d9a89c18487964 Mon Sep 17 00:00:00 2001 From: Phillip Tennen Date: Mon, 12 Feb 2024 14:07:30 +0000 Subject: [PATCH] [Dock] Update for Bordered API changes --- rust_programs/dock/src/main.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/rust_programs/dock/src/main.rs b/rust_programs/dock/src/main.rs index ee5cad30..40ae01ed 100644 --- a/rust_programs/dock/src/main.rs +++ b/rust_programs/dock/src/main.rs @@ -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) { // TODO(PT): Time this @@ -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 {