mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:57:45 +00:00
Assistant: Add subtitle field to the Result class
This allows providers to specify an appropriate subtitle instead of making that something the UI layer has to figure out. :^)
This commit is contained in:
parent
ed2bf0a753
commit
3ecd1d603f
3 changed files with 12 additions and 10 deletions
|
@ -266,14 +266,11 @@ int main(int argc, char** argv)
|
|||
auto& match = results_container.add<Assistant::ResultRow>();
|
||||
match.set_image(result->bitmap());
|
||||
match.set_title(result->title());
|
||||
match.set_subtitle(result->subtitle());
|
||||
match.on_selected = [result_copy = result]() {
|
||||
result_copy->activate();
|
||||
exit(0);
|
||||
};
|
||||
|
||||
if (result->kind() == Assistant::Result::Kind::Calculator) {
|
||||
match.set_subtitle("'Enter' will copy to clipboard");
|
||||
}
|
||||
}
|
||||
|
||||
mark_selected_item();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue