diff --git a/Signal/ConversationView/CellViews/CVPollView.swift b/Signal/ConversationView/CellViews/CVPollView.swift index 6ec90b440e..a150030e25 100644 --- a/Signal/ConversationView/CellViews/CVPollView.swift +++ b/Signal/ConversationView/CellViews/CVPollView.swift @@ -607,11 +607,10 @@ public class CVPollView: ManualStackView { let checkMark = UIImageView(image: UIImage(named: Theme.iconName(.checkmark))) checkbox.addSubview(spinningEllipse, withLayoutBlock: { [weak self] _ in guard let self else { return } - spinningEllipse.frame = checkbox.bounds spinView(view: spinningEllipse) checkMark.frame = CGRect( - x: (checkbox.bounds.width - 15) / 2, - y: (checkbox.bounds.height - 15) / 2, + x: (spinningEllipse.frame.width - 15) / 2, + y: (spinningEllipse.frame.height - 15) / 2, width: 15, height: 15 ) @@ -638,7 +637,9 @@ public class CVPollView: ManualStackView { switch localUserVoteState { case .vote: - checkbox.addSubview(UIImageView(image: UIImage(named: Theme.iconName(.checkCircleFill)))) + let checkMarkCircle = UIImageView(image: UIImage(named: Theme.iconName(.checkCircleFill))) + checkbox.addSubview(checkMarkCircle) + checkbox.tintColor = configurator.colorConfigurator.checkboxSelectedColor case .pendingVote, .pendingUnvote: displayPendingUI(type: localUserVoteState) diff --git a/Signal/Symbols.xcassets/arrow/arrow-up-30.imageset/Contents.json b/Signal/Symbols.xcassets/arrow/arrow-up-30.imageset/Contents.json new file mode 100644 index 0000000000..47d67eb539 --- /dev/null +++ b/Signal/Symbols.xcassets/arrow/arrow-up-30.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "arrow-up-30.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" + } +} diff --git a/Signal/Symbols.xcassets/arrow/arrow-up-30.imageset/arrow-up-30.pdf b/Signal/Symbols.xcassets/arrow/arrow-up-30.imageset/arrow-up-30.pdf new file mode 100644 index 0000000000..37a620b105 Binary files /dev/null and b/Signal/Symbols.xcassets/arrow/arrow-up-30.imageset/arrow-up-30.pdf differ diff --git a/Signal/Symbols.xcassets/x/x-26.imageset/Contents.json b/Signal/Symbols.xcassets/x/x-26.imageset/Contents.json new file mode 100644 index 0000000000..a04026ffa4 --- /dev/null +++ b/Signal/Symbols.xcassets/x/x-26.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "x26.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" + } +} diff --git a/Signal/Symbols.xcassets/x/x-26.imageset/x26.pdf b/Signal/Symbols.xcassets/x/x-26.imageset/x26.pdf new file mode 100644 index 0000000000..e59608f684 Binary files /dev/null and b/Signal/Symbols.xcassets/x/x-26.imageset/x26.pdf differ diff --git a/Signal/src/ViewControllers/Polls/NewPollViewController.swift b/Signal/src/ViewControllers/Polls/NewPollViewController.swift index c92c2c6eb6..4855d7ccd0 100644 --- a/Signal/src/ViewControllers/Polls/NewPollViewController.swift +++ b/Signal/src/ViewControllers/Polls/NewPollViewController.swift @@ -190,6 +190,11 @@ struct NewPollView: View { .onAppear { focusQuestionField = true } + .onSubmit { + if let nextBlankRow = findFirstBlankRow() { + focusedItemID = nextBlankRow.id + } + } } header: { Text( OWSLocalizedString( @@ -212,6 +217,11 @@ struct NewPollView: View { option.text = "" } } + .onSubmit { + if let nextBlankRow = findFirstBlankRow() { + focusedItemID = nextBlankRow.id + } + } .focused($focusedItemID, equals: option.id) } .onMove(perform: { from, to in @@ -254,9 +264,10 @@ struct NewPollView: View { Button(action: { viewModel.onDismiss() }) { - Image(Theme.iconName(.xBold)) + Image(Theme.iconName(.x26)) } .accessibilityLabel(CommonStrings.cancelButton) + .foregroundColor(Color.Signal.label) } else { Button(CommonStrings.cancelButton, action: { viewModel.onDismiss() @@ -273,7 +284,8 @@ struct NewPollView: View { Button(action: { sendButtonPressed(sendButtonEnabled: sendButtonEnabled) }) { - Image(Theme.iconName(.arrowUp)) + Image(Theme.iconName(.arrowUp30)) + .foregroundColor(.white) } .accessibilityLabel(MessageStrings.sendButton) .tint(Color.Signal.ultramarine) @@ -292,6 +304,15 @@ struct NewPollView: View { } } + private func findFirstBlankRow() -> NewOption? { + for option in pollOptions { + if option.text.isEmpty { + return option + } + } + return nil + } + private func sendButtonPressed(sendButtonEnabled: Bool) { if sendButtonEnabled { viewModel.onSend( diff --git a/Signal/src/ViewControllers/Polls/PollDetailsViewController.swift b/Signal/src/ViewControllers/Polls/PollDetailsViewController.swift index 3a017f84f3..79282b5f2a 100644 --- a/Signal/src/ViewControllers/Polls/PollDetailsViewController.swift +++ b/Signal/src/ViewControllers/Polls/PollDetailsViewController.swift @@ -76,6 +76,13 @@ struct PollDetailsView: View { Text(poll.question) .font(.body) .foregroundColor(Color.Signal.label) + } header: { + Text( + OWSLocalizedString( + "POLL_QUESTION_LABEL", + comment: "Header for the poll question text box when making a new poll" + ) + ) } if !poll.isEnded, poll.ownerIsLocalUser { @@ -137,14 +144,15 @@ struct PollDetailsView: View { } .navigationTitle(titleString) .toolbar { - ToolbarItem(placement: .topBarLeading) { + ToolbarItem(placement: .topBarTrailing) { if #available(iOS 26.0, *) { Button(action: { viewModel.onDismiss() }) { - Image(Theme.iconName(.xBold)) + Image(Theme.iconName(.x26)) } .accessibilityLabel(CommonStrings.doneButton) + .foregroundColor(Color.Signal.label) } else { Button(CommonStrings.doneButton, action: { viewModel.onDismiss() diff --git a/SignalUI/Appearance/Theme+Icons.swift b/SignalUI/Appearance/Theme+Icons.swift index 52697a4697..4688a50832 100644 --- a/SignalUI/Appearance/Theme+Icons.swift +++ b/SignalUI/Appearance/Theme+Icons.swift @@ -69,11 +69,13 @@ public enum ThemeIcon: UInt { case checkCircleFill case xCircle case xBold + case x26 case checkmark case checkmarkBold case circle case arrowDown case arrowUp + case arrowUp30 case arrowRight case chevronUp case chevronDown @@ -339,6 +341,8 @@ public extension Theme { return "x-circle" case .xBold: return "x-bold" + case .x26: + return "x-26" case .checkmark: return "check" case .checkmarkBold: @@ -349,6 +353,8 @@ public extension Theme { return "arrow-down" case .arrowUp: return "arrow-up" + case .arrowUp30: + return "arrow-up-30" case .arrowRight: return "arrow-right" case .chevronUp: