Skip to content

Commit

Permalink
change order of easing in combo box
Browse files Browse the repository at this point in the history
  • Loading branch information
NamorNiradnug committed Jun 25, 2024
1 parent 35813ee commit efc4238
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/wcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,18 @@ OptionWidget::OptionWidget(Option *option) : Gtk::Box(Gtk::ORIENTATION_HORIZONTA
auto combo_box = std::make_unique<Gtk::ComboBoxText>();
for (const auto& easing : wf::animation::smoothing::get_available_smooth_functions())
{
combo_box->append(easing);
static const std::map<std::string, int> 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);
Expand Down

0 comments on commit efc4238

Please sign in to comment.