mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 23:13:13 -04:00
[button] Remove minimum button width
This commit is contained in:
@@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
### Changed 🔧
|
||||
|
||||
* Changed default font to [Ubuntu-Light](https://fonts.google.com/specimen/Ubuntu).
|
||||
* Remove minimum button width
|
||||
* Refactored `egui::Layout` substantially, changing its interface.
|
||||
|
||||
### Removed 🔥
|
||||
|
||||
@@ -366,7 +366,7 @@ impl Widget for Button {
|
||||
let galley = font.layout_multiline(text, ui.available_width());
|
||||
let mut desired_size = galley.size + 2.0 * button_padding;
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user