Skip to content

Commit

Permalink
add signature icon in about page
Browse files Browse the repository at this point in the history
  • Loading branch information
B0ney committed Oct 20, 2023
1 parent a029521 commit a6206bd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
Binary file added assets/img/vbee3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ fn icon(unicode: char) -> Text<'static> {
.horizontal_alignment(alignment::Horizontal::Center)
}


/* TODO */

pub fn xmodits_logo() -> image::Handle {
use std::sync::OnceLock;
static HANDLE: OnceLock<image::Handle> = OnceLock::new();
Expand All @@ -67,3 +70,12 @@ pub fn xmodits_logo() -> image::Handle {
.get_or_init(|| image::Handle::from_memory(include_bytes!("../assets/img/logos/icon.png")))
.clone()
}

pub fn vbee3() -> image::Handle {
use std::sync::OnceLock;
static HANDLE: OnceLock<image::Handle> = OnceLock::new();

HANDLE
.get_or_init(|| image::Handle::from_memory(include_bytes!("../assets/img/vbee3.png")))
.clone()
}
14 changes: 10 additions & 4 deletions src/screen/about.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
//! Information about xmodits
use crate::app::Message;
use crate::icon::xmodits_logo;
use crate::icon::{vbee3, xmodits_logo};
use crate::theme;
use crate::widget::helpers::{
centered_column_x, centered_container, centered_text, control, control_filled,
};
use crate::widget::{Collection, Element};
use iced::widget::{button, column, image, text};
use iced::widget::{button, column, image, row, text};

use super::build_info;

pub fn view<'a>() -> Element<'a, Message> {
let title = centered_text("XMODITS - by B0ney");
let title = row![
image(vbee3()),
centered_text("XMODITS - by B0ney"),
image(vbee3()),
]
.align_items(iced::Alignment::Center)
.spacing(8);
let about = centered_text("A tool to rip samples from various tracker modules.");
let repo = button(text(env!("CARGO_PKG_REPOSITORY")))
.on_press(Message::Open(String::from(env!("CARGO_PKG_REPOSITORY"))))
.style(theme::Button::Hyperlink);
.style(theme::Button::HyperlinkInverted);
let version = centered_text(format!("version: {}", env!("CARGO_PKG_VERSION")));
let image = image(xmodits_logo());
let about = centered_container(centered_column_x(column![
Expand Down

0 comments on commit a6206bd

Please sign in to comment.