Dim switcher buttons inspector when inactive

This commit is contained in:
1024jp 2023-10-31 21:27:29 +09:00
parent f280e74ee9
commit 4161dd2ed8
3 changed files with 10 additions and 2 deletions

View File

@ -7,6 +7,7 @@ Change Log
### Improvements
- [trivial] Dim the switcher buttons in the inspector when the window is inactive.
- [trivial] Improve the style of the pop-up buttons in the print panel.

View File

@ -37,6 +37,14 @@ final class InspectorTabSegmentedControl: NSSegmentedControl {
// MARK: -
// MARK: Segmented Control Methods
override func viewWillDraw() {
super.viewWillDraw()
self.alphaValue = (self.window?.isMainWindow ?? false) ? 1 : 0.5
}
override var selectedSegment: Int {
didSet {

View File

@ -173,8 +173,7 @@ private extension InspectorPane {
func image(selected: Bool = false) -> NSImage? {
NSImage(systemSymbolName: selected ? self.selectedImageName : self.imageName,
accessibilityDescription: self.name)?
NSImage(systemSymbolName: selected ? self.selectedImageName : self.imageName, accessibilityDescription: self.name)?
.withSymbolConfiguration(.init(pointSize: 0, weight: selected ? .semibold : .regular))
}