style: MessageTTS menu item icon

This commit is contained in:
o0kam1
2024-07-11 13:35:34 +08:00
parent 8b21d1e5df
commit 2728de0592
3 changed files with 72 additions and 2 deletions

View File

@@ -132,7 +132,7 @@ object MessageTTSHook : CommonSwitchFunctionHook(), OnMenuBuilder, DexKitFinder
override fun onGetMenuNt(msg: Any, componentType: String, param: XC_MethodHook.MethodHookParam) {
if (!isEnabled) return
val item = CustomMenu.createItemIconNt(msg, "TTS", 0, R.id.item_tts) {
val item = CustomMenu.createItemIconNt(msg, "TTS", R.drawable.ic_item_tts_72dp, R.id.item_tts) {
val ctx = ContextUtils.getCurrentActivity()
val wc = CommonContextWrapper.createAppCompatContext(ctx)
val text = try {
@@ -144,7 +144,7 @@ object MessageTTSHook : CommonSwitchFunctionHook(), OnMenuBuilder, DexKitFinder
}
TTS.speak(wc, text.toString())
}
val item2 = CustomMenu.createItemIconNt(msg, "TTS+", 0, R.id.item_tts2) {
val item2 = CustomMenu.createItemIconNt(msg, "TTS+", R.drawable.ic_item_tts_plus_72dp, R.id.item_tts2) {
val ctx = ContextUtils.getCurrentActivity()
val wc = CommonContextWrapper.createAppCompatContext(ctx)
val text = try {

View File

@@ -0,0 +1,33 @@
<!--
~ QAuxiliary - An Xposed module for QQ/TIM
~ Copyright (C) 2019-2024 QAuxiliary developers
~ https://github.com/cinit/QAuxiliary
~
~ This software is an opensource software: you can redistribute it
~ and/or modify it under the terms of the General Public License
~ as published by the Free Software Foundation; either
~ version 3 of the License, or any later version as published
~ by QAuxiliary contributors.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the General Public License for more details.
~
~ You should have received a copy of the General Public License
~ along with this software.
~ If not, see
~ <https://github.com/cinit/QAuxiliary/blob/master/LICENSE.md>.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="72dp" android:tint="#ffffff" android:viewportHeight="24" android:viewportWidth="24" android:width="72dp">
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12c0,5.52 4.48,10 10,10s10,-4.48 10,-10C22,6.48 17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8s8,3.58 8,8S16.42,20 12,20z"/>
<path android:fillColor="@android:color/white" android:pathData="M7.1,10.18c0.26,0.56 0.39,1.16 0.4,1.8c0.01,0.63 -0.13,1.25 -0.4,1.86l1.37,0.62c0.37,-0.81 0.55,-1.65 0.54,-2.5c-0.01,-0.84 -0.19,-1.65 -0.54,-2.4L7.1,10.18z"/>
<path android:fillColor="@android:color/white" android:pathData="M13.33,7.33c0.78,1.57 1.18,3.14 1.18,4.64c0,1.51 -0.4,3.09 -1.18,4.69l1.35,0.66c0.88,-1.81 1.33,-3.61 1.33,-5.35c0,-1.74 -0.45,-3.53 -1.33,-5.31L13.33,7.33z"/>
<path android:fillColor="@android:color/white" android:pathData="M10.2,8.72c0.53,1.07 0.8,2.21 0.8,3.4c0,1.17 -0.26,2.23 -0.78,3.15l1.3,0.74c0.65,-1.15 0.98,-2.45 0.98,-3.89c0,-1.42 -0.32,-2.79 -0.96,-4.07L10.2,8.72z"/>
</vector>

View File

@@ -0,0 +1,37 @@
<!--
~ QAuxiliary - An Xposed module for QQ/TIM
~ Copyright (C) 2019-2024 QAuxiliary developers
~ https://github.com/cinit/QAuxiliary
~
~ This software is an opensource software: you can redistribute it
~ and/or modify it under the terms of the General Public License
~ as published by the Free Software Foundation; either
~ version 3 of the License, or any later version as published
~ by QAuxiliary contributors.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the General Public License for more details.
~
~ You should have received a copy of the General Public License
~ along with this software.
~ If not, see
~ <https://github.com/cinit/QAuxiliary/blob/master/LICENSE.md>.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="72dp" android:viewportHeight="24" android:viewportWidth="24" android:width="72dp" android:tint="#ffffff">
<path android:fillColor="#000000" android:pathData="M12,2C6.48,2 2,6.48 2,12C2,17.52 6.48,22 12,22C17.52,22 22,17.52 22,12C22,6.48 17.52,2 12,2ZM12,20C7.58,20 4,16.42 4,12C4,7.58 7.58,4 12,4C16.42,4 20,7.58 20,12C20,16.42 16.42,20 12,20Z"/>
<path android:fillColor="#000000" android:pathData="M7.1,10.18C7.36,10.74 7.49,11.34 7.5,11.98C7.51,12.61 7.37,13.23 7.1,13.84L8.47,14.46C8.84,13.65 9.02,12.81 9.01,11.96C9,11.12 8.82,10.31 8.47,9.56L7.1,10.18Z"/>
<path android:fillColor="#000000" android:pathData="M13.33,7.33C14.11,8.9 14.51,10.47 14.51,11.97C14.51,13.48 14.11,15.06 13.33,16.66L14.68,17.32C15.56,15.51 16.01,13.71 16.01,11.97C16.01,10.23 15.56,8.44 14.68,6.66L13.33,7.33Z"/>
<path android:fillColor="#000000" android:pathData="M10.2,8.72C10.73,9.79 11,10.93 11,12.12C11,13.29 10.74,14.35 10.22,15.27L11.52,16.01C12.17,14.86 12.5,13.56 12.5,12.12C12.5,10.7 12.18,9.33 11.54,8.05L10.2,8.72Z"/>
<path android:fillColor="#000000" android:pathData="M19.533,2.064h3.833v1.101h-3.833z" android:strokeColor="#00000000" android:strokeWidth="0.188976"/>
<path android:fillColor="#000000" android:pathData="M22,0.698l-0,3.833l-1.101,0l-0,-3.833z" android:strokeColor="#00000000" android:strokeWidth="0.188976"/>
</vector>