瀏覽代碼

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;