deps: update miuix to 0.9.0

This commit is contained in:
Miuzarte
2026-04-10 13:16:28 +08:00
parent 3f94d91564
commit da2bb9e227
11 changed files with 73 additions and 75 deletions

View File

@@ -41,7 +41,7 @@
## 构建
- JDK 17+
- Android SDK`compileSdk 36` / `buildTools 36.0.0`
- Android SDK`compileSdk 37` / `buildTools 36.0.0`
- Android NDK `28.2.13676358`
```bash

View File

@@ -14,11 +14,7 @@ val configuredAbiList = (project.findProperty("abiList") as String?)
android {
namespace = "io.github.miuzarte.scrcpyforandroid"
compileSdk {
version = release(36) {
minorApiLevel = 1
}
}
compileSdk = 37
defaultConfig {
applicationId = "io.github.miuzarte.scrcpyforandroid"
@@ -91,7 +87,8 @@ dependencies {
implementation(libs.androidx.compose.material.icons.extended)
implementation(libs.androidx.navigation3.runtime)
implementation(libs.material)
implementation(libs.miuix)
implementation(libs.miuix.ui)
implementation(libs.miuix.preference)
implementation(libs.miuix.icons)
implementation(libs.miuix.navigation3.ui)
implementation("io.github.vvb2060.ndk:boringssl:20250114")

View File

@@ -73,7 +73,7 @@ import top.yukonga.miuix.kmp.basic.ScrollBehavior
import top.yukonga.miuix.kmp.basic.Text
import top.yukonga.miuix.kmp.basic.TextField
import top.yukonga.miuix.kmp.basic.TopAppBar
import top.yukonga.miuix.kmp.extra.SuperListPopup
import top.yukonga.miuix.kmp.overlay.OverlayListPopup
import top.yukonga.miuix.kmp.theme.MiuixTheme
import java.net.InetSocketAddress
import java.net.Socket
@@ -995,7 +995,7 @@ private fun DeviceMenuPopup(
canClearLogs: Boolean,
onClearLogs: () -> Unit,
) {
SuperListPopup(
OverlayListPopup(
show = show,
popupPositionProvider = ListPopupDefaults.ContextMenuPositionProvider,
alignment = PopupPositionProvider.Align.TopEnd,

View File

@@ -24,7 +24,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import top.yukonga.miuix.kmp.extra.SuperBottomSheet
import top.yukonga.miuix.kmp.overlay.OverlayBottomSheet
@Composable
fun ReorderDevicesScreen(
@@ -70,7 +70,7 @@ fun ReorderDevicesScreen(
}
}
SuperBottomSheet(
OverlayBottomSheet(
show = show,
title = "快速设备排序",
onDismissRequest = onDismissRequest,

View File

@@ -61,10 +61,10 @@ import top.yukonga.miuix.kmp.basic.SpinnerEntry
import top.yukonga.miuix.kmp.basic.Text
import top.yukonga.miuix.kmp.basic.TextField
import top.yukonga.miuix.kmp.basic.TopAppBar
import top.yukonga.miuix.kmp.extra.SuperArrow
import top.yukonga.miuix.kmp.extra.SuperDropdown
import top.yukonga.miuix.kmp.extra.SuperSpinner
import top.yukonga.miuix.kmp.extra.SuperSwitch
import top.yukonga.miuix.kmp.preference.ArrowPreference
import top.yukonga.miuix.kmp.preference.OverlayDropdownPreference
import top.yukonga.miuix.kmp.preference.OverlaySpinnerPreference
import top.yukonga.miuix.kmp.preference.SwitchPreference
import kotlin.math.roundToInt
@Composable
@@ -374,7 +374,7 @@ internal fun ScrcpyAllOptionsPage(
item {
Card {
SuperSwitch(
SwitchPreference(
title = "启动后关闭屏幕",
summary = "--turn-screen-off",
checked = soBundle.turnScreenOff,
@@ -390,7 +390,7 @@ internal fun ScrcpyAllOptionsPage(
}
},
)
SuperSwitch(
SwitchPreference(
title = "禁用控制",
summary = "--no-control",
checked = !soBundle.control,
@@ -402,7 +402,7 @@ internal fun ScrcpyAllOptionsPage(
// 拦不住同时点, 弃用
// enabled = audio || video,
)
SuperSwitch(
SwitchPreference(
title = "禁用视频",
summary = "--no-video",
checked = !soBundle.video,
@@ -413,7 +413,7 @@ internal fun ScrcpyAllOptionsPage(
},
// enabled = audio || control,
)
SuperSwitch(
SwitchPreference(
title = "禁用音频",
summary = "--no-audio",
checked = !soBundle.audio,
@@ -455,7 +455,7 @@ internal fun ScrcpyAllOptionsPage(
)
},
)
SuperSwitch(
SwitchPreference(
title = "开始投屏时不唤醒屏幕",
summary = "--no-power-on",
checked = !soBundle.powerOn,
@@ -465,7 +465,7 @@ internal fun ScrcpyAllOptionsPage(
)
},
)
SuperSwitch(
SwitchPreference(
title = "结束投屏时息屏",
summary = "--power-off-on-close",
checked = soBundle.powerOffOnClose,
@@ -475,7 +475,7 @@ internal fun ScrcpyAllOptionsPage(
)
},
)
SuperSwitch(
SwitchPreference(
title = "显示物理触控",
summary = "--show-touches",
checked = soBundle.showTouches,
@@ -485,7 +485,7 @@ internal fun ScrcpyAllOptionsPage(
)
},
)
SuperSwitch(
SwitchPreference(
title = "投屏时保持本机屏幕唤醒",
summary = "--disable-screensaver",
checked = soBundle.disableScreensaver,
@@ -500,7 +500,7 @@ internal fun ScrcpyAllOptionsPage(
item {
Card {
SuperDropdown(
OverlayDropdownPreference(
title = "音频编码",
summary = "--audio-codec",
items = audioCodecItems,
@@ -545,7 +545,7 @@ internal fun ScrcpyAllOptionsPage(
},
)
SuperDropdown(
OverlayDropdownPreference(
title = "视频编码",
summary = "--video-codec",
items = videoCodecItems,
@@ -604,7 +604,7 @@ internal fun ScrcpyAllOptionsPage(
item {
Card {
SuperDropdown(
OverlayDropdownPreference(
title = "视频来源",
summary = "--video-source",
items = videoSourceItems,
@@ -709,7 +709,7 @@ internal fun ScrcpyAllOptionsPage(
.fillMaxWidth()
.padding(all = UiSpacing.Large),
)
SuperDropdown(
OverlayDropdownPreference(
title = "摄像头朝向",
summary = "--camera-facing",
items = cameraFacingItems,
@@ -722,11 +722,11 @@ internal fun ScrcpyAllOptionsPage(
)
},
)
SuperArrow(
ArrowPreference(
title = "获取 Camera Sizes",
summary = "--list-camera-sizes",
onClick = {
if (refreshBusy) return@SuperArrow
if (refreshBusy) return@ArrowPreference
scope.launch {
refreshBusy = true
snackbar.show("获取中")
@@ -744,7 +744,7 @@ internal fun ScrcpyAllOptionsPage(
}
},
)
SuperDropdown(
OverlayDropdownPreference(
title = "摄像头分辨率",
summary = "--camera-size",
items = cameraSizeDropdownItems,
@@ -850,7 +850,7 @@ internal fun ScrcpyAllOptionsPage(
)
},
)
SuperSwitch(
SwitchPreference(
title = "高帧率模式",
summary = "--camera-high-speed",
checked = soBundle.cameraHighSpeed,
@@ -860,7 +860,7 @@ internal fun ScrcpyAllOptionsPage(
)
},
)
SuperSwitch(
SwitchPreference(
title = "关闭虚拟显示器时保留内容",
summary = "--no-vd-destroy-content",
checked = !soBundle.vdDestroyContent,
@@ -870,7 +870,7 @@ internal fun ScrcpyAllOptionsPage(
)
},
)
SuperSwitch(
SwitchPreference(
title = "禁用虚拟显示器系统装饰",
summary = "--no-vd-system-decorations",
checked = !soBundle.vdSystemDecorations,
@@ -888,7 +888,7 @@ internal fun ScrcpyAllOptionsPage(
item {
Card {
SuperDropdown(
OverlayDropdownPreference(
title = "音频来源",
summary = "--audio-source",
items = audioSourceItems,
@@ -899,7 +899,7 @@ internal fun ScrcpyAllOptionsPage(
)
},
)
SuperSwitch(
SwitchPreference(
title = "音频双路输出",
summary = "--audio-dup",
checked = soBundle.audioDup,
@@ -909,7 +909,7 @@ internal fun ScrcpyAllOptionsPage(
)
},
)
SuperSwitch(
SwitchPreference(
title = "仅转发不播放",
summary = "--no-audio-playback",
checked = !soBundle.audioPlayback,
@@ -919,7 +919,7 @@ internal fun ScrcpyAllOptionsPage(
)
},
)
SuperSwitch(
SwitchPreference(
title = "音频转发失败时终止",
summary = "--require-audio",
checked = soBundle.requireAudio,
@@ -934,11 +934,11 @@ internal fun ScrcpyAllOptionsPage(
item {
Card {
SuperArrow(
ArrowPreference(
title = "获取编码器列表",
summary = "--list-encoders",
onClick = {
if (refreshBusy) return@SuperArrow
if (refreshBusy) return@ArrowPreference
scope.launch {
refreshBusy = true
snackbar.show("获取中")
@@ -956,8 +956,8 @@ internal fun ScrcpyAllOptionsPage(
}
},
)
// TODO: 在 SuperSpinner / SuperDropdown 支持展开状态回调后, 在展开时触发获取
SuperSpinner(
// TODO: 在 OverlaySpinnerPreference / OverlayDropdownPreference 支持展开状态回调后, 在展开时触发获取
OverlaySpinnerPreference(
title = "视频编码器",
summary = "--video-encoder",
items = videoEncoderEntries,
@@ -982,7 +982,7 @@ internal fun ScrcpyAllOptionsPage(
.fillMaxWidth()
.padding(all = UiSpacing.Large),
)
SuperSpinner(
OverlaySpinnerPreference(
title = "音频编码器",
summary = "--audio-encoder",
items = audioEncoderEntries,

View File

@@ -56,9 +56,9 @@ import top.yukonga.miuix.kmp.basic.ScrollBehavior
import top.yukonga.miuix.kmp.basic.Text
import top.yukonga.miuix.kmp.basic.TextField
import top.yukonga.miuix.kmp.basic.TopAppBar
import top.yukonga.miuix.kmp.extra.SuperArrow
import top.yukonga.miuix.kmp.extra.SuperDropdown
import top.yukonga.miuix.kmp.extra.SuperSwitch
import top.yukonga.miuix.kmp.preference.ArrowPreference
import top.yukonga.miuix.kmp.preference.OverlayDropdownPreference
import top.yukonga.miuix.kmp.preference.SwitchPreference
import kotlin.math.roundToInt
import kotlin.system.exitProcess
@@ -193,7 +193,7 @@ fun SettingsPage(
item {
SectionSmallTitle("主题", showLeadingSpacer = false)
Card {
SuperDropdown(
OverlayDropdownPreference(
title = "外观模式",
summary = ThemeModes.baseOptions
.getOrNull(
@@ -213,7 +213,7 @@ fun SettingsPage(
asBundle = asBundle.copy(themeBaseIndex = it)
},
)
SuperSwitch(
SwitchPreference(
title = "Monet",
summary = "开启后使用 Monet 动态配色",
checked = asBundle.monet,
@@ -227,7 +227,7 @@ fun SettingsPage(
item {
SectionSmallTitle("投屏")
Card {
SuperSwitch(
SwitchPreference(
title = "启用调试信息",
summary = "在全屏界面悬浮显示分辨率、帧率和触点信息",
checked = asBundle.fullscreenDebugInfo,
@@ -259,17 +259,17 @@ fun SettingsPage(
}
},
)
SuperArrow(
ArrowPreference(
title = "快速设备排序",
summary = "手动排序设备页的快速设备",
onClick = onOpenReorderDevices,
)
SuperArrow(
ArrowPreference(
title = "虚拟按钮排序",
summary = "手动排序预览/全屏时的虚拟按钮,并选择哪些按钮展示在外",
onClick = onOpenVirtualButtonOrder,
)
SuperSwitch(
SwitchPreference(
title = "全屏显示虚拟按钮",
summary = "在全屏控制页底部显示返回键、主页键等虚拟按钮",
checked = asBundle.showFullscreenVirtualButtons,
@@ -420,7 +420,7 @@ fun SettingsPage(
)
}
}
SuperSwitch(
SwitchPreference(
title = "配对时自动启用发现服务",
summary = "打开配对弹窗后自动搜索可用配对端口",
checked = asBundle.adbPairingAutoDiscoverOnDialogOpen,
@@ -430,7 +430,7 @@ fun SettingsPage(
)
},
)
SuperSwitch(
SwitchPreference(
title = "自动重连已配对设备",
summary = "自动发现开启无线调试的设备,更新快速设备的随机端口并尝试连接(效果比较随缘)",
checked = asBundle.adbAutoReconnectPairedDevice,
@@ -448,7 +448,7 @@ fun SettingsPage(
// 应用启动时就会执行迁移与旧数据的删除
SectionSmallTitle("应用", showLeadingSpacer = false)
Card {
SuperArrow(
ArrowPreference(
title = "恢复旧版本配置",
summary = "从旧版本的 SharedPreferences 恢复至 DataStore",
onClick = {
@@ -481,7 +481,7 @@ fun SettingsPage(
item {
SectionSmallTitle("关于", showLeadingSpacer = false)
Card {
SuperArrow(
ArrowPreference(
title = "仓库发布页",
summary = "$updateSummary\n${AppUpdateChecker.REPO_URL.removePrefix("https://")}",
onClick = {

View File

@@ -33,7 +33,7 @@ import top.yukonga.miuix.kmp.basic.IconButton
import top.yukonga.miuix.kmp.basic.Scaffold
import top.yukonga.miuix.kmp.basic.ScrollBehavior
import top.yukonga.miuix.kmp.basic.TopAppBar
import top.yukonga.miuix.kmp.extra.SuperSwitch
import top.yukonga.miuix.kmp.preference.SwitchPreference
@Composable
internal fun VirtualButtonOrderScreen(
@@ -106,7 +106,7 @@ internal fun VirtualButtonOrderPage(
// 按钮显示文本开关
item {
Card {
SuperSwitch(
SwitchPreference(
title = "按钮显示文本",
summary = "超过3个建议关闭只对预览卡下方的虚拟按钮生效",
checked = asBundle.previewVirtualButtonShowText,

View File

@@ -20,8 +20,8 @@ import top.yukonga.miuix.kmp.basic.ButtonDefaults
import top.yukonga.miuix.kmp.basic.Slider
import top.yukonga.miuix.kmp.basic.Text
import top.yukonga.miuix.kmp.basic.TextButton
import top.yukonga.miuix.kmp.extra.SuperArrow
import top.yukonga.miuix.kmp.extra.SuperDialog
import top.yukonga.miuix.kmp.overlay.OverlayDialog
import top.yukonga.miuix.kmp.preference.ArrowPreference
import top.yukonga.miuix.kmp.theme.MiuixTheme
@Composable
@@ -52,7 +52,7 @@ fun SuperSlider(
var showInputDialog by remember { mutableStateOf(false) }
var holdArrow by remember { mutableStateOf(false) }
SuperArrow(
ArrowPreference(
title = title,
summary = summary,
onClick = {
@@ -119,7 +119,7 @@ private fun SliderInputDialog(
onDismissFinished: () -> Unit,
onConfirm: (String) -> Unit,
) {
SuperDialog(
OverlayDialog(
show = showDialog,
title = title,
summary = summary,

View File

@@ -95,10 +95,10 @@ import top.yukonga.miuix.kmp.basic.Icon
import top.yukonga.miuix.kmp.basic.Text
import top.yukonga.miuix.kmp.basic.TextButton
import top.yukonga.miuix.kmp.basic.TextField
import top.yukonga.miuix.kmp.extra.SuperArrow
import top.yukonga.miuix.kmp.extra.SuperDialog
import top.yukonga.miuix.kmp.extra.SuperDropdown
import top.yukonga.miuix.kmp.extra.SuperSwitch
import top.yukonga.miuix.kmp.overlay.OverlayDialog
import top.yukonga.miuix.kmp.preference.ArrowPreference
import top.yukonga.miuix.kmp.preference.OverlayDropdownPreference
import top.yukonga.miuix.kmp.preference.SwitchPreference
import top.yukonga.miuix.kmp.theme.MiuixTheme
import top.yukonga.miuix.kmp.theme.MiuixTheme.isDynamicColor
import top.yukonga.miuix.kmp.utils.PressFeedbackType
@@ -220,7 +220,7 @@ internal fun PairingCard(
val holdDownState = remember { mutableStateOf(false) }
Card {
SuperArrow(
ArrowPreference(
title = "使用配对码配对设备",
onClick = {
showPairDialog.value = true
@@ -410,7 +410,7 @@ internal fun ConfigPanel(
}
Card {
SuperSwitch(
SwitchPreference(
title = "音频转发",
summary = "转发设备音频到本机 (Android 11+)",
checked = soBundle.audio,
@@ -419,7 +419,7 @@ internal fun ConfigPanel(
&& audioForwardingSupported,
)
SuperDropdown(
OverlayDropdownPreference(
title = "音频编码",
summary = "--audio-codec",
items = audioCodecItems,
@@ -465,7 +465,7 @@ internal fun ConfigPanel(
)
}
SuperDropdown(
OverlayDropdownPreference(
title = "视频编码",
summary = "--video-codec",
items = videoCodecItems,
@@ -524,7 +524,7 @@ internal fun ConfigPanel(
enabled = !sessionStarted,
)
SuperArrow(
ArrowPreference(
title = "更多参数",
summary = "所有 scrcpy 参数",
onClick = onOpenAdvanced,
@@ -617,7 +617,7 @@ private fun PairingDialog(
}
}
SuperDialog(
OverlayDialog(
show = showDialog,
title = "使用配对码配对设备",
summary = "使用六位数的配对码配对新设备",

View File

@@ -46,7 +46,7 @@ import top.yukonga.miuix.kmp.basic.SpinnerDefaults
import top.yukonga.miuix.kmp.basic.SpinnerEntry
import top.yukonga.miuix.kmp.basic.SpinnerItemImpl
import top.yukonga.miuix.kmp.basic.Text
import top.yukonga.miuix.kmp.extra.SuperListPopup
import top.yukonga.miuix.kmp.overlay.OverlayListPopup
import top.yukonga.miuix.kmp.theme.MiuixTheme
enum class VirtualButtonAction(
@@ -310,7 +310,7 @@ class VirtualButtonBar(
}
}
SuperListPopup(
OverlayListPopup(
show = show,
popupPositionProvider = ListPopupDefaults.ContextMenuPositionProvider,
alignment = PopupPositionProvider.Align.TopEnd,

View File

@@ -9,7 +9,7 @@ androidxNavigation3 = "1.1.0-beta01"
junit = "4.13.2"
androidxJunit = "1.3.0"
espressoCore = "3.7.0"
miuix = "0.8.7"
miuix = "0.9.0"
material = "1.13.0"
runtime = "1.10.5"
@@ -30,7 +30,8 @@ junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidxJunit" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
miuix = { group = "top.yukonga.miuix.kmp", name = "miuix", version.ref = "miuix" }
miuix-ui = { group = "top.yukonga.miuix.kmp", name = "miuix-ui", version.ref = "miuix" }
miuix-preference = { group = "top.yukonga.miuix.kmp", name = "miuix-preference", version.ref = "miuix" }
miuix-icons = { group = "top.yukonga.miuix.kmp", name = "miuix-icons", version.ref = "miuix" }
miuix-navigation3-ui = { group = "top.yukonga.miuix.kmp", name = "miuix-navigation3-ui", version.ref = "miuix" }
androidx-compose-runtime = { group = "androidx.compose.runtime", name = "runtime", version.ref = "runtime" }