Skip to content

Commit

Permalink
Merge pull request #1167 from sophialee0416/dividerFix
Browse files Browse the repository at this point in the history
(cherry picked from commit 7bdded4)
  • Loading branch information
sophialee0416 authored and Sophia Lee committed Aug 17, 2022
1 parent 41d3c1b commit 45c022d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ios/FluentUI/Table View/TableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1679,13 +1679,17 @@ open class TableViewCell: UITableViewCell, TokenizedControlInternal {
}

func separatorLeadingInset(for type: SeparatorType) -> CGFloat {
guard type == .inset else {
switch type {
case .none:
return 0
}
let baseOffset = safeAreaInsets.left + TableViewCell.selectionModeAreaWidth(isInSelectionMode: isInSelectionMode,
selectionImageMarginTrailing: tokens.selectionImageMarginTrailing,
selectionImageSize: tokens.selectionImageSize.width)
return baseOffset + paddingLeading + tokens.customViewDimensions.width + tokens.customViewTrailingMargin
case .inset:
let baseOffset = TableViewCell.selectionModeAreaWidth(isInSelectionMode: isInSelectionMode,
selectionImageMarginTrailing: tokens.selectionImageMarginTrailing,
selectionImageSize: tokens.selectionImageSize.width)
return baseOffset + paddingLeading + tokens.customViewDimensions.width + tokens.customViewTrailingMargin
case .full:
return effectiveUserInterfaceLayoutDirection == .rightToLeft ? -safeAreaInsets.right : -safeAreaInsets.left
}paddingLeading + tokens.customViewDimensions.width + tokens.customViewTrailingMargin
}

open override func prepareForReuse() {
Expand Down

0 comments on commit 45c022d

Please sign in to comment.