Commit graph

10 commits

Author SHA1 Message Date
thislooksfun
1a3ea0c892 LibGUI: Add myself to the copyright header 2021-11-02 17:53:22 +01:00
thislooksfun
49b4dfd6cd LibGUI: Suggest 'layout' even before the user starts typing 2021-11-02 17:53:22 +01:00
thislooksfun
8863fe5852 LibGUI: Remove unused check
This check was removed as it will now never trigger.

The completion has the suffix ': ' on it, and the key does not.
Therefore if the user has not yet typed the ':', it will not be equal,
and after they do the check on line 167 will fail so the entry won't be
in the list to begin with.
2021-11-02 17:53:22 +01:00
thislooksfun
9a70ae1593 LibGUI: Automatically append ': ' after autocompleted GML properties 2021-11-02 17:53:22 +01:00
thislooksfun
f8c98cbf55 LibGUI: Show autocomplete for Layout properties 2021-11-02 17:53:22 +01:00
thislooksfun
b0122744a6 LibGUI: Match layout classes even after you start typing
The previous commit fixed the issue with layout classes not being
suggested at all, but there was still another issue. Once you started
typing the class name a different suggester would take over and only
show widgets. This commit makes it so it still only suggests layouts
in that situation.

This, combined with the last commit, makes autocompleting layouts way
more discoverable and user-friendly. :^)
2021-11-02 17:53:22 +01:00
thislooksfun
f048d16be5 LibGUI: Correctly suggest layout classes
Previously when the GMLAutocompleteProvider was invoked just after the
'layout:' tag it would suggest nothing. This is because Layouts do not
inherit from Widget, so the two checks would always eliminate every
suggestion from the list. This patch makes it always suggest any
(registered) object that inherits from GUI::Layout.

This should make layouts more discoverable and easier to quickly use.
2021-11-02 17:53:22 +01:00
thislooksfun
989c111d65 LibGUI: Remove unnecessary curly braces
Not needed for the commit, but I always try to leave the code nicer
than I found it. :)
2021-11-02 17:53:22 +01:00
thislooksfun
c3b0b9057e LibCore+LibGUI: Make ObjectClassRegistration::construct() nullable
This lays the groundwork for allowing the registration of abstract
core objects, which will be needed for improved GML autocomplete.
2021-11-02 17:53:22 +01:00
Conor Byrne
2b5566d7cc LibGUI+Playground: Move GMLAutocompleteProvider to LibGUI 2021-07-29 11:33:16 +02:00
Renamed from Userland/DevTools/Playground/GMLAutocompleteProvider.cpp (Browse further)