diff --git a/src/CurrentCallVC.mm b/src/CurrentCallVC.mm index b264f659f77556cd4ea18cb057aa8041e0a107b8..fb72f0b7f3c88dfcf298f2abf1a7e8783be53639 100644 --- a/src/CurrentCallVC.mm +++ b/src/CurrentCallVC.mm @@ -336,9 +336,9 @@ CVPixelBufferRef pixelBufferPreview; -(void) setUpButtons:(lrc::api::call::Info&)callInfo isRecording:(BOOL) isRecording { muteAudioButton.image = callInfo.audioMuted ? [NSImage imageNamed:@"micro_off.png"] : [NSImage imageNamed:@"micro_on.png"]; - NSColor* audioImageColor = callInfo.audioMuted ? [NSColor redColor] : [NSColor whiteColor]; + NSColor* audioImageColor = callInfo.audioMuted ? [NSColor callButtonRedColor] : [NSColor whiteColor]; [self updateColorForButton: muteAudioButton color: audioImageColor]; - NSColor* videoImageColor = callInfo.videoMuted ? [NSColor redColor] : [NSColor whiteColor]; + NSColor* videoImageColor = callInfo.videoMuted ? [NSColor callButtonRedColor] : [NSColor whiteColor]; [self updateColorForButton: muteVideoButton color: videoImageColor]; muteVideoButton.image = callInfo.videoMuted ? [NSImage imageNamed:@"camera_off.png"] : [NSImage imageNamed:@"camera_on.png"]; @@ -1122,7 +1122,7 @@ CVPixelBufferRef pixelBufferPreview; auto& currentCall = callModel->getCall(callUid_); callModel->toggleMedia(callUid_, lrc::api::NewCallModel::Media::AUDIO); muteAudioButton.image = currentCall.audioMuted ? [NSImage imageNamed:@"micro_off.png"] : [NSImage imageNamed:@"micro_on.png"]; - NSColor* audioImageColor = currentCall.audioMuted ? [NSColor redColor] : [NSColor whiteColor]; + NSColor* audioImageColor = currentCall.audioMuted ? [NSColor callButtonRedColor] : [NSColor whiteColor]; [self updateColorForButton: muteAudioButton color: audioImageColor]; } @@ -1144,7 +1144,7 @@ CVPixelBufferRef pixelBufferPreview; } callModel->toggleMedia(callUid_, lrc::api::NewCallModel::Media::VIDEO); muteVideoButton.image = currentCall.videoMuted ? [NSImage imageNamed:@"camera_off.png"] : [NSImage imageNamed:@"camera_on.png"]; - NSColor* videoImageColor = currentCall.videoMuted ? [NSColor redColor] : [NSColor whiteColor]; + NSColor* videoImageColor = currentCall.videoMuted ? [NSColor callButtonRedColor] : [NSColor whiteColor]; [self updateColorForButton: muteVideoButton color: videoImageColor]; } diff --git a/src/views/NSColor+RingTheme.h b/src/views/NSColor+RingTheme.h index c84d2455a62367d8f6e3cad4bf9142677ff8155c..eac20745ff1de79c3b14c4f3c029fec0bc767978 100644 --- a/src/views/NSColor+RingTheme.h +++ b/src/views/NSColor+RingTheme.h @@ -36,6 +36,7 @@ + (NSColor*) presenceColor; + (NSColor*) unregisteredColor; + (NSColor*) buttonBlinkColorColor; ++ (NSColor*) callButtonRedColor; - (NSColor *)lightenColorByValue:(float)value; - (NSColor *)darkenColorByValue:(float)value; diff --git a/src/views/NSColor+RingTheme.mm b/src/views/NSColor+RingTheme.mm index 5b845f7e841035c5a2cab4e72055fc15721d1f17..0bc42ef50ebb596d937c576155d998466e73bdc4 100644 --- a/src/views/NSColor+RingTheme.mm +++ b/src/views/NSColor+RingTheme.mm @@ -85,6 +85,10 @@ return [NSColor colorWithCalibratedRed:59/255.0 green:193/255.0 blue:211/255.0 a return [NSColor colorWithCalibratedRed:76/255.0 green:217/255.0 blue:100/255.0 alpha:1]; } ++ (NSColor*) callButtonRedColor +{ + return [NSColor colorWithCalibratedRed:144/255.0 green:27/255.0 blue:33/255.0 alpha:1]; +} - (NSColor *)lightenColorByValue:(float)value { if(![self isKindOfClass:[NSCalibratedRGBColorSpace class]]) { diff --git a/ui/Base.lproj/CurrentCall.xib b/ui/Base.lproj/CurrentCall.xib index c27a7c26c22e6709ff13e5dbd874d2174061d3dc..563252ac283709133c02565b4cd06ad1e3033cd4 100644 --- a/ui/Base.lproj/CurrentCall.xib +++ b/ui/Base.lproj/CurrentCall.xib @@ -73,7 +73,7 @@ <color key="fillColor" red="0.120510533452034" green="0.12050692737102509" blue="0.12050899863243103" alpha="1" colorSpace="calibratedRGB"/> </box> <stackView distribution="fill" orientation="vertical" alignment="centerX" spacing="10" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" translatesAutoresizingMaskIntoConstraints="NO" id="aLB-LA-yn0"> - <rect key="frame" x="302" y="4462" width="142" height="305"/> + <rect key="frame" x="302" y="5326" width="142" height="305"/> <subviews> <customView translatesAutoresizingMaskIntoConstraints="NO" id="s4L-Ke-9Jm"> <rect key="frame" x="7" y="177" width="128" height="128"/> @@ -187,7 +187,7 @@ </buttonCell> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="color" keyPath="bgColor"> - <color key="value" red="0.94509803920000002" green="0.16078431369999999" blue="0.0" alpha="0.83999999999999997" colorSpace="calibratedRGB"/> + <color key="value" red="0.56416362519999996" green="0.10639867929999999" blue="0.12937241790000001" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="number" keyPath="imageInsets"> <integer key="value" value="16"/> @@ -234,7 +234,7 @@ <rect key="frame" x="0.0" y="0.0" width="746" height="788"/> </customView> <customView translatesAutoresizingMaskIntoConstraints="NO" id="d0X-cW-Xgz" customClass="GradientView"> - <rect key="frame" x="0.0" y="9179" width="746" height="50"/> + <rect key="frame" x="0.0" y="10907" width="746" height="50"/> <constraints> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="568" id="Xeq-Aa-f1W"/> <constraint firstAttribute="height" constant="50" id="w34-Yi-hGT"/> @@ -311,7 +311,7 @@ </subviews> </customView> <customView translatesAutoresizingMaskIntoConstraints="NO" id="DfH-di-xs7" customClass="GradientView"> - <rect key="frame" x="0.0" y="9179" width="746" height="50"/> + <rect key="frame" x="0.0" y="10907" width="746" height="50"/> <subviews> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dl1-Gt-oz5"> <rect key="frame" x="624" y="17" width="104" height="16"/> @@ -364,22 +364,25 @@ <integer key="value" value="12"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="imageColor"> - <color key="value" name="systemRedColor" catalog="System" colorSpace="catalog"/> + <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="imageHoverColor"> - <color key="value" name="systemRedColor" catalog="System" colorSpace="catalog"/> + <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="number" keyPath="imageIncreaseOnHover"> <integer key="value" value="0"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="hoverColor"> - <color key="value" red="0.19607843137254902" green="0.19607843137254902" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="value" red="0.70588235294117641" green="0.15686274509803921" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> + </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="color" keyPath="hoverDarkColor"> + <color key="value" red="0.70588235294117641" green="0.15686274509803921" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="bgColor"> - <color key="value" red="0.1137239709" green="0.1137244478" blue="0.1137255356" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> + <color key="value" red="0.56416362519999996" green="0.10639867929999999" blue="0.12937241790000001" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="imageDarkColor"> - <color key="value" red="1" green="0.14913141730000001" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> <connections> @@ -452,6 +455,9 @@ <userDefinedRuntimeAttribute type="color" keyPath="hoverColor"> <color key="value" red="0.19607843137254902" green="0.19607843137254902" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="color" keyPath="hoverDarkColor"> + <color key="value" red="0.1960784314" green="0.1960784314" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> <connections> <action selector="muteAudio:" target="-2" id="kdH-9t-FUA"/> @@ -480,6 +486,9 @@ <userDefinedRuntimeAttribute type="color" keyPath="hoverColor"> <color key="value" red="0.19607843137254902" green="0.19607843137254902" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="color" keyPath="hoverDarkColor"> + <color key="value" red="0.1960784314" green="0.1960784314" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> <connections> <action selector="toggleChangeAudioInput:" target="-2" id="c2M-8Q-U13"/> @@ -526,6 +535,9 @@ <userDefinedRuntimeAttribute type="color" keyPath="hoverColor"> <color key="value" red="0.19607843137254902" green="0.19607843137254902" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="color" keyPath="hoverDarkColor"> + <color key="value" red="0.1960784314" green="0.1960784314" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> <connections> <action selector="toggleChangeAudioOutput:" target="-2" id="4yj-f1-9ut"/> @@ -551,6 +563,9 @@ <userDefinedRuntimeAttribute type="color" keyPath="bgColor"> <color key="value" red="0.20784077049999999" green="0.20784154530000001" blue="0.2078431845" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="color" keyPath="hoverDarkColor"> + <color key="value" red="0.1960784314" green="0.1960784314" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="hoverColor"> <color key="value" red="0.19607843137254902" green="0.19607843137254902" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> @@ -591,6 +606,9 @@ <userDefinedRuntimeAttribute type="number" keyPath="imageIncreaseOnHover"> <integer key="value" value="0"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="color" keyPath="hoverDarkColor"> + <color key="value" red="0.1960784314" green="0.1960784314" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="bgColor"> <color key="value" red="0.1137239709" green="0.1137244478" blue="0.1137255356" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> </userDefinedRuntimeAttribute> @@ -622,6 +640,9 @@ <userDefinedRuntimeAttribute type="color" keyPath="bgColor"> <color key="value" red="0.20784077049999999" green="0.20784154530000001" blue="0.2078431845" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="color" keyPath="hoverDarkColor"> + <color key="value" red="0.1960784314" green="0.1960784314" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="hoverColor"> <color key="value" red="0.19607843137254902" green="0.19607843137254902" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> @@ -668,6 +689,9 @@ <userDefinedRuntimeAttribute type="color" keyPath="imageDarkColor"> <color key="value" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="color" keyPath="hoverDarkColor"> + <color key="value" red="0.1960784314" green="0.1960784314" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="hoverColor"> <color key="value" red="0.19607843137254902" green="0.19607843137254902" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> @@ -708,6 +732,9 @@ <userDefinedRuntimeAttribute type="color" keyPath="bgColor"> <color key="value" red="0.1137239709" green="0.1137244478" blue="0.1137255356" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="color" keyPath="hoverDarkColor"> + <color key="value" red="0.1960784314" green="0.1960784314" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="hoverColor"> <color key="value" red="0.19607843137254902" green="0.19607843137254902" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> @@ -748,6 +775,9 @@ <userDefinedRuntimeAttribute type="color" keyPath="hoverColor"> <color key="value" red="0.19607843137254902" green="0.19607843137254902" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="color" keyPath="hoverDarkColor"> + <color key="value" red="0.1960784314" green="0.1960784314" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="imagePressedColor"> <color key="value" name="systemRedColor" catalog="System" colorSpace="catalog"/> </userDefinedRuntimeAttribute> @@ -788,6 +818,9 @@ <userDefinedRuntimeAttribute type="color" keyPath="hoverColor"> <color key="value" red="0.19607843137254902" green="0.19607843137254902" blue="0.19607843137254902" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="color" keyPath="hoverDarkColor"> + <color key="value" red="0.1960784314" green="0.1960784314" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="imagePressedColor"> <color key="value" name="systemRedColor" catalog="System" colorSpace="catalog"/> </userDefinedRuntimeAttribute> @@ -897,13 +930,13 @@ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <subviews> <scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="62" horizontalPageScroll="10" verticalLineScroll="62" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" scrollerKnobStyle="dark" translatesAutoresizingMaskIntoConstraints="NO" id="o0i-7W-5fA"> - <rect key="frame" x="20" y="145" width="331" height="9082"/> + <rect key="frame" x="20" y="145" width="331" height="10810"/> <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="H2i-4W-Gvt"> - <rect key="frame" x="0.0" y="0.0" width="331" height="9082"/> + <rect key="frame" x="0.0" y="0.0" width="331" height="10810"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" selectionHighlightStyle="none" autosaveColumns="NO" rowHeight="60" rowSizeStyle="automatic" usesAutomaticRowHeights="YES" viewBased="YES" id="ZOj-5b-rnp"> - <rect key="frame" x="0.0" y="0.0" width="331" height="9082"/> + <rect key="frame" x="0.0" y="0.0" width="331" height="10810"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <size key="intercellSpacing" width="3" height="2"/> <color key="backgroundColor" white="1" alpha="0.0" colorSpace="deviceWhite"/> @@ -1215,7 +1248,7 @@ </scroller> </scrollView> <customView translatesAutoresizingMaskIntoConstraints="NO" id="mFB-6z-yC0" customClass="DraggingDestinationView"> - <rect key="frame" x="0.0" y="0.0" width="371" height="9229"/> + <rect key="frame" x="0.0" y="0.0" width="371" height="10957"/> </customView> <stackView distribution="fill" orientation="vertical" alignment="centerX" spacing="0.0" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nSk-sH-cgy"> <rect key="frame" x="20" y="0.0" width="331" height="145"/>