Closed longseespace closed 1 year ago
frame(width:height:)
If you want to have the width and height of the tab's content (or resizable if the content's width and height is resizable), use:
settingsTab
.frame()
For specifying another width and/or height, use the width and/or height arguments. If you omit one of the arguments, it will take that value from the content:
settingsTab
.frame(width: 500, height: 200)
width(_:)
and height(_:)
If you want to only change the width without affecting the height or only change the height without affecting the width, use width(_:)
or height(_:)
.
In your case, @longseespace, if you want to make the height adapt to the content, but the width to stay the default width of the settings window, use:
settingsTab
.height()
Fantastic work, @david-swift. Can you enable git tip/sponsor? I wanted to sponsor your works (not much anyway, but I hope it helps)
Thank you very much for the kind offer, @longseespace, however, I currently prefer not to accept tips/sponsorships. Thanks for taking the time to open issues and for your valuable suggestions, that is incredibly helpful!
Problem
The SettingTab always have a fixed height. Is it possible to have it automatically adjust based on the inside content?
SettingsKit
:Preview
app:Thanks for the good work.