-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: overhaul settings * feat: overhaul experimental options * split to its own page * remember experimental options enabled state * remove localization for experimental options * feat(settings/languages): use radio buttons
- Loading branch information
1 parent
10f5041
commit 9586eaa
Showing
18 changed files
with
227 additions
and
146 deletions.
There are no files selected for viewing
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
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
61 changes: 61 additions & 0 deletions
61
app/src/main/java/com/aliernfrog/pftool/ui/component/maps/MapHeader.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,61 @@ | ||
package com.aliernfrog.pftool.ui.component.maps | ||
|
||
import androidx.compose.animation.animateContentSize | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.graphics.painter.Painter | ||
import androidx.compose.ui.unit.dp | ||
|
||
@Composable | ||
fun MapHeader( | ||
title: String, | ||
modifier: Modifier = Modifier, | ||
description: String? = null, | ||
painter: Painter? = null, | ||
contentColor: Color = MaterialTheme.colorScheme.onSurface | ||
) { | ||
Row( | ||
modifier = modifier, | ||
verticalAlignment = Alignment.CenterVertically | ||
) { | ||
painter?.let { | ||
Icon( | ||
painter = painter, | ||
contentDescription = null, | ||
modifier = Modifier.size(30.dp).padding(1.dp), | ||
tint = contentColor | ||
) | ||
} | ||
Column( | ||
modifier = Modifier | ||
.padding(vertical = 4.dp, horizontal = 8.dp) | ||
) { | ||
Text( | ||
text = title, | ||
color = contentColor, | ||
style = MaterialTheme.typography.titleMedium, | ||
modifier = Modifier.fillMaxWidth() | ||
) | ||
description?.let { | ||
Text( | ||
text = description, | ||
color = contentColor, | ||
style = MaterialTheme.typography.bodyMedium, | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.animateContentSize() | ||
) | ||
} | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.