mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Composer Update - Typing and sending a message
- Change send button icon according to the send mode - Changed the background of the input view
This commit is contained in:
parent
763c20f077
commit
bca3c6131c
9 changed files with 63 additions and 18 deletions
23
Riot/Assets/Images.xcassets/Room/Input/save_icon.imageset/Contents.json
vendored
Normal file
23
Riot/Assets/Images.xcassets/Room/Input/save_icon.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "save_icon.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "save_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "save_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
Riot/Assets/Images.xcassets/Room/Input/save_icon.imageset/save_icon.png
vendored
Normal file
BIN
Riot/Assets/Images.xcassets/Room/Input/save_icon.imageset/save_icon.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 876 B |
BIN
Riot/Assets/Images.xcassets/Room/Input/save_icon.imageset/save_icon@2x.png
vendored
Normal file
BIN
Riot/Assets/Images.xcassets/Room/Input/save_icon.imageset/save_icon@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
Riot/Assets/Images.xcassets/Room/Input/save_icon.imageset/save_icon@3x.png
vendored
Normal file
BIN
Riot/Assets/Images.xcassets/Room/Input/save_icon.imageset/save_icon@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
|
@ -113,6 +113,7 @@ internal enum Asset {
|
|||
internal static let roomContextMenuReply = ImageAsset(name: "room_context_menu_reply")
|
||||
internal static let roomContextMenuRetry = ImageAsset(name: "room_context_menu_retry")
|
||||
internal static let inputTextBackground = ImageAsset(name: "input_text_background")
|
||||
internal static let saveIcon = ImageAsset(name: "save_icon")
|
||||
internal static let sendIcon = ImageAsset(name: "send_icon")
|
||||
internal static let uploadIcon = ImageAsset(name: "upload_icon")
|
||||
internal static let uploadIconDark = ImageAsset(name: "upload_icon_dark")
|
||||
|
|
|
@ -48,7 +48,7 @@ extern NSNotificationName const RoomCallTileTappedNotification;
|
|||
@property (weak, nonatomic) IBOutlet UILabel *jumpToLastUnreadLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *resetReadMarkerButton;
|
||||
@property (weak, nonatomic) IBOutlet UIView *jumpToLastUnreadBannerSeparatorView;
|
||||
@property (weak, nonatomic) IBOutlet UIVisualEffectView *inputBackgroundView;
|
||||
@property (weak, nonatomic) IBOutlet UIView *inputBackgroundView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *scrollToBottomButton;
|
||||
@property (weak, nonatomic) IBOutlet BadgeLabel *scrollToBottomBadgeLabel;
|
||||
|
||||
|
|
|
@ -465,14 +465,14 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo
|
|||
self.scrollToBottomButton.layer.shadowRadius = 6;
|
||||
self.scrollToBottomButton.layer.shadowOffset = CGSizeMake(0, 4);
|
||||
|
||||
self.inputBackgroundView.backgroundColor = [ThemeService.shared.theme.searchBackgroundColor colorWithAlphaComponent:0.98];
|
||||
|
||||
if ([ThemeService.shared.themeId isEqualToString:@"light"])
|
||||
{
|
||||
self.inputBackgroundView.effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
|
||||
[self.scrollToBottomButton setImage:[UIImage imageNamed:@"scrolldown"] forState:UIControlStateNormal];
|
||||
}
|
||||
else if ([ThemeService.shared.themeId isEqualToString:@"dark"] || [ThemeService.shared.themeId isEqualToString:@"black"])
|
||||
{
|
||||
self.inputBackgroundView.effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
|
||||
[self.scrollToBottomButton setImage:[UIImage imageNamed:@"scrolldown_dark"] forState:UIControlStateNormal];
|
||||
}
|
||||
else if (@available(iOS 12.0, *) && ThemeService.shared.theme.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
|
@ -13,7 +14,7 @@
|
|||
<outlet property="bubblesTableView" destination="BGD-sd-SQR" id="OG4-Tw-Ovt"/>
|
||||
<outlet property="bubblesTableViewBottomConstraint" destination="1SD-y2-oTg" id="n8D-hT-eqt"/>
|
||||
<outlet property="bubblesTableViewTopConstraint" destination="bFw-dg-qEr" id="KxM-H0-h2y"/>
|
||||
<outlet property="inputBackgroundView" destination="lPR-zi-UZr" id="WW9-rW-gNi"/>
|
||||
<outlet property="inputBackgroundView" destination="Xt7-83-dQh" id="xoG-eb-zFB"/>
|
||||
<outlet property="jumpToLastUnreadBannerContainer" destination="S6r-bo-jxw" id="Ady-Eh-4E0"/>
|
||||
<outlet property="jumpToLastUnreadBannerContainerTopConstraint" destination="5eM-eJ-khq" id="b1J-aM-ZcT"/>
|
||||
<outlet property="jumpToLastUnreadBannerSeparatorView" destination="knN-q1-QkJ" id="hHJ-c8-QfN"/>
|
||||
|
@ -54,14 +55,6 @@
|
|||
<constraint firstAttribute="height" constant="368" id="goj-GZ-IkD"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lPR-zi-UZr">
|
||||
<rect key="frame" x="0.0" y="626" width="375" height="41"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="vMI-bt-nqq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="41"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</view>
|
||||
<blurEffect style="regular"/>
|
||||
</visualEffectView>
|
||||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S6r-bo-jxw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<subviews>
|
||||
|
@ -140,11 +133,15 @@
|
|||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" alpha="0.0" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QHs-rM-UU8" userLabel="scroll badge" customClass="BadgeLabel" customModule="Riot" customModuleProvider="target">
|
||||
<rect key="frame" x="334" y="562.5" width="18" height="15.5"/>
|
||||
<rect key="frame" x="334.5" y="562" width="17.5" height="16.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xt7-83-dQh" userLabel="Input Background View">
|
||||
<rect key="frame" x="0.0" y="626" width="375" height="41"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
</view>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XX4-n6-hCm" userLabel="Activities Container">
|
||||
<rect key="frame" x="0.0" y="626" width="375" height="0.0"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
@ -172,15 +169,15 @@
|
|||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="BGD-sd-SQR" secondAttribute="bottom" constant="41" id="1SD-y2-oTg"/>
|
||||
<constraint firstItem="S6r-bo-jxw" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="5eM-eJ-khq"/>
|
||||
<constraint firstItem="lPR-zi-UZr" firstAttribute="trailing" secondItem="QpJ-1u-4ii" secondAttribute="trailing" id="6no-fN-liL"/>
|
||||
<constraint firstItem="Xt7-83-dQh" firstAttribute="leading" secondItem="QpJ-1u-4ii" secondAttribute="leading" id="6lr-Tx-pEb"/>
|
||||
<constraint firstItem="QpJ-1u-4ii" firstAttribute="trailing" secondItem="Ih9-EU-BOU" secondAttribute="trailing" constant="16" id="6rq-lR-0sB"/>
|
||||
<constraint firstItem="54r-18-K1g" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="7Ft-EV-Br0"/>
|
||||
<constraint firstItem="gt1-EO-UVY" firstAttribute="leading" secondItem="QpJ-1u-4ii" secondAttribute="leading" id="8Ff-Ot-h3F"/>
|
||||
<constraint firstItem="Xt7-83-dQh" firstAttribute="bottom" secondItem="iN0-l3-epB" secondAttribute="bottom" id="9g2-wm-4M9"/>
|
||||
<constraint firstItem="S6r-bo-jxw" firstAttribute="leading" secondItem="QpJ-1u-4ii" secondAttribute="leading" id="Bcq-e4-B0D"/>
|
||||
<constraint firstItem="BGD-sd-SQR" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="ECb-mP-EOG"/>
|
||||
<constraint firstAttribute="trailing" secondItem="BGD-sd-SQR" secondAttribute="trailing" id="EGD-cX-OGq"/>
|
||||
<constraint firstItem="XX4-n6-hCm" firstAttribute="top" secondItem="Ih9-EU-BOU" secondAttribute="bottom" constant="24" id="GUp-ZU-6h3"/>
|
||||
<constraint firstItem="lPR-zi-UZr" firstAttribute="bottom" secondItem="iN0-l3-epB" secondAttribute="bottom" id="HJy-rU-H5H"/>
|
||||
<constraint firstItem="QHs-rM-UU8" firstAttribute="centerX" secondItem="Ih9-EU-BOU" secondAttribute="centerX" id="K8X-wJ-hkh"/>
|
||||
<constraint firstItem="QHs-rM-UU8" firstAttribute="centerY" secondItem="Ih9-EU-BOU" secondAttribute="top" id="KL4-OU-cP6"/>
|
||||
<constraint firstItem="gt1-EO-UVY" firstAttribute="trailing" secondItem="QpJ-1u-4ii" secondAttribute="trailing" id="L9A-P5-xeT"/>
|
||||
|
@ -190,14 +187,14 @@
|
|||
<constraint firstItem="XX4-n6-hCm" firstAttribute="trailing" secondItem="QpJ-1u-4ii" secondAttribute="trailing" id="Tij-mR-KZp"/>
|
||||
<constraint firstItem="S6r-bo-jxw" firstAttribute="trailing" secondItem="QpJ-1u-4ii" secondAttribute="trailing" id="VVn-vW-lbm"/>
|
||||
<constraint firstItem="gt1-EO-UVY" firstAttribute="top" secondItem="QpJ-1u-4ii" secondAttribute="top" id="YfN-0Z-0bc"/>
|
||||
<constraint firstItem="lPR-zi-UZr" firstAttribute="leading" secondItem="QpJ-1u-4ii" secondAttribute="leading" id="ZhL-JV-bfI"/>
|
||||
<constraint firstItem="54r-18-K1g" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="aR5-rp-1Cp"/>
|
||||
<constraint firstItem="gt1-EO-UVY" firstAttribute="bottom" secondItem="nLd-BP-JAE" secondAttribute="bottom" id="acJ-g8-R7x"/>
|
||||
<constraint firstItem="BGD-sd-SQR" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="bFw-dg-qEr"/>
|
||||
<constraint firstItem="lPR-zi-UZr" firstAttribute="top" secondItem="XX4-n6-hCm" secondAttribute="top" id="m2G-6h-NUU"/>
|
||||
<constraint firstAttribute="bottom" secondItem="nLd-BP-JAE" secondAttribute="bottom" id="omU-sm-3bK"/>
|
||||
<constraint firstItem="nLd-BP-JAE" firstAttribute="trailing" secondItem="QpJ-1u-4ii" secondAttribute="trailing" id="pRw-S0-6WL"/>
|
||||
<constraint firstItem="Xt7-83-dQh" firstAttribute="trailing" secondItem="QpJ-1u-4ii" secondAttribute="trailing" id="tAK-09-gTA"/>
|
||||
<constraint firstAttribute="trailing" secondItem="54r-18-K1g" secondAttribute="trailing" id="wOi-Ih-yfq"/>
|
||||
<constraint firstItem="Xt7-83-dQh" firstAttribute="top" secondItem="XX4-n6-hCm" secondAttribute="top" id="xHx-En-Ppf"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<point key="canvasLocation" x="136.80000000000001" y="152.47376311844079"/>
|
||||
|
@ -205,12 +202,15 @@
|
|||
</objects>
|
||||
<designables>
|
||||
<designable name="QHs-rM-UU8">
|
||||
<size key="intrinsicContentSize" width="17.5" height="15.5"/>
|
||||
<size key="intrinsicContentSize" width="17.5" height="16.5"/>
|
||||
</designable>
|
||||
</designables>
|
||||
<resources>
|
||||
<image name="cancel" width="20" height="20"/>
|
||||
<image name="scrolldown" width="32" height="32"/>
|
||||
<image name="scrollup" width="30" height="30"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
@ -135,6 +135,27 @@
|
|||
_sendMode = sendMode;
|
||||
|
||||
[self updatePlaceholder];
|
||||
[self updateToolbarButtonLabel];
|
||||
}
|
||||
|
||||
- (void)updateToolbarButtonLabel
|
||||
{
|
||||
UIImage *buttonImage;
|
||||
|
||||
switch (_sendMode)
|
||||
{
|
||||
case RoomInputToolbarViewSendModeReply:
|
||||
buttonImage = [UIImage imageNamed:@"send_icon"];
|
||||
break;
|
||||
case RoomInputToolbarViewSendModeEdit:
|
||||
buttonImage = [UIImage imageNamed:@"save_icon"];
|
||||
break;
|
||||
default:
|
||||
buttonImage = [UIImage imageNamed:@"send_icon"];
|
||||
break;
|
||||
}
|
||||
|
||||
[self.rightInputToolbarButton setImage:buttonImage forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
- (void)updatePlaceholder
|
||||
|
|
Loading…
Reference in a new issue