mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix line number view position with vertical text
This commit is contained in:
parent
92230fc924
commit
a4009de077
@ -14,6 +14,7 @@
|
||||
### Fixes
|
||||
|
||||
- Fix an issue that a document kept in the Dock was not brought to the front on the reopen event even though no documents were displayed.
|
||||
- Fix an issue that the line number view went under the toolbar when the text orientation was vertical and the navigation bar was hidden.
|
||||
- Fix the view layout in the Quick Action bar.
|
||||
- Fix a potential memory leak.
|
||||
|
||||
|
@ -2,8 +2,7 @@
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="KjS-UJ-AjC">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22689"/>
|
||||
<capability name="NSView safe area layout guides" minToolsVersion="12.0"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22690"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
@ -12,7 +11,7 @@
|
||||
<objects>
|
||||
<viewController id="KjS-UJ-AjC" customClass="NavigationBarController" customModule="CotEditor" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<visualEffectView key="view" wantsLayer="YES" verticalCompressionResistancePriority="249" blendingMode="withinWindow" material="titlebar" state="followsWindowActiveState" id="Fb7-9r-keA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="72"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button hidden="YES" toolTip="Close split editor" verticalHuggingPriority="750" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="Bmo-XE-CCn">
|
||||
@ -113,7 +112,7 @@
|
||||
</binding>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<textField hidden="YES" wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Svt-vI-TEc">
|
||||
<textField hidden="YES" wantsLayer="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Svt-vI-TEc">
|
||||
<rect key="frame" x="68" y="2" width="107" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Extracting Outline…" id="aUE-uy-XLQ">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
@ -130,31 +129,29 @@
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="feF-Kd-UKM" firstAttribute="bottom" secondItem="uo6-wO-fJZ" secondAttribute="bottom" constant="-1" id="0Ge-40-6cs"/>
|
||||
<constraint firstAttribute="bottom" secondItem="uo6-wO-fJZ" secondAttribute="bottom" constant="-1" id="0Ge-40-6cs"/>
|
||||
<constraint firstItem="syK-XU-x2I" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="uo6-wO-fJZ" secondAttribute="trailing" constant="8" symbolic="YES" id="2MH-a6-qwS"/>
|
||||
<constraint firstItem="feF-Kd-UKM" firstAttribute="bottom" secondItem="FJH-xr-Bxo" secondAttribute="bottom" constant="4" id="4MP-Ey-t02"/>
|
||||
<constraint firstAttribute="bottom" secondItem="FJH-xr-Bxo" secondAttribute="bottom" constant="4" id="4MP-Ey-t02"/>
|
||||
<constraint firstItem="FJH-xr-Bxo" firstAttribute="leading" secondItem="Bmo-XE-CCn" secondAttribute="trailing" constant="2" id="4QS-rF-z9f"/>
|
||||
<constraint firstItem="MlW-Dz-FOk" firstAttribute="top" secondItem="feF-Kd-UKM" secondAttribute="top" id="6cS-JS-uMe"/>
|
||||
<constraint firstItem="FJH-xr-Bxo" firstAttribute="top" secondItem="feF-Kd-UKM" secondAttribute="top" constant="5" id="7pu-c1-Tzy"/>
|
||||
<constraint firstItem="MlW-Dz-FOk" firstAttribute="top" secondItem="Fb7-9r-keA" secondAttribute="top" id="6cS-JS-uMe"/>
|
||||
<constraint firstItem="FJH-xr-Bxo" firstAttribute="top" secondItem="Fb7-9r-keA" secondAttribute="top" constant="5" id="7pu-c1-Tzy"/>
|
||||
<constraint firstItem="MlW-Dz-FOk" firstAttribute="leading" secondItem="BUj-TD-scp" secondAttribute="trailing" id="A58-M8-L3L"/>
|
||||
<constraint firstItem="uo6-wO-fJZ" firstAttribute="leading" secondItem="MlW-Dz-FOk" secondAttribute="trailing" id="GA9-bT-tVf"/>
|
||||
<constraint firstItem="BUj-TD-scp" firstAttribute="leading" secondItem="FJH-xr-Bxo" secondAttribute="trailing" constant="4" id="JTE-zW-r6R"/>
|
||||
<constraint firstItem="feF-Kd-UKM" firstAttribute="bottom" secondItem="Bmo-XE-CCn" secondAttribute="bottom" constant="-1" id="Kke-Sl-ibg"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Bmo-XE-CCn" secondAttribute="bottom" constant="-1" id="Kke-Sl-ibg"/>
|
||||
<constraint firstItem="syK-XU-x2I" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Svt-vI-TEc" secondAttribute="trailing" constant="8" symbolic="YES" id="MTu-Pf-9wL"/>
|
||||
<constraint firstItem="uo6-wO-fJZ" firstAttribute="top" secondItem="feF-Kd-UKM" secondAttribute="top" id="Pdl-aM-DT9"/>
|
||||
<constraint firstItem="feF-Kd-UKM" firstAttribute="trailing" secondItem="syK-XU-x2I" secondAttribute="trailing" constant="1" id="YT4-Oj-3Yn"/>
|
||||
<constraint firstItem="Bmo-XE-CCn" firstAttribute="top" secondItem="feF-Kd-UKM" secondAttribute="top" id="lnf-XI-Uu9"/>
|
||||
<constraint firstItem="feF-Kd-UKM" firstAttribute="bottom" secondItem="MlW-Dz-FOk" secondAttribute="bottom" constant="-1" id="oZh-rX-9Nd"/>
|
||||
<constraint firstItem="Bmo-XE-CCn" firstAttribute="leading" secondItem="feF-Kd-UKM" secondAttribute="leading" constant="2" id="onf-dY-Bgm"/>
|
||||
<constraint firstItem="BUj-TD-scp" firstAttribute="top" secondItem="feF-Kd-UKM" secondAttribute="top" id="qXY-wb-kbw"/>
|
||||
<constraint firstItem="feF-Kd-UKM" firstAttribute="bottom" secondItem="syK-XU-x2I" secondAttribute="bottom" constant="-1" id="sNu-uV-dSg"/>
|
||||
<constraint firstItem="feF-Kd-UKM" firstAttribute="bottom" secondItem="BUj-TD-scp" secondAttribute="bottom" constant="-1" id="uPK-py-Bfo"/>
|
||||
<constraint firstItem="uo6-wO-fJZ" firstAttribute="top" secondItem="Fb7-9r-keA" secondAttribute="top" id="Pdl-aM-DT9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="syK-XU-x2I" secondAttribute="trailing" constant="1" id="YT4-Oj-3Yn"/>
|
||||
<constraint firstItem="Bmo-XE-CCn" firstAttribute="top" secondItem="Fb7-9r-keA" secondAttribute="top" id="lnf-XI-Uu9"/>
|
||||
<constraint firstAttribute="bottom" secondItem="MlW-Dz-FOk" secondAttribute="bottom" constant="-1" id="oZh-rX-9Nd"/>
|
||||
<constraint firstItem="Bmo-XE-CCn" firstAttribute="leading" secondItem="Fb7-9r-keA" secondAttribute="leading" constant="2" id="onf-dY-Bgm"/>
|
||||
<constraint firstItem="BUj-TD-scp" firstAttribute="top" secondItem="Fb7-9r-keA" secondAttribute="top" id="qXY-wb-kbw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="syK-XU-x2I" secondAttribute="bottom" constant="-1" id="sNu-uV-dSg"/>
|
||||
<constraint firstAttribute="bottom" secondItem="BUj-TD-scp" secondAttribute="bottom" constant="-1" id="uPK-py-Bfo"/>
|
||||
<constraint firstItem="Svt-vI-TEc" firstAttribute="leading" secondItem="uo6-wO-fJZ" secondAttribute="leading" constant="8" id="v6J-Te-MSs"/>
|
||||
<constraint firstItem="syK-XU-x2I" firstAttribute="top" secondItem="feF-Kd-UKM" secondAttribute="top" id="vXG-JU-O6t"/>
|
||||
<constraint firstItem="Svt-vI-TEc" firstAttribute="centerY" secondItem="feF-Kd-UKM" secondAttribute="centerY" constant="1" id="zxj-gI-io3"/>
|
||||
<constraint firstItem="syK-XU-x2I" firstAttribute="top" secondItem="Fb7-9r-keA" secondAttribute="top" id="vXG-JU-O6t"/>
|
||||
<constraint firstItem="Svt-vI-TEc" firstAttribute="centerY" secondItem="Fb7-9r-keA" secondAttribute="centerY" constant="1" id="zxj-gI-io3"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="feF-Kd-UKM"/>
|
||||
<viewLayoutGuide key="layoutMargins" id="z15-5N-tWk"/>
|
||||
</visualEffectView>
|
||||
<connections>
|
||||
<outlet property="editorSplitMenu" destination="yKS-mO-j45" id="XVz-tF-UbW"/>
|
||||
|
@ -111,6 +111,18 @@ final class DocumentViewController: NSSplitViewController, ThemeChanging, NSTool
|
||||
// set identifier for state restoration
|
||||
self.identifier = NSUserInterfaceItemIdentifier("DocumentViewController")
|
||||
|
||||
// add hidden view for toolbar area
|
||||
// -> To avoid the line number view goes under the toolbar when the text orientation is vertical
|
||||
// and the navigation bar is hidden. (2024-07, macOS 14)
|
||||
let safeAreaView = NSVisualEffectView()
|
||||
safeAreaView.material = .windowBackground
|
||||
let safeAreaViewController = NSViewController()
|
||||
safeAreaViewController.view = safeAreaView
|
||||
self.addChild(safeAreaViewController)
|
||||
let constraint = safeAreaView.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor, constant: -1)
|
||||
constraint.priority = .defaultHigh
|
||||
constraint.isActive = true
|
||||
|
||||
self.addChild(self.splitViewController)
|
||||
|
||||
// set status bar
|
||||
|
Loading…
Reference in New Issue
Block a user