mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 06:01:49 +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.Modifier
|
||||||
import androidx.compose.ui.draw.alpha
|
import androidx.compose.ui.draw.alpha
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
|
import androidx.compose.ui.draw.drawBehind
|
||||||
import androidx.compose.ui.graphics.Brush
|
import androidx.compose.ui.graphics.Brush
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.Shadow
|
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.TextStyle
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
@ -306,28 +304,7 @@ private fun GridItemSelectable(
|
|||||||
private fun Modifier.selectedOutline(
|
private fun Modifier.selectedOutline(
|
||||||
isSelected: Boolean,
|
isSelected: Boolean,
|
||||||
color: Color,
|
color: Color,
|
||||||
): Modifier {
|
) = this then drawBehind { if (isSelected) drawRect(color = color) }
|
||||||
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
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Layout of list item.
|
* Layout of list item.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[versions]
|
[versions]
|
||||||
compiler = "1.4.3"
|
compiler = "1.4.3"
|
||||||
compose-bom = "2023.02.00-beta01"
|
compose-bom = "2023.02.00-beta02"
|
||||||
accompanist = "0.29.1-alpha"
|
accompanist = "0.29.1-alpha"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
Loading…
Reference in New Issue
Block a user