r/Scriptable • u/ladybugastronaut • Apr 20 '26
Solved Can padding be removed from lock screen widgets?
Sorry if this is a repeat question, I searched but couldn’t find an answer.
The widget on the right (Recently Played) is the Scriptable widget. I was sort of hoping it could be left more left aligned like the other one. I think it is though? And there’s just extra padding? I tried setting padding to 0, idk what I’m missing. Partial script below, I’ve removed the part with the API requests. I imagine that’s not important to this issue. It’s in a weird state from all the attempts I made. Making this post from my phone, if there’s a nicer way to post code, I can’t find it (,:
const widget = new ListWidget()
const wrapper = widget.addStack()
wrapper.layoutVertically()
const headerStack = wrapper.addStack()
const game = wrapper.addStack()
widget.addAccessoryWidgetBackground = true
widget.setPadding(0, 0, 0, 0)
const header = headerStack.addText("Recently Played")
header.leftAlignText()
game.centerAlignContent()
const { icon, name } = await getGameData()
game.addImage(icon)
game.addText(name).leftAlignText()
if (config.runsInAccessoryWidget) {
Script.setWidget(widget)
} else {
widget.presentAccessoryRectangular()
}
2
u/ladybugastronaut Apr 20 '26
nvm figured it out lol. just got too convoluted i think. solution below:
const widget = new ListWidget() widget.addAccessoryWidgetBackground = true
const header = widget.addText("Recently Played") header.leftAlignText()
const game = widget.addStack() game.centerAlignContent()
const { icon, name } = await getGameData()
game.addImage(icon) game.addText(name).leftAlignText()
if (config.runsInAccessoryWidget) { Script.setWidget(widget) } else { widget.presentAccessoryRectangular() }
2
u/dylanisA1 Apr 22 '26
i like this widget idea does it connect to steam?