Skip to content

Commit

Permalink
Add bigger logo for app icon widget
Browse files Browse the repository at this point in the history
  • Loading branch information
GianniCarlo committed Feb 4, 2024
1 parent f9ba44d commit 167b408
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "logo-nopadding.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 11 additions & 9 deletions BookPlayerWidgets/Shared/SharedIconWidget/SharedIconWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,22 @@ struct SharedIconWidgetTimelineProvider: TimelineProvider {
@available(iOSApplicationExtension 16.0, watchOS 9.0, *)
struct SharedIconWidget: Widget {
let kind: String = Constants.Widgets.sharedIconWidget.rawValue
#if os(watchOS)
let imageName = "Graphic Circular"
#else
let imageName = "logo-nopadding"
#endif

var body: some WidgetConfiguration {
StaticConfiguration(
kind: kind,
provider: SharedIconWidgetTimelineProvider()) { _ in
ZStack {
AccessoryWidgetBackground()
Image("Graphic Circular")
.resizable()
.aspectRatio(contentMode: .fit)
.padding(Spacing.S3)
.widgetAccentable()
.widgetBackground(backgroundView: Color.clear)
}
Image(imageName)
.resizable()
.aspectRatio(contentMode: .fit)
.padding(0)
.widgetAccentable()
.widgetBackground(backgroundView: Color.clear)
}
.configurationDisplayName("Icon")
.description("Quickly launch BookPlayer")
Expand Down

0 comments on commit 167b408

Please sign in to comment.