tangled
alpha
login
or
join now
jonmsterling.com
/
AquaKit
4
fork
atom
A collection of user interface components and drawing routines for building tasteful apps using AppKit.
appkit
swift
aqua
ui
mac
4
fork
atom
overview
issues
1
pulls
pipelines
Tweak AquaSegmentedControl dimensions
jonmsterling.com
1 month ago
848e5ad1
5af1a855
+7
-1
1 changed file
expand all
collapse all
unified
split
Sources
AquaKit
Controls and Views
AquaSegmentedControl.swift
+7
-1
Sources/AquaKit/Controls and Views/AquaSegmentedControl.swift
···
5
5
import AppKit
6
6
7
7
open class AquaSegmentedControl: NSSegmentedControl {
8
8
+
var segmentWidth: CGFloat = 40 {
9
9
+
didSet {
10
10
+
invalidateIntrinsicContentSize()
11
11
+
}
12
12
+
}
13
13
+
8
14
override open var intrinsicContentSize: NSSize {
9
9
-
return NSSize(width: 40 * segmentCount, height: 40)
15
15
+
return NSSize(width: segmentWidth * CGFloat(segmentCount), height: 35)
10
16
}
11
17
12
18
override open var isFlipped: Bool { false }