mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Dim switcher buttons inspector when inactive
This commit is contained in:
parent
f280e74ee9
commit
4161dd2ed8
@ -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.
|
||||
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user