Skip to content

Commit ee85341

Browse files
committed
[*] fix: cursor tracking transition
1 parent ee98c7c commit ee85341

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

lib/recorder/src/cursor_tracker.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,18 +358,24 @@ impl CursorTracker {
358358
(EdgeState::Left, EdgeTouch::Right) => true,
359359
(EdgeState::Left, EdgeTouch::Top) => true,
360360
(EdgeState::Left, EdgeTouch::Bottom) => true,
361+
(EdgeState::Left, EdgeTouch::TopLeft) => true,
361362
(EdgeState::Left, EdgeTouch::TopRight) => true,
363+
(EdgeState::Left, EdgeTouch::BottomLeft) => true,
362364
(EdgeState::Left, EdgeTouch::BottomRight) => true,
363365

364366
(EdgeState::Right, EdgeTouch::Left) => true,
365367
(EdgeState::Right, EdgeTouch::Top) => true,
366368
(EdgeState::Right, EdgeTouch::Bottom) => true,
367369
(EdgeState::Right, EdgeTouch::TopLeft) => true,
370+
(EdgeState::Right, EdgeTouch::TopRight) => true,
368371
(EdgeState::Right, EdgeTouch::BottomLeft) => true,
372+
(EdgeState::Right, EdgeTouch::BottomRight) => true,
369373

370374
(EdgeState::Top, EdgeTouch::Left) => true,
371375
(EdgeState::Top, EdgeTouch::Right) => true,
372376
(EdgeState::Top, EdgeTouch::Bottom) => true,
377+
(EdgeState::Top, EdgeTouch::TopLeft) => true,
378+
(EdgeState::Top, EdgeTouch::TopRight) => true,
373379
(EdgeState::Top, EdgeTouch::BottomLeft) => true,
374380
(EdgeState::Top, EdgeTouch::BottomRight) => true,
375381

@@ -378,6 +384,8 @@ impl CursorTracker {
378384
(EdgeState::Bottom, EdgeTouch::Top) => true,
379385
(EdgeState::Bottom, EdgeTouch::TopLeft) => true,
380386
(EdgeState::Bottom, EdgeTouch::TopRight) => true,
387+
(EdgeState::Bottom, EdgeTouch::BottomLeft) => true,
388+
(EdgeState::Bottom, EdgeTouch::BottomRight) => true,
381389

382390
_ => false,
383391
}

tr-helper/src/tr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ fn cn() -> &'static HashMap<&'static str, &'static str> {
263263
("After zooming in, the transition time of the cursor when moving across the area.","放大后,移动区域时光标的过度时间" ),
264264
("Reposition transition duration(milliseconds)", "重新定位时间间隔(毫秒)"),
265265
("After zooming in, when touching the boundary of the area, move the area.", "放大后,触碰到区域边界,移动区域"),
266-
266+
("Zoom transition effect", "缩放效果"),
267+
("Reposition edge threshold(0-0.5)", "重新定位边界阈值(0-0.5)"),
267268
])
268269
})
269270
}

wayshot/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ pub struct CursorTracker {
175175
#[derivative(Default(value = "30"))]
176176
pub stable_radius: i32,
177177

178-
#[derivative(Default(value = "300"))]
178+
#[derivative(Default(value = "200"))]
179179
pub fast_moving_duration: i32,
180180

181-
#[derivative(Default(value = "800"))]
181+
#[derivative(Default(value = "1000"))]
182182
pub zoom_transition_duration: i32,
183183

184184
#[derivative(Default(value = "0.15"))]

wayshot/src/logic/tr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ fn cn() -> &'static HashMap<&'static str, &'static str> {
265265
("After zooming in, the transition time of the cursor when moving across the area.","放大后,移动区域时光标的过度时间" ),
266266
("Reposition transition duration(milliseconds)", "重新定位时间间隔(毫秒)"),
267267
("After zooming in, when touching the boundary of the area, move the area.", "放大后,触碰到区域边界,移动区域"),
268-
268+
("Zoom transition effect", "缩放效果"),
269+
("Reposition edge threshold(0-0.5)", "重新定位边界阈值(0-0.5)"),
269270
])
270271
})
271272
}

wayshot/ui/panel/setting/components/cursor-tracker.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export component CursorTracker inherits SettingDetail {
148148
}
149149

150150
zoom-transition-effect-select := Select {
151-
values: ["Linear", "Ease-InOut"];
151+
values: ["Linear", "Ease InOut"];
152152
current-value: root.setting.zoom_in_transition_type == TransitionType.Linear || root.setting.zoom-out-transition-type == TransitionType.Linear ? self.values[0] : self.values[1];
153153
}
154154
}

0 commit comments

Comments
 (0)