From f6805c92113857e190897c144a4f67b27789db95 Mon Sep 17 00:00:00 2001 From: Tommaso Negri Date: Mon, 10 Aug 2026 22:30:12 +0200 Subject: update docs --- patches/bar-font_offset-20260810-11d813c.patch | 36 ------------------------ patches/patch-font_offset-20260810-11d813c.patch | 36 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 patches/bar-font_offset-20260810-11d813c.patch create mode 100644 patches/patch-font_offset-20260810-11d813c.patch (limited to 'patches') diff --git a/patches/bar-font_offset-20260810-11d813c.patch b/patches/bar-font_offset-20260810-11d813c.patch deleted file mode 100644 index 69b6ce2..0000000 --- a/patches/bar-font_offset-20260810-11d813c.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/Sources/bar/Config.swift b/Sources/bar/Config.swift -index 2d9859b..685bf93 100644 ---- a/Sources/bar/Config.swift -+++ b/Sources/bar/Config.swift -@@ -28,6 +28,12 @@ enum Config { - /// The font used for all text and icons in the bar. - static let font: Font = .system(size: 14, weight: .regular, design: .monospaced) - -+ /// The vertical offset that can be used to adjust font centering. -+ /// -+ /// A negative value will move the text upward, while a positive -+ /// value will move it downward. -+ static let fontOffset: Double = -0.5 -+ - // NOTE: Customizing colors - // - // You can use system default colors and the standard SwiftUI -diff --git a/Sources/bar/Views/CellView.swift b/Sources/bar/Views/CellView.swift -index 6b39eb1..909299a 100644 ---- a/Sources/bar/Views/CellView.swift -+++ b/Sources/bar/Views/CellView.swift -@@ -4,8 +4,11 @@ struct CellView: View { - var cell: Cell - - var body: some View { -- Text(cell.rawValue) -- .frame(height: Config.height) -- .background(cell.background) -+ Group { -+ Text(cell.rawValue) -+ .transformEffect(.init(translationX: 0, y: Config.fontOffset)) -+ } -+ .frame(height: Config.height) -+ .background(cell.background) - } - } diff --git a/patches/patch-font_offset-20260810-11d813c.patch b/patches/patch-font_offset-20260810-11d813c.patch new file mode 100644 index 0000000..69b6ce2 --- /dev/null +++ b/patches/patch-font_offset-20260810-11d813c.patch @@ -0,0 +1,36 @@ +diff --git a/Sources/bar/Config.swift b/Sources/bar/Config.swift +index 2d9859b..685bf93 100644 +--- a/Sources/bar/Config.swift ++++ b/Sources/bar/Config.swift +@@ -28,6 +28,12 @@ enum Config { + /// The font used for all text and icons in the bar. + static let font: Font = .system(size: 14, weight: .regular, design: .monospaced) + ++ /// The vertical offset that can be used to adjust font centering. ++ /// ++ /// A negative value will move the text upward, while a positive ++ /// value will move it downward. ++ static let fontOffset: Double = -0.5 ++ + // NOTE: Customizing colors + // + // You can use system default colors and the standard SwiftUI +diff --git a/Sources/bar/Views/CellView.swift b/Sources/bar/Views/CellView.swift +index 6b39eb1..909299a 100644 +--- a/Sources/bar/Views/CellView.swift ++++ b/Sources/bar/Views/CellView.swift +@@ -4,8 +4,11 @@ struct CellView: View { + var cell: Cell + + var body: some View { +- Text(cell.rawValue) +- .frame(height: Config.height) +- .background(cell.background) ++ Group { ++ Text(cell.rawValue) ++ .transformEffect(.init(translationX: 0, y: Config.fontOffset)) ++ } ++ .frame(height: Config.height) ++ .background(cell.background) + } + } -- cgit v1.2.3