Skip to content

Commit

Permalink
feat(ui/multiple_select): Improve logic for determining split directi…
Browse files Browse the repository at this point in the history
…on in multi-select popup
  • Loading branch information
sarub0b0 committed Jul 2, 2023
1 parent 06b2c03 commit 4b44bb3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ui/widget/complex/multiple_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,11 @@ impl<'a> SelectForm<'a> {
}

fn update_layout(&mut self, chunk: Rect) {
if 65 < chunk.width {
self.direction = Direction::Horizontal;
} else {
// 等幅フォントのとき 幅:高さ = 1:2
if chunk.width < chunk.height * 4 {
self.direction = Direction::Vertical;
} else {
self.direction = Direction::Horizontal;
};
}

Expand Down

0 comments on commit 4b44bb3

Please sign in to comment.