-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make DownloadItem icons smaller so I can fit more of them (#143)
- Loading branch information
1 parent
2074da4
commit 890bb2f
Showing
3 changed files
with
35 additions
and
7 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/kotlin/de/lobbenmeier/stefan/common/ui/SmallIconButton.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package de.lobbenmeier.stefan.common.ui | ||
|
||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material.ExperimentalMaterialApi | ||
import androidx.compose.material.IconButton | ||
import androidx.compose.material.LocalMinimumInteractiveComponentEnforcement | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.CompositionLocalProvider | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
|
||
@OptIn(ExperimentalMaterialApi::class) | ||
@Composable | ||
fun SmallIconButton( | ||
onClick: () -> Unit, | ||
modifier: Modifier = Modifier, | ||
enabled: Boolean = true, | ||
content: @Composable () -> Unit, | ||
) { | ||
CompositionLocalProvider(LocalMinimumInteractiveComponentEnforcement provides false) { | ||
IconButton( | ||
onClick = onClick, | ||
modifier = modifier.padding(4.dp), | ||
enabled = enabled, | ||
content = content, | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters