Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
fix clippy suggestions
  • Loading branch information
xarvic committed Jan 21, 2023
1 parent a0f7621 commit 9d446b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion druid/examples/viewport_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
// On Windows platform, don't show a console when opening the app.
#![windows_subsystem = "windows"]

use druid::im::Vector;
use druid::widget::prelude::*;
use druid::widget::{Button, Controller, Flex, Label, List, Side, TextBox, ViewportHeader};
use druid::{
AppLauncher, Color, Data, Insets, Lens, LocalizedString, RoundedRectRadii, Selector, WidgetExt,
WindowDesc,
};
use im::Vector;
use std::sync::Arc;

#[derive(Clone, Data, Lens)]
Expand Down
2 changes: 1 addition & 1 deletion druid/src/widget/viewport_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl ViewportHeaderConfig {
let axis = self.header_side.axis();
let max = axis.major(self.content_size) - self.minimum_visible();

self.header_side.from_inset(insets).max(0.0).min(max)
self.header_side.from_inset(insets).clamp(0.0, max)
}

/// The amount of pixels the viewport of the content gets cropped by the header.
Expand Down

0 comments on commit 9d446b2

Please sign in to comment.