From 6a34a234bb9ac2f82df526031009e8f048579e08 Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Thu, 8 Aug 2024 20:07:30 +0900 Subject: [PATCH] Update slider.rs --- crates/egui/src/widgets/slider.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/egui/src/widgets/slider.rs b/crates/egui/src/widgets/slider.rs index 84e47aeef3e..75caed495ac 100644 --- a/crates/egui/src/widgets/slider.rs +++ b/crates/egui/src/widgets/slider.rs @@ -846,7 +846,7 @@ impl<'a> Slider<'a> { let old_value = self.get_value(); let thickness = ui - .text_style_height(&TextStyle::Body) + .text_style_height(&ui.style().drag_value_text_style) .at_least(ui.spacing().interact_size.y); let mut response = self.allocate_slider_space(ui, thickness); self.slider_ui(ui, &response); @@ -922,7 +922,7 @@ impl<'a> Slider<'a> { impl<'a> Widget for Slider<'a> { fn ui(mut self, ui: &mut Ui) -> Response { let inner_response = match self.orientation { - SliderOrientation::Horizontal => ui.horizontal(|ui| self.add_contents(ui)), + SliderOrientation::Horizontal => ui.horizontal_top(|ui| self.add_contents(ui)), SliderOrientation::Vertical => ui.vertical(|ui| self.add_contents(ui)), };