diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2023-01-02 20:57:06 +0200 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2023-01-02 20:57:06 +0200 |
| commit | 11f76444666d2e3d053c5d6bd4c7567fe86a2cd4 (patch) | |
| tree | 8a7495855bb8400e8292028b2a47a087ff58e290 /src/tags.rs | |
| parent | eebeed1f2774146c3d7df90c7a982f58428d4cff (diff) | |
| download | i3bar-mango-11f76444666d2e3d053c5d6bd4c7567fe86a2cd4.tar.gz | |
implement tags_padding config option
Diffstat (limited to 'src/tags.rs')
| -rw-r--r-- | src/tags.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tags.rs b/src/tags.rs index d22853d..e3b87ab 100644 --- a/src/tags.rs +++ b/src/tags.rs @@ -1,7 +1,7 @@ +use crate::config::Config; use crate::text::{Attributes, ComputedText}; -use cairo::Context; -use pango::FontDescription; -use pangocairo::{cairo, pango}; + +use pangocairo::cairo::Context; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum TagState { @@ -32,13 +32,13 @@ impl TagsInfo { } } -pub fn compute_tag_label(label: &str, font: &FontDescription, context: &Context) -> ComputedText { +pub fn compute_tag_label(label: &str, config: &Config, context: &Context) -> ComputedText { ComputedText::new( label, Attributes { - font, - padding_left: 25.0, - padding_right: 25.0, + font: &config.font.0, + padding_left: config.tags_padding, + padding_right: config.tags_padding, min_width: None, align: Default::default(), markup: false, |
