19 lines
426 B
Go
19 lines
426 B
Go
|
package naive
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/progrium/darwinkit/macos/appkit"
|
||
|
)
|
||
|
|
||
|
func (lo LayoutOrientation) toNative() appkit.UserInterfaceLayoutOrientation {
|
||
|
switch lo {
|
||
|
case LayoutOrientationHorizontal:
|
||
|
return appkit.UserInterfaceLayoutOrientationHorizontal
|
||
|
case LayoutOrientationVertical:
|
||
|
return appkit.UserInterfaceLayoutOrientationVertical
|
||
|
default:
|
||
|
panic(fmt.Sprintf("invalid layout orientation %d", lo))
|
||
|
}
|
||
|
}
|