From 9af46d82bf89844511bc42459491150df84e2fb8 Mon Sep 17 00:00:00 2001 From: heddxh Date: Sun, 16 Mar 2025 21:52:30 +0800 Subject: [PATCH 01/33] Add dynamic color support (#696) Co-authored-by: Rocka --- README.md | 2 +- .../fcitx/fcitx5/android/FcitxApplication.kt | 4 +- .../fcitx/fcitx5/android/data/theme/Theme.kt | 65 ++++++++++++- .../fcitx5/android/data/theme/ThemeManager.kt | 12 ++- .../fcitx5/android/data/theme/ThemeMonet.kt | 95 +++++++++++++++++++ .../android/input/NavigationBarManager.kt | 5 +- .../android/input/preedit/PreeditComponent.kt | 6 +- .../main/settings/theme/ThemeThumbnailUi.kt | 19 +++- .../drawable/ic_baseline_auto_awesome_24.xml | 9 ++ 9 files changed, 201 insertions(+), 16 deletions(-) create mode 100644 app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemeMonet.kt create mode 100644 app/src/main/res/drawable/ic_baseline_auto_awesome_24.xml diff --git a/README.md b/README.md index 7943e9d50..85f9bba0f 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ GitHub: [![release version](https://img.shields.io/github/v/release/fcitx5-andro - Virtual Keyboard (layout not customizable yet) - Expandable candidate view - Clipboard management (plain text only) -- Theming (custom color scheme and background image) +- Theming (custom color scheme, background image and dynamic color aka monet color after Android 12) - Popup preview on key press - Long press popup keyboard for convenient symbol input - Symbol and Emoji picker diff --git a/app/src/main/java/org/fcitx/fcitx5/android/FcitxApplication.kt b/app/src/main/java/org/fcitx/fcitx5/android/FcitxApplication.kt index 2e9085d6e..e52553b36 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/FcitxApplication.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/FcitxApplication.kt @@ -165,8 +165,8 @@ class FcitxApplication : Application() { override fun onConfigurationChanged(newConfig: Configuration) { super.onConfigurationChanged(newConfig) - ThemeManager.onSystemDarkModeChange(newConfig.isDarkMode()) - Locales.onLocaleChange(resources.configuration) + ThemeManager.onSystemPlatteChange(newConfig) + Locales.onLocaleChange(newConfig) } companion object { diff --git a/app/src/main/java/org/fcitx/fcitx5/android/data/theme/Theme.kt b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/Theme.kt index d9501d4b7..33cec64a1 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/data/theme/Theme.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/Theme.kt @@ -14,6 +14,7 @@ import kotlinx.parcelize.Parcelize import kotlinx.serialization.Serializable import org.fcitx.fcitx5.android.utils.DarkenColorFilter import org.fcitx.fcitx5.android.utils.RectSerializer +import org.fcitx.fcitx5.android.utils.alpha import org.fcitx.fcitx5.android.utils.appContext import java.io.File @@ -261,4 +262,66 @@ sealed class Theme : Parcelable { ) } -} \ No newline at end of file + @Parcelize + data class Monet( + override val name: String, + override val isDark: Boolean, + override val backgroundColor: Int, + override val barColor: Int, + override val keyboardColor: Int, + override val keyBackgroundColor: Int, + override val keyTextColor: Int, + override val candidateTextColor: Int, + override val candidateLabelColor: Int, + override val candidateCommentColor: Int, + override val altKeyBackgroundColor: Int, + override val altKeyTextColor: Int, + override val accentKeyBackgroundColor: Int, + override val accentKeyTextColor: Int, + override val keyPressHighlightColor: Int, + override val keyShadowColor: Int, + override val popupBackgroundColor: Int, + override val popupTextColor: Int, + override val spaceBarColor: Int, + override val dividerColor: Int, + override val clipboardEntryColor: Int, + override val genericActiveBackgroundColor: Int, + override val genericActiveForegroundColor: Int + ) : Theme() { + constructor( + isDark: Boolean, + surfaceContainer: Int, + surfaceContainerHigh: Int, + surfaceBright: Int, + onSurface: Int, + primary: Int, + onPrimary: Int, + secondaryContainer: Int, + onSurfaceVariant: Int, + ) : this( + name = "Monet" + if (isDark) "Dark" else "Light", + isDark = isDark, + backgroundColor = surfaceContainer, + barColor = surfaceContainerHigh, + keyboardColor = surfaceContainer, + keyBackgroundColor = surfaceBright, + keyTextColor = onSurface, + candidateTextColor = onSurface, + candidateLabelColor = onSurface, + candidateCommentColor = onSurfaceVariant, + altKeyBackgroundColor = secondaryContainer, + altKeyTextColor = onSurfaceVariant, + accentKeyBackgroundColor = primary, + accentKeyTextColor = onPrimary, + keyPressHighlightColor = onSurface.alpha(if (isDark) 0.2f else 0.12f), + keyShadowColor = 0x000000, + popupBackgroundColor = surfaceContainer, + popupTextColor = onSurface, + spaceBarColor = surfaceBright, + dividerColor = surfaceBright, + clipboardEntryColor = surfaceBright, + genericActiveBackgroundColor = primary, + genericActiveForegroundColor = onPrimary + ) + } +} diff --git a/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemeManager.kt b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemeManager.kt index ef9ef45c0..93ba4d47f 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemeManager.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemeManager.kt @@ -12,6 +12,7 @@ import androidx.core.content.edit import androidx.preference.PreferenceManager import org.fcitx.fcitx5.android.data.prefs.AppPrefs import org.fcitx.fcitx5.android.data.prefs.ManagedPreferenceProvider +import org.fcitx.fcitx5.android.data.theme.ThemeManager.activeTheme import org.fcitx.fcitx5.android.utils.WeakHashSet import org.fcitx.fcitx5.android.utils.appContext import org.fcitx.fcitx5.android.utils.isDarkMode @@ -36,12 +37,14 @@ object ThemeManager { val DefaultTheme = ThemePreset.PixelDark + private var monetThemes = listOf(ThemeMonet.getLight(), ThemeMonet.getDark()) + private val customThemes: MutableList = ThemeFilesManager.listThemes() fun getTheme(name: String) = customThemes.find { it.name == name } ?: BuiltinThemes.find { it.name == name } - fun getAllThemes() = customThemes + BuiltinThemes + fun getAllThemes() = customThemes + monetThemes + BuiltinThemes fun refreshThemes() { customThemes.clear() @@ -134,8 +137,11 @@ object ThemeManager { _activeTheme = evaluateActiveTheme() } - fun onSystemDarkModeChange(isDark: Boolean) { - isDarkMode = isDark + fun onSystemPlatteChange(newConfig: Configuration) { + isDarkMode = newConfig.isDarkMode() + monetThemes = listOf(ThemeMonet.getLight(), ThemeMonet.getDark()) + // `ManagedThemePreference` finds a theme with same name in `getAllThemes()` + // thus `evaluateActiveTheme()` should be called after updating `monetThemes` activeTheme = evaluateActiveTheme() } diff --git a/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemeMonet.kt b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemeMonet.kt new file mode 100644 index 000000000..ef9e32433 --- /dev/null +++ b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemeMonet.kt @@ -0,0 +1,95 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-or-later + * SPDX-FileCopyrightText: Copyright 2025 Fcitx5 for Android Contributors + */ +package org.fcitx.fcitx5.android.data.theme + +import android.os.Build +import org.fcitx.fcitx5.android.utils.appContext + +// Ref: +// https://github.com/material-components/material-components-android/blob/master/docs/theming/Color.md +// https://www.figma.com/community/file/809865700885504168/material-3-android-15 +// https://material-foundation.github.io/material-theme-builder/ + +// FIXME: SDK < 34 can only have approximate color values, maybe we can implement our own color algorithm. +// See: https://github.com/XayahSuSuSu/Android-DataBackup/blob/e8b087fb55519c659bebdc46c0217731fe80a0d7/source/core/ui/src/main/kotlin/com/xayah/core/ui/material3/DynamicTonalPalette.kt#L185 + +object ThemeMonet { + fun getLight(): Theme.Monet = + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) // Real Monet colors + Theme.Monet( + isDark = false, + surfaceContainer = appContext.getColor(android.R.color.system_surface_container_light), + surfaceContainerHigh = appContext.getColor(android.R.color.system_surface_container_highest_light), + surfaceBright = appContext.getColor(android.R.color.system_surface_bright_light), + onSurface = appContext.getColor(android.R.color.system_on_surface_light), + primary = appContext.getColor(android.R.color.system_primary_light), + onPrimary = appContext.getColor(android.R.color.system_on_primary_light), + secondaryContainer = appContext.getColor(android.R.color.system_secondary_container_light), + onSurfaceVariant = appContext.getColor(android.R.color.system_on_surface_variant_light) + ) + else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) // Approximate color values + Theme.Monet( + isDark = false, + surfaceContainer = appContext.getColor(android.R.color.system_neutral1_50), // neutral94 + surfaceContainerHigh = appContext.getColor(android.R.color.system_neutral2_100), // neutral92 + surfaceBright = appContext.getColor(android.R.color.system_neutral1_10), // neutral98 + onSurface = appContext.getColor(android.R.color.system_neutral1_900), + primary = appContext.getColor(android.R.color.system_accent1_600), + onPrimary = appContext.getColor(android.R.color.system_accent1_0), + secondaryContainer = appContext.getColor(android.R.color.system_accent2_100), + onSurfaceVariant = appContext.getColor(android.R.color.system_accent2_700) + ) + else // Static MD3 colors, based on #769CDF + Theme.Monet( + isDark = false, + surfaceContainer = 0xffededf4.toInt(), + surfaceContainerHigh = 0xffe7e8ee.toInt(), + surfaceBright = 0xfff9f9ff.toInt(), + onSurface = 0xff191c20.toInt(), + primary = 0xff415f91.toInt(), + onPrimary = 0xffffffff.toInt(), + secondaryContainer = 0xffdae2f9.toInt(), + onSurfaceVariant = 0xff44474e.toInt(), + ) + + fun getDark(): Theme.Monet = + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) // Real Monet colors + Theme.Monet( + isDark = true, + surfaceContainer = appContext.getColor(android.R.color.system_surface_container_dark), + surfaceContainerHigh = appContext.getColor(android.R.color.system_surface_container_high_dark), + surfaceBright = appContext.getColor(android.R.color.system_surface_bright_dark), + onSurface = appContext.getColor(android.R.color.system_on_surface_dark), + primary = appContext.getColor(android.R.color.system_primary_dark), + onPrimary = appContext.getColor(android.R.color.system_on_primary_dark), + secondaryContainer = appContext.getColor(android.R.color.system_secondary_container_dark), + onSurfaceVariant = appContext.getColor(android.R.color.system_on_surface_variant_dark) + ) + else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) // Approximate color values + Theme.Monet( + isDark = true, + surfaceContainer = appContext.getColor(android.R.color.system_neutral1_900), // neutral12 + surfaceContainerHigh = appContext.getColor(android.R.color.system_neutral2_1000), // neutral17 + surfaceBright = appContext.getColor(android.R.color.system_neutral1_800), // neutral24 + onSurface = appContext.getColor(android.R.color.system_neutral1_100), + primary = appContext.getColor(android.R.color.system_accent1_200), + onPrimary = appContext.getColor(android.R.color.system_accent1_800), + secondaryContainer = appContext.getColor(android.R.color.system_accent2_700), + onSurfaceVariant = appContext.getColor(android.R.color.system_accent2_200) + ) + else // Static MD3 colors, based on #769CDF + Theme.Monet( + isDark = true, + surfaceContainer = 0xff1d2024.toInt(), + surfaceContainerHigh = 0xff282a2f.toInt(), + surfaceBright = 0xff37393e.toInt(), + onSurface = 0xffe2e2e9.toInt(), + primary = 0xffaac7ff.toInt(), + onPrimary = 0xff0a305f.toInt(), + secondaryContainer = 0xff3e4759.toInt(), + onSurfaceVariant = 0xffc4c6d0.toInt(), + ) + +} \ No newline at end of file diff --git a/app/src/main/java/org/fcitx/fcitx5/android/input/NavigationBarManager.kt b/app/src/main/java/org/fcitx/fcitx5/android/input/NavigationBarManager.kt index 691b89d53..6361670be 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/input/NavigationBarManager.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/input/NavigationBarManager.kt @@ -97,10 +97,7 @@ class NavigationBarManager { } if (shouldUpdateNavbarBackground) { window.setNavbarBackgroundColor( - when (theme) { - is Theme.Builtin -> if (keyBorder) theme.backgroundColor else theme.keyboardColor - is Theme.Custom -> theme.backgroundColor - } + if (!keyBorder && theme is Theme.Builtin) theme.keyboardColor else theme.backgroundColor ) } } diff --git a/app/src/main/java/org/fcitx/fcitx5/android/input/preedit/PreeditComponent.kt b/app/src/main/java/org/fcitx/fcitx5/android/input/preedit/PreeditComponent.kt index b2258931a..0f2c4a59a 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/input/preedit/PreeditComponent.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/input/preedit/PreeditComponent.kt @@ -27,10 +27,8 @@ class PreeditComponent : UniqueComponent(), Dependent, InputBr val ui by lazy { val keyBorder = ThemeManager.prefs.keyBorder.getValue() - val bkgColor = when (theme) { - is Theme.Builtin -> if (keyBorder) theme.backgroundColor else theme.barColor - is Theme.Custom -> theme.backgroundColor - } + val bkgColor = + if (!keyBorder && theme is Theme.Builtin) theme.barColor else theme.backgroundColor PreeditUi(context, theme, setupTextView = { backgroundColor = bkgColor horizontalPadding = dp(8) diff --git a/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeThumbnailUi.kt b/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeThumbnailUi.kt index bf56b1875..abdd999ee 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeThumbnailUi.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeThumbnailUi.kt @@ -1,6 +1,6 @@ /* * SPDX-License-Identifier: LGPL-2.1-or-later - * SPDX-FileCopyrightText: Copyright 2021-2023 Fcitx5 for Android Contributors + * SPDX-FileCopyrightText: Copyright 2021-2025 Fcitx5 for Android Contributors */ package org.fcitx.fcitx5.android.ui.main.settings.theme @@ -9,6 +9,7 @@ import android.content.res.ColorStateList import android.graphics.drawable.GradientDrawable import android.graphics.drawable.ShapeDrawable import android.graphics.drawable.shapes.OvalShape +import android.os.Build import android.view.View import android.view.ViewOutlineProvider import android.widget.ImageView @@ -25,6 +26,7 @@ import splitties.views.dsl.constraintlayout.constraintLayout import splitties.views.dsl.constraintlayout.endOfParent import splitties.views.dsl.constraintlayout.lParams import splitties.views.dsl.constraintlayout.rightOfParent +import splitties.views.dsl.constraintlayout.startOfParent import splitties.views.dsl.constraintlayout.topOfParent import splitties.views.dsl.core.Ui import splitties.views.dsl.core.add @@ -59,6 +61,12 @@ class ThemeThumbnailUi(override val ctx: Context) : Ui { imageResource = R.drawable.ic_baseline_edit_24 } + val dynamicIcon = imageView { + setPaddingDp(5, 5, 5, 5) + scaleType = ImageView.ScaleType.FIT_CENTER + imageResource = R.drawable.ic_baseline_auto_awesome_24 + } + override val root = constraintLayout { outlineProvider = ViewOutlineProvider.BOUNDS elevation = dp(2f) @@ -80,6 +88,10 @@ class ThemeThumbnailUi(override val ctx: Context) : Ui { topOfParent() endOfParent() }) + add(dynamicIcon, lParams(dp(32), dp(32)) { + topOfParent() + startOfParent() + }) } fun setTheme(theme: Theme) { @@ -102,6 +114,11 @@ class ThemeThumbnailUi(override val ctx: Context) : Ui { background = rippleDrawable(theme.keyPressHighlightColor) imageTintList = foregroundTint } + dynamicIcon.apply { + visibility = + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && theme is Theme.Monet) View.VISIBLE else View.GONE + imageTintList = foregroundTint + } checkMark.imageTintList = foregroundTint } diff --git a/app/src/main/res/drawable/ic_baseline_auto_awesome_24.xml b/app/src/main/res/drawable/ic_baseline_auto_awesome_24.xml new file mode 100644 index 000000000..3fa1ea95d --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_auto_awesome_24.xml @@ -0,0 +1,9 @@ + + + From 712aaa3fa8c799dadf115130fa4cd81da898e2cb Mon Sep 17 00:00:00 2001 From: Rocka Date: Wed, 19 Mar 2025 23:46:05 +0800 Subject: [PATCH 02/33] Treat TYPE_TEXT_VARIATION_VISIBLE_PASSWORD as NoSpellCheck --- .../main/java/org/fcitx/fcitx5/android/core/CapabilityFlag.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/fcitx/fcitx5/android/core/CapabilityFlag.kt b/app/src/main/java/org/fcitx/fcitx5/android/core/CapabilityFlag.kt index 800ede315..098f34c06 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/core/CapabilityFlag.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/core/CapabilityFlag.kt @@ -148,6 +148,7 @@ value class CapabilityFlags constructor(val flags: ULong) { } if (equals(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD)) { flags += CapabilityFlag.Sensitive + flags += CapabilityFlag.NoSpellCheck } if (equals(InputType.TYPE_TEXT_VARIATION_URI)) { flags += CapabilityFlag.Url From 8a870b81eac96e6890d4306dd24ada540342cbbc Mon Sep 17 00:00:00 2001 From: Rocka Date: Wed, 19 Mar 2025 23:46:48 +0800 Subject: [PATCH 03/33] Use ndk default toolchain --- .../convention/src/main/kotlin/NativeBaseConventionPlugin.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/build-logic/convention/src/main/kotlin/NativeBaseConventionPlugin.kt b/build-logic/convention/src/main/kotlin/NativeBaseConventionPlugin.kt index 6ff01b69e..494709f8c 100644 --- a/build-logic/convention/src/main/kotlin/NativeBaseConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/NativeBaseConventionPlugin.kt @@ -22,7 +22,6 @@ open class NativeBaseConventionPlugin : Plugin { cmake { arguments( "-DANDROID_STL=c++_shared", - "-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF", "-DVERSION_NAME=${Versions.baseVersionName}", "-DPREBUILT_DIR=${prebuiltDir.absolutePath}" ) From e2869de8fa5347f19119ad4c75a21b68e1c3b8da Mon Sep 17 00:00:00 2001 From: Rocka Date: Wed, 19 Mar 2025 23:47:26 +0800 Subject: [PATCH 04/33] Replace dark mode icon once again --- .../fcitx5/android/ui/main/settings/theme/ThemeThumbnailUi.kt | 4 ++-- ...c_sharp_mode_night_24.xml => ic_baseline_dark_mode_24.xml} | 2 +- ..._sharp_light_mode_24.xml => ic_baseline_light_mode_24.xml} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename app/src/main/res/drawable/{ic_sharp_mode_night_24.xml => ic_baseline_dark_mode_24.xml} (50%) rename app/src/main/res/drawable/{ic_sharp_light_mode_24.xml => ic_baseline_light_mode_24.xml} (100%) diff --git a/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeThumbnailUi.kt b/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeThumbnailUi.kt index abdd999ee..db8964561 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeThumbnailUi.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeThumbnailUi.kt @@ -132,8 +132,8 @@ class ThemeThumbnailUi(override val ctx: Context) : Ui { checkMark.imageResource = when (state) { State.Normal -> 0 State.Selected -> R.drawable.ic_baseline_check_24 - State.LightMode -> R.drawable.ic_sharp_light_mode_24 - State.DarkMode -> R.drawable.ic_sharp_mode_night_24 + State.LightMode -> R.drawable.ic_baseline_light_mode_24 + State.DarkMode -> R.drawable.ic_baseline_dark_mode_24 } } } \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_sharp_mode_night_24.xml b/app/src/main/res/drawable/ic_baseline_dark_mode_24.xml similarity index 50% rename from app/src/main/res/drawable/ic_sharp_mode_night_24.xml rename to app/src/main/res/drawable/ic_baseline_dark_mode_24.xml index da75edbd0..10cccb646 100644 --- a/app/src/main/res/drawable/ic_sharp_mode_night_24.xml +++ b/app/src/main/res/drawable/ic_baseline_dark_mode_24.xml @@ -5,5 +5,5 @@ android:viewportHeight="24"> + android:pathData="M12,3c-4.97,0 -9,4.03 -9,9s4.03,9 9,9s9,-4.03 9,-9c0,-0.46 -0.04,-0.92 -0.1,-1.36c-0.98,1.37 -2.58,2.26 -4.4,2.26c-2.98,0 -5.4,-2.42 -5.4,-5.4c0,-1.81 0.89,-3.42 2.26,-4.4C12.92,3.04 12.46,3 12,3L12,3z" /> diff --git a/app/src/main/res/drawable/ic_sharp_light_mode_24.xml b/app/src/main/res/drawable/ic_baseline_light_mode_24.xml similarity index 100% rename from app/src/main/res/drawable/ic_sharp_light_mode_24.xml rename to app/src/main/res/drawable/ic_baseline_light_mode_24.xml From da1a89227c98843def19abce71bc3d575ef83ce5 Mon Sep 17 00:00:00 2001 From: Rocka Date: Wed, 19 Mar 2025 23:48:54 +0800 Subject: [PATCH 05/33] Fix hapticFeedback useVibrator condition --- .../java/org/fcitx/fcitx5/android/data/InputFeedbacks.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/fcitx/fcitx5/android/data/InputFeedbacks.kt b/app/src/main/java/org/fcitx/fcitx5/android/data/InputFeedbacks.kt index d71ed91cd..e1b7b30e4 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/data/InputFeedbacks.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/data/InputFeedbacks.kt @@ -6,7 +6,6 @@ package org.fcitx.fcitx5.android.data import android.media.AudioManager import android.os.Build -import android.os.Build.VERSION import android.os.VibrationEffect import android.provider.Settings import android.view.HapticFeedbackConstants @@ -71,13 +70,13 @@ object InputFeedbacks { } else { duration = buttonPressVibrationMilliseconds.toLong() amplitude = buttonPressVibrationAmplitude - hfc = if (VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1 && keyUp) { + hfc = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1 && keyUp) { HapticFeedbackConstants.KEYBOARD_RELEASE } else { HapticFeedbackConstants.KEYBOARD_TAP } } - val useVibrator = duration != 0L + val useVibrator = duration != 0L || amplitude != 0 if (useVibrator) { // on Android 13, if system haptic feedback was disabled, `vibrator.vibrate()` won't work From d819a914a014d43fd74359ada5b7a5723121620c Mon Sep 17 00:00:00 2001 From: Rocka Date: Wed, 19 Mar 2025 23:49:20 +0800 Subject: [PATCH 06/33] Long press to share clipboard content --- .../android/input/clipboard/ClipboardAdapter.kt | 5 +++++ .../android/input/clipboard/ClipboardWindow.kt | 12 ++++++++++++ app/src/main/res/drawable/ic_baseline_share_24.xml | 9 +++++++++ app/src/main/res/values/strings.xml | 1 + 4 files changed, 27 insertions(+) create mode 100644 app/src/main/res/drawable/ic_baseline_share_24.xml diff --git a/app/src/main/java/org/fcitx/fcitx5/android/input/clipboard/ClipboardAdapter.kt b/app/src/main/java/org/fcitx/fcitx5/android/input/clipboard/ClipboardAdapter.kt index acce63b68..bd7c7fa3e 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/input/clipboard/ClipboardAdapter.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/input/clipboard/ClipboardAdapter.kt @@ -111,6 +111,9 @@ abstract class ClipboardAdapter( menu.item(R.string.edit, R.drawable.ic_baseline_edit_24, iconTint) { onEdit(entry.id) } + menu.item(R.string.share, R.drawable.ic_baseline_share_24, iconTint) { + onShare(entry) + } menu.item(R.string.delete, R.drawable.ic_baseline_delete_24, iconTint) { onDelete(entry.id) } @@ -143,6 +146,8 @@ abstract class ClipboardAdapter( abstract fun onEdit(id: Int) + abstract fun onShare(entry: ClipboardEntry) + abstract fun onDelete(id: Int) } \ No newline at end of file diff --git a/app/src/main/java/org/fcitx/fcitx5/android/input/clipboard/ClipboardWindow.kt b/app/src/main/java/org/fcitx/fcitx5/android/input/clipboard/ClipboardWindow.kt index 9dd164040..6b6fac783 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/input/clipboard/ClipboardWindow.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/input/clipboard/ClipboardWindow.kt @@ -5,6 +5,7 @@ package org.fcitx.fcitx5.android.input.clipboard import android.annotation.SuppressLint +import android.content.Intent import android.view.View import android.view.ViewGroup import android.widget.FrameLayout @@ -103,6 +104,17 @@ class ClipboardWindow : InputWindow.ExtendedInputWindow() { AppUtil.launchClipboardEdit(context, id) } + override fun onShare(entry: ClipboardEntry) { + val target = Intent(Intent.ACTION_SEND).apply { + type = "text/plain" + putExtra(Intent.EXTRA_TEXT, entry.text) + } + val chooser = Intent.createChooser(target, null).apply { + addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + } + service.startActivity(chooser) + } + override fun onDelete(id: Int) { service.lifecycleScope.launch { ClipboardManager.delete(id) diff --git a/app/src/main/res/drawable/ic_baseline_share_24.xml b/app/src/main/res/drawable/ic_baseline_share_24.xml new file mode 100644 index 000000000..d38ab1c98 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_share_24.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 840e7b5ed..9305ec5f2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -303,4 +303,5 @@ Move cursor to end Open input method settings Delete all + Share From cbf7682bb5c7c2c09e4755884254fe1a7253238a Mon Sep 17 00:00:00 2001 From: rocka Date: Mon, 7 Apr 2025 00:14:39 +0800 Subject: [PATCH 07/33] Update to Android NDK r28 (#710) --- .github/workflows/fdroid.yml | 5 +++++ .github/workflows/nix.yml | 11 +++-------- .github/workflows/publish.yml | 2 +- .github/workflows/pull_request.yml | 2 +- .gitmodules | 1 + app/org.fcitx.fcitx5.android.yml | 15 +++++++-------- app/src/main/cpp/CMakeLists.txt | 6 +----- .../convention/src/main/kotlin/Versions.kt | 4 ++-- flake.lock | 18 +++++++++--------- flake.nix | 6 +++--- gradle/libs.versions.toml | 8 ++++---- .../src/main/cpp/CMakeLists.txt | 7 ++----- .../src/main/cpp/fcitx5-chinese-addons | 2 +- lib/fcitx5/src/main/cpp/CMakeLists.txt | 4 ---- lib/fcitx5/src/main/cpp/fcitx5 | 2 +- lib/fcitx5/src/main/cpp/prebuilt | 2 +- lib/libime/src/main/cpp/CMakeLists.txt | 7 ++----- .../src/main/cpp/cmake/FindLibIMECore.cmake | 4 +++- .../src/main/cpp/cmake/FindLibIMEPinyin.cmake | 1 - .../src/main/cpp/cmake/FindLibIMETable.cmake | 3 +-- lib/libime/src/main/cpp/libime | 2 +- plugin/chewing/src/main/cpp/fcitx5-chewing | 2 +- plugin/clipboard-filter/ClearURLsRules | 2 +- plugin/jyutping/src/main/cpp/CMakeLists.txt | 7 ++----- plugin/jyutping/src/main/cpp/libime-jyutping | 2 +- plugin/rime/src/main/cpp/CMakeLists.txt | 3 +-- plugin/rime/src/main/cpp/fcitx5-rime | 2 +- plugin/rime/src/main/cpp/rime-essay | 2 +- plugin/sayura/src/main/cpp/fcitx5-sayura | 2 +- plugin/thai/src/main/cpp/fcitx5-libthai | 2 +- 30 files changed, 59 insertions(+), 77 deletions(-) diff --git a/.github/workflows/fdroid.yml b/.github/workflows/fdroid.yml index 8d612b32e..c2c449d2c 100644 --- a/.github/workflows/fdroid.yml +++ b/.github/workflows/fdroid.yml @@ -90,6 +90,11 @@ jobs: (.versionCode = $versionCode) |= (.commit = \"$commitHash\") " $metadata + # TODO: remove this afterwards + # https://github.com/orgs/community/discussions/26676 + yq -i ".Builds[0] |= + (.commit = \"${{ github.event.pull_request.head.sha }}\") + " $metadata prebuiltTreeURL=$(curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer ${{ github.token }}" \ diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index e07b4f3fb..01968ac76 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -7,22 +7,17 @@ on: jobs: develop: - strategy: - matrix: - os: - - ubuntu-24.04 - - macos-14 - runs-on: ${{ matrix.os }} + runs-on: ubuntu-24.04 steps: - name: Fetch source code uses: actions/checkout@v4 with: fetch-depth: 0 submodules: recursive - - uses: cachix/install-nix-action@v30 + - uses: cachix/install-nix-action@v31 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - - uses: cachix/cachix-action@v15 + - uses: cachix/cachix-action@v16 with: name: fcitx5-android authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bb9b3ce50..43438a178 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,7 +32,7 @@ jobs: - name: Setup Android environment uses: android-actions/setup-android@v3 with: - packages: cmake;3.22.1 + packages: cmake;3.31.6 - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index fb5246f61..dcc86c2e1 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -37,7 +37,7 @@ jobs: - name: Install Android NDK run: | - sdkmanager --install "cmake;3.22.1" + sdkmanager --install "cmake;3.31.6" - name: Install system dependencies (Ubuntu) if: ${{ startsWith(matrix.os, 'ubuntu') }} diff --git a/.gitmodules b/.gitmodules index b710f89d6..2f3d38b6d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,7 @@ [submodule "lib/fcitx5/src/main/cpp/prebuilt"] path = lib/fcitx5/src/main/cpp/prebuilt url = https://github.com/fcitx5-android/prebuilt.git + shallow = true [submodule "lib/fcitx5-lua/src/main/cpp/fcitx5-lua"] path = lib/fcitx5-lua/src/main/cpp/fcitx5-lua url = https://github.com/fcitx/fcitx5-lua.git diff --git a/app/org.fcitx.fcitx5.android.yml b/app/org.fcitx.fcitx5.android.yml index 6c1dd0953..7c2ffc2eb 100644 --- a/app/org.fcitx.fcitx5.android.yml +++ b/app/org.fcitx.fcitx5.android.yml @@ -21,9 +21,9 @@ Builds: sudo: - apt-get update - apt-get install -y g++ libtool make automake gettext bzip2 xz-utils zstd pkg-config - cmake extra-cmake-modules ninja-build libfmt-dev libboost-all-dev libfcitx5utils-dev opencc - ghc cabal-install libghc-shake-dev libghc-aeson-pretty-dev libghc-js-flot-data - haskell-js-dgtable-utils fcitx5-modules python-is-python3 + cmake extra-cmake-modules ninja-build libfmt-dev libsystemd-dev libboost-all-dev + ghc cabal-install libghc-shake-dev libghc-aeson-pretty-dev libghc-js-flot-data haskell-js-dgtable-utils + python-is-python3 opencc gradle: - yes binary: https://jenkins.fcitx-im.org/job/android/job/fcitx5-android/lastSuccessfulBuild/artifact/out/org.fcitx.fcitx5.android-%v-%abi-release.apk @@ -32,7 +32,7 @@ Builds: rm: - lib/fcitx5/src/main/cpp/prebuilt prebuild: - - sdkmanager 'cmake;3.22.1' + - sdkmanager 'cmake;3.31.6' - sed -i -e '/ImportQualifiedPost/d' $$fcitx5-android-prebuilder$$/src/Main.hs - sed -i -e 's/import \(.*\) qualified as/import qualified \1 as/g' $$fcitx5-android-prebuilder$$/src/*.hs - sed -i -e 's|https://maven.pkg.github.com|https://jitpack.io|g' ../build-logic/convention/build.gradle.kts @@ -43,12 +43,11 @@ Builds: - build-logic/convention/build build: - pushd $$fcitx5-android-prebuilder$$ - - ABI=%abi ANDROID_NDK_ROOT=$$NDK$$ CMAKE_VERSION=3.22.1 ANDROID_PLATFORM=23 - COMP_SPELL_DICT=/usr/lib/x86_64-linux-gnu/fcitx5/libexec/comp-spell-dict - ./build-cabal -j spell-dict fmt libuv libintl-lite boost marisa opencc libime lua chinese-addons-data zstd + - ABI=%abi ANDROID_NDK_ROOT=$$NDK$$ CMAKE_VERSION=3.31.6 ANDROID_PLATFORM=23 + ./build-cabal -j app - popd - mv $$fcitx5-android-prebuilder$$/build ../lib/fcitx5/src/main/cpp/prebuilt - ndk: 25.2.9519653 + ndk: 28.0.13004108 gradleprops: - buildABI=%abi - buildTimestamp=%ts diff --git a/app/src/main/cpp/CMakeLists.txt b/app/src/main/cpp/CMakeLists.txt index 7e5e85908..9777b761f 100644 --- a/app/src/main/cpp/CMakeLists.txt +++ b/app/src/main/cpp/CMakeLists.txt @@ -31,10 +31,6 @@ add_subdirectory(androidfrontend) add_subdirectory(androidkeyboard) add_subdirectory(androidnotification) -# prebuilt fmt -set(fmt_DIR "${PREBUILT_DIR}/fmt/${ANDROID_ABI}/lib/cmake/fmt") -find_package(fmt) - # prebuilt libuv set(libuv_DIR "${PREBUILT_DIR}/libuv/${ANDROID_ABI}/lib/cmake/libuv") find_package(libuv) @@ -46,7 +42,7 @@ find_package(Boost 1.86.0 REQUIRED COMPONENTS headers iostreams CONFIG) set(CHINESE_ADDONS_PINYIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons/im/pinyin") add_library(pinyin-customphrase STATIC "${CHINESE_ADDONS_PINYIN_DIR}/customphrase.cpp") target_include_directories(pinyin-customphrase INTERFACE "${CHINESE_ADDONS_PINYIN_DIR}") -target_link_libraries(pinyin-customphrase PRIVATE fmt::fmt-header-only Fcitx5::Utils LibIME::Core) +target_link_libraries(pinyin-customphrase PRIVATE Fcitx5::Utils LibIME::Core) add_library(native-lib SHARED native-lib.cpp) target_link_libraries(native-lib diff --git a/build-logic/convention/src/main/kotlin/Versions.kt b/build-logic/convention/src/main/kotlin/Versions.kt index 29131adb4..6a9c1fd9d 100644 --- a/build-logic/convention/src/main/kotlin/Versions.kt +++ b/build-logic/convention/src/main/kotlin/Versions.kt @@ -12,8 +12,8 @@ object Versions { const val minSdk = 23 const val targetSdk = 35 - const val defaultCMake = "3.22.1" - const val defaultNDK = "25.2.9519653" + const val defaultCMake = "3.31.6" + const val defaultNDK = "28.0.13004108" const val defaultBuildTools = "35.0.1" // NOTE: increase this value to bump version code diff --git a/flake.lock b/flake.lock index a4b1c9ca3..d80af2f64 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", "type": "github" }, "original": { @@ -21,11 +21,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -36,11 +36,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730785428, - "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", + "lastModified": 1743583204, + "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", + "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f94cac598..3e980e7fa 100644 --- a/flake.nix +++ b/flake.nix @@ -30,11 +30,11 @@ # Update versions here # This should match to build-logic/convention/src/main/kotlin/Versions.kt - cmakeVersion = "3.22.1"; - buildToolsVersion = "35.0.0"; + cmakeVersion = "3.31.6"; + buildToolsVersion = "35.0.1"; platformToolsVersion = "35.0.2"; platformVersion = "35"; - ndkVersion = "25.2.9519653"; + ndkVersion = "28.0.13004108"; includeNDK = true; androidComposition = final.androidenv.composeAndroidPackages { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d87c51b0b..aa506c21b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,9 +1,9 @@ [versions] -androidGradlePlugin = "8.8.2" -kotlin = "2.1.10" -ksp = "2.1.10-1.0.31" +androidGradlePlugin = "8.9.1" +kotlin = "2.1.20" +ksp = "2.1.20-1.0.31" lifecycle = "2.8.7" -navigation = "2.8.8" +navigation = "2.8.9" room = "2.6.1" splitties = "3.0.0" aboutlibraries = "11.6.3" diff --git a/lib/fcitx5-chinese-addons/src/main/cpp/CMakeLists.txt b/lib/fcitx5-chinese-addons/src/main/cpp/CMakeLists.txt index 744a0cfae..f489e8a2d 100644 --- a/lib/fcitx5-chinese-addons/src/main/cpp/CMakeLists.txt +++ b/lib/fcitx5-chinese-addons/src/main/cpp/CMakeLists.txt @@ -31,13 +31,10 @@ find_package(Fcitx5ModuleLuaAddonLoader MODULE) # dummy target to export src/main/cpp/cmake add_custom_target(cmake) -# prebuilt fmt -set(fmt_DIR "${PREBUILT_DIR}/fmt/${ANDROID_ABI}/lib/cmake/fmt") -find_package(fmt) - # prebuilt boost list(APPEND CMAKE_FIND_ROOT_PATH "${PREBUILT_DIR}/boost/${ANDROID_ABI}/lib/cmake") -find_package(Boost 1.86.0 REQUIRED COMPONENTS iostreams CONFIG) +find_package(Boost 1.87.0 REQUIRED COMPONENTS iostreams CONFIG) +add_compile_definitions("BOOST_ALL_NO_EMBEDDED_GDB_SCRIPTS") # prebuilt marisa-tire, OpenCC needs it set(marisa_DIR "${PREBUILT_DIR}/marisa/${ANDROID_ABI}/lib/cmake/marisa") diff --git a/lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons b/lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons index 4e6ba3e12..12d6bdff6 160000 --- a/lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons +++ b/lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons @@ -1 +1 @@ -Subproject commit 4e6ba3e12aa0d48fb4599030092073adbbf4070d +Subproject commit 12d6bdff68123c38d60964c7e211c7929a088a16 diff --git a/lib/fcitx5/src/main/cpp/CMakeLists.txt b/lib/fcitx5/src/main/cpp/CMakeLists.txt index 8087f32fd..4b3cfee4a 100644 --- a/lib/fcitx5/src/main/cpp/CMakeLists.txt +++ b/lib/fcitx5/src/main/cpp/CMakeLists.txt @@ -17,10 +17,6 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) # cmake/FindECM.cmake find_package(ECM) -# prebuilt fmt -set(fmt_DIR "${PREBUILT_DIR}/fmt/${ANDROID_ABI}/lib/cmake/fmt") -find_package(fmt) - # prebuilt libintl-lite set(LibIntl_DIR "${PREBUILT_DIR}/libintl-lite/${ANDROID_ABI}/lib/cmake") find_package(LibIntl) diff --git a/lib/fcitx5/src/main/cpp/fcitx5 b/lib/fcitx5/src/main/cpp/fcitx5 index 7745ce431..b4405d70a 160000 --- a/lib/fcitx5/src/main/cpp/fcitx5 +++ b/lib/fcitx5/src/main/cpp/fcitx5 @@ -1 +1 @@ -Subproject commit 7745ce431ec7140a88437aa6b62ef7852d2232fa +Subproject commit b4405d70a6d58ac94b9f06a446e84f777ea5f3b7 diff --git a/lib/fcitx5/src/main/cpp/prebuilt b/lib/fcitx5/src/main/cpp/prebuilt index 498e68f9a..2936527df 160000 --- a/lib/fcitx5/src/main/cpp/prebuilt +++ b/lib/fcitx5/src/main/cpp/prebuilt @@ -1 +1 @@ -Subproject commit 498e68f9af9ce3ce4d81b337ecefa6c8f3bdfa72 +Subproject commit 2936527dfd5209ee3d96fc25e6d1b1fb0673669a diff --git a/lib/libime/src/main/cpp/CMakeLists.txt b/lib/libime/src/main/cpp/CMakeLists.txt index 44926eef3..548f3a705 100644 --- a/lib/libime/src/main/cpp/CMakeLists.txt +++ b/lib/libime/src/main/cpp/CMakeLists.txt @@ -16,13 +16,10 @@ find_package(Fcitx5Utils MODULE) # dummy target to export src/main/cpp/cmake add_custom_target(cmake) -# prebuilt fmt -set(fmt_DIR "${PREBUILT_DIR}/fmt/${ANDROID_ABI}/lib/cmake/fmt") -find_package(fmt) - # prebuilt boost list(APPEND CMAKE_FIND_ROOT_PATH "${PREBUILT_DIR}/boost/${ANDROID_ABI}/lib/cmake") -find_package(Boost 1.86.0 REQUIRED COMPONENTS iostreams CONFIG) +find_package(Boost 1.87.0 REQUIRED COMPONENTS iostreams CONFIG) +add_compile_definitions("BOOST_ALL_NO_EMBEDDED_GDB_SCRIPTS") # prebuilt zstd set(zstd_DIR "${PREBUILT_DIR}/zstd/${ANDROID_ABI}/lib/cmake/zstd") diff --git a/lib/libime/src/main/cpp/cmake/FindLibIMECore.cmake b/lib/libime/src/main/cpp/cmake/FindLibIMECore.cmake index cac00a021..3adf7e9c3 100644 --- a/lib/libime/src/main/cpp/cmake/FindLibIMECore.cmake +++ b/lib/libime/src/main/cpp/cmake/FindLibIMECore.cmake @@ -6,7 +6,9 @@ find_package(libime REQUIRED CONFIG) if (NOT TARGET LibIME::Core) # fix target dependency - set_target_properties(libime::IMECore PROPERTIES INTERFACE_LINK_LIBRARIES fcitx5::Fcitx5Utils) + set_target_properties(libime::IMECore PROPERTIES + INTERFACE_LINK_LIBRARIES "fcitx5::Fcitx5Utils;Boost::boost" + ) # fix target name add_library(LibIME::Core ALIAS libime::IMECore) endif() diff --git a/lib/libime/src/main/cpp/cmake/FindLibIMEPinyin.cmake b/lib/libime/src/main/cpp/cmake/FindLibIMEPinyin.cmake index af9c2a237..ff24a8d1f 100644 --- a/lib/libime/src/main/cpp/cmake/FindLibIMEPinyin.cmake +++ b/lib/libime/src/main/cpp/cmake/FindLibIMEPinyin.cmake @@ -8,7 +8,6 @@ find_package(LibIMECore MODULE) if (NOT TARGET LibIME::Pinyin) # fix target dependency - set_target_properties(libime::IMEPinyin PROPERTIES INTERFACE_LINK_LIBRARIES fcitx5::Fcitx5Utils) set_target_properties(libime::IMEPinyin PROPERTIES INTERFACE_LINK_LIBRARIES libime::IMECore) # fix target name add_library(LibIME::Pinyin ALIAS libime::IMEPinyin) diff --git a/lib/libime/src/main/cpp/cmake/FindLibIMETable.cmake b/lib/libime/src/main/cpp/cmake/FindLibIMETable.cmake index a09a5c32e..7dd476107 100644 --- a/lib/libime/src/main/cpp/cmake/FindLibIMETable.cmake +++ b/lib/libime/src/main/cpp/cmake/FindLibIMETable.cmake @@ -8,8 +8,7 @@ find_package(LibIMECore MODULE) if (NOT TARGET LibIME::Table) # fix target dependency - set_target_properties(libime::IMETable PROPERTIES INTERFACE_LINK_LIBRARIES fcitx5::Fcitx5Utils) - set_target_properties(libime::IMEPinyin PROPERTIES INTERFACE_LINK_LIBRARIES libime::IMECore) + set_target_properties(libime::IMETable PROPERTIES INTERFACE_LINK_LIBRARIES libime::IMECore) # fix target name add_library(LibIME::Table ALIAS libime::IMETable) endif() diff --git a/lib/libime/src/main/cpp/libime b/lib/libime/src/main/cpp/libime index 58414fc0d..020b4573f 160000 --- a/lib/libime/src/main/cpp/libime +++ b/lib/libime/src/main/cpp/libime @@ -1 +1 @@ -Subproject commit 58414fc0d42c4a59881e929f0dd8cb070b2da509 +Subproject commit 020b4573ff13e7e0f474e587dd26c2f5eea55373 diff --git a/plugin/chewing/src/main/cpp/fcitx5-chewing b/plugin/chewing/src/main/cpp/fcitx5-chewing index bd5951485..d240b95ac 160000 --- a/plugin/chewing/src/main/cpp/fcitx5-chewing +++ b/plugin/chewing/src/main/cpp/fcitx5-chewing @@ -1 +1 @@ -Subproject commit bd595148534b547fc93306988dc2b4a915dd4215 +Subproject commit d240b95acb16cb54fff57bae8844e2925f6fd8fc diff --git a/plugin/clipboard-filter/ClearURLsRules b/plugin/clipboard-filter/ClearURLsRules index b935388cb..45300f3fd 160000 --- a/plugin/clipboard-filter/ClearURLsRules +++ b/plugin/clipboard-filter/ClearURLsRules @@ -1 +1 @@ -Subproject commit b935388cbae3ed9c4441bd81ff46473df5bf8faf +Subproject commit 45300f3fdbccf816ef63a2bfa90f16f694bb6cf9 diff --git a/plugin/jyutping/src/main/cpp/CMakeLists.txt b/plugin/jyutping/src/main/cpp/CMakeLists.txt index 37d41016e..05a5b8b7d 100644 --- a/plugin/jyutping/src/main/cpp/CMakeLists.txt +++ b/plugin/jyutping/src/main/cpp/CMakeLists.txt @@ -26,13 +26,10 @@ set(CMAKE_MODULE_PATH ${FCITX5_CHINESE_ADDONS_CMAKE_MODULES} ${CMAKE_MODULE_PATH find_package(Fcitx5ModulePunctuation MODULE) -# prebuilt fmt -set(fmt_DIR "${PREBUILT_DIR}/fmt/${ANDROID_ABI}/lib/cmake/fmt") -find_package(fmt) - # prebuilt boost list(APPEND CMAKE_FIND_ROOT_PATH "${PREBUILT_DIR}/boost/${ANDROID_ABI}/lib/cmake") -find_package(Boost 1.86.0 REQUIRED COMPONENTS iostreams CONFIG) +find_package(Boost 1.87.0 REQUIRED COMPONENTS iostreams CONFIG) +add_compile_definitions("BOOST_ALL_NO_EMBEDDED_GDB_SCRIPTS") # prebuilt zstd set(zstd_DIR "${PREBUILT_DIR}/zstd/${ANDROID_ABI}/lib/cmake/zstd") diff --git a/plugin/jyutping/src/main/cpp/libime-jyutping b/plugin/jyutping/src/main/cpp/libime-jyutping index 7ad0e426f..eeb43c90f 160000 --- a/plugin/jyutping/src/main/cpp/libime-jyutping +++ b/plugin/jyutping/src/main/cpp/libime-jyutping @@ -1 +1 @@ -Subproject commit 7ad0e426f9af2105033bd1afe52c0cb3057b127e +Subproject commit eeb43c90fa6ef38f4983b12344a6606cfcf7380d diff --git a/plugin/rime/src/main/cpp/CMakeLists.txt b/plugin/rime/src/main/cpp/CMakeLists.txt index 62fa626ff..6ee8e78c9 100644 --- a/plugin/rime/src/main/cpp/CMakeLists.txt +++ b/plugin/rime/src/main/cpp/CMakeLists.txt @@ -34,9 +34,8 @@ set_target_properties(Rime_static PROPERTIES # https://github.com/rime/librime/blob/1.9.0/src/rime_api.h#L663 # https://stackoverflow.com/questions/805555/ld-linker-question-the-whole-archive-option -# use $ when cmake updated to 3.24+ # https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#link-features -set(RIME_TARGET "-Wl,--whole-archive" Rime_static "-Wl,--no-whole-archive") +set(RIME_TARGET $) set(RIME_DATA_DIR "${CMAKE_INSTALL_DATADIR}/rime-data") add_subdirectory(fcitx5-rime) diff --git a/plugin/rime/src/main/cpp/fcitx5-rime b/plugin/rime/src/main/cpp/fcitx5-rime index 9155bf3ff..81c0a15b4 160000 --- a/plugin/rime/src/main/cpp/fcitx5-rime +++ b/plugin/rime/src/main/cpp/fcitx5-rime @@ -1 +1 @@ -Subproject commit 9155bf3ffc5bb42460d87303332d0cf5b8481ecc +Subproject commit 81c0a15b4a201a0bc17a5e1c8161696267d16dca diff --git a/plugin/rime/src/main/cpp/rime-essay b/plugin/rime/src/main/cpp/rime-essay index 13674aade..46f14a562 160000 --- a/plugin/rime/src/main/cpp/rime-essay +++ b/plugin/rime/src/main/cpp/rime-essay @@ -1 +1 @@ -Subproject commit 13674aadebc482e418067c1980c7f69bf4a30f90 +Subproject commit 46f14a56244ddeeba173dbe5415f868cdff8ea56 diff --git a/plugin/sayura/src/main/cpp/fcitx5-sayura b/plugin/sayura/src/main/cpp/fcitx5-sayura index ca2953c8a..e8d2a893d 160000 --- a/plugin/sayura/src/main/cpp/fcitx5-sayura +++ b/plugin/sayura/src/main/cpp/fcitx5-sayura @@ -1 +1 @@ -Subproject commit ca2953c8acf967eb87c7ea8eef8558709d7e503c +Subproject commit e8d2a893d2834f1b408c6351718428fe17f0dfba diff --git a/plugin/thai/src/main/cpp/fcitx5-libthai b/plugin/thai/src/main/cpp/fcitx5-libthai index 3157f2850..5130b0f48 160000 --- a/plugin/thai/src/main/cpp/fcitx5-libthai +++ b/plugin/thai/src/main/cpp/fcitx5-libthai @@ -1 +1 @@ -Subproject commit 3157f28506e15a04a6e4a28bf6afaba8f1f0b418 +Subproject commit 5130b0f48981242d9934ea5369a3fdaece48f446 From 37bbbd8c47b2b600aa3e1877fecef44c549ae673 Mon Sep 17 00:00:00 2001 From: Timmy Date: Fri, 9 May 2025 20:31:57 +0800 Subject: [PATCH 08/33] Update fcitx5-chewing.json (#712) --- plugin/chewing/licenses/libraries/fcitx5-chewing.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/chewing/licenses/libraries/fcitx5-chewing.json b/plugin/chewing/licenses/libraries/fcitx5-chewing.json index 6120715e1..6f8e0db8e 100644 --- a/plugin/chewing/licenses/libraries/fcitx5-chewing.json +++ b/plugin/chewing/licenses/libraries/fcitx5-chewing.json @@ -6,6 +6,6 @@ "website": "https://github.com/fcitx/fcitx5-chewing", "tag": "native", "licenses": [ - "GPL-2.0-or-later" + "LGPL-2.1-or-later" ] } From e414817d010abcfdcf737151e46ae2d8c361e5e0 Mon Sep 17 00:00:00 2001 From: mokapsing <39441028+mokapsing@users.noreply.github.com> Date: Fri, 9 May 2025 21:02:54 +0800 Subject: [PATCH 09/33] New preference for candidate window corner radius (#711) Co-authored-by: Rocka --- .../org/fcitx/fcitx5/android/data/prefs/AppPrefs.kt | 3 +++ .../org/fcitx/fcitx5/android/input/CandidatesView.kt | 12 ++++++++++-- app/src/main/res/values/strings.xml | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/fcitx/fcitx5/android/data/prefs/AppPrefs.kt b/app/src/main/java/org/fcitx/fcitx5/android/data/prefs/AppPrefs.kt index 492d3057a..5b3f09c36 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/data/prefs/AppPrefs.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/data/prefs/AppPrefs.kt @@ -294,6 +294,9 @@ class AppPrefs(private val sharedPreferences: SharedPreferences) { val fontSize = int(R.string.candidates_font_size, "candidates_window_font_size", 20, 4, 64, "sp") + val windowRadius = + int(R.string.candidates_window_radius, "candidates_window_radius", 0, 0, 48, "dp") + val itemPaddingVertical: ManagedPreference.PInt val itemPaddingHorizontal: ManagedPreference.PInt diff --git a/app/src/main/java/org/fcitx/fcitx5/android/input/CandidatesView.kt b/app/src/main/java/org/fcitx/fcitx5/android/input/CandidatesView.kt index f5d0eb290..2cd59110b 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/input/CandidatesView.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/input/CandidatesView.kt @@ -6,8 +6,10 @@ package org.fcitx.fcitx5.android.input import android.annotation.SuppressLint +import android.graphics.drawable.GradientDrawable import android.os.Build import android.view.ViewGroup +import android.view.ViewOutlineProvider import android.view.ViewTreeObserver.OnGlobalLayoutListener import android.view.ViewTreeObserver.OnPreDrawListener import android.view.WindowInsets @@ -22,7 +24,6 @@ import org.fcitx.fcitx5.android.data.theme.Theme import org.fcitx.fcitx5.android.input.candidates.floating.PagedCandidatesUi import org.fcitx.fcitx5.android.input.preedit.PreeditUi import splitties.dimensions.dp -import splitties.views.backgroundColor import splitties.views.dsl.constraintlayout.below import splitties.views.dsl.constraintlayout.bottomOfParent import splitties.views.dsl.constraintlayout.centerHorizontally @@ -49,6 +50,7 @@ class CandidatesView( private val orientation by candidatesPrefs.orientation private val windowMinWidth by candidatesPrefs.windowMinWidth private val windowPadding by candidatesPrefs.windowPadding + private val windowRadius by candidatesPrefs.windowRadius private val fontSize by candidatesPrefs.fontSize private val itemPaddingVertical by candidatesPrefs.itemPaddingVertical private val itemPaddingHorizontal by candidatesPrefs.itemPaddingHorizontal @@ -186,7 +188,13 @@ class CandidatesView( minWidth = dp(windowMinWidth) padding = dp(windowPadding) - backgroundColor = theme.backgroundColor + background = GradientDrawable().apply { + setColor(theme.backgroundColor) + shape = GradientDrawable.RECTANGLE + cornerRadius = dp(windowRadius).toFloat() + } + clipToOutline = true + outlineProvider = ViewOutlineProvider.BACKGROUND add(preeditUi.root, lParams(wrapContent, wrapContent) { topOfParent() startOfParent() diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9305ec5f2..669434c6b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -270,6 +270,7 @@ Crop Candidates Window Show candidates window + Candidates window radius Depends on input device Candidates list orientation Automatic From 81e04ec06b9b9f8c87e68df0775b946c9ce288ed Mon Sep 17 00:00:00 2001 From: heddxh Date: Fri, 9 May 2025 21:10:00 +0800 Subject: [PATCH 10/33] Make Theme.Monet able to export (#719) --- .../fcitx/fcitx5/android/data/theme/Theme.kt | 28 +++++++++++++++++++ .../main/settings/theme/ThemeListAdapter.kt | 3 ++ 2 files changed, 31 insertions(+) diff --git a/app/src/main/java/org/fcitx/fcitx5/android/data/theme/Theme.kt b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/Theme.kt index 33cec64a1..d7f2791b2 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/data/theme/Theme.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/Theme.kt @@ -323,5 +323,33 @@ sealed class Theme : Parcelable { genericActiveBackgroundColor = primary, genericActiveForegroundColor = onPrimary ) + + @OptIn(ExperimentalStdlibApi::class) + fun toCustom() = Custom( + name = name + "#" + this.accentKeyBackgroundColor.toHexString(), // Use primary color as identifier + isDark = isDark, + backgroundImage = null, + backgroundColor = backgroundColor, + barColor = barColor, + keyboardColor = keyboardColor, + keyBackgroundColor = keyBackgroundColor, + keyTextColor = keyTextColor, + candidateTextColor = candidateTextColor, + candidateLabelColor = candidateLabelColor, + candidateCommentColor = candidateCommentColor, + altKeyBackgroundColor = altKeyBackgroundColor, + altKeyTextColor = altKeyTextColor, + accentKeyBackgroundColor = accentKeyBackgroundColor, + accentKeyTextColor = accentKeyTextColor, + keyPressHighlightColor = keyPressHighlightColor, + keyShadowColor = keyShadowColor, + popupBackgroundColor = popupBackgroundColor, + popupTextColor = popupTextColor, + spaceBarColor = spaceBarColor, + dividerColor = dividerColor, + clipboardEntryColor = clipboardEntryColor, + genericActiveBackgroundColor = genericActiveBackgroundColor, + genericActiveForegroundColor = genericActiveForegroundColor + ) } } diff --git a/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeListAdapter.kt b/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeListAdapter.kt index dab226ba0..c8702b3eb 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeListAdapter.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/theme/ThemeListAdapter.kt @@ -127,6 +127,9 @@ abstract class ThemeListAdapter : RecyclerView.Adapter Date: Fri, 9 May 2025 10:06:38 -0400 Subject: [PATCH 11/33] Add option to hide altText (#720) Co-authored-by: Rocka --- .../fcitx/fcitx5/android/data/theme/ThemePrefs.kt | 1 + .../fcitx5/android/input/keyboard/KeyView.kt | 15 +++++++++++++++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 17 insertions(+) diff --git a/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemePrefs.kt b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemePrefs.kt index 4817d44e5..a42ef8d52 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemePrefs.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/data/theme/ThemePrefs.kt @@ -87,6 +87,7 @@ class ThemePrefs(sharedPreferences: SharedPreferences) : int(R.string.clipboard_entry_radius, "clipboard_entry_radius", 2, 0, 48, "dp") enum class PunctuationPosition(override val stringRes: Int) : ManagedPreferenceEnum { + None(R.string.punctuation_pos_none), Bottom(R.string.punctuation_pos_bottom), TopRight(R.string.punctuation_pos_top_right); } diff --git a/app/src/main/java/org/fcitx/fcitx5/android/input/keyboard/KeyView.kt b/app/src/main/java/org/fcitx/fcitx5/android/input/keyboard/KeyView.kt index 382d27209..2252d7459 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/input/keyboard/KeyView.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/input/keyboard/KeyView.kt @@ -298,6 +298,7 @@ class AltTextKeyView(ctx: Context, theme: Theme, def: KeyDef.Appearance.AltText) topToTop = parentId bottomToBottom = parentId } + altText.visibility = View.VISIBLE altText.updateLayoutParams { // reset bottomToBottom = unset; bottomMargin = 0 @@ -316,6 +317,7 @@ class AltTextKeyView(ctx: Context, theme: Theme, def: KeyDef.Appearance.AltText) topToTop = parentId; topMargin = vMargin bottomToTop = altText.existingOrNewId } + altText.visibility = View.VISIBLE altText.updateLayoutParams { // reset topToTop = unset; topMargin = 0 @@ -327,6 +329,18 @@ class AltTextKeyView(ctx: Context, theme: Theme, def: KeyDef.Appearance.AltText) } } + private fun applyNoAltTextPosition() { + mainText.updateLayoutParams { + // reset + topMargin = 0 + bottomToTop = unset + // set + topToTop = parentId + bottomToBottom = parentId + } + altText.visibility = View.GONE + } + private fun applyLayout(orientation: Int) { when (ThemeManager.prefs.punctuationPosition.getValue()) { PunctuationPosition.Bottom -> when (orientation) { @@ -334,6 +348,7 @@ class AltTextKeyView(ctx: Context, theme: Theme, def: KeyDef.Appearance.AltText) else -> applyBottomAltTextPosition() } PunctuationPosition.TopRight -> applyTopRightAltTextPosition() + PunctuationPosition.None -> applyNoAltTextPosition() } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 669434c6b..4fbf85cc5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -122,6 +122,7 @@ Punctuation position Bottom (Portrait only) Top Right + None Expand toolbar by default Popup on key press Disable animation From 7a366e753f02690a102863f6286a7fb2dbd0b1bf Mon Sep 17 00:00:00 2001 From: Rocka Date: Fri, 9 May 2025 23:15:32 +0800 Subject: [PATCH 12/33] Update fcitx5 submodules --- lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons | 2 +- lib/fcitx5/src/main/cpp/fcitx5 | 2 +- lib/libime/src/main/cpp/libime | 2 +- plugin/anthy/src/main/cpp/fcitx5-anthy | 2 +- plugin/chewing/src/main/cpp/fcitx5-chewing | 2 +- plugin/hangul/src/main/cpp/fcitx5-hangul | 2 +- plugin/rime/src/main/cpp/fcitx5-rime | 2 +- plugin/rime/src/main/cpp/rime-essay | 2 +- plugin/rime/src/main/cpp/rime-luna-pinyin | 2 +- plugin/rime/src/main/cpp/rime-prelude | 2 +- plugin/thai/src/main/cpp/fcitx5-libthai | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons b/lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons index 12d6bdff6..e40f0a461 160000 --- a/lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons +++ b/lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons @@ -1 +1 @@ -Subproject commit 12d6bdff68123c38d60964c7e211c7929a088a16 +Subproject commit e40f0a4617162fdf63f4373af0c702390322e650 diff --git a/lib/fcitx5/src/main/cpp/fcitx5 b/lib/fcitx5/src/main/cpp/fcitx5 index b4405d70a..ddd4673d8 160000 --- a/lib/fcitx5/src/main/cpp/fcitx5 +++ b/lib/fcitx5/src/main/cpp/fcitx5 @@ -1 +1 @@ -Subproject commit b4405d70a6d58ac94b9f06a446e84f777ea5f3b7 +Subproject commit ddd4673d87cabc67cbc7fb8ad9ec18b1f6d527dd diff --git a/lib/libime/src/main/cpp/libime b/lib/libime/src/main/cpp/libime index 020b4573f..61f8246f6 160000 --- a/lib/libime/src/main/cpp/libime +++ b/lib/libime/src/main/cpp/libime @@ -1 +1 @@ -Subproject commit 020b4573ff13e7e0f474e587dd26c2f5eea55373 +Subproject commit 61f8246f608f2e46d217f0562b30d9cbd355c876 diff --git a/plugin/anthy/src/main/cpp/fcitx5-anthy b/plugin/anthy/src/main/cpp/fcitx5-anthy index 2aa3cb41b..642e14fc2 160000 --- a/plugin/anthy/src/main/cpp/fcitx5-anthy +++ b/plugin/anthy/src/main/cpp/fcitx5-anthy @@ -1 +1 @@ -Subproject commit 2aa3cb41b1b0858cba741be4c420decd3f22a4cd +Subproject commit 642e14fc2aba09ffda84a87035a8457ad4973653 diff --git a/plugin/chewing/src/main/cpp/fcitx5-chewing b/plugin/chewing/src/main/cpp/fcitx5-chewing index d240b95ac..8a989e423 160000 --- a/plugin/chewing/src/main/cpp/fcitx5-chewing +++ b/plugin/chewing/src/main/cpp/fcitx5-chewing @@ -1 +1 @@ -Subproject commit d240b95acb16cb54fff57bae8844e2925f6fd8fc +Subproject commit 8a989e423d6c0a714e10023773b713b17585271f diff --git a/plugin/hangul/src/main/cpp/fcitx5-hangul b/plugin/hangul/src/main/cpp/fcitx5-hangul index 5826227ec..6480de4b4 160000 --- a/plugin/hangul/src/main/cpp/fcitx5-hangul +++ b/plugin/hangul/src/main/cpp/fcitx5-hangul @@ -1 +1 @@ -Subproject commit 5826227ec0a5e833f6602d6f09e1b26e65c59627 +Subproject commit 6480de4b40bb9399ddf72e0893b7710f5a0a9538 diff --git a/plugin/rime/src/main/cpp/fcitx5-rime b/plugin/rime/src/main/cpp/fcitx5-rime index 81c0a15b4..6f9b3ef2d 160000 --- a/plugin/rime/src/main/cpp/fcitx5-rime +++ b/plugin/rime/src/main/cpp/fcitx5-rime @@ -1 +1 @@ -Subproject commit 81c0a15b4a201a0bc17a5e1c8161696267d16dca +Subproject commit 6f9b3ef2dd7be2ddbf04c3fbedf38f755fc174f6 diff --git a/plugin/rime/src/main/cpp/rime-essay b/plugin/rime/src/main/cpp/rime-essay index 46f14a562..573bbeb53 160000 --- a/plugin/rime/src/main/cpp/rime-essay +++ b/plugin/rime/src/main/cpp/rime-essay @@ -1 +1 @@ -Subproject commit 46f14a56244ddeeba173dbe5415f868cdff8ea56 +Subproject commit 573bbeb53e53d4331fff5fae151b814c67b8d0cd diff --git a/plugin/rime/src/main/cpp/rime-luna-pinyin b/plugin/rime/src/main/cpp/rime-luna-pinyin index b7db6ce96..959309008 160000 --- a/plugin/rime/src/main/cpp/rime-luna-pinyin +++ b/plugin/rime/src/main/cpp/rime-luna-pinyin @@ -1 +1 @@ -Subproject commit b7db6ce9640a49fc8884a1b223abb420e636eccc +Subproject commit 9593090080294a7dfc3c864c087e4070459c0168 diff --git a/plugin/rime/src/main/cpp/rime-prelude b/plugin/rime/src/main/cpp/rime-prelude index 3803f0945..3c602fdb0 160000 --- a/plugin/rime/src/main/cpp/rime-prelude +++ b/plugin/rime/src/main/cpp/rime-prelude @@ -1 +1 @@ -Subproject commit 3803f09458072e03b9ed396692ce7e1d35c88c95 +Subproject commit 3c602fdb0dcca7825103e281efc50ef7580f99ec diff --git a/plugin/thai/src/main/cpp/fcitx5-libthai b/plugin/thai/src/main/cpp/fcitx5-libthai index 5130b0f48..e41f9b4a0 160000 --- a/plugin/thai/src/main/cpp/fcitx5-libthai +++ b/plugin/thai/src/main/cpp/fcitx5-libthai @@ -1 +1 @@ -Subproject commit 5130b0f48981242d9934ea5369a3fdaece48f446 +Subproject commit e41f9b4a018176d26603fa578afc941ffc1e0302 From 5dd2325a77ca776974b09b2339b3acdb08391b70 Mon Sep 17 00:00:00 2001 From: Rocka Date: Fri, 9 May 2025 23:22:48 +0800 Subject: [PATCH 13/33] Update dependencies --- .idea/codeStyles/Project.xml | 35 +++++++++++++++++++ .../android/input/FcitxInputMethodService.kt | 3 +- .../main/kotlin/AndroidAppConventionPlugin.kt | 19 ++++++---- gradle/libs.versions.toml | 22 ++++++------ 4 files changed, 59 insertions(+), 20 deletions(-) diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index b38416157..cf0517db7 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,5 +1,40 @@ + + +