mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 18:39:55 +02:00
feat(desktop): unify Linux window chrome
This commit is contained in:
@@ -65,6 +65,7 @@ object DesktopAppearanceBridge {
|
||||
var applyNativeAppearance: ((Boolean) -> Unit)? = null
|
||||
|
||||
fun isMacOs(): Boolean = isMacOs(System.getProperty("os.name"))
|
||||
fun isLinux(): Boolean = isLinux(System.getProperty("os.name"))
|
||||
|
||||
fun toggleMaximized(window: Window) {
|
||||
if (!isMacOs()) return
|
||||
@@ -77,6 +78,9 @@ object DesktopAppearanceBridge {
|
||||
internal fun isMacOs(osName: String): Boolean =
|
||||
osName.startsWith("Mac", ignoreCase = true)
|
||||
|
||||
internal fun isLinux(osName: String): Boolean =
|
||||
osName.startsWith("Linux", ignoreCase = true)
|
||||
|
||||
internal fun toggledWindowState(currentState: Int): Int =
|
||||
if (currentState and Frame.MAXIMIZED_BOTH == Frame.MAXIMIZED_BOTH) {
|
||||
Frame.NORMAL
|
||||
|
||||
Reference in New Issue
Block a user