mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Middle-click links to open in new tab
Closes https://github.com/emilk/egui/issues/231
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user