A lightweight, macOS-style dock for Windows 11, with glass visuals, smooth magnification, and Genie effect.
fix(menubar): remove duplicate closing delimiter and format gfx line drawing
Saivarshith Mitukula9b67cad944d0
diff --git a/apps/dock/src/gfx.rs b/apps/dock/src/gfx.rsindex 8438b89..f6167ca 100644--- a/apps/dock/src/gfx.rs+++ b/apps/dock/src/gfx.rs@@ -1019,12 +1019,11 @@ impl Gfx {};// SAFETY: The brush, format and text live for each drawing call.unsafe {+ const WIFI: [char; 4] = ['\u{E872}', '\u{E873}', '\u{E874}', '\u{E701}'];+ const WIFI_FULL: char = '\u{E701}';let ink_brush = dc.CreateSolidColorBrush(&ink.color(), None)?;- let wifi_glyph = crate::menubar::glyph::WIFI[usize::from(bars.clamp(1, 4)) - 1];- for &(glyph, opacity) in &[- (crate::menubar::glyph::WIFI_FULL, 0.3f32),- (wifi_glyph, 1.0f32),- ] {+ let wifi_glyph = WIFI[usize::from(bars.clamp(1, 4)) - 1];+ for &(glyph, opacity) in &[(WIFI_FULL, 0.3f32), (wifi_glyph, 1.0f32)] {let mut units = [0u16; 2];let text = glyph.encode_utf16(&mut units);ink_brush.SetOpacity(opacity);@@ -1045,8 +1044,14 @@ impl Gfx {let bar_top = height * 0.22;let bar_bottom = height * 0.58;dc.DrawLine(- Vector2 { X: ex_x, Y: bar_top },- Vector2 { X: ex_x, Y: bar_bottom },+ Vector2 {+ X: ex_x,+ Y: bar_top,+ },+ Vector2 {+ X: ex_x,+ Y: bar_bottom,+ },&warn_brush,stroke,None,diff --git a/apps/dock/src/menubar.rs b/apps/dock/src/menubar.rsindex 54bce5a..258f621 100644--- a/apps/dock/src/menubar.rs+++ b/apps/dock/src/menubar.rs@@ -1035,7 +1035,6 @@ impl MenuBar {self.widgets = widgets;self.refresh(gfx)}- }/// The pointer reached the top edge or left the bar.pub fn hover(&mut self, gfx: &Gfx, inside: bool) -> Result<()> {