mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -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 🔧
|
||||||
|
|
||||||
* 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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user