mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 08:44:40 +01:00
url_row: Use activatable instead of a gesture
This gives highlight on mouse over.
This commit is contained in:
parent
64cc9a8d3d
commit
ca96e2da0d
1 changed files with 2 additions and 4 deletions
|
@ -31,8 +31,8 @@ mod imp {
|
||||||
fn constructed(&self) {
|
fn constructed(&self) {
|
||||||
self.parent_constructed();
|
self.parent_constructed();
|
||||||
let obj = self.obj();
|
let obj = self.obj();
|
||||||
let gesture = gtk::GestureClick::new();
|
obj.set_activatable(true);
|
||||||
gesture.connect_pressed(clone!(@weak obj as row => move |_,_,_,_| {
|
obj.connect_activated(clone!(@weak obj as row => move |_| {
|
||||||
if let Some(uri) = row.imp().uri.borrow().clone() {
|
if let Some(uri) = row.imp().uri.borrow().clone() {
|
||||||
spawn(async move {
|
spawn(async move {
|
||||||
let file = gio::File::for_uri(&uri);
|
let file = gio::File::for_uri(&uri);
|
||||||
|
@ -44,8 +44,6 @@ mod imp {
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
obj.add_controller(gesture);
|
|
||||||
|
|
||||||
let image_suffix = gtk::Image::from_icon_name("link-symbolic");
|
let image_suffix = gtk::Image::from_icon_name("link-symbolic");
|
||||||
image_suffix.add_css_class("dim-label");
|
image_suffix.add_css_class("dim-label");
|
||||||
image_suffix.set_accessible_role(gtk::AccessibleRole::Presentation);
|
image_suffix.set_accessible_role(gtk::AccessibleRole::Presentation);
|
||||||
|
|
Loading…
Add table
Reference in a new issue