Bladeren bron

LibGUI: Use default buttons in ColorPicker and FontPicker

Karol Kosek 3 jaren geleden
bovenliggende
commit
5f89369f67
2 gewijzigde bestanden met toevoegingen van 2 en 0 verwijderingen
  1. 1 0
      Userland/Libraries/LibGUI/ColorPicker.cpp
  2. 1 0
      Userland/Libraries/LibGUI/FontPicker.cpp

+ 1 - 0
Userland/Libraries/LibGUI/ColorPicker.cpp

@@ -238,6 +238,7 @@ void ColorPicker::build_ui()
     ok_button.on_click = [this](auto) {
         done(ExecResult::OK);
     };
+    ok_button.set_default(true);
 
     auto& cancel_button = button_container.add<Button>();
     cancel_button.set_fixed_width(80);

+ 1 - 0
Userland/Libraries/LibGUI/FontPicker.cpp

@@ -161,6 +161,7 @@ FontPicker::FontPicker(Window* parent_window, Gfx::Font const* current_font, boo
     ok_button.on_click = [this](auto) {
         done(ExecResult::OK);
     };
+    ok_button.set_default(true);
 
     auto& cancel_button = *widget.find_descendant_of_type_named<GUI::Button>("cancel_button");
     cancel_button.on_click = [this](auto) {