From efc4238c9b1d34fca666282062b7837e8ff91c21 Mon Sep 17 00:00:00 2001 From: NamorNiradnug Date: Wed, 26 Jun 2024 01:41:16 +0300 Subject: [PATCH] change order of easing in combo box --- src/wcm.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/wcm.cpp b/src/wcm.cpp index b0e6abb..2315fbc 100644 --- a/src/wcm.cpp +++ b/src/wcm.cpp @@ -402,7 +402,18 @@ OptionWidget::OptionWidget(Option *option) : Gtk::Box(Gtk::ORIENTATION_HORIZONTA auto combo_box = std::make_unique(); for (const auto& easing : wf::animation::smoothing::get_available_smooth_functions()) { - combo_box->append(easing); + static const std::map preffered_easing_position = { + {"linear", 0}, + {"circle", 1}, + {"sigmoid", 2}, + }; + if (preffered_easing_position.count(easing) != 0) + { + combo_box->insert(preffered_easing_position.at(easing), easing); + } else + { + combo_box->append(easing); + } } combo_box->set_active_text(easing_value);