mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
fix some glitches related to calculating the Extended Details location
This commit is contained in:
parent
430fa3a1aa
commit
cd5804ccb9
2 changed files with 4 additions and 5 deletions
|
@ -555,8 +555,8 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
|
||||
private fun getExtendedDetailsY(height: Int): Float {
|
||||
val smallMargin = resources.getDimension(R.dimen.small_margin)
|
||||
val fullscreenOffset = context!!.navigationBarHeight.toFloat() - smallMargin
|
||||
val fullscreenOffset = smallMargin + if (isFullscreen) 0 else context!!.navigationBarHeight
|
||||
val actionsHeight = if (context!!.config.bottomActions && !isFullscreen) resources.getDimension(R.dimen.bottom_actions_height) else 0f
|
||||
return context!!.usableScreenSize.y - height - actionsHeight + if (isFullscreen) fullscreenOffset else -smallMargin
|
||||
return context!!.realScreenSize.y - height - actionsHeight - fullscreenOffset
|
||||
}
|
||||
}
|
||||
|
|
|
@ -627,8 +627,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||
|
||||
private fun getExtendedDetailsY(height: Int): Float {
|
||||
val smallMargin = resources.getDimension(R.dimen.small_margin)
|
||||
val timeHolderHeight = mTimeHolder!!.height - context!!.navigationBarHeight.toFloat()
|
||||
val fullscreenOffset = context!!.navigationBarHeight.toFloat() - smallMargin
|
||||
return context!!.usableScreenSize.y - height + if (mIsFullscreen) fullscreenOffset else -(timeHolderHeight + smallMargin)
|
||||
val fullscreenOffset = smallMargin + if (mIsFullscreen) 0 else mTimeHolder!!.height
|
||||
return context!!.realScreenSize.y.toFloat() - height - fullscreenOffset
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue