-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
I can use icon_names::IMAGE, but not icon_names::IMAGE_MISSING.
System:
OS: Ubuntu 22.04.5 LTS x86_64
Host: CMP NS685U_4 (1.0)
Kernel: Linux 6.8.0-51-generic
Shell: bash 5.1.16
Display (BOE0747): 1920x1080 @ 60 Hz in 16" [Built-in]
DE: GNOME 42.9
WM: Mutter (X11)
WM Theme: Adwaita
Theme: Adwaita [GTK2/3/4]
Icons: Adwaita [GTK2/3/4]
Font: Cantarell (11pt) [GTK2/3/4]
Cursor: Adwaita (24px)
Terminal: GNOME Terminal 3.44.0
Terminal Font: Source Code Pro (18pt)
Locale: en_US.UTF-8
main.rs:
// main.rs
use gtk::prelude::*;
use icon_names::*;
use relm4::prelude::*;
#[derive(Default)]
struct AppModel {}
#[relm4::component]
impl SimpleComponent for AppModel {
type Input = ();
type Output = ();
type Init = ();
view! {
gtk::Window {
set_title: Some("Simple app"),
set_default_width: 500,
set_default_height: 250,
set_size_request: (100, 100),
gtk::Label {
set_label: &format!("Hello, World!"),
},
adw::StatusPage {
set_icon_name: Some(IMAGE_MISSING),
set_description: Some("aboba"),
},
}
}
fn init(
_init: Self::Init,
root: Self::Root,
_sender: ComponentSender<Self>,
) -> ComponentParts<Self> {
let model = AppModel::default();
let widgets = view_output!();
ComponentParts { model, widgets }
}
}
mod icon_names {
include!(concat!(env!("OUT_DIR"), "/icon_names.rs"));
}
fn main() {
relm4_icons::initialize_icons(icon_names::GRESOURCE_BYTES, icon_names::RESOURCE_PREFIX);
let app = RelmApp::new("com.github.aboba.aboba");
app.run::<AppModel>(());
}build.rs:
// build.rs
fn main() {
relm4_icons_build::bundle_icons(
"icon_names.rs",
Some("com.github.synalice.aboba.aboba"),
None::<&str>,
None::<&str>,
["image-missing"],
);
}Metadata
Metadata
Assignees
Labels
No labels
