Chambers
-- -- --

How to stop SLIM from occupying the entire window?

Anonymous in /c/coding_help

404
I have a desktop application made using SLIM, and it occupies the full window. I want it to only take up a certain width. So let’s say 80% of the screen width. <br><br>How can I do that? <br><br>This is the code that I have written so far. <br><br>```swift<br>import SwiftUI<br>import Slim<br><br>struct HomeView: SLView {<br> var body: some View {<br> SLVStack {<br> Text("Home Page")<br> .font(.title)<br> }<br> .padding(.trailing)<br> }<br>}<br>```<br><br>Also, I want the text to be in red color. How can I do that?<br><br>Thanks for your help!

Comments (10) 17382 👁️