forked from GitHub-Mirror/riotX-android
Merge pull request #495 from vector-im/feature/fix_423
Slide-in reply icon is distorted
This commit is contained in:
commit
5d002532d3
@ -11,7 +11,7 @@ Other changes:
|
|||||||
-
|
-
|
||||||
|
|
||||||
Bugfix:
|
Bugfix:
|
||||||
-
|
- Slide-in reply icon is distorted (#423)
|
||||||
|
|
||||||
Translations:
|
Translations:
|
||||||
-
|
-
|
||||||
|
@ -191,12 +191,13 @@ class RoomMessageTouchHelperCallback(private val context: Context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
val y = (itemView.top + itemView.measuredHeight / 2).toFloat()
|
val y = (itemView.top + itemView.measuredHeight / 2).toFloat()
|
||||||
//magic numbers?
|
val hw = imageDrawable.intrinsicWidth / 2f
|
||||||
|
val hh = imageDrawable.intrinsicHeight / 2f
|
||||||
imageDrawable.setBounds(
|
imageDrawable.setBounds(
|
||||||
(x - convertToPx(12) * scale).toInt(),
|
(x - hw * scale).toInt(),
|
||||||
(y - convertToPx(11) * scale).toInt(),
|
(y - hh * scale).toInt(),
|
||||||
(x + convertToPx(12) * scale).toInt(),
|
(x + hw * scale).toInt(),
|
||||||
(y + convertToPx(10) * scale).toInt()
|
(y + hh * scale).toInt()
|
||||||
)
|
)
|
||||||
imageDrawable.draw(canvas)
|
imageDrawable.draw(canvas)
|
||||||
imageDrawable.alpha = 255
|
imageDrawable.alpha = 255
|
||||||
|
Loading…
Reference in New Issue
Block a user