[button] Remove minimum button width
This commit is contained in:
parent
8b9d58d753
commit
b0d0d5dd55
2 changed files with 2 additions and 1 deletions
|
@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
### Changed 🔧
|
### Changed 🔧
|
||||||
|
|
||||||
* Changed default font to [Ubuntu-Light](https://fonts.google.com/specimen/Ubuntu).
|
* Changed default font to [Ubuntu-Light](https://fonts.google.com/specimen/Ubuntu).
|
||||||
|
* Remove minimum button width
|
||||||
* Refactored `egui::Layout` substantially, changing its interface.
|
* Refactored `egui::Layout` substantially, changing its interface.
|
||||||
|
|
||||||
### Removed 🔥
|
### Removed 🔥
|
||||||
|
|
|
@ -366,7 +366,7 @@ impl Widget for Button {
|
||||||
let galley = font.layout_multiline(text, ui.available_width());
|
let galley = font.layout_multiline(text, ui.available_width());
|
||||||
let mut desired_size = galley.size + 2.0 * button_padding;
|
let mut desired_size = galley.size + 2.0 * button_padding;
|
||||||
if !small {
|
if !small {
|
||||||
desired_size = desired_size.at_least(ui.style().spacing.interact_size);
|
desired_size.y = desired_size.y.at_least(ui.style().spacing.interact_size.y);
|
||||||
}
|
}
|
||||||
let rect = ui.allocate_space(desired_size);
|
let rect = ui.allocate_space(desired_size);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue