mirror of
https://github.com/emilk/egui.git
synced 2026-06-28 07:23:13 -04:00
[style] tigher buttons and monospaced DragValue text
This commit is contained in:
@@ -73,7 +73,7 @@ impl Default for Style {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
window_padding: vec2(6.0, 6.0),
|
||||
button_padding: vec2(5.0, 3.0),
|
||||
button_padding: vec2(4.0, 1.0),
|
||||
item_spacing: vec2(8.0, 4.0),
|
||||
indent: 21.0,
|
||||
clickable_diameter: 22.0,
|
||||
|
||||
@@ -534,7 +534,9 @@ impl<'a> Widget for DragValue<'a> {
|
||||
.log10()
|
||||
.ceil()
|
||||
.max(0.0) as usize;
|
||||
let button = Button::new(format!("{:.*}", precision, *value)).sense(Sense::drag());
|
||||
let button = Button::new(format!("{:.*}", precision, *value))
|
||||
.sense(Sense::drag())
|
||||
.text_style(TextStyle::Monospace);
|
||||
let interact = ui.add(button);
|
||||
if interact.active {
|
||||
let mdelta = ui.input().mouse.delta;
|
||||
|
||||
Reference in New Issue
Block a user