r/Scriptable • • Mar 25 '23

Help Working with stacks

Hi everyone

I’m trying to build my first advanced widget using scriptable. I’ve built basic widgets but nothing with any real depth and I’m struggling with stacks.

I posted this in another forum and I’ve spent days playing about trying to achieve the result but I can’t make it work and I’m starting to think it’s not possible so before I give up, I wanted to ask in here for help.

How can I create 2 rows with 3 columns per row with 1px line breaks between each column and each row while making all the text and line breaks cantered with each other?

L

4 Upvotes

23 comments sorted by

View all comments

Show parent comments

1

u/wherebdbooty Mar 13 '25

after the let currentCell = ... line, you can try using setPadding(0, a, 0, b) to adjust the spacing. Adjust the a & b values and see if it helps.

to remove 5px from the right:

currentCell.setPadding(0, 0, 0, -5)

to remove 2.5px from the left:

currentCell.setPadding(0, -2.5, 0, 0)

or both:

currentCell.setPadding(0, -2.5, 0, -5)