Skip to content

Commit

Permalink
feat: added tooltips to the widgets that allow to read them with Voic…
Browse files Browse the repository at this point in the history
…eOver (#2321)
  • Loading branch information
exelban committed Jan 17, 2025
1 parent 73e321c commit 8de91d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Kit/module/widget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ public class SWidget {
}
self.menuBarItem?.button?.addSubview(self.item)
self.menuBarItem?.button?.image = NSImage()
self.menuBarItem?.button?.toolTip = "\(localizedString(self.module)): \(self.type.name())"

if let item = self.menuBarItem, !item.isVisible {
self.menuBarItem?.isVisible = true
Expand Down Expand Up @@ -487,6 +488,7 @@ public class MenuBar {

self.menuBarItem?.button?.addSubview(self.view)
self.menuBarItem?.button?.image = NSImage()
self.menuBarItem?.button?.toolTip = "\(localizedString(self.moduleName))"
self.menuBarItem?.button?.target = self
self.menuBarItem?.button?.action = #selector(self.togglePopup)
self.menuBarItem?.button?.sendAction(on: [.leftMouseDown, .rightMouseDown])
Expand Down
1 change: 1 addition & 0 deletions Stats/Views/CombinedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ internal class CombinedView: NSObject, NSGestureRecognizerDelegate {
self.menuBarItem?.autosaveName = "CombinedModules"
self.menuBarItem?.button?.addSubview(self.view)
self.menuBarItem?.button?.image = NSImage()
self.menuBarItem?.button?.toolTip = localizedString("Combined modules")

if !self.combinedModulesPopup {
self.activeModules.forEach { (m: Module) in
Expand Down

0 comments on commit 8de91d9

Please sign in to comment.