Commit 39ce23d4 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

10.14 compatibility: UI

This patch fixes next UI problem:

- search contact field still visible when open account settings
- username on welcome view is not centered vertically
- background for account settings
- on account settings add image button is not visible

Change-Id: I4a62a03a4576103839e068d3bd14269391ce05b3
parent 8973ddae
......@@ -114,7 +114,7 @@ typedef NS_ENUM(NSInteger, TagViews) {
- (void)awakeFromNib
{
[super awakeFromNib];
// [photoView setBordered:YES];
[photoView setBordered:YES];
[addProfilePhotoImage setWantsLayer: YES];
devicesTableView.delegate = self;
devicesTableView.dataSource = self;
......@@ -141,7 +141,7 @@ typedef NS_ENUM(NSInteger, TagViews) {
QVariant photo = GlobalInstances::pixmapManipulator().personPhoto(ba, nil);
if(QtMac::toNSImage(qvariant_cast<QPixmap>(photo))) {
//[photoView setBordered:NO];
[photoView setBordered:NO];
NSImage *image = QtMac::toNSImage(qvariant_cast<QPixmap>(photo));
CGFloat newSize = MIN(image.size.height, image.size.width);
image = [image cropImageToSize:CGSizeMake(newSize, newSize)];
......@@ -149,7 +149,7 @@ typedef NS_ENUM(NSInteger, TagViews) {
[addProfilePhotoImage setHidden:YES];
} else {
[photoView setImage:nil];
// [photoView setBordered:YES];
[photoView setBordered:YES];
[addProfilePhotoImage setHidden:NO];
}
NSString* displayName = @(account.profileInfo.alias.c_str());
......@@ -235,13 +235,13 @@ typedef NS_ENUM(NSInteger, TagViews) {
CGFloat newSize = MIN(image.size.height, image.size.width);
outputImage = [outputImage cropImageToSize:CGSizeMake(newSize, newSize)];
[photoView setImage: [outputImage roundCorners: outputImage.size.height * 0.5]];
// [photoView setBordered:NO];
[photoView setBordered:NO];
[addProfilePhotoImage setHidden:YES];
auto imageToBytes = QByteArray::fromNSData([outputImage TIFFRepresentation]).toBase64();
std::string imageToString = std::string(imageToBytes.constData(), imageToBytes.length());
self.accountModel->setAvatar(self.selectedAccountID, imageToString);
} else if(!photoView.image) {
//[photoView setBordered:YES];
[photoView setBordered:YES];
[addProfilePhotoImage setHidden:NO];
}
}
......
......@@ -92,6 +92,7 @@ CGFloat const VIEW_INSET = 20;
[self hide];
return;
}
[self.view.window makeFirstResponder:self.view];
[accountGeneralVC setSelectedAccount: selectedAccountID];
[accountAdvancedVC setSelectedAccount: selectedAccountID];
[self displayGeneralSettings];
......
......@@ -51,6 +51,9 @@
self.accountAvatar.layer.masksToBounds = YES;
[self.accountStatus setWantsLayer:YES];
[self.accountAvatar.layer setBackgroundColor:[[NSColor ringGreyLight] CGColor]];
if (@available(macOS 10.14, *)) {
self.createNewAccountImage.contentTintColor = [NSColor clearColor];
}
}
}
......
......@@ -19,6 +19,6 @@
#import <Cocoa/Cocoa.h>
@interface RingIDField : NSTextField
@interface RingIDField : NSView
@end
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14113" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14113"/>
<capability name="box content view" minToolsVersion="7.0"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14313.18"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
<capability name="system font weights other than Regular or Bold" minToolsVersion="7.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="AccRingGeneralVC">
......@@ -37,8 +35,8 @@
<rect key="frame" x="1" y="1" width="618" height="465"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
<color key="borderColor" name="controlHighlightColor" catalog="System" colorSpace="catalog"/>
<color key="fillColor" name="controlColor" catalog="System" colorSpace="catalog"/>
<color key="borderColor" red="0.88235294117647056" green="0.88235294117647056" blue="0.88235294117647056" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="fillColor" red="0.91764705882352937" green="0.91764705882352937" blue="0.91764705882352937" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</box>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oMU-r6-ptk">
<rect key="frame" x="266" y="479" width="63" height="18"/>
......@@ -177,7 +175,7 @@
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn identifier="" width="575" minWidth="40" maxWidth="1000" id="Smk-YT-73t">
<tableColumn width="575" minWidth="40" maxWidth="1000" id="Smk-YT-73t">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
......@@ -260,11 +258,11 @@
<constraints>
<constraint firstAttribute="height" constant="150" id="Sca-Sh-Zm3"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="QUF-D7-MhJ">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="QUF-D7-MhJ">
<rect key="frame" x="1" y="133" width="578" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="RnI-3s-sSx">
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="RnI-3s-sSx">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
......@@ -321,7 +319,7 @@
<rect key="frame" x="0.0" y="0.0" width="128" height="21"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="center" placeholderString="Enter name" bezelStyle="round" id="kt0-P6-fdQ">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
......@@ -379,14 +377,14 @@
<rect key="frame" x="1" y="1" width="578" height="0.0"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowHeight="1" viewBased="YES" id="aau-IO-oSs">
<tableView verticalHuggingPriority="750" ambiguous="YES" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowHeight="1" viewBased="YES" id="aau-IO-oSs">
<rect key="frame" x="0.0" y="0.0" width="578" height="104"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="0.0"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn identifier="" width="575" maxWidth="1000" id="Ow9-IO-1MA">
<tableColumn width="575" maxWidth="1000" id="Ow9-IO-1MA">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
......@@ -456,11 +454,11 @@
<constraints>
<constraint firstAttribute="height" constant="2" id="TeK-1Q-aAk"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="0.02" horizontal="YES" id="TaD-4q-JiG">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.02" horizontal="YES" id="TaD-4q-JiG">
<rect key="frame" x="-100" y="-100" width="578" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="cGM-Ld-1hV">
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="cGM-Ld-1hV">
<rect key="frame" x="573" y="1" width="16" height="0.0"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14113" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14113"/>
<capability name="box content view" minToolsVersion="7.0"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14313.18"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
<capability name="system font weights other than Regular or Bold" minToolsVersion="7.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="AccSipGeneralVC">
......@@ -34,8 +32,8 @@
<rect key="frame" x="1" y="1" width="618" height="450"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
<color key="borderColor" name="controlHighlightColor" catalog="System" colorSpace="catalog"/>
<color key="fillColor" name="controlColor" catalog="System" colorSpace="catalog"/>
<color key="borderColor" red="0.88235294117647056" green="0.88235294117647056" blue="0.88235294117647056" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="fillColor" red="0.91764705882352937" green="0.91764705882352937" blue="0.91764705882352937" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</box>
<view translatesAutoresizingMaskIntoConstraints="NO" id="pL7-7S-saC">
<rect key="frame" x="110" y="0.0" width="400" height="513"/>
......@@ -73,7 +71,7 @@
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="center" placeholderString="Enter name" bezelStyle="round" id="YAG-qB-4wH">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
......@@ -136,7 +134,7 @@
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" drawsBackground="YES" id="zmU-E8-9jO">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
......@@ -147,7 +145,7 @@
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" drawsBackground="YES" id="CRt-f6-XCu">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
......@@ -158,7 +156,7 @@
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" drawsBackground="YES" id="Agb-My-Tpl">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
......@@ -182,7 +180,7 @@
<rect key="frame" x="120" y="140" width="240" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" drawsBackground="YES" id="9q6-1c-CYo">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
......@@ -193,7 +191,7 @@
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" drawsBackground="YES" id="eCQ-fg-fu6">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
......
......@@ -13,7 +13,6 @@
<outlet property="currentView" destination="se5-gp-TjO" id="Sae-7F-MB3"/>
<outlet property="qrcodeView" destination="dZR-JL-MY4" id="6Jf-42-qwY"/>
<outlet property="ringIDLabel" destination="JN3-vO-zcd" id="WHd-L7-6od"/>
<outlet property="ringLabelTrailingConstraint" destination="4u6-30-3Ac" id="SnB-9E-wuO"/>
<outlet property="shareButton" destination="Oac-o7-2Ge" id="b0D-xr-PCx"/>
<outlet property="smartViewVC" destination="jrf-42-1l2" id="lM5-3U-244"/>
<outlet property="welcomeContainer" destination="D6e-KX-8gC" id="zV3-38-ClK"/>
......@@ -460,21 +459,31 @@
<binding destination="-2" name="hidden" keyPath="self.notRingAccount" id="r7A-Pi-WHz"/>
</connections>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JN3-vO-zcd" userLabel="Ring ID" customClass="RingIDField">
<customView translatesAutoresizingMaskIntoConstraints="NO" id="phj-Jr-1k3" customClass="RingIDField">
<rect key="frame" x="20" y="64" width="400" height="26"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JN3-vO-zcd" userLabel="Ring ID">
<rect key="frame" x="-2" y="3" width="404" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="400" id="ywt-Ml-u9k"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" refusesFirstResponder="YES" sendsActionOnEndEditing="YES" alignment="center" id="qCF-Zf-vZg">
<font key="font" size="15" name="HelveticaNeue"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="26" id="TYe-h2-pPT"/>
<constraint firstAttribute="width" constant="400" id="ywt-Ml-u9k"/>
<constraint firstAttribute="height" constant="26" id="MfX-MV-DHO"/>
<constraint firstItem="JN3-vO-zcd" firstAttribute="centerX" secondItem="phj-Jr-1k3" secondAttribute="centerX" id="NjD-HV-YiQ"/>
<constraint firstAttribute="width" constant="400" id="OiR-zK-Cwd"/>
<constraint firstItem="JN3-vO-zcd" firstAttribute="centerY" secondItem="phj-Jr-1k3" secondAttribute="centerY" id="aWE-ds-8AU"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" refusesFirstResponder="YES" sendsActionOnEndEditing="YES" borderStyle="border" alignment="center" id="qCF-Zf-vZg">
<font key="font" size="15" name="HelveticaNeue"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="-2" name="hidden" keyPath="self.isSIPAccount" id="llK-P7-CiI"/>
<binding destination="-2" name="hidden" keyPath="self.isSIPAccount" id="wn4-Ot-QG5"/>
</connections>
</textField>
</customView>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="f62-JV-dgr">
<rect key="frame" x="148" y="175" width="225" height="75"/>
<constraints>
......@@ -528,19 +537,18 @@
</subviews>
<constraints>
<constraint firstItem="f62-JV-dgr" firstAttribute="top" secondItem="D6e-KX-8gC" secondAttribute="top" constant="20" id="0b6-u8-yQg"/>
<constraint firstItem="eXV-BT-B6J" firstAttribute="leading" secondItem="JN3-vO-zcd" secondAttribute="trailing" priority="999" constant="11" id="4u6-30-3Ac"/>
<constraint firstItem="Oac-o7-2Ge" firstAttribute="centerY" secondItem="JN3-vO-zcd" secondAttribute="centerY" id="9sL-W9-dDT"/>
<constraint firstItem="Oac-o7-2Ge" firstAttribute="centerY" secondItem="phj-Jr-1k3" secondAttribute="centerY" id="7Mi-oH-cpB"/>
<constraint firstItem="VJ1-xk-v5e" firstAttribute="centerX" secondItem="D6e-KX-8gC" secondAttribute="centerX" id="ID9-YU-lFv"/>
<constraint firstAttribute="trailing" secondItem="Oac-o7-2Ge" secondAttribute="trailing" constant="20" id="J2a-v7-JnP"/>
<constraint firstItem="eXV-BT-B6J" firstAttribute="centerY" secondItem="JN3-vO-zcd" secondAttribute="centerY" id="KqQ-sn-ZT0"/>
<constraint firstAttribute="height" constant="270" id="PLl-IK-oQA"/>
<constraint firstItem="Oac-o7-2Ge" firstAttribute="leading" secondItem="eXV-BT-B6J" secondAttribute="trailing" constant="9" id="TPn-gc-dPs"/>
<constraint firstItem="f62-JV-dgr" firstAttribute="centerX" secondItem="D6e-KX-8gC" secondAttribute="centerX" id="VTp-M2-i33"/>
<constraint firstItem="JN3-vO-zcd" firstAttribute="top" secondItem="kFj-Sh-o5u" secondAttribute="bottom" constant="8" id="WCt-uf-zGJ"/>
<constraint firstItem="kFj-Sh-o5u" firstAttribute="centerX" secondItem="D6e-KX-8gC" secondAttribute="centerX" id="X8P-ae-ug3"/>
<constraint firstItem="phj-Jr-1k3" firstAttribute="top" secondItem="kFj-Sh-o5u" secondAttribute="bottom" constant="8" id="bWw-O7-rZE"/>
<constraint firstItem="eXV-BT-B6J" firstAttribute="centerY" secondItem="phj-Jr-1k3" secondAttribute="centerY" id="hRc-dW-Yyd"/>
<constraint firstItem="eXV-BT-B6J" firstAttribute="leading" secondItem="phj-Jr-1k3" secondAttribute="trailing" constant="11" id="iRA-Sd-F98"/>
<constraint firstItem="eXV-BT-B6J" firstAttribute="top" secondItem="kFj-Sh-o5u" secondAttribute="bottom" constant="6" id="jfB-b4-Gyc"/>
<constraint firstAttribute="width" constant="520" id="nXn-Wh-VAi"/>
<constraint firstItem="JN3-vO-zcd" firstAttribute="centerX" secondItem="D6e-KX-8gC" secondAttribute="centerX" priority="750" id="uWT-kG-rQw"/>
<constraint firstItem="kFj-Sh-o5u" firstAttribute="top" secondItem="VJ1-xk-v5e" secondAttribute="bottom" constant="8" id="wQ0-UB-Yo2"/>
<constraint firstItem="VJ1-xk-v5e" firstAttribute="top" secondItem="f62-JV-dgr" secondAttribute="bottom" constant="8" id="zNb-f8-m6q"/>
</constraints>
......
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