Skip to content

Commit

Permalink
Update slider.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Aug 8, 2024
1 parent 2dac4a4 commit 6a34a23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/egui/src/widgets/slider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)),
};

Expand Down

0 comments on commit 6a34a23

Please sign in to comment.