Skip to content

Commit

Permalink
Row trailing padding fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanov91 committed Oct 20, 2022
1 parent 600b2f7 commit ae8b8d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 30 deletions.
5 changes: 4 additions & 1 deletion Sources/OversizeUI/Controls/Row/Row.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ public struct Row: View {
@ViewBuilder
private func content(_ textAlignment: TextAlignment) -> some View {
VStack(alignment: .leading) {
HStack(spacing: .small) {
HStack(spacing: .zero) {
if let leadingType {
leading(leadingType)
.padding(.trailing, .small)
}

if textAlignment == .trailing || textAlignment == .center {
Expand All @@ -113,6 +114,7 @@ public struct Row: View {

if let trallingType {
tralling(trallingType)
.padding(.leading, .xxSmall)
}
}
}
Expand Down Expand Up @@ -264,6 +266,7 @@ public struct Row: View {
private func premiumLabel() -> some View {
if isPremiumOption, premiumStatus == false {
PremiumLabel(text: "Pro", size: .small)
.padding(.leading, .small)
} else {
EmptyView()
}
Expand Down
29 changes: 0 additions & 29 deletions Sources/OversizeUI/Core/Appearance/ThemeSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,3 @@ public class ThemeSettings: ObservableObject {
Theme(id: 0, name: "Blue", accentColor: .accent),
]
}

#if os(iOS)
public class AppIconSettings: ObservableObject {
public var iconNames: [String?] = [nil]
@Published public var currentIndex = 0

public init() {
getAlternateIconNames()

if let currentIcon = UIApplication.shared.alternateIconName {
currentIndex = iconNames.firstIndex(of: currentIcon) ?? 0
}
}

private func getAlternateIconNames() {
if let icons = Bundle.main.object(forInfoDictionaryKey: "CFBundleIcons") as? [String: Any],
let alternateIcons = icons["CFBundleAlternateIcons"] as? [String: Any]
{
for (_, value) in alternateIcons {
guard let iconList = value as? [String: Any] else { return }
guard let iconFiles = iconList["CFBundleIconFiles"] as? [String] else { return }
guard let icon = iconFiles.first else { return }

iconNames.append(icon)
}
}
}
}
#endif

0 comments on commit ae8b8d2

Please sign in to comment.