From 956e706f74468f29ea5fba5c122ea0a8e675c9de Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 21 Jun 2025 00:55:03 +1000 Subject: feat: launcher calculator Requires libqalculate --- modules/launcher/AppList.qml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'modules/launcher/AppList.qml') diff --git a/modules/launcher/AppList.qml b/modules/launcher/AppList.qml index c06893a..bbcb27f 100644 --- a/modules/launcher/AppList.qml +++ b/modules/launcher/AppList.qml @@ -14,11 +14,14 @@ ListView { required property PersistentProperties visibilities property bool isAction: search.text.startsWith(Config.launcher.actionPrefix) + property bool isCalc: search.text.startsWith(`${Config.launcher.actionPrefix}calc `) property bool isScheme: search.text.startsWith(`${Config.launcher.actionPrefix}scheme `) property bool isVariant: search.text.startsWith(`${Config.launcher.actionPrefix}variant `) function getModelValues() { let text = search.text; + if (isCalc) + return [0]; if (isScheme) return Schemes.fuzzyQuery(text); if (isVariant) @@ -49,6 +52,8 @@ ListView { } delegate: { + if (isCalc) + return calcItem; if (isScheme) return schemeItem; if (isVariant) @@ -123,6 +128,14 @@ ListView { } } + Component { + id: calcItem + + CalcItem { + list: root + } + } + Component { id: schemeItem @@ -143,6 +156,10 @@ ListView { ChangeAnim {} } + Behavior on isCalc { + ChangeAnim {} + } + Behavior on isScheme { ChangeAnim {} } -- cgit v1.2.3-freya