Skip to content

Commit

Permalink
improv: menu item icons
Browse files Browse the repository at this point in the history
  • Loading branch information
edfloreshz committed Nov 18, 2024
1 parent 42e3955 commit 32ed65b
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 18 deletions.
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions res/icons/bundled/cross-small-square-filled-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions res/icons/bundled/edit-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions res/icons/bundled/face-smile-big-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions res/icons/bundled/info-outline-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions res/icons/bundled/plus-square-filled-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions res/icons/bundled/settings-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions res/icons/bundled/tabs-stack-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use key_bind::key_binds;
use pages::color_schemes::providers::cosmic_themes::CosmicTheme;

use crate::{
core::nav::Page,
core::{icons, nav::Page},
fl,
pages::{
self,
Expand Down Expand Up @@ -234,9 +234,17 @@ impl Application for TweakTool {
menu::items(
&self.key_binds,
vec![
menu::Item::Button(fl!("settings"), TweaksAction::Settings),
menu::Item::Button(
fl!("settings"),
Some(icons::get_handle("settings-symbolic", 14)),
TweaksAction::Settings,
),
menu::Item::Divider,
menu::Item::Button(fl!("about"), TweaksAction::About),
menu::Item::Button(
fl!("about"),
Some(icons::get_handle("info-outline-symbolic", 14)),
TweaksAction::About,
),
],
),
)])
Expand Down
10 changes: 10 additions & 0 deletions src/core/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ impl IconCache {
);
};
}

// Menu items
bundle!("cross-small-square-filled-symbolic", 14);
bundle!("edit-symbolic", 14);
bundle!("face-smile-big-symbolic", 14);
bundle!("plus-square-filled-symbolic", 14);
bundle!("settings-symbolic", 14);
bundle!("tabs-stack-symbolic", 14);
bundle!("info-outline-symbolic", 14);

bundle!("size-horizontally-symbolic", 18);
bundle!("dock-bottom-symbolic", 18);
bundle!("dock-top-symbolic", 18);
Expand Down

0 comments on commit 32ed65b

Please sign in to comment.