6.6.3 - Alpha - 修复 console.setContentTextColor 日志字体颜色异常 (issue #346)
This commit is contained in:
@@ -4,7 +4,8 @@
|
|||||||
"released_date": "2025/04/17",
|
"released_date": "2025/04/17",
|
||||||
"fix": [
|
"fix": [
|
||||||
"主页文档标签显示在线文档时部分内容被系统导航栏遮挡的问题",
|
"主页文档标签显示在线文档时部分内容被系统导航栏遮挡的问题",
|
||||||
"部分设备代码编辑器空行显示方框字符的问题"
|
"部分设备代码编辑器空行显示方框字符的问题",
|
||||||
|
"console.setContentTextColor 方法导致日志字体颜色丢失默认值的问题 _[`issue #346`](http://issues.autojs6.com/346)_"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"v6.6.2": {
|
"v6.6.2": {
|
||||||
|
|||||||
@@ -632,7 +632,7 @@ open class ConsoleImpl(val uiHandler: UiHandler) : AbstractConsole() {
|
|||||||
fun getContentTextSize() = getFloatingConsoleView()?.textSize ?: 0f
|
fun getContentTextSize() = getFloatingConsoleView()?.textSize ?: 0f
|
||||||
|
|
||||||
@ScriptInterface
|
@ScriptInterface
|
||||||
fun setContentTextColors(colors: Array<out Int>) = runWithWindow({ configurator.setContentTextColors(colors) }) {
|
fun setContentTextColors(colors: Array<out Int?>) = runWithWindow({ configurator.setContentTextColors(colors) }) {
|
||||||
getFloatingConsoleView()?.setTextColors(colors)
|
getFloatingConsoleView()?.setTextColors(colors)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -859,7 +859,7 @@ open class ConsoleImpl(val uiHandler: UiHandler) : AbstractConsole() {
|
|||||||
private set
|
private set
|
||||||
|
|
||||||
@Volatile
|
@Volatile
|
||||||
var contentTextColors: Array<out Int>? = null
|
var contentTextColors: Array<out Int?>? = null
|
||||||
private set
|
private set
|
||||||
|
|
||||||
@Volatile
|
@Volatile
|
||||||
@@ -923,7 +923,7 @@ open class ConsoleImpl(val uiHandler: UiHandler) : AbstractConsole() {
|
|||||||
contentTextSize = size
|
contentTextSize = size
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setContentTextColors(colors: Array<out Int>) = also {
|
fun setContentTextColors(colors: Array<out Int?>) = also {
|
||||||
contentTextColors = colors
|
contentTextColors = colors
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -410,10 +410,13 @@ class Console(scriptRuntime: ScriptRuntime) : AugmentableProxy(scriptRuntime) {
|
|||||||
when (argList.size) {
|
when (argList.size) {
|
||||||
1 -> when (val o = argList[0]) {
|
1 -> when (val o = argList[0]) {
|
||||||
is NativeArray -> {
|
is NativeArray -> {
|
||||||
scriptRuntime.console.setContentTextColors(o.map { S13n.color(arrayOf(it)) }.toTypedArray())
|
val tmp = Array(6) { index ->
|
||||||
|
if (index < o.size) S13n.color(arrayOf(o[index])) else null
|
||||||
|
}
|
||||||
|
scriptRuntime.console.setContentTextColors(tmp)
|
||||||
}
|
}
|
||||||
is NativeObject -> {
|
is NativeObject -> {
|
||||||
val tmp = Array(6) { 0 }
|
val tmp = Array<Int?>(6) { null }
|
||||||
listOf("verbose", "log", "info", "warn", "error", "assert").forEachIndexed { index, key ->
|
listOf("verbose", "log", "info", "warn", "error", "assert").forEachIndexed { index, key ->
|
||||||
if (o.hasProp(key)) {
|
if (o.hasProp(key)) {
|
||||||
tmp[index] = S13n.color(arrayOf(o.prop(key)))
|
tmp[index] = S13n.color(arrayOf(o.prop(key)))
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#Thu Apr 17 18:03:05 CST 2025
|
#Thu Apr 17 18:34:12 CST 2025
|
||||||
BUILD_TIME=1744884185114
|
BUILD_TIME=1744886052185
|
||||||
COMPILE_SDK_VERSION=35
|
COMPILE_SDK_VERSION=35
|
||||||
JAVA_VERSION=23
|
JAVA_VERSION=23
|
||||||
JAVA_VERSION_MIN_RADICAL=0
|
JAVA_VERSION_MIN_RADICAL=0
|
||||||
|
|||||||
Reference in New Issue
Block a user