marcoarment,
@marcoarment@mastodon.social avatar

How am I supposed to be reading/handling the big corner radius of StandBy widgets?

I'm getting significantly clipped on the corners.

I've adopted containerBackground. Safe area's all zeros. Widget margins claim to be only 3pt (much smaller than reality).

goforth,

@marcoarment if you haven’t seen it already, there is a method to not show widgets in certain contexts which means you could just have a completely different widget in standby: https://developer.apple.com/documentation/swiftui/widgetconfiguration/disfavoredlocations(_:for:)

ay8s,
@ay8s@mastodon.social avatar

@marcoarment Came across this also, spotted a few other folks mention it but not seen a solid solution so far that doesn't effect other widget locations.

marcoarment,
@marcoarment@mastodon.social avatar

Solved my own problem! The widgetContentMargins are actually correct (3.something points), but they look much bigger since this is a very scaled-up environment.

@Environment(.widgetContentMargins) var insets

MyWidgetView {
}
.padding([.top], insets.top)
.padding([.bottom], insets.bottom)

marcoarment,
@marcoarment@mastodon.social avatar

Also, FWIW, iOS 17 making StandBy just a blown-up “small" widget class was a really weird choice.

It looks and behaves very differently, and it needs its own design.

agiletortoise,
@agiletortoise@mastodon.social avatar

@marcoarment It is a little weird. Similar to case of small widget in vibrant appearance on iPad Lock Screen. Lots of switch statements.

marcoarment,
@marcoarment@mastodon.social avatar

@agiletortoise Yup.

I'm checking showsWidgetContainerBackground, and actually serving two completely different widgets based on that.

And I'm making the iPad Lock/StandBy version non-interactive for now, since the interaction sucks in both places due to the locked state.

t9mike,

@marcoarment @agiletortoise Marco have you done hack similar to https://developer.apple.com/forums/thread/733780?answerId=759066022#759066022 in order to avoid crash with showsWidgetContainerBackground on iOS 16? The forums thread has a good workaround.

agiletortoise,
@agiletortoise@mastodon.social avatar

@marcoarment I’ve created a configuration option on Tally’s new widgets to choose if tapping increments or opens the app, which is only active on accessoryCircular and accessoryRectangular. Great for Lock Screen, but doesn’t make any sense for systemSmall. No way to make that conditional on container background or vibrancy.

mipstian,
@mipstian@mas.to avatar

@marcoarment reads better without the brackets :)

.padding(.top, insets.top)

marcoarment,
@marcoarment@mastodon.social avatar

@mipstian Thanks! Didn’t know I could do that.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • cisconetworking
  • mdbf
  • everett
  • Youngstown
  • rosin
  • slotface
  • love
  • khanakhh
  • kavyap
  • ngwrru68w68
  • ethstaker
  • thenastyranch
  • magazineikmin
  • provamag3
  • modclub
  • cubers
  • InstantRegret
  • osvaldo12
  • Durango
  • GTA5RPClips
  • tester
  • normalnudes
  • Leos
  • tacticalgear
  • anitta
  • megavids
  • JUstTest
  • All magazines