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