I'm trying to replicate the little status panel as seen in the Xcode toolbar, but using SwiftUI. This one...

I've tried by putting a HStack in a ToolbarItem and setting a rounded rectangle as the background. This works, the only issue is that I cannot get the view to resize with the window.
Is there any way to achieve this? Please help!