meow
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
//! something is muted — the signal the quickshell Audio widget gives.
|
||||
|
||||
use iced::widget::{container, row, space, text};
|
||||
use iced::{border, Alignment, Element, Length, Task, Theme};
|
||||
use iced::{Alignment, Element, Length, Task};
|
||||
|
||||
use common::{AudioNode, BarModule, ModuleEffect, PipewireMsg, PipewireState, Service, Wire};
|
||||
use common::{pill, AudioNode, BarModule, ModuleEffect, PipewireMsg, PipewireState, Service, Wire};
|
||||
|
||||
/// Glyphs exactly as the Quickshell Audio widget draws them: the speaker is a
|
||||
/// Material `md-volume` icon, the mic a Font Awesome one.
|
||||
@@ -19,7 +19,6 @@ const MIC_MUTED: &str = "\u{f131}"; // fa-microphone_slash
|
||||
/// given — if the bar ever leaves 20 px, scale the two sizes here.
|
||||
const REF_SLOT_W: f32 = 24.0;
|
||||
const REF_SPACING: f32 = 4.0;
|
||||
const REF_RADIUS: f32 = 3.5;
|
||||
/// The speaker is re-drawn in the mono face, whose ink is 1168/1496 the size
|
||||
/// of the proportional face quickshell uses, so it is pre-compensated.
|
||||
const REF_SINK_SIZE: f32 = 20.0 * 1496.0 / 1168.0;
|
||||
@@ -95,12 +94,3 @@ fn glyph(node: AudioNode, on: &'static str, muted: &'static str) -> &'static str
|
||||
on
|
||||
}
|
||||
}
|
||||
|
||||
/// The quickshell pill: rounded, a shade lighter than the bar behind it.
|
||||
fn pill(theme: &Theme) -> container::Style {
|
||||
container::Style {
|
||||
background: Some(theme.extended_palette().background.weak.color.into()),
|
||||
border: border::rounded(REF_RADIUS),
|
||||
..container::Style::default()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user