Revision: 29855
http://sourceforge.net/p/bibdesk/svn/29855
Author: hofman
Date: 2025-11-19 23:19:13 +0000 (Wed, 19 Nov 2025)
Log Message:
-----------
set height of template options view to largest required height
Modified Paths:
--------------
trunk/bibdesk/BDSKTemplateDocument.m
trunk/bibdesk/Base.lproj/TemplateDocument.xib
Modified: trunk/bibdesk/BDSKTemplateDocument.m
===================================================================
--- trunk/bibdesk/BDSKTemplateDocument.m 2025-11-19 17:14:57 UTC (rev
29854)
+++ trunk/bibdesk/BDSKTemplateDocument.m 2025-11-19 23:19:13 UTC (rev
29855)
@@ -213,10 +213,16 @@
for (NSView *view in views)
[[[view widthAnchor] constraintEqualToConstant:width]
setActive:YES];
}
- CGFloat width = [fieldOptionsView fittingSize].width;
+ NSSize size = [fieldOptionsView fittingSize];
for (NSView *view in @[appendingOptionsView, textOptionsView,
fontOptionsView])
- [[[view widthAnchor] constraintEqualToConstant:width] setActive:YES];
- [[[optionsView widthAnchor] constraintGreaterThanOrEqualToConstant:width]
setActive:YES];
+ [[[view widthAnchor] constraintEqualToConstant:size.width]
setActive:YES];
+ [[[optionsView widthAnchor]
constraintGreaterThanOrEqualToConstant:size.width] setActive:YES];
+ for (NSLayoutConstraint *constraint in [optionsView constraints]) {
+ if ([constraint firstAttribute] == NSLayoutAttributeHeight) {
+ [constraint setConstant:3.0 * size.height];
+ break;
+ }
+ }
if (@available(macOS 10.14, *)) {
[prefixTemplateTextView setDrawsBackground:NO];
@@ -235,7 +241,7 @@
[tableView setStyle:NSTableViewStylePlain];
NSTableColumn *tableColumn = [tableView
tableColumnWithIdentifier:@"pubType"];
- width = NSWidth([[[tableView enclosingScrollView] contentView]
visibleRect]) - 2.0 * [tableView intercellSpacing].width - [[tableView
tableColumnWithIdentifier:@"included"] width];
+ CGFloat width = NSWidth([[[tableView enclosingScrollView] contentView]
visibleRect]) - 2.0 * [tableView intercellSpacing].width - [[tableView
tableColumnWithIdentifier:@"included"] width];
[tableColumn setWidth:fmax(width, [tableColumn minWidth])];
[(NSNumberFormatter *)[sizeComboBox formatter]
setZeroSymbol:NSLocalizedString(@"Inherit", @"Inherit font size placeholder")];
Modified: trunk/bibdesk/Base.lproj/TemplateDocument.xib
===================================================================
--- trunk/bibdesk/Base.lproj/TemplateDocument.xib 2025-11-19 17:14:57 UTC
(rev 29854)
+++ trunk/bibdesk/Base.lproj/TemplateDocument.xib 2025-11-19 23:19:13 UTC
(rev 29855)
@@ -418,7 +418,7 @@
</view>
</box>
<textField verticalHuggingPriority="750"
translatesAutoresizingMaskIntoConstraints="NO" id="1542">
- <rect key="frame" x="18" y="510" width="37"
height="14"/>
+ <rect key="frame" x="18" y="510" width="62"
height="14"/>
<textFieldCell key="cell" controlSize="small"
scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES"
alignment="right" title="Default type:" id="1901">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor"
catalog="System" colorSpace="catalog"/>
@@ -426,7 +426,7 @@
</textFieldCell>
</textField>
<popUpButton horizontalHuggingPriority="750"
verticalHuggingPriority="751" translatesAutoresizingMaskIntoConstraints="NO"
id="1537">
- <rect key="frame" x="32" y="482" width="25"
height="22"/>
+ <rect key="frame" x="32" y="482" width="50"
height="22"/>
<popUpButtonCell key="cell" type="push"
bezelStyle="rounded" alignment="left" controlSize="small"
lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel"
inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY"
selectedItem="1541" id="1900">
<behavior key="behavior" lightByBackground="YES"
lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -443,9 +443,9 @@
</connections>
</popUpButton>
<scrollView autohidesScrollers="YES"
horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19"
verticalPageScroll="10" usesPredominantAxisScrolling="NO"
translatesAutoresizingMaskIntoConstraints="NO" id="ZVm-ex-Jeo">
- <rect key="frame" x="20" y="177" width="33"
height="301"/>
+ <rect key="frame" x="20" y="177" width="58"
height="301"/>
<clipView key="contentView" id="D7r-8N-QXM">
- <rect key="frame" x="1" y="1" width="31"
height="299"/>
+ <rect key="frame" x="1" y="1" width="56"
height="299"/>
<autoresizingMask key="autoresizingMask"
widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750"
allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly"
alternatingRowBackgroundColors="YES" columnReordering="NO"
multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO"
headerView="W7l-ga-thB" viewBased="YES" id="6Be-c7-qbI"
customClass="BDSKTableView">
@@ -547,8 +547,8 @@
</tableView>
</subviews>
</clipView>
- <scroller key="horizontalScroller" wantsLayer="YES"
verticalHuggingPriority="750" doubleValue="0.67500000000000004"
horizontal="YES" id="qw6-WF-LwA">
- <rect key="frame" x="1" y="284" width="31"
height="16"/>
+ <scroller key="horizontalScroller" wantsLayer="YES"
verticalHuggingPriority="750" horizontal="YES" id="qw6-WF-LwA">
+ <rect key="frame" x="1" y="284" width="56"
height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES"
wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="vni-Rr-d7f">
@@ -561,13 +561,13 @@
</tableHeaderView>
</scrollView>
<box verticalCompressionResistancePriority="250"
title="Item Template" translatesAutoresizingMaskIntoConstraints="NO" id="1556">
- <rect key="frame" x="53" y="303" width="764"
height="94"/>
+ <rect key="frame" x="78" y="303" width="739"
height="94"/>
<view key="contentView" id="vaM-Fl-fT2">
- <rect key="frame" x="3" y="3" width="758"
height="76"/>
+ <rect key="frame" x="3" y="3" width="733"
height="76"/>
<autoresizingMask key="autoresizingMask"
widthSizable="YES" heightSizable="YES"/>
<subviews>
<tokenField
horizontalCompressionResistancePriority="250"
verticalCompressionResistancePriority="250"
translatesAutoresizingMaskIntoConstraints="NO" id="1558"
customClass="BDSKTokenField">
- <rect key="frame" x="12" y="10"
width="734" height="56"/>
+ <rect key="frame" x="12" y="10"
width="709" height="56"/>
<constraints>
<constraint firstAttribute="height"
relation="greaterThanOrEqual" constant="22" id="bkY-kv-FEE"/>
<constraint firstAttribute="height"
priority="499" constant="56" id="bn0-3P-xsm"/>
@@ -596,13 +596,13 @@
</view>
</box>
<box title="Options for field"
translatesAutoresizingMaskIntoConstraints="NO" id="1559">
- <rect key="frame" x="53" y="173" width="764"
height="126"/>
+ <rect key="frame" x="78" y="173" width="739"
height="126"/>
<view key="contentView" id="TSn-hs-oy2">
- <rect key="frame" x="3" y="3" width="758"
height="108"/>
+ <rect key="frame" x="3" y="3" width="733"
height="108"/>
<autoresizingMask key="autoresizingMask"
widthSizable="YES" heightSizable="YES"/>
<subviews>
<customView
translatesAutoresizingMaskIntoConstraints="NO" id="cLa-yx-uut">
- <rect key="frame" x="4" y="6" width="750"
height="96"/>
+ <rect key="frame" x="4" y="6" width="725"
height="96"/>
<constraints>
<constraint firstAttribute="height"
constant="96" id="ZSn-Gp-DmP"/>
</constraints>
@@ -624,15 +624,15 @@
</connections>
</box>
<box title="Available Fields"
translatesAutoresizingMaskIntoConstraints="NO" id="1547">
- <rect key="frame" x="53" y="401" width="764"
height="123"/>
+ <rect key="frame" x="78" y="401" width="739"
height="123"/>
<view key="contentView" id="fnr-QQ-bwY">
- <rect key="frame" x="3" y="3" width="758"
height="105"/>
+ <rect key="frame" x="3" y="3" width="733"
height="105"/>
<autoresizingMask key="autoresizingMask"
widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView borderType="none"
autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10"
verticalLineScroll="10" verticalPageScroll="10" hasVerticalScroller="NO"
usesPredominantAxisScrolling="NO"
translatesAutoresizingMaskIntoConstraints="NO" id="1549">
- <rect key="frame" x="12" y="0.0"
width="734" height="95"/>
+ <rect key="frame" x="12" y="0.0"
width="709" height="95"/>
<clipView key="contentView"
autoresizesSubviews="NO" drawsBackground="NO" copiesOnScroll="NO"
id="uAv-0P-sO3">
- <rect key="frame" x="0.0" y="0.0"
width="734" height="95"/>
+ <rect key="frame" x="0.0" y="0.0"
width="709" height="95"/>
<autoresizingMask
key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<customView
translatesAutoresizingMaskIntoConstraints="NO" id="1550"
customClass="BDSKFlippedView">
@@ -778,7 +778,7 @@
</connections>
</customView>
<customView placeholderIntrinsicWidth="9"
placeholderIntrinsicHeight="9" translatesAutoresizingMaskIntoConstraints="NO"
id="hQX-jZ-Y2Y" customClass="BDSKResizeView">
- <rect key="frame" x="56" y="298" width="758"
height="9"/>
+ <rect key="frame" x="81" y="298" width="733"
height="9"/>
<connections>
<outlet property="constraint"
destination="bn0-3P-xsm" id="BGv-oq-fab"/>
</connections>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit