mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
Merge pull request #7165 from FineFindus/feat/rounded-progress
feat: increase corner-radius of watch-progressbar
This commit is contained in:
commit
71f0d48e24
@ -1,7 +1,9 @@
|
|||||||
package com.github.libretube.ui.extensions
|
package com.github.libretube.ui.extensions
|
||||||
|
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
|
import android.graphics.Outline
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.view.ViewOutlineProvider
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.core.graphics.ColorUtils
|
import androidx.core.graphics.ColorUtils
|
||||||
import androidx.core.view.isGone
|
import androidx.core.view.isGone
|
||||||
@ -36,5 +38,14 @@ fun View.setWatchProgressLength(videoId: String, duration: Long) {
|
|||||||
}
|
}
|
||||||
setBackgroundColor(backgroundColor)
|
setBackgroundColor(backgroundColor)
|
||||||
|
|
||||||
|
// set corner-radius
|
||||||
|
clipToOutline = true
|
||||||
|
outlineProvider = object : ViewOutlineProvider() {
|
||||||
|
override fun getOutline(view: View, outline: Outline) {
|
||||||
|
outline.setRoundRect(0, 0, view.width, view.height, 16f)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
isVisible = true
|
isVisible = true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user