Middle-click links to open in new tab
Closes https://github.com/emilk/egui/issues/231
This commit is contained in:
parent
f77ab26828
commit
65a86b2d15
1 changed files with 6 additions and 0 deletions
|
@ -65,6 +65,12 @@ impl Widget for Hyperlink {
|
||||||
new_tab: modifiers.any(),
|
new_tab: modifiers.any(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if response.middle_clicked() {
|
||||||
|
ui.ctx().output().open_url = Some(crate::output::OpenUrl {
|
||||||
|
url: url.clone(),
|
||||||
|
new_tab: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let color = ui.visuals().hyperlink_color;
|
let color = ui.visuals().hyperlink_color;
|
||||||
let visuals = ui.style().interact(&response);
|
let visuals = ui.style().interact(&response);
|
||||||
|
|
Loading…
Reference in a new issue