Commit 89398b63 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk

UI: call view border

Hide split view divider and remove blur border on call view.

Change-Id: I3422b98cd7d02508d2e314d07884ebf17a28fc4d
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 91c17998
......@@ -69,7 +69,7 @@
// Main container
@property (unsafe_unretained) IBOutlet NSSplitView* splitView;
@property (unsafe_unretained) IBOutlet NSImageView* backgroundImage;
@property (unsafe_unretained) IBOutlet NSView* backgroundImage;
@property (unsafe_unretained) IBOutlet NSBox* bluerBackgroundEffect;
// Header info
......@@ -201,6 +201,8 @@
bluerBackgroundEffect.alphaValue = 0.6;
[audioCallView setWantsLayer:YES];
[audioCallView.layer setBackgroundColor: [[NSColor clearColor] CGColor]];
[backgroundImage setWantsLayer: YES];
backgroundImage.layer.contentsGravity = kCAGravityResizeAspectFill;
}
-(void) updateDurationLabel
......@@ -332,7 +334,6 @@
[headerContainer setHidden:NO];
[previewView setHidden: NO];
[bluerBackgroundEffect setHidden:YES];
[bluerBackgroundEffect.layer setBackgroundFilters: nil];
[backgroundImage setHidden:YES];
}
......@@ -347,17 +348,24 @@
auto it = getConversationFromUid(convUid_, *convModel);
NSImage *image= [self getContactImageOfSize:120.0 withDefaultAvatar:NO];
if(image) {
CIImage * ciImage = [[CIImage alloc] initWithData:[image TIFFRepresentation]];
CIContext *context = [[CIContext alloc] init];
CIFilter *clamp = [CIFilter filterWithName:@"CIAffineClamp"];
[clamp setValue:[NSAffineTransform transform] forKey:@"inputTransform"];
[clamp setValue:ciImage forKey: kCIInputImageKey];
CIFilter* bluerFilter = [CIFilter filterWithName:@"CIGaussianBlur"];
[bluerFilter setDefaults];
[bluerFilter setValue:[NSNumber numberWithFloat: 30] forKey:@"inputRadius"];
[bluerBackgroundEffect.layer setBackgroundFilters:@[bluerFilter]];
[backgroundImage setImage: image];
[bluerFilter setValue:[NSNumber numberWithFloat: 9] forKey:@"inputRadius"];
[bluerFilter setValue:[clamp valueForKey:kCIOutputImageKey] forKey: kCIInputImageKey];
CIImage *result = [bluerFilter valueForKey:kCIOutputImageKey];
CGRect extent = [result extent];
CGImageRef cgImage = [context createCGImage:result fromRect: [ciImage extent]];
NSImage *bluredImage = [[NSImage alloc] initWithCGImage:cgImage size:NSSizeFromCGSize(CGSizeMake(image.size.width, image.size.height))];
backgroundImage.layer.contents = bluredImage;
[backgroundImage setHidden:NO];
} else {
[bluerBackgroundEffect.layer setBackgroundFilters:nil];
[bluerBackgroundEffect setFillColor:[NSColor ringDarkGrey]];
[backgroundImage setHidden:YES];
[backgroundImage setImage:nil];
}
}
......@@ -653,8 +661,6 @@
//background view
[bluerBackgroundEffect setHidden:NO];
[backgroundImage setHidden:NO];
[backgroundImage setImage:nil];
[bluerBackgroundEffect setBackgroundFilters:nil];
//outgoing view
[outgoingPersonLabel setStringValue:@""];
[outgoingStateLabel setStringValue:@""];
......@@ -1004,4 +1010,9 @@
[[headerContainer animator] setAlphaValue:move];
}
- (BOOL)splitView:(NSSplitView *)splitView shouldHideDividerAtIndex:(NSInteger)dividerIndex
{
return YES;
}
@end
This diff is collapsed.
......@@ -32,9 +32,6 @@
<rect key="frame" x="0.0" y="0.0" width="1053" height="658"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<box horizontalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="Pav-Bw-GgK">
<rect key="frame" x="322" y="0.0" width="5" height="658"/>
</box>
<customView wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YgH-CN-tkB" userLabel="Left Panel">
<rect key="frame" x="0.0" y="0.0" width="324" height="658"/>
<subviews>
......@@ -564,16 +561,16 @@
</constraints>
</customView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Fzg-MB-mlx" userLabel="HomeView">
<rect key="frame" x="325" y="0.0" width="728" height="658"/>
<rect key="frame" x="324" y="0.0" width="729" height="658"/>
<subviews>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="6bh-ow-nJO">
<rect key="frame" x="0.0" y="0.0" width="728" height="172"/>
<rect key="frame" x="0.0" y="0.0" width="729" height="172"/>
<constraints>
<constraint firstAttribute="height" constant="172" id="hCN-uz-Nmc"/>
</constraints>
</customView>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dZR-JL-MY4">
<rect key="frame" x="264" y="229" width="200" height="200"/>
<rect key="frame" x="265" y="229" width="200" height="200"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="RCZ-Wt-iKD"/>
<constraint firstAttribute="height" constant="200" id="tSn-OT-Zn8"/>
......@@ -586,7 +583,7 @@
</userDefinedRuntimeAttributes>
</imageView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="D6e-KX-8gC">
<rect key="frame" x="104" y="194" width="520" height="270"/>
<rect key="frame" x="105" y="194" width="520" height="270"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kFj-Sh-o5u">
<rect key="frame" x="95" y="98" width="330" height="19"/>
......@@ -628,7 +625,7 @@
</connections>
</customView>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="f62-JV-dgr">
<rect key="frame" x="148" y="175" width="225" height="75"/>
<rect key="frame" x="147" y="175" width="225" height="75"/>
<constraints>
<constraint firstAttribute="height" constant="75" id="mWM-v0-n2w"/>
<constraint firstAttribute="width" constant="225" id="paw-4z-Zbv"/>
......@@ -670,7 +667,7 @@
</connections>
</button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VJ1-xk-v5e">
<rect key="frame" x="24" y="125" width="473" height="42"/>
<rect key="frame" x="23" y="125" width="473" height="42"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="Ring is free software for universal communication which respects the freedoms and privacy of its users." id="eln-Vm-t0d">
<font key="font" size="15" name="HelveticaNeue"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
......@@ -697,7 +694,7 @@
</constraints>
</customView>
<customView focusRingType="none" translatesAutoresizingMaskIntoConstraints="NO" id="tSW-YT-asL">
<rect key="frame" x="0.0" y="0.0" width="728" height="658"/>
<rect key="frame" x="0.0" y="0.0" width="729" height="658"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="340" id="5yo-rb-X1O"/>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="725" id="ccX-uq-zuj"/>
......@@ -723,12 +720,9 @@
</subviews>
<constraints>
<constraint firstItem="YgH-CN-tkB" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="H99-2E-fs4"/>
<constraint firstAttribute="bottom" secondItem="Pav-Bw-GgK" secondAttribute="bottom" id="QrG-jO-ix7"/>
<constraint firstItem="Pav-Bw-GgK" firstAttribute="leading" secondItem="YgH-CN-tkB" secondAttribute="trailing" id="RdH-bx-3aI"/>
<constraint firstAttribute="trailing" secondItem="Fzg-MB-mlx" secondAttribute="trailing" id="T3I-2c-Eto"/>
<constraint firstItem="Fzg-MB-mlx" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="VUS-o0-RNY"/>
<constraint firstItem="Fzg-MB-mlx" firstAttribute="leading" secondItem="YgH-CN-tkB" secondAttribute="trailing" constant="1" id="Xgw-Na-kgh"/>
<constraint firstItem="Pav-Bw-GgK" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="hcV-ir-ZEc"/>
<constraint firstItem="Fzg-MB-mlx" firstAttribute="leading" secondItem="YgH-CN-tkB" secondAttribute="trailing" id="Xgw-Na-kgh"/>
<constraint firstAttribute="bottom" secondItem="YgH-CN-tkB" secondAttribute="bottom" id="hkC-sf-sNA"/>
<constraint firstAttribute="bottom" secondItem="Fzg-MB-mlx" secondAttribute="bottom" id="tQc-0j-ggO"/>
<constraint firstItem="YgH-CN-tkB" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="w2k-lK-25U"/>
......
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