Fix Dock search bar disappearing when its corner radius is set to 0%

This commit is contained in:
Patryk Michalik committed 2021-10-27 18:53:05 +02:00
1 parent 01b408f428
commit 2bf71a7cfd
1 file changed
+2 -2
+2 -2
View File
@@ -120,7 +120,7 @@ class QsbLayout(context: Context, attrs: AttributeSet?) : FrameLayout(context, a
private fun clipIconRipples() {
val cornerRadius = getCornerRadius(context, preferenceManager)
listOf(lensIcon, micIcon).forEach {
it.clipToOutline = true
it.clipToOutline = cornerRadius > 0
it.background = PaintDrawable(Color.TRANSPARENT).apply {
setCornerRadius(cornerRadius)
}
@@ -131,7 +131,7 @@ class QsbLayout(context: Context, attrs: AttributeSet?) : FrameLayout(context, a
val cornerRadius = getCornerRadius(context, preferenceManager)
val color = if (themed) Themes.getColorBackgroundFloating(context) else Themes.getAttrColor(context, R.attr.qsbFillColor)
with (inner) {
clipToOutline = true
clipToOutline = cornerRadius > 0
background = PaintDrawable(color).apply {
setCornerRadius(cornerRadius)
}