Преглед изворни кода

LibGUI: Suggest 'layout' even before the user starts typing

thislooksfun пре 3 година
родитељ
комит
49b4dfd6cd
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      Userland/Libraries/LibGUI/GMLAutocompleteProvider.cpp

+ 3 - 0
Userland/Libraries/LibGUI/GMLAutocompleteProvider.cpp

@@ -189,6 +189,9 @@ void GMLAutocompleteProvider::provide_completions(Function<void(Vector<Entry>)>
                 }
             }
         }
+        if (can_have_declared_layout(class_names.last()))
+            identifier_entries.empend("layout: ", 0u, Language::Unspecified, "layout");
+
         Core::ObjectClassRegistration::for_each([&](const Core::ObjectClassRegistration& registration) {
             if (!registration.is_derived_from(widget_class))
                 return;