Skip to content

Commit

Permalink
perf(UI): improve service list layout
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Apr 8, 2024
1 parent 7843478 commit de76bf4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Easydict/Swift/View/SettingView/Tabs/ServiceTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct ServiceTab: View {
.clipShape(RoundedRectangle(cornerRadius: 10))
.padding(.bottom)
.padding(.horizontal)
.frame(minWidth: 280)
.frame(minWidth: 250)
}

Group {
Expand Down Expand Up @@ -205,7 +205,6 @@ private struct ServiceItemView: View {
.frame(width: 20.0, height: 20.0)
Text(service.name())
.lineLimit(1)
.frame(maxWidth: 180, alignment: .leading)
}
}
.onReceive(serviceItemViewModel.$isEnable) { newValue in
Expand All @@ -217,12 +216,12 @@ private struct ServiceItemView: View {
EZLocalStorage.shared().setService(service, windowType: viewModel.windowType)
viewModel.postUpdateServiceNotification()
}
.padding(4.0)
.toggleStyle(.switch)
.controlSize(.small)
.listRowSeparator(.hidden)
.listRowInsets(.init())
.padding(10)
.padding(.horizontal, 8)
.padding(.vertical, 12)
}

// MARK: Private
Expand Down

0 comments on commit de76bf4

Please sign in to comment.