Custom colors cleanup
This commit is contained in:
@ -50,7 +50,6 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
|
||||
import androidx.compose.ui.platform.SoftwareKeyboardController
|
||||
@ -127,7 +126,6 @@ class AccountActivity : ComponentActivity() {
|
||||
private var oldDefaultAccount = false
|
||||
private var newDefaultAccount = false
|
||||
private var newNumericKeypad = false
|
||||
private var arrowTint = Color.Unspecified
|
||||
private var password = mutableStateOf("")
|
||||
private var showPasswordDialog = mutableStateOf(false)
|
||||
private var keyboardController: SoftwareKeyboardController? = null
|
||||
@ -311,11 +309,6 @@ class AccountActivity : ComponentActivity() {
|
||||
@Composable
|
||||
fun AccountContent(ctx: Context, contentPadding: PaddingValues) {
|
||||
|
||||
arrowTint = if (BaresipService.darkTheme.value)
|
||||
LocalCustomColors.current.grayLight
|
||||
else
|
||||
LocalCustomColors.current.black
|
||||
|
||||
val scrollState = rememberScrollState()
|
||||
|
||||
if (showAlert.value) {
|
||||
@ -690,7 +683,7 @@ class AccountActivity : ComponentActivity() {
|
||||
Text(text = mediaEncMap[mediaEnc.value]!!,
|
||||
color = LocalCustomColors.current.itemText)
|
||||
CustomElements.DrawDrawable(R.drawable.arrow_drop_down,
|
||||
tint = arrowTint)
|
||||
tint = LocalCustomColors.current.itemText)
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = isDropDownExpanded.value,
|
||||
@ -749,7 +742,7 @@ class AccountActivity : ComponentActivity() {
|
||||
Text(text = mediaNatMap[mediaNat.value]!!,
|
||||
color = LocalCustomColors.current.itemText)
|
||||
CustomElements.DrawDrawable(R.drawable.arrow_drop_down,
|
||||
tint = arrowTint)
|
||||
tint = LocalCustomColors.current.itemText)
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = isDropDownExpanded.value,
|
||||
@ -980,7 +973,7 @@ class AccountActivity : ComponentActivity() {
|
||||
Text(text = dtmfModeMap[dtmfMode.intValue]!!,
|
||||
color = LocalCustomColors.current.itemText)
|
||||
CustomElements.DrawDrawable(R.drawable.arrow_drop_down,
|
||||
tint = arrowTint)
|
||||
tint = LocalCustomColors.current.itemText)
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = isDropDownExpanded.value,
|
||||
@ -1040,7 +1033,7 @@ class AccountActivity : ComponentActivity() {
|
||||
Text(text = answerModeMap[answerMode.intValue]!!,
|
||||
color = LocalCustomColors.current.itemText)
|
||||
CustomElements.DrawDrawable(R.drawable.arrow_drop_down,
|
||||
tint = arrowTint)
|
||||
tint = LocalCustomColors.current.itemText)
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = isDropDownExpanded.value,
|
||||
@ -1098,7 +1091,7 @@ class AccountActivity : ComponentActivity() {
|
||||
Text(text = redirectModeMap[autoRedirect.value]!!,
|
||||
color = LocalCustomColors.current.itemText)
|
||||
CustomElements.DrawDrawable(R.drawable.arrow_drop_down,
|
||||
tint = arrowTint)
|
||||
tint = LocalCustomColors.current.itemText)
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = isDropDownExpanded.value,
|
||||
|
||||
@ -75,7 +75,6 @@ class AudioActivity : ComponentActivity() {
|
||||
private var newOpusPacketLoss = oldOpusPacketLoss
|
||||
private var newAudioDelay = BaresipService.audioDelay.toString()
|
||||
private var newToneCountry = BaresipService.toneCountry
|
||||
private var arrowTint = Color.Unspecified
|
||||
|
||||
private val alertTitle = mutableStateOf("")
|
||||
private val alertMessage = mutableStateOf("")
|
||||
@ -184,11 +183,6 @@ class AudioActivity : ComponentActivity() {
|
||||
@Composable
|
||||
fun AudioContent(contentPadding: PaddingValues) {
|
||||
|
||||
arrowTint = if (BaresipService.darkTheme.value)
|
||||
LocalCustomColors.current.grayLight
|
||||
else
|
||||
LocalCustomColors.current.black
|
||||
|
||||
if (showAlert.value) {
|
||||
AlertDialog(
|
||||
showDialog = showAlert,
|
||||
@ -256,7 +250,7 @@ class AudioActivity : ComponentActivity() {
|
||||
Text(text = volNames[itemPosition.intValue],
|
||||
color = LocalCustomColors.current.itemText)
|
||||
CustomElements.DrawDrawable(R.drawable.arrow_drop_down,
|
||||
tint = arrowTint)
|
||||
tint = LocalCustomColors.current.itemText)
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = isDropDownExpanded.value,
|
||||
@ -509,7 +503,7 @@ class AudioActivity : ComponentActivity() {
|
||||
Text(text = countryNames[itemPosition.intValue],
|
||||
color = LocalCustomColors.current.itemText)
|
||||
CustomElements.DrawDrawable(R.drawable.arrow_drop_down,
|
||||
tint = arrowTint)
|
||||
tint = LocalCustomColors.current.itemText)
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = isDropDownExpanded.value,
|
||||
|
||||
@ -63,7 +63,6 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
@ -112,7 +111,6 @@ class ConfigActivity : ComponentActivity() {
|
||||
private var newDebug = false
|
||||
private var oldSipTrace = false
|
||||
private var newSipTrace = false
|
||||
private var arrowTint = Color.Unspecified
|
||||
|
||||
private lateinit var roleManager: RoleManager
|
||||
private lateinit var powerManager: PowerManager
|
||||
@ -374,11 +372,6 @@ class ConfigActivity : ComponentActivity() {
|
||||
@Composable
|
||||
fun ConfigContent(ctx: Context, contentPadding: PaddingValues) {
|
||||
|
||||
arrowTint = if (BaresipService.darkTheme.value)
|
||||
LocalCustomColors.current.grayLight
|
||||
else
|
||||
LocalCustomColors.current.black
|
||||
|
||||
if (showAlert.value) {
|
||||
AlertDialog(
|
||||
showDialog = showAlert,
|
||||
@ -546,7 +539,7 @@ class ConfigActivity : ComponentActivity() {
|
||||
Text(text = familyNames[itemPosition.intValue],
|
||||
color = LocalCustomColors.current.itemText)
|
||||
CustomElements.DrawDrawable(R.drawable.arrow_drop_down,
|
||||
tint = arrowTint)
|
||||
tint = LocalCustomColors.current.itemText)
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = isDropDownExpanded.value,
|
||||
@ -996,7 +989,7 @@ class ConfigActivity : ComponentActivity() {
|
||||
Text(text = contactNames[itemPosition.intValue],
|
||||
color = LocalCustomColors.current.itemText)
|
||||
CustomElements.DrawDrawable(R.drawable.arrow_drop_down,
|
||||
tint = arrowTint)
|
||||
tint = LocalCustomColors.current.itemText)
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = isDropDownExpanded.value,
|
||||
|
||||
@ -51,26 +51,15 @@ val light_gray = Color(0xff9e9e9e)
|
||||
val light_gray_dark = Color(0xFF424242)
|
||||
val light_gray_light = Color(0xffe0e0e0)
|
||||
val light_accent = Color(0xFFF77445)
|
||||
val light_baresip = Color(0xff0ca1fd)
|
||||
val light_strong = Color(0xFF000000)
|
||||
val light_green = Color(0xff01df01)
|
||||
val light_red = Color(0xffff0000)
|
||||
val light_traffic_green = Color(0xFF4CAF50)
|
||||
val light_traffic_yellow = Color(0xFFFFEB3B)
|
||||
val light_traffic_red = Color(0xFFFF5722)
|
||||
val light_light = Color(0xfffcfcfc)
|
||||
val light_dark = Color(0xFF383838)
|
||||
val light_spinner_text = light_dark
|
||||
val light_spinner_dropdown = light_gray_light
|
||||
val light_spinner_divider = light_gray
|
||||
val light_item_text = light_dark
|
||||
val light_alert_text = light_strong
|
||||
val light_background = light_light
|
||||
val light_textfield_background = light_gray_light
|
||||
val light_card_background = light_gray_light
|
||||
val light_popup_background = light_secondary_dark
|
||||
val light_alert = light_primary
|
||||
val light_actionbar = light_background
|
||||
|
||||
val dark_primary = Color(0xff0073c9)
|
||||
val dark_primary_dark = Color(0xff00008b)
|
||||
@ -82,27 +71,15 @@ val dark_gray = Color(0xff9e9e9e)
|
||||
val dark_gray_dark = Color(0xFF424242)
|
||||
val dark_gray_light = Color(0xffe0e0e0)
|
||||
val dark_accent = Color(0xFFF77445)
|
||||
val dark_baresip = Color(0xff0ca1fd)
|
||||
val dark_black = Color(0xFF000000)
|
||||
val dark_strong = Color(0xffffffff)
|
||||
val dark_green = Color(0xff01df01)
|
||||
val dark_red = Color(0xffdf0101)
|
||||
val dark_traffic_green = Color(0xFF2E7D32)
|
||||
val dark_traffic_yellow = Color(0xFFF9A825)
|
||||
val dark_traffic_red = Color(0xFFC62828)
|
||||
val dark_light = dark_gray_light
|
||||
val dark_dark = Color(0xFF121212)
|
||||
val dark_spinner_text = dark_dark
|
||||
val dark_spinner_dropdown = dark_gray
|
||||
val dark_spinner_divider = dark_gray_dark
|
||||
val dark_item_text = dark_gray_light
|
||||
val dark_alert_text = dark_gray_light
|
||||
val dark_background = dark_dark
|
||||
val dark_textfield_background = dark_gray
|
||||
val dark_card_background = dark_gray_dark
|
||||
val dark_popup_background = dark_secondary_dark
|
||||
val dark_alert = dark_primary_light
|
||||
val dark_actionbar = dark_gray_dark
|
||||
|
||||
val LightCustomColors = CustomColors(
|
||||
primary = light_primary,
|
||||
@ -115,27 +92,16 @@ val LightCustomColors = CustomColors(
|
||||
grayDark = light_gray_dark,
|
||||
grayLight = light_gray_light,
|
||||
accent = light_accent,
|
||||
baresip = light_baresip,
|
||||
strong = light_strong,
|
||||
green = light_green,
|
||||
red = light_red,
|
||||
trafficGreen = light_traffic_green,
|
||||
trafficYellow = light_traffic_yellow,
|
||||
trafficRed = light_traffic_red,
|
||||
light = light_light,
|
||||
dark = light_dark,
|
||||
spinnerText = light_spinner_text,
|
||||
spinnerDropdown = light_spinner_dropdown,
|
||||
spinnerDivider = light_spinner_divider,
|
||||
itemText = light_item_text,
|
||||
alertText = light_alert_text,
|
||||
background = light_background,
|
||||
cardBackground = light_card_background,
|
||||
textFieldBackground = light_textfield_background,
|
||||
popupBackground = light_popup_background,
|
||||
alert = light_alert,
|
||||
actionbar = light_actionbar,
|
||||
)
|
||||
)
|
||||
|
||||
val DarkCustomColors = CustomColors(
|
||||
primary = dark_primary,
|
||||
@ -148,27 +114,15 @@ val DarkCustomColors = CustomColors(
|
||||
grayDark = dark_gray_dark,
|
||||
grayLight = dark_gray_light,
|
||||
accent = dark_accent,
|
||||
baresip = dark_baresip,
|
||||
black = dark_black,
|
||||
strong = dark_strong,
|
||||
green = dark_green,
|
||||
red = dark_red,
|
||||
trafficGreen = dark_traffic_green,
|
||||
trafficYellow = dark_traffic_yellow,
|
||||
trafficRed = dark_traffic_red,
|
||||
light = dark_light,
|
||||
dark = dark_dark,
|
||||
spinnerText = dark_spinner_text,
|
||||
spinnerDropdown = dark_spinner_dropdown,
|
||||
spinnerDivider = dark_spinner_divider,
|
||||
itemText = dark_item_text,
|
||||
alertText = dark_alert_text,
|
||||
background = dark_background,
|
||||
cardBackground = dark_card_background,
|
||||
textFieldBackground = dark_textfield_background,
|
||||
popupBackground = dark_popup_background,
|
||||
alert = dark_alert,
|
||||
actionbar = dark_actionbar,
|
||||
)
|
||||
)
|
||||
|
||||
val LocalCustomColors = compositionLocalOf { CustomColors() }
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
android:height="20dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="@color/colorTrafficRed" >
|
||||
android:tint="@color/colorRed" >
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M232.35,775.65L232.35,428.65L315.35,428.65L315.35,634L714.85,234.5L773.5,293.15L374,692.65L579.35,692.65L579.35,775.65L232.35,775.65Z"/>
|
||||
|
||||
Reference in New Issue
Block a user