feat: expand ToolApp back gesture ranges
This commit is contained in:
@@ -99,9 +99,9 @@ var ConfigValidator = {
|
||||
LONG_PRESS_MS: { type: "int", min: 200, max: 2000, default: 600 },
|
||||
LONG_PRESS_VIBRATE_MS: { type: "int", min: 10, max: 100, default: 40 },
|
||||
CLICK_SLOP_DP: { type: "int", min: 2, max: 20, default: 6 },
|
||||
TOOLAPP_BACK_EDGE_WIDTH_DP: { type: "int", min: 12, max: 48, default: 22 },
|
||||
TOOLAPP_BACK_COMMIT_DISTANCE_DP: { type: "int", min: 48, max: 160, default: 72 },
|
||||
TOOLAPP_BACK_PROGRESS_DISTANCE_DP: { type: "int", min: 120, max: 320, default: 180 },
|
||||
TOOLAPP_BACK_EDGE_WIDTH_DP: { type: "int", min: 1, max: 120, default: 22 },
|
||||
TOOLAPP_BACK_COMMIT_DISTANCE_DP: { type: "int", min: 1, max: 480, default: 72 },
|
||||
TOOLAPP_BACK_PROGRESS_DISTANCE_DP: { type: "int", min: 1, max: 720, default: 180 },
|
||||
|
||||
// 功能开关
|
||||
ENABLE_SNAP_TO_EDGE: { type: "bool", default: true },
|
||||
@@ -844,9 +844,9 @@ var ConfigManager = {
|
||||
|
||||
{ type: "section", name: "触摸与手势" },
|
||||
{ key: "CLICK_SLOP_DP", name: "点击位移阈值(dp)", type: "int", min: 1, max: 40, step: 1 },
|
||||
{ key: "TOOLAPP_BACK_EDGE_WIDTH_DP", name: "设置页返回边界宽度", type: "int", min: 12, max: 48, step: 1 },
|
||||
{ key: "TOOLAPP_BACK_COMMIT_DISTANCE_DP", name: "设置页返回触发距离", type: "int", min: 48, max: 160, step: 1 },
|
||||
{ key: "TOOLAPP_BACK_PROGRESS_DISTANCE_DP", name: "设置页返回动画距离", type: "int", min: 120, max: 320, step: 1 },
|
||||
{ key: "TOOLAPP_BACK_EDGE_WIDTH_DP", name: "设置页返回边界宽度", type: "int", min: 1, max: 120, step: 1 },
|
||||
{ key: "TOOLAPP_BACK_COMMIT_DISTANCE_DP", name: "设置页返回触发距离", type: "int", min: 1, max: 480, step: 1 },
|
||||
{ key: "TOOLAPP_BACK_PROGRESS_DISTANCE_DP", name: "设置页返回动画距离", type: "int", min: 1, max: 720, step: 1 },
|
||||
{ key: "ENABLE_LONG_PRESS", name: "启用长按", type: "bool" },
|
||||
{ key: "LONG_PRESS_MS", name: "长按判定(ms)", type: "int", min: 200, max: 2000, step: 10 },
|
||||
{ key: "LONG_PRESS_HAPTIC_ENABLE", name: "长按震动反馈", type: "bool" },
|
||||
|
||||
@@ -788,8 +788,8 @@ FloatBallAppWM.prototype.createToolAppEdgeBackStrip = function(edge) {
|
||||
moved = true;
|
||||
var triggerDp = Number(self.config.TOOLAPP_BACK_PROGRESS_DISTANCE_DP || 180);
|
||||
if (isNaN(triggerDp)) triggerDp = 180;
|
||||
if (triggerDp < 120) triggerDp = 120;
|
||||
if (triggerDp > 320) triggerDp = 320;
|
||||
if (triggerDp < 1) triggerDp = 1;
|
||||
if (triggerDp > 720) triggerDp = 720;
|
||||
var triggerDistance = self.dp(triggerDp);
|
||||
var p = Math.min(1, Math.abs(mx) / triggerDistance);
|
||||
self.applyToolAppBackPreviewProgress(edge, p);
|
||||
@@ -801,8 +801,8 @@ FloatBallAppWM.prototype.createToolAppEdgeBackStrip = function(edge) {
|
||||
var uy = event.getRawY() - downY;
|
||||
var commitDp = Number(self.config.TOOLAPP_BACK_COMMIT_DISTANCE_DP || 72);
|
||||
if (isNaN(commitDp)) commitDp = 72;
|
||||
if (commitDp < 48) commitDp = 48;
|
||||
if (commitDp > 160) commitDp = 160;
|
||||
if (commitDp < 1) commitDp = 1;
|
||||
if (commitDp > 480) commitDp = 480;
|
||||
var completeDistance = self.dp(commitDp);
|
||||
var okDir = (edge === 0 && ux > completeDistance) || (edge === 1 && ux < -completeDistance);
|
||||
var ok = (action === android.view.MotionEvent.ACTION_UP) && moved && okDir && Math.abs(ux) > Math.abs(uy) * 1.2;
|
||||
@@ -846,8 +846,8 @@ FloatBallAppWM.prototype.showToolAppScreenBackStrips = function() {
|
||||
}
|
||||
var stripDp = Number(this.config.TOOLAPP_BACK_EDGE_WIDTH_DP || 22);
|
||||
if (isNaN(stripDp)) stripDp = 22;
|
||||
if (stripDp < 12) stripDp = 12;
|
||||
if (stripDp > 48) stripDp = 48;
|
||||
if (stripDp < 1) stripDp = 1;
|
||||
if (stripDp > 120) stripDp = 120;
|
||||
var stripW = this.dp(stripDp);
|
||||
var flags = android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
|
||||
android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"alg": "SHA256withRSA",
|
||||
"files": {
|
||||
"th_01_base.js": {
|
||||
"sha256": "49b97160e851877c00fe6cebbc2e94edee87b2b0cc63e76237e58d31af7bb8b8",
|
||||
"size": 54172
|
||||
"sha256": "b1ff842821c7d7c8d40543f74ba54134289d7ff4bb412c439ee0e96756744f95",
|
||||
"size": 54166
|
||||
},
|
||||
"th_02_core.js": {
|
||||
"sha256": "15bb9bfbd19a673d442e221b0a00a456ed5f87af2666b9c73b117d6223faeecd",
|
||||
@@ -58,8 +58,8 @@
|
||||
"size": 262019
|
||||
},
|
||||
"th_15_extra.js": {
|
||||
"sha256": "f3e92febb017f88cb5484d368e10bd6d69baa7dd50ac39c01c381fa9d7f71bd5",
|
||||
"size": 96070
|
||||
"sha256": "b927a12da2a2c71099ca166d838cf982a4c0420ce47301ec5fa3da58047a5c97",
|
||||
"size": 96064
|
||||
},
|
||||
"th_16_entry.js": {
|
||||
"sha256": "e7c99c3dfbd6aedab05551426955081ae6cae034754f2f557cefa01dc75dc001",
|
||||
@@ -68,5 +68,5 @@
|
||||
},
|
||||
"keyId": "toolhub-targets-2026-rsa3072",
|
||||
"schema": 2,
|
||||
"version": 20260518162547
|
||||
"version": 20260518163640
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
LHqLlyMtbfnUs3QuarMMSqyZmIp+zaCcxL+8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