Skip to content

Commit

Permalink
Enable text search on combo boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora committed Feb 18, 2021
1 parent 90699da commit cff1363
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/cascadia/TerminalSettingsEditor/EnumEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
_EnumName{ enumName },
_EnumValue{ enumValue } {}

hstring ToString()
{
return EnumName();
}

WINRT_CALLBACK(PropertyChanged, Windows::UI::Xaml::Data::PropertyChangedEventHandler);
OBSERVABLE_GETSET_PROPERTY(winrt::hstring, EnumName, _PropertyChangedHandlers);
OBSERVABLE_GETSET_PROPERTY(winrt::Windows::Foundation::IInspectable, EnumValue, _PropertyChangedHandlers);
Expand Down
3 changes: 2 additions & 1 deletion src/cascadia/TerminalSettingsEditor/EnumEntry.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

namespace Microsoft.Terminal.Settings.Editor
{
[default_interface] runtimeclass EnumEntry : Windows.UI.Xaml.Data.INotifyPropertyChanged
[default_interface] runtimeclass EnumEntry : Windows.UI.Xaml.Data.INotifyPropertyChanged, Windows.Foundation.IStringable
{
String EnumName { get; };
IInspectable EnumValue { get; };
String ToString();
}
}
5 changes: 5 additions & 0 deletions src/cascadia/TerminalSettingsModel/ColorScheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
ColorScheme(hstring name, COLORREF defaultFg, COLORREF defaultBg, COLORREF cursorColor);
com_ptr<ColorScheme> Copy() const;

hstring ToString()
{
return Name();
}

static com_ptr<ColorScheme> FromJson(const Json::Value& json);
bool ShouldBeLayered(const Json::Value& json) const;
void LayerJson(const Json::Value& json);
Expand Down
3 changes: 2 additions & 1 deletion src/cascadia/TerminalSettingsModel/ColorScheme.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

namespace Microsoft.Terminal.Settings.Model
{
[default_interface] runtimeclass ColorScheme {
[default_interface] runtimeclass ColorScheme : Windows.Foundation.IStringable {
ColorScheme(String name);
String ToString();

String Name;

Expand Down
6 changes: 6 additions & 0 deletions src/cascadia/TerminalSettingsModel/Profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
public:
Profile();
Profile(guid guid);

hstring ToString()
{
return Name();
}

static com_ptr<Profile> CloneInheritanceGraph(com_ptr<Profile> oldProfile, com_ptr<Profile> newProfile, std::unordered_map<void*, com_ptr<Profile>>& visited);
static com_ptr<Profile> CopySettings(com_ptr<Profile> source);

Expand Down
4 changes: 3 additions & 1 deletion src/cascadia/TerminalSettingsModel/Profile.idl
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ namespace Microsoft.Terminal.Settings.Model
Vertical_Bottom = 0x20
};

[default_interface] runtimeclass Profile {
[default_interface] runtimeclass Profile : Windows.Foundation.IStringable {
Profile();
Profile(Guid guid);

String ToString();

Boolean HasName();
void ClearName();
String Name;
Expand Down

1 comment on commit cff1363

@github-actions

This comment was marked as resolved.

Please sign in to comment.