mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-30 13:04:13 +00:00
change default icon to view-pin-symbolic
This commit is contained in:
parent
28fcf247b2
commit
7fdc053051
@ -2,7 +2,7 @@ use std::sync::Arc;
|
|||||||
|
|
||||||
use adw::TabView;
|
use adw::TabView;
|
||||||
use gtk::{
|
use gtk::{
|
||||||
gio::{SimpleAction, SimpleActionGroup},
|
gio::{Icon, SimpleAction, SimpleActionGroup},
|
||||||
glib::{uuid_string_random, GString},
|
glib::{uuid_string_random, GString},
|
||||||
prelude::{ActionMapExt, WidgetExt},
|
prelude::{ActionMapExt, WidgetExt},
|
||||||
};
|
};
|
||||||
@ -19,8 +19,14 @@ impl Widget {
|
|||||||
action_group.add_action(action_tab_append.as_ref());
|
action_group.add_action(action_tab_append.as_ref());
|
||||||
|
|
||||||
// Init gobject
|
// Init gobject
|
||||||
let gobject = TabView::builder().build();
|
let gobject = TabView::new();
|
||||||
|
|
||||||
|
// Change default icon visible for tabs pinned
|
||||||
|
if let Ok(default_icon) = Icon::for_string("view-pin-symbolic") {
|
||||||
|
gobject.set_default_icon(&default_icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create new group for actions
|
||||||
gobject.insert_action_group(&uuid_string_random(), Some(&action_group));
|
gobject.insert_action_group(&uuid_string_random(), Some(&action_group));
|
||||||
|
|
||||||
Self { gobject }
|
Self { gobject }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user