diff --git a/src/app_tray/mod.rs b/src/app_tray/mod.rs index 4beb9c4..4941c1b 100644 --- a/src/app_tray/mod.rs +++ b/src/app_tray/mod.rs @@ -8,9 +8,9 @@ use compositor::{ use iced::{Element, Task}; use crate::{ - component_theme::{button_style, PANEL_SIZE}, - components::app_tray_button, config::AppTrayConfig, + design::component_theme::{button_style, PANEL_SIZE}, + design::components::app_tray_button, freedesktop::desktop_entry::EntryInfo, }; diff --git a/src/component_theme.rs b/src/design/component_theme.rs similarity index 100% rename from src/component_theme.rs rename to src/design/component_theme.rs diff --git a/src/components.rs b/src/design/components.rs similarity index 91% rename from src/components.rs rename to src/design/components.rs index eb301b0..99bdcc1 100644 --- a/src/components.rs +++ b/src/design/components.rs @@ -5,7 +5,7 @@ use iced::{ Element, Length, Theme, }; -use crate::component_theme::app_tray_icon_rule; +use super::component_theme::app_tray_icon_rule; pub fn app_tray_button<'a, T: 'a>( icon_path: Option<&Path>, @@ -15,11 +15,11 @@ pub fn app_tray_button<'a, T: 'a>( ) -> iced::widget::Button<'a, T> { match icon_path { Some(path) => iced::widget::button(if is_start_menu { - column![crate::components::app_icon(path)] + column![crate::design::components::app_icon(path)] } else { column![ app_tray_horizontal_rule(is_active, num_toplevels, true), - crate::components::app_icon(path), + crate::design::components::app_icon(path), app_tray_horizontal_rule(is_active, num_toplevels, false) ] }), diff --git a/src/design/mod.rs b/src/design/mod.rs new file mode 100644 index 0000000..de60aea --- /dev/null +++ b/src/design/mod.rs @@ -0,0 +1,2 @@ +pub mod component_theme; +pub mod components; diff --git a/src/main.rs b/src/main.rs index 990cc82..e5a6afe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,13 +15,14 @@ use env_logger::Env; use panel::Panel; -pub mod app_tray; -pub mod component_theme; -pub mod components; +pub mod design; pub mod freedesktop; mod config; + mod panel; + +pub mod app_tray; mod settings_tray; pub mod start_menu; diff --git a/src/panel.rs b/src/panel.rs index aa14d95..8035ed3 100644 --- a/src/panel.rs +++ b/src/panel.rs @@ -17,8 +17,8 @@ use smithay_client_toolkit::shell::wlr_layer::Anchor; use crate::{ app_tray::{AppTray, AppTrayMessage}, - component_theme::PANEL_SIZE, config::PanelConfig, + design::component_theme::PANEL_SIZE, freedesktop::{desktop_entry::DesktopEntryCache, icons::IconTheme}, settings_tray::{SettingsTray, SettingsTrayMessage}, start_menu::{StartMenu, StartMenuMessage}, diff --git a/src/settings_tray/status_icons.rs b/src/settings_tray/status_icons.rs index c39d014..04fe46a 100644 --- a/src/settings_tray/status_icons.rs +++ b/src/settings_tray/status_icons.rs @@ -1,5 +1,5 @@ use crate::{ - components::app_icon, + design::components::app_icon, freedesktop::icons::{default_icon_path, IconTheme}, }; diff --git a/src/start_menu/mod.rs b/src/start_menu/mod.rs index 40e81b6..b3102d8 100644 --- a/src/start_menu/mod.rs +++ b/src/start_menu/mod.rs @@ -11,8 +11,8 @@ use iced::{ }; use crate::{ - component_theme::{button_style, PANEL_SIZE}, - components::{app_icon, app_tray_button}, + design::component_theme::{button_style, PANEL_SIZE}, + design::components::{app_icon, app_tray_button}, freedesktop::{ desktop_entry::{DesktopEntryCache, EntryInfo}, icons::{start_menu_icon, IconTheme},