Skip to content

Commit

Permalink
Merge pull request #285 from StillGreen-san/fix_number_input_padding_…
Browse files Browse the repository at this point in the history
…reducing_max_width

fix max width being reduced by padding in number_input
  • Loading branch information
genusistimelord authored Sep 3, 2024
2 parents 5482588 + 9acbeb7 commit 8c0f4c1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/widget/number_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,7 @@ where

fn layout(&self, tree: &mut Tree, renderer: &Renderer, limits: &Limits) -> Node {
let num_size = self.size();
let limits = limits
.width(num_size.width)
.height(Length::Shrink)
.shrink(self.padding);
let limits = limits.width(num_size.width).height(Length::Shrink);
let content = self
.content
.layout(&mut tree.children[0], renderer, &limits);
Expand Down

0 comments on commit 8c0f4c1

Please sign in to comment.