Skip to content
Snippets Groups Projects
Commit c3896547 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

UI: fix for earlier versions

Fix button animations for versions earlier than 10.14

Change-Id: I829cdb12b210bbb40bb50b595cadcadb5a2a8d7e
Gitlab: #224
parent a8e75161
No related branches found
No related tags found
No related merge requests found
......@@ -266,6 +266,10 @@ NSString* BLINK_ANIMATION_IDENTIFIER = @"blinkAnimation";
to:(NSColor*)endColor
scaleFactor:(CGFloat)scaleFactor
duration:(CGFloat) duration {
if(!@available(macOS 10.14, *)) {
self.pressed = true;
return;
}
[self setWantsLayer: YES];
CIFilter *filter = [CIFilter filterWithName:@"CIFalseColor"];
[filter setDefaults];
......@@ -300,6 +304,10 @@ NSString* BLINK_ANIMATION_IDENTIFIER = @"blinkAnimation";
}
-(void)stopBlinkAnimation {
if(!@available(macOS 10.14, *)) {
self.pressed = false;
return;
}
self.animating = false;
[self.layer removeAnimationForKey:BLINK_ANIMATION_IDENTIFIER];
}
......
......@@ -509,6 +509,9 @@
<userDefinedRuntimeAttribute type="color" keyPath="imageDarkColor">
<color key="value" red="0.84313725490196079" green="0.84313725490196079" blue="0.84313725490196079" alpha="1" colorSpace="calibratedRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="imagePressedColor">
<color key="value" name="systemRedColor" catalog="System" colorSpace="catalog"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="toggleRecording:" target="-2" id="zVh-ci-nzl"/>
......
......@@ -128,8 +128,8 @@
<userDefinedRuntimeAttribute type="number" keyPath="imageIncreaseOnHover">
<integer key="value" value="4"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="imageIncreaseOnClick">
<integer key="value" value="4"/>
<userDefinedRuntimeAttribute type="color" keyPath="imagePressedColor">
<color key="value" name="systemRedColor" catalog="System" colorSpace="catalog"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
......@@ -161,7 +161,7 @@
</objects>
<resources>
<image name="ic_action_cancel" width="72" height="72"/>
<image name="ic_action_record" width="100" height="100"/>
<image name="ic_action_record" width="36" height="36"/>
<image name="ic_audio_file" width="100" height="100"/>
</resources>
</document>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment