mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-23 21:16:22 +00:00
Make status action button areas bigger
This commit is contained in:
parent
f6b7b9807f
commit
f699c33dfb
1 changed files with 24 additions and 25 deletions
|
@ -189,32 +189,21 @@ struct StatusRowActionsView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func actionButton(action: Action) -> some View {
|
private func actionButton(action: Action) -> some View {
|
||||||
HStack(spacing: 2) {
|
|
||||||
Button {
|
Button {
|
||||||
handleAction(action: action)
|
handleAction(action: action)
|
||||||
} label: {
|
} label: {
|
||||||
|
HStack(spacing: 2) {
|
||||||
if action == .boost {
|
if action == .boost {
|
||||||
action
|
action
|
||||||
.image(dataController: statusDataController, privateBoost: privateBoost())
|
.image(dataController: statusDataController, privateBoost: privateBoost())
|
||||||
.imageScale(.medium)
|
.imageScale(.medium)
|
||||||
.font(.scaledBody)
|
.font(.scaledBody)
|
||||||
.fontWeight(.black)
|
.fontWeight(.black)
|
||||||
.contentShape(Rectangle())
|
|
||||||
} else {
|
} else {
|
||||||
action
|
action
|
||||||
.image(dataController: statusDataController, privateBoost: privateBoost())
|
.image(dataController: statusDataController, privateBoost: privateBoost())
|
||||||
.font(.scaledBody)
|
.font(.scaledBody)
|
||||||
.contentShape(Rectangle())
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.buttonStyle(
|
|
||||||
.statusAction(
|
|
||||||
isOn: action.isOn(dataController: statusDataController),
|
|
||||||
tintColor: action.tintColor(theme: theme)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.disabled(action == .boost &&
|
|
||||||
(viewModel.status.visibility == .direct || viewModel.status.visibility == .priv && viewModel.status.account.id != currentAccount.account?.id))
|
|
||||||
if !isNarrow,
|
if !isNarrow,
|
||||||
let count = action.count(dataController: statusDataController,
|
let count = action.count(dataController: statusDataController,
|
||||||
isFocused: isFocused,
|
isFocused: isFocused,
|
||||||
|
@ -227,6 +216,16 @@ struct StatusRowActionsView: View {
|
||||||
.monospacedDigit()
|
.monospacedDigit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.contentShape(Rectangle())
|
||||||
|
}
|
||||||
|
.buttonStyle(
|
||||||
|
.statusAction(
|
||||||
|
isOn: action.isOn(dataController: statusDataController),
|
||||||
|
tintColor: action.tintColor(theme: theme)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.disabled(action == .boost &&
|
||||||
|
(viewModel.status.visibility == .direct || viewModel.status.visibility == .priv && viewModel.status.account.id != currentAccount.account?.id))
|
||||||
.accessibilityElement(children: .combine)
|
.accessibilityElement(children: .combine)
|
||||||
.accessibilityLabel(action.accessibilityLabel(dataController: statusDataController, privateBoost: privateBoost()))
|
.accessibilityLabel(action.accessibilityLabel(dataController: statusDataController, privateBoost: privateBoost()))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue