Bump compose-bom version 2023.02.00-beta02 (#9137)

This commit is contained in:
Ivan Iskandar 2023-02-24 10:29:38 +07:00 committed by GitHub
parent bd47eafeec
commit 36ae388332
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 26 deletions

View file

@ -29,12 +29,10 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shadow
import androidx.compose.ui.graphics.drawscope.ContentDrawScope
import androidx.compose.ui.node.DrawModifierNode
import androidx.compose.ui.node.modifierElementOf
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
@ -306,28 +304,7 @@ private fun GridItemSelectable(
private fun Modifier.selectedOutline(
isSelected: Boolean,
color: Color,
): Modifier {
class SelectedOutlineNode(var selected: Boolean, var color: Color) : DrawModifierNode, Modifier.Node() {
override fun ContentDrawScope.draw() {
if (selected) drawRect(color)
drawContent()
}
}
return this then modifierElementOf(
key = isSelected.hashCode() + color.hashCode(),
create = { SelectedOutlineNode(isSelected, color) },
update = {
it.selected = isSelected
it.color = color
},
definitions = {
name = "selectionOutline"
properties["isSelected"] = isSelected
properties["color"] = color
},
)
}
) = this then drawBehind { if (isSelected) drawRect(color = color) }
/**
* Layout of list item.

View file

@ -1,6 +1,6 @@
[versions]
compiler = "1.4.3"
compose-bom = "2023.02.00-beta01"
compose-bom = "2023.02.00-beta02"
accompanist = "0.29.1-alpha"
[libraries]