Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit b944f6b

Browse files
author
EXAM454
authored
fix: Reduce padding DPI for swipe zones
1 parent eb41894 commit b944f6b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/src/main/java/app/revanced/integrations/fenster/util/SwipeControlZoneHelper.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fun MotionEvent.getSwipeControlZone(context: Context): SwipeControlZone {
3838
// check in what detection zone the event is in
3939
val _40dp = 40.applyDimension(context, TypedValue.COMPLEX_UNIT_DIP).toFloat()
4040
val _80dp = 80.applyDimension(context, TypedValue.COMPLEX_UNIT_DIP).toFloat()
41-
val _220dp = 220.applyDimension(context, TypedValue.COMPLEX_UNIT_DIP).toFloat()
41+
val _200dp = 200.applyDimension(context, TypedValue.COMPLEX_UNIT_DIP).toFloat()
4242

4343
// Y- Axis:
4444
// -------- 0
@@ -60,13 +60,13 @@ fun MotionEvent.getSwipeControlZone(context: Context): SwipeControlZone {
6060
// X- Axis:
6161
// 0 xBrigStart xBrigEnd xVolStart xVolEnd screenWidth
6262
// | | | | | |
63-
// | 40dp | 220dp | | 220dp | 40dp |
63+
// | 40dp | 200dp | | 200dp | 40dp |
6464
// | <------> | <------> | <------> | <------> | <------> |
6565
// | dead | brightness | dead | volume | dead |
6666
val xBrightStart = _40dp
67-
val xBrightEnd = xBrightStart + _220dp
67+
val xBrightEnd = xBrightStart + _200dp
6868
val xVolEnd = screenWidth - _40dp
69-
val xVolStart = xVolEnd - _220dp
69+
val xVolStart = xVolEnd - _200dp
7070

7171
// test detection zone
7272
if (y in yDeadTop..yDeadBtm) {

0 commit comments

Comments
 (0)