Skip to content

Commit 4f98fae

Browse files
committed
Fix chart theming
1 parent bd1d7f5 commit 4f98fae

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎submodules/GraphUI/Sources/ChartNode.swift‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public extension ChartTheme {
3939
context.fill(CGRect(x: 7.0, y: 0.0, width: 4.0, height: 1.0))
4040
context.fill(CGRect(x: 7.0, y: 41.0, width: 4.0, height: 1.0))
4141

42-
context.fill(CGRect(x: 107.0, y: 0.0, width: 4.0, height: 1.0))
43-
context.fill(CGRect(x: 107.0, y: 41.0, width: 4.0, height: 1.0))
42+
context.fill(CGRect(x: 100.0, y: 0.0, width: 4.0, height: 1.0))
43+
context.fill(CGRect(x: 100.0, y: 41.0, width: 4.0, height: 1.0))
4444

45-
context.fill(CGRect(x: 11.0, y: 0.0, width: 81.0, height: 1.0))
46-
context.fill(CGRect(x: 11.0, y: 41.0, width: 81.0, height: 1.0))
45+
context.fill(CGRect(x: 11.0, y: 0.0, width: 92.0, height: 1.0))
46+
context.fill(CGRect(x: 11.0, y: 41.0, width: 92.0, height: 1.0))
4747

4848
context.setLineCap(.round)
4949
context.setLineWidth(1.5)

‎submodules/GraphUI/Sources/ChartStackSection.swift‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ private class LeftAlignedIconButton: UIButton {
1818
let titleRect = super.titleRect(forContentRect: contentRect)
1919
let imageSize = currentImage?.size ?? .zero
2020
let availableWidth = contentRect.width - imageEdgeInsets.right - imageSize.width - titleRect.width
21-
return titleRect.offsetBy(dx: round(availableWidth / 2), dy: 0)
21+
return titleRect.offsetBy(dx: round(availableWidth / 2) - imageEdgeInsets.left, dy: 0)
2222
}
2323
}
2424

@@ -63,7 +63,7 @@ class ChartStackSection: UIView, ChartThemeContainer {
6363
backButton.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .regular)
6464
backButton.setTitleColor(UIColor(rgb: 0x007ee5), for: .normal)
6565
backButton.setImage(UIImage(bundleImageName: "Chart/arrow_left"), for: .normal)
66-
backButton.imageEdgeInsets = UIEdgeInsets(top: 0.0, left: 0.0, bottom: 0.0, right: 3.0)
66+
backButton.imageEdgeInsets = UIEdgeInsets(top: 0.0, left: 6.0, bottom: 0.0, right: 3.0)
6767
backButton.imageView?.tintColor = UIColor(rgb: 0x007ee5)
6868

6969
backButton.setVisible(false, animated: false)
@@ -93,6 +93,7 @@ class ChartStackSection: UIView, ChartThemeContainer {
9393

9494
self.backButton.tintColor = theme.actionButtonColor
9595
self.backButton.setTitleColor(theme.actionButtonColor, for: .normal)
96+
self.backButton.imageView?.tintColor = theme.actionButtonColor
9697
}
9798

9899
if rangeView.isVisibleInWindow || chartView.isVisibleInWindow {

0 commit comments

Comments
 (0)