mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Make it possible to add a title to context menu
This commit is contained in:
parent
687156ac90
commit
0b489a0135
9 changed files with 33 additions and 18 deletions
|
@ -564,9 +564,10 @@ void ServoControl::OnServoDevtoolsStarted(bool success,
|
|||
});
|
||||
}
|
||||
|
||||
void ServoControl::OnServoShowContextMenu(std::vector<winrt::hstring> items) {
|
||||
void ServoControl::OnServoShowContextMenu(std::optional<hstring> title,
|
||||
std::vector<winrt::hstring> items) {
|
||||
RunOnUIThread([=] {
|
||||
MessageDialog msg{L"Menu"};
|
||||
MessageDialog msg{title.value_or(L"Menu")};
|
||||
for (auto i = 0; i < items.size(); i++) {
|
||||
UICommand cmd{items[i], [=](auto) {
|
||||
RunOnGLThread([=] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue