-
Notifications
You must be signed in to change notification settings - Fork 2
files core monitor pillview swift 5daa1860
ventaphobia edited this page Apr 23, 2026
·
1 revision
- Area: Core app.
- This page records the file's current repository role, source metadata, and recent commit history.
- Review nearby tests and commit pages before changing this file.
| Field | Value |
|---|---|
| Source path | Core-Monitor/PillView.swift |
| Wiki area | Core app |
| Exists in current checkout | True |
| Size | 1589 bytes |
| Binary | False |
| Line count | 52 |
| Extension | .swift |
AppKit
| Kind | Name | Line |
|---|---|---|
| class | PillView |
4 |
| func | setup |
24 |
| func | applyTheme |
41 |
| Commit | Date | Subject |
|---|---|---|
05e3328 |
2026-04-13 | commit |
2664fd1 |
2026-04-11 | Update Core Monitor |
011232b |
2026-04-11 | Update website install video |
- Prefer focused changes that respect the ownership described above.
- If this file touches helper trust, SMC writes, startup, or permissions, update the relevant support docs and tests.
- If this file is generated or an asset manifest, verify the producing workflow instead of hand-editing generated payloads.
// yeah i dont paid enough for thisssssssssssssss
import AppKit
final class PillView: NSView {
// Content is placed inside `contentView`; auto-sized to fit.
let contentView = NSView()
// Explicit fixed width override (pass 0 to auto-size)
var fixedWidth: CGFloat = 0 {
didSet { invalidateIntrinsicContentSize() }
}
var theme: TouchBarTheme = .dark {
didSet { applyTheme() }
}
override init(frame: NSRect) {
super.init(frame: frame)
setup()
}
required init?(coder: NSCoder) { super.init(coder: coder); setup() }
private func setup() {
wantsLayer = true
layer?.cornerRadius = TB.pillRadius
layer?.borderWidth = 1
applyTheme()
contentView.translatesAutoresizingMaskIntoConstraints = false
addSubview(contentView)
NSLayoutConstraint.activate([
contentView.leadingAnchor.constraint(equalTo: leadingAnchor, constant: TB.hPad),
contentView.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -TB.hPad),
contentView.topAnchor.constraint(equalTo: topAnchor),
contentView.bottomAnchor.constraint(equalTo: bottomAnchor)
])
}
- Home
- Start Here
- Product Overview
- Runtime Architecture
- Monitoring Pipeline
- Fan Control
- Privileged Helper
- Touch Bar
- Release Automation
- Security Model
- File Index (279)
- Every Commit (401)
- Chronological Change Log
- Removed Parts
- All Deleted Paths
- Branches And Tags
- Wiki Manifest
- Start Here
- Product Overview
- Source Map
- Runtime Architecture
- App Startup And Lifecycle
- Dashboard Architecture
- Menu Bar Architecture
- Monitoring Pipeline
- Snapshot Trends And Freshness
- CPU GPU Memory Disk Network
- Battery Power And Thermals
- SMC And Apple Silicon
- Fan Control
- Custom Fan Curves
- Privileged Helper
- XPC Trust Boundary
- Helper Diagnostics
- Touch Bar Architecture
- Touch Bar Customization
- Weather And Location
- Privacy And Permissions
- Onboarding And Help
- Legacy Alerts
- Kernel Panic Weird Mode