Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New UI with Assets included #62

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cachyos-welcome.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<file compressed="true">data/img/reddit.png</file>
<file compressed="true">data/img/telegram.png</file>
<file compressed="true">data/img/twitter.png</file>
<file compressed="true">data/img/cachyOS.png</file>
</gresource>
</gresources>
Binary file added data/img/cachyOS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,17 @@ fn build_ui(application: &gtk::Application) {
image.set_from_resource(Some(&icon_path));
}

// Setup cachyOS Logo resource
let cachyos_image: gtk::Image = builder.object("cachyOS").expect("Couldn't get cachyOS image");
let cachyos_icon_path = format!("{RESPREFIX}/data/img/cachyOS.png");

let pixbuf = Pixbuf::from_resource_at_scale(&cachyos_icon_path, 256, 256, true)
.expect("Could not load the image from resource");

// Set the Pixbuf to the GtkImage
cachyos_image.set_from_pixbuf(Some(&pixbuf));


let homepage_grid: gtk::Grid = builder.object("homepage").unwrap();
for widget in homepage_grid.children() {
let casted_widget = widget.downcast::<gtk::Button>();
Expand Down
Loading
Loading