Note that scaleFactor is not used in MyButtonStyle. It can be eliminated.
Looking at my actual application, the exampleView looks like the following:
.buttonStyle(GameButtonStyle(labelWidth: 140 * scaleFactor, labelHeight: 20 * scaleFactor, minWidth: 70 * scaleFactor, verticalPadding: 3 * scaleFactor))
I determine the scaleFactor depending upon the size of the window on OSX or the size of the screen on IOS.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: