parent
2d2d7569e3
commit
55796c9a30
13 changed files with 21 additions and 45 deletions
|
|
@ -595,12 +595,12 @@ class ComposeActivity :
|
|||
@ColorInt val color = if (contentWarningShown) {
|
||||
binding.composeHideMediaButton.setImageResource(R.drawable.ic_hide_media_24dp)
|
||||
binding.composeHideMediaButton.isClickable = false
|
||||
ContextCompat.getColor(this, R.color.transparent_tusky_blue)
|
||||
getColor(R.color.transparent_tusky_blue)
|
||||
} else {
|
||||
binding.composeHideMediaButton.isClickable = true
|
||||
if (markMediaSensitive) {
|
||||
binding.composeHideMediaButton.setImageResource(R.drawable.ic_hide_media_24dp)
|
||||
ContextCompat.getColor(this, R.color.tusky_blue)
|
||||
getColor(R.color.tusky_blue)
|
||||
} else {
|
||||
binding.composeHideMediaButton.setImageResource(R.drawable.ic_eye_24dp)
|
||||
ThemeUtils.getColor(this, android.R.attr.textColorTertiary)
|
||||
|
|
@ -614,7 +614,7 @@ class ComposeActivity :
|
|||
@ColorInt val color = if (binding.composeScheduleView.time == null) {
|
||||
ThemeUtils.getColor(this, android.R.attr.textColorTertiary)
|
||||
} else {
|
||||
ContextCompat.getColor(this, R.color.tusky_blue)
|
||||
getColor(R.color.tusky_blue)
|
||||
}
|
||||
binding.composeScheduleButton.drawable.colorFilter = PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
|
|
@ -797,7 +797,7 @@ class ComposeActivity :
|
|||
binding.composeCharactersLeftView.text = String.format(Locale.getDefault(), "%d", remainingLength)
|
||||
|
||||
val textColor = if (remainingLength < 0) {
|
||||
ContextCompat.getColor(this, R.color.tusky_red)
|
||||
getColor(R.color.tusky_red)
|
||||
} else {
|
||||
ThemeUtils.getColor(this, android.R.attr.textColorTertiary)
|
||||
}
|
||||
|
|
@ -969,7 +969,7 @@ class ComposeActivity :
|
|||
binding.composeContentWarningBar.show()
|
||||
binding.composeContentWarningField.setSelection(binding.composeContentWarningField.text.length)
|
||||
binding.composeContentWarningField.requestFocus()
|
||||
ContextCompat.getColor(this, R.color.tusky_blue)
|
||||
getColor(R.color.tusky_blue)
|
||||
} else {
|
||||
binding.composeContentWarningBar.hide()
|
||||
binding.composeEditField.requestFocus()
|
||||
|
|
|
|||
|
|
@ -58,15 +58,14 @@ public final class ProgressImageView extends AppCompatImageView {
|
|||
}
|
||||
|
||||
private void init() {
|
||||
circlePaint.setColor(ContextCompat.getColor(getContext(), R.color.tusky_blue));
|
||||
circlePaint.setColor(getContext().getColor(R.color.tusky_blue));
|
||||
circlePaint.setStrokeWidth(Utils.dpToPx(getContext(), 4));
|
||||
circlePaint.setStyle(Paint.Style.STROKE);
|
||||
|
||||
clearPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OUT));
|
||||
|
||||
markBgPaint.setStyle(Paint.Style.FILL);
|
||||
markBgPaint.setColor(ContextCompat.getColor(getContext(),
|
||||
R.color.tusky_grey_10));
|
||||
markBgPaint.setColor(getContext().getColor(R.color.tusky_grey_10));
|
||||
captionDrawable = AppCompatResources.getDrawable(getContext(), R.drawable.spellcheck);
|
||||
}
|
||||
|
||||
|
|
@ -81,8 +80,7 @@ public final class ProgressImageView extends AppCompatImageView {
|
|||
}
|
||||
|
||||
public void setChecked(boolean checked) {
|
||||
this.markBgPaint.setColor(ContextCompat.getColor(getContext(),
|
||||
checked ? R.color.tusky_blue : R.color.tusky_grey_10));
|
||||
this.markBgPaint.setColor(getContext().getColor(checked ? R.color.tusky_blue : R.color.tusky_grey_10));
|
||||
invalidate();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue