mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Don't allow cell editing, lock size.
This commit is contained in:
parent
e055668554
commit
daa5679241
@ -666,24 +666,24 @@ Gw
|
|||||||
<rect key="frame" x="1" y="1" width="128" height="123"/>
|
<rect key="frame" x="1" y="1" width="128" height="123"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="none" columnReordering="NO" columnSelection="YES" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="24" id="3go-Eb-GOy">
|
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="none" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="24" id="3go-Eb-GOy">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="128" height="123"/>
|
<rect key="frame" x="0.0" y="0.0" width="128" height="123"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<size key="intercellSpacing" width="17" height="0.0"/>
|
<size key="intercellSpacing" width="17" height="0.0"/>
|
||||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
||||||
<tableColumns>
|
<tableColumns>
|
||||||
<tableColumn width="116" minWidth="40" maxWidth="1000" id="uZt-BZ-OdO">
|
<tableColumn editable="NO" width="116" minWidth="40" maxWidth="1000" id="uZt-BZ-OdO">
|
||||||
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
|
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
|
||||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
|
||||||
</tableHeaderCell>
|
</tableHeaderCell>
|
||||||
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" refusesFirstResponder="YES" allowsUndo="NO" title="Text Cell" usesSingleLineMode="YES" id="vrW-w8-IWl">
|
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" allowsUndo="NO" title="Text Cell" usesSingleLineMode="YES" id="vrW-w8-IWl">
|
||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
|
||||||
</tableColumn>
|
</tableColumn>
|
||||||
</tableColumns>
|
</tableColumns>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -192,6 +192,14 @@ class MachinePicker: NSObject, NSTableViewDataSource, NSTableViewDelegate {
|
|||||||
machineSelector.selectTabViewItem(at: machineNameTable.selectedRow)
|
machineSelector.selectTabViewItem(at: machineNameTable.selectedRow)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func tableView(_ tableView: NSTableView, heightOfRow row: Int) -> CGFloat {
|
||||||
|
let font = NSFont.systemFont(ofSize: NSFont.systemFontSize)
|
||||||
|
|
||||||
|
// YUCK. TODO: find a way to use larger cells, with vertically-centred text.
|
||||||
|
// Likely that means not using NSTextFieldCell.
|
||||||
|
return font.ascender - font.descender + 2.0
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: - Machine builder
|
// MARK: - Machine builder
|
||||||
func selectedMachine() -> CSStaticAnalyser {
|
func selectedMachine() -> CSStaticAnalyser {
|
||||||
storeOptions()
|
storeOptions()
|
||||||
|
Loading…
Reference in New Issue
Block a user