Commit c14b5843 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

Smart list: fix constrains

Sometimes last used time is not displayed in Smart List. This patch
fix it by changing constrains

Change-Id: I81ac85e4c59e13130f0098e7af635a1704d80ad2
Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
parent 8ca0c7e8
......@@ -272,7 +272,6 @@ NSInteger const PRESENCE_TAG = 800;
else {
NSTextField* displayRingID = [result viewWithTag:RING_ID_LABEL];
[displayName setStringValue:displayNameString];
displayIDString = [NSString stringWithFormat:@"%@%@%@",@"(", displayIDString, @")"];
[displayRingID setStringValue:displayIDString];
}
NSImageView* photoView = [result viewWithTag:IMAGE_TAG];
......
......@@ -43,8 +43,17 @@
NSColor* backgroundColor = self.bgColor;
NSColor* borderColor = self.borderColor;
NSBezierPath* ovalPath = [NSBezierPath bezierPathWithRoundedRect: dirtyRect xRadius:[self.cornerRadius floatValue] yRadius:[self.cornerRadius floatValue]];
NSRect group = NSMakeRect(NSMinX(dirtyRect) + floor(NSWidth(dirtyRect) * 0.03333) + 0.5,
NSMinY(dirtyRect) + floor(NSHeight(dirtyRect) * 0.03333) + 0.5,
floor(NSWidth(dirtyRect) * 0.96667) - floor(NSWidth(dirtyRect) * 0.03333),
floor(NSHeight(dirtyRect) * 0.96667) - floor(NSHeight(dirtyRect) * 0.03333));
NSBezierPath* ovalPath = [NSBezierPath bezierPathWithRoundedRect:
NSMakeRect(NSMinX(group) + floor(NSWidth(group) * 0.00000 + 0.5),
NSMinY(group) + floor(NSHeight(group) * 0.00000 + 0.5),
floor(NSWidth(group) * 1.00000 + 0.5) - floor(NSWidth(group) * 0.00000 + 0.5),
floor(NSHeight(group) * 1.00000 + 0.5) - floor(NSHeight(group) * 0.00000 + 0.5))
xRadius:[self.cornerRadius floatValue] yRadius:[self.cornerRadius floatValue]];
[backgroundColor setFill];
[ovalPath fill];
[borderColor setStroke];
......
......@@ -3,6 +3,7 @@
<dependencies>
<development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="RingWindowController">
......@@ -77,7 +78,7 @@
<rect key="frame" x="1" y="1" width="321" height="60"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" tag="200" translatesAutoresizingMaskIntoConstraints="NO" id="epa-Ih-aKF" userLabel="name">
<textField horizontalHuggingPriority="750" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" tag="200" translatesAutoresizingMaskIntoConstraints="NO" id="epa-Ih-aKF" userLabel="name">
<rect key="frame" x="57" y="34" width="89" height="23"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" placeholderString="Display Role" id="uSw-g5-kte">
<font key="font" size="16" name="HelveticaNeue-Light"/>
......@@ -94,7 +95,10 @@
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSUser" id="bqQ-Jp-DPH"/>
</imageView>
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" tag="500" translatesAutoresizingMaskIntoConstraints="NO" id="MYe-rn-qOP" userLabel="UnreadMsgCount" customClass="RoundedTextField">
<rect key="frame" x="301" y="14" width="15" height="14"/>
<rect key="frame" x="295" y="11" width="21" height="14"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" secondItem="MYe-rn-qOP" secondAttribute="height" multiplier="3/2" priority="750" id="2hf-oz-IbF"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" placeholderString="n" drawsBackground="YES" id="sGB-x7-gig">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
......@@ -105,11 +109,11 @@
<color key="value" red="0.83734809027777779" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="2"/>
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<textField verticalHuggingPriority="750" tag="700" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bZ6-1S-zx2" userLabel="ringId">
<textField horizontalHuggingPriority="750" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" tag="700" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bZ6-1S-zx2" userLabel="ringId">
<rect key="frame" x="57" y="11" width="37" height="20"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" state="on" placeholderString="ringID" id="zp2-mv-NHW">
<font key="font" size="13" name="HelveticaNeue-Light"/>
......@@ -134,8 +138,11 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" tag="300" translatesAutoresizingMaskIntoConstraints="NO" id="epi-ZP-as5" userLabel="date">
<rect key="frame" x="278" y="36" width="40" height="20"/>
<textField verticalHuggingPriority="750" tag="300" translatesAutoresizingMaskIntoConstraints="NO" id="epi-ZP-as5" userLabel="date">
<rect key="frame" x="274" y="36" width="44" height="20"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="40" id="asz-gD-lug"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" placeholderString="details" id="BfK-c5-B1l">
<font key="font" size="13" name="HelveticaNeue-Light"/>
<color key="textColor" name="windowFrameColor" catalog="System" colorSpace="catalog"/>
......@@ -163,18 +170,19 @@
</button>
</subviews>
<constraints>
<constraint firstItem="epi-ZP-as5" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="epa-Ih-aKF" secondAttribute="trailing" constant="10" id="1nA-Ix-UwX"/>
<constraint firstItem="epa-Ih-aKF" firstAttribute="top" secondItem="Z6G-mQ-L3J" secondAttribute="top" constant="3" id="34y-lV-vl2"/>
<constraint firstItem="sHH-wj-oHs" firstAttribute="leading" secondItem="Z6G-mQ-L3J" secondAttribute="leading" constant="3" id="CGt-hN-ulS"/>
<constraint firstItem="bZ6-1S-zx2" firstAttribute="leading" secondItem="epa-Ih-aKF" secondAttribute="leading" id="Ffs-rJ-b8V"/>
<constraint firstItem="YkV-D4-ddd" firstAttribute="trailing" secondItem="sHH-wj-oHs" secondAttribute="trailing" id="HSa-sm-3vp"/>
<constraint firstItem="bZ6-1S-zx2" firstAttribute="bottom" secondItem="MYe-rn-qOP" secondAttribute="bottom" id="Jbg-Rb-S74"/>
<constraint firstItem="sHH-wj-oHs" firstAttribute="top" secondItem="Z6G-mQ-L3J" secondAttribute="top" constant="6" id="KMX-Ru-AEa"/>
<constraint firstItem="epi-ZP-as5" firstAttribute="centerY" secondItem="epa-Ih-aKF" secondAttribute="centerY" id="L49-TZ-Pju"/>
<constraint firstItem="epi-ZP-as5" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="bZ6-1S-zx2" secondAttribute="trailing" constant="10" id="N03-9f-gVt"/>
<constraint firstItem="bZ6-1S-zx2" firstAttribute="top" secondItem="epa-Ih-aKF" secondAttribute="bottom" constant="3" id="NnZ-fX-wbG"/>
<constraint firstAttribute="bottom" secondItem="sHH-wj-oHs" secondAttribute="bottom" constant="6" id="SJ6-9t-r0l"/>
<constraint firstItem="YkV-D4-ddd" firstAttribute="bottom" secondItem="sHH-wj-oHs" secondAttribute="bottom" id="TGB-Iw-hdK"/>
<constraint firstItem="epi-ZP-as5" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="bZ6-1S-zx2" secondAttribute="trailing" constant="5" id="Tn4-iJ-hWx"/>
<constraint firstAttribute="trailing" secondItem="epi-ZP-as5" secondAttribute="trailing" constant="5" id="XEf-2m-loK"/>
<constraint firstItem="MYe-rn-qOP" firstAttribute="centerY" secondItem="bZ6-1S-zx2" secondAttribute="centerY" id="Zeb-OX-Jds"/>
<constraint firstAttribute="trailing" secondItem="DAd-lc-L62" secondAttribute="trailing" constant="3" id="jOb-x2-6OF"/>
<constraint firstItem="epa-Ih-aKF" firstAttribute="leading" secondItem="sHH-wj-oHs" secondAttribute="trailing" constant="8" symbolic="YES" id="sdS-XG-xRu"/>
<constraint firstAttribute="trailing" secondItem="MYe-rn-qOP" secondAttribute="trailing" constant="5" id="yFn-ZR-eEJ"/>
......@@ -210,8 +218,8 @@
<action selector="hangUpClickedAtRow:" target="-1" id="mlM-gd-4bQ"/>
</connections>
</button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" tag="200" translatesAutoresizingMaskIntoConstraints="NO" id="sfz-V3-QhK">
<rect key="frame" x="6" y="24" width="276" height="23"/>
<textField horizontalHuggingPriority="750" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" tag="200" translatesAutoresizingMaskIntoConstraints="NO" id="sfz-V3-QhK">
<rect key="frame" x="6" y="24" width="73" height="23"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="Knk-h9-HbW"/>
</constraints>
......@@ -221,8 +229,8 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" tag="300" translatesAutoresizingMaskIntoConstraints="NO" id="Sm2-al-NU0">
<rect key="frame" x="6" y="3" width="276" height="20"/>
<textField horizontalHuggingPriority="750" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" tag="300" translatesAutoresizingMaskIntoConstraints="NO" id="Sm2-al-NU0">
<rect key="frame" x="6" y="3" width="40" height="20"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" placeholderString="details" id="mK5-kV-YOO">
<font key="font" size="13" name="HelveticaNeue-Light"/>
<color key="textColor" name="windowFrameColor" catalog="System" colorSpace="catalog"/>
......@@ -235,12 +243,10 @@
<constraint firstItem="goj-2q-MrC" firstAttribute="centerY" secondItem="nvG-hU-lKg" secondAttribute="centerY" id="Kym-eH-bYz"/>
<constraint firstItem="sfz-V3-QhK" firstAttribute="top" secondItem="nvG-hU-lKg" secondAttribute="top" constant="3" id="M4L-Af-Pfa"/>
<constraint firstItem="sfz-V3-QhK" firstAttribute="leading" secondItem="nvG-hU-lKg" secondAttribute="leading" constant="8" id="O23-cp-x3m"/>
<constraint firstItem="goj-2q-MrC" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Sm2-al-NU0" secondAttribute="trailing" constant="10" id="Sqh-4i-tSZ"/>
<constraint firstItem="Sm2-al-NU0" firstAttribute="leading" secondItem="nvG-hU-lKg" secondAttribute="leading" constant="8" id="WJh-9X-RGV"/>
<constraint firstItem="Sm2-al-NU0" firstAttribute="leading" secondItem="nvG-hU-lKg" secondAttribute="leading" constant="8" id="YZn-VJ-val"/>
<constraint firstAttribute="trailing" secondItem="goj-2q-MrC" secondAttribute="trailing" constant="3" id="hjs-hz-0hg"/>
<constraint firstItem="goj-2q-MrC" firstAttribute="leading" secondItem="Sm2-al-NU0" secondAttribute="trailing" constant="8" id="iHP-pI-Jw3"/>
<constraint firstItem="sfz-V3-QhK" firstAttribute="leading" secondItem="nvG-hU-lKg" secondAttribute="leading" constant="8" id="vjw-ee-Iqh"/>
<constraint firstItem="goj-2q-MrC" firstAttribute="leading" secondItem="sfz-V3-QhK" secondAttribute="trailing" constant="8" id="y0f-Av-r8z"/>
<constraint firstItem="goj-2q-MrC" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="sfz-V3-QhK" secondAttribute="trailing" constant="10" id="zKq-Ux-HAE"/>
</constraints>
<connections>
<outlet property="textField" destination="sfz-V3-QhK" id="0Ka-vn-gAW"/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment