mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 04:37:25 +01:00
Bump compose-bom version 2023.02.00-beta02 (#9137)
This commit is contained in:
parent
bd47eafeec
commit
36ae388332
@ -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.
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user