mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-05 04:21:03 +02:00
feat: add feature flags
Flags allow you to disable certain functionality and compile with only select features to reduce build time. Resolves #54.
This commit is contained in:
parent
e83618b1d6
commit
c347b6c944
16 changed files with 249 additions and 62 deletions
|
@ -3,6 +3,7 @@ use gtk::prelude::*;
|
|||
use gtk::{Button, IconTheme, Image, Label, Orientation};
|
||||
use tracing::error;
|
||||
|
||||
#[cfg(any(feature = "music", feature = "workspaces"))]
|
||||
pub fn new_icon_button(input: &str, icon_theme: &IconTheme, size: i32) -> Button {
|
||||
let button = Button::new();
|
||||
|
||||
|
@ -27,6 +28,7 @@ pub fn new_icon_button(input: &str, icon_theme: &IconTheme, size: i32) -> Button
|
|||
button
|
||||
}
|
||||
|
||||
#[cfg(feature = "music")]
|
||||
pub fn new_icon_label(input: &str, icon_theme: &IconTheme, size: i32) -> gtk::Box {
|
||||
let container = gtk::Box::new(Orientation::Horizontal, 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue