kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
feat: Graphs Blue Color (#1597)
* Changed the humidity color on the graph to the same blue used for current in the power graph. * Refactor: Centralized the blue used in both the Env and Pow metrics in CommonCharts.kt. --------- Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>pull/1599/head
rodzic
3e74373617
commit
85d6e0ccdf
|
@ -73,6 +73,7 @@ object CommonCharts {
|
|||
const val LINE_LIMIT = 4
|
||||
const val TEXT_PAINT_ALPHA = 192
|
||||
const val MAX_PERCENT_VALUE = 100f
|
||||
val INFANTRY_BLUE = Color(75, 119, 190)
|
||||
}
|
||||
|
||||
private const val LINE_ON = 10f
|
||||
|
|
|
@ -65,10 +65,11 @@ import com.geeksville.mesh.model.TimeFrame
|
|||
import com.geeksville.mesh.ui.components.CommonCharts.X_AXIS_SPACING
|
||||
import com.geeksville.mesh.ui.components.CommonCharts.MS_PER_SEC
|
||||
import com.geeksville.mesh.ui.components.CommonCharts.DATE_TIME_FORMAT
|
||||
import com.geeksville.mesh.ui.components.CommonCharts.INFANTRY_BLUE
|
||||
|
||||
private enum class Environment(val color: Color) {
|
||||
TEMPERATURE(Color.Red),
|
||||
HUMIDITY(Color.Blue),
|
||||
HUMIDITY(INFANTRY_BLUE),
|
||||
IAQ(Color.Green)
|
||||
}
|
||||
private val LEGEND_DATA = listOf(
|
||||
|
|
|
@ -64,12 +64,13 @@ import com.geeksville.mesh.model.MetricsViewModel
|
|||
import com.geeksville.mesh.model.TimeFrame
|
||||
import com.geeksville.mesh.ui.components.CommonCharts.MS_PER_SEC
|
||||
import com.geeksville.mesh.ui.components.CommonCharts.DATE_TIME_FORMAT
|
||||
import com.geeksville.mesh.ui.components.CommonCharts.INFANTRY_BLUE
|
||||
import com.geeksville.mesh.util.GraphUtil
|
||||
import com.geeksville.mesh.util.GraphUtil.createPath
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
private enum class Power(val color: Color, val min: Float, val max: Float) {
|
||||
CURRENT(Color(75, 119, 190), -500f, 500f),
|
||||
CURRENT(INFANTRY_BLUE, -500f, 500f),
|
||||
VOLTAGE(Color.Red, 0f, 20f);
|
||||
/**
|
||||
* Difference between the metrics `max` and `min` values.
|
||||
|
|
Ładowanie…
Reference in New Issue