mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
20 lines
367 B
Rust
20 lines
367 B
Rust
pub struct Pin {
|
|
image: gtk::Image,
|
|
}
|
|
|
|
impl Pin {
|
|
// Construct
|
|
pub fn new(is_pinned: bool) -> Pin {
|
|
let image = gtk::Image::builder()
|
|
.icon_name("view-pin-symbolic")
|
|
.visible(is_pinned)
|
|
.build();
|
|
|
|
Self { image }
|
|
}
|
|
|
|
// Getters
|
|
pub fn image(&self) -> >k::Image {
|
|
&self.image
|
|
}
|
|
}
|