Skip to content

Commit 5e043c8

Browse files
committed
Add theme color for manager
1 parent eae99c3 commit 5e043c8

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

canvas/src/main/java/dev/arkbuilders/canvas/presentation/edit/EditScreen.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import androidx.compose.foundation.shape.CircleShape
3131
import androidx.compose.foundation.shape.RoundedCornerShape
3232
import androidx.compose.material.AlertDialog
3333
import androidx.compose.material.Button
34+
import androidx.compose.material.ButtonDefaults
3435
import androidx.compose.material.Icon
3536
import androidx.compose.material.Slider
3637
import androidx.compose.material.Text
@@ -780,7 +781,8 @@ private fun ExitDialog(
780781
onClick = {
781782
viewModel.showExitDialog = false
782783
viewModel.showSavePathDialog = true
783-
}
784+
},
785+
colors = ButtonDefaults.buttonColors(backgroundColor = viewModel.editManager.colorProperties.primary)
784786
) {
785787
Text("Save")
786788
}
@@ -794,9 +796,13 @@ private fun ExitDialog(
794796
} else {
795797
navigateBack()
796798
}
797-
}
799+
},
800+
colors = ButtonDefaults.buttonColors(backgroundColor = viewModel.editManager.colorProperties.primary)
798801
) {
799-
Text("Exit")
802+
Text(
803+
text = "Exit",
804+
color = viewModel.editManager.colorProperties.primary,
805+
)
800806
}
801807
}
802808
)

canvas/src/main/java/dev/arkbuilders/canvas/presentation/edit/NewImageOptionsDialog.kt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import androidx.compose.foundation.layout.wrapContentHeight
1313
import androidx.compose.foundation.shape.CircleShape
1414
import androidx.compose.foundation.shape.RoundedCornerShape
1515
import androidx.compose.foundation.text.KeyboardOptions
16+
import androidx.compose.material.ButtonDefaults
1617
import androidx.compose.material.Checkbox
17-
import androidx.compose.material.MaterialTheme
1818
import androidx.compose.material.Text
1919
import androidx.compose.material.TextButton
2020
import androidx.compose.material.TextField
@@ -169,7 +169,7 @@ fun NewImageOptionsDialog(
169169
Text(
170170
stringResource(R.string.width),
171171
Modifier.fillMaxWidth(),
172-
color = MaterialTheme.colors.primary,
172+
color = editManager.colorProperties.primary,
173173
textAlign = TextAlign.Center
174174
)
175175
},
@@ -216,9 +216,9 @@ fun NewImageOptionsDialog(
216216
},
217217
label = {
218218
Text(
219-
stringResource(R.string.height),
220-
Modifier.fillMaxWidth(),
221-
color = MaterialTheme.colors.primary,
219+
text = stringResource(R.string.height),
220+
modifier = Modifier.fillMaxWidth(),
221+
color = editManager.colorProperties.primary,
222222
textAlign = TextAlign.Center
223223
)
224224
},
@@ -278,11 +278,13 @@ fun NewImageOptionsDialog(
278278
onClick = {
279279
isVisible = false
280280
navigateBack()
281-
}
281+
},
282+
colors = ButtonDefaults.buttonColors(backgroundColor = editManager.colorProperties.primary)
282283
) {
283284
Text("Close")
284285
}
285286
TextButton(
287+
colors = ButtonDefaults.buttonColors(backgroundColor = editManager.colorProperties.primary),
286288
modifier = Modifier
287289
.padding(end = 8.dp),
288290
onClick = {

0 commit comments

Comments
 (0)