Skip to content

Commit

Permalink
fixed capsule broder radius
Browse files Browse the repository at this point in the history
  • Loading branch information
Amy committed Jun 22, 2023
1 parent 32935fa commit ffcca33
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 7 deletions.
Binary file added .DS_Store
Binary file not shown.
80 changes: 80 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/NiceComponents.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "NiceComponents_NiceComponents"
BuildableName = "NiceComponents_NiceComponents"
BlueprintName = "NiceComponents_NiceComponents"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "NiceComponents"
BuildableName = "NiceComponents"
BlueprintName = "NiceComponents"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "NiceComponents_NiceComponents"
BuildableName = "NiceComponents_NiceComponents"
BlueprintName = "NiceComponents_NiceComponents"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Binary file added NiceComponentsExample/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/onevcat/Kingfisher.git",
"state": {
"branch": null,
"revision": "2235a22ca249199cb736237f4bb9cc12b6ed416a",
"version": "7.3.0"
"revision": "c1f60c63f356d364f4284ba82961acbe7de79bcc",
"version": "7.8.1"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct NiceButtonExampleView: View {

PrimaryButton(
"Like Button",
surfaceColor: .white,
surfaceColor: .orange,
border: .rounded(
color: .black,
cornerRadius: 4,
Expand All @@ -38,6 +38,16 @@ struct NiceButtonExampleView: View {
NiceImage(systemIcon: "heart.fill", width: 14, height: 14, tintColor: .red)
)

PrimaryButton(
"Capsule Button",
border: .capsule(
color: .black,
width: 1.5
)
) { }.withRightImage(
NiceImage(systemIcon: "heart.fill", width: 14, height: 14, tintColor: .red)
)

SecondaryButton("Left Image Button") { }.withLeftImage(
NiceImage(systemIcon: "pencil", width: 14, height: 14, tintColor: .black)
)
Expand Down
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/onevcat/Kingfisher.git",
"state": {
"branch": null,
"revision": "44e891bdb61426a95e31492a67c7c0dfad1f87c5",
"version": "7.4.1"
"revision": "c1f60c63f356d364f4284ba82961acbe7de79bcc",
"version": "7.8.1"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
dependencies: [
.package(
url: "https://github.com/onevcat/Kingfisher.git",
from: "7.2.0"
from: "7.6.1"
)
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/NiceComponents/Button/NiceButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ extension NiceButton {
.frame(height: style.height)
.fixedSize(horizontal: false, vertical: true)
.background(inactive ? style.inactiveSurfaceColor : style.surfaceColor)
.cornerRadius(style.border.cornerRadius)
.cornerRadius(cornerRadius)
.overlay(
borderOverlay
)
Expand Down

0 comments on commit ffcca33

Please sign in to comment.