Skip to content

Commit

Permalink
make design module
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Brue <ryanbrue.dev@gmail.com>
  • Loading branch information
ryanabx committed Sep 22, 2024
1 parent 51f6f31 commit 401c864
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/app_tray/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/components.rs → src/design/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand All @@ -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)
]
}),
Expand Down
2 changes: 2 additions & 0 deletions src/design/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod component_theme;
pub mod components;
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion src/settings_tray/status_icons.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
components::app_icon,
design::components::app_icon,
freedesktop::icons::{default_icon_path, IconTheme},
};

Expand Down
4 changes: 2 additions & 2 deletions src/start_menu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 401c864

Please sign in to comment.