Theme refactoring (#1656)

* Theme refactoring

* disable the automatic tinting of surfaces with elevation in dark mode

* make the media warning visible again with the dark theme

* fix nav bar on api 27+

* use correct color for all media warnings
This commit is contained in:
Konrad Pozniak 2020-01-30 21:37:28 +01:00 committed by GitHub
commit 8767d2ed3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
122 changed files with 330 additions and 724 deletions

View file

@ -24,6 +24,7 @@ import android.widget.ImageView
import android.widget.TextView
import androidx.annotation.DrawableRes
import androidx.appcompat.content.res.AppCompatResources
import androidx.core.content.ContextCompat
import com.bumptech.glide.Glide
import com.keylesspalace.tusky.R
import com.keylesspalace.tusky.entity.Attachment
@ -87,8 +88,7 @@ class StatusViewHelper(private val itemView: View) {
}
val mediaPreviewUnloaded = ThemeUtils.getDrawable(context,
R.attr.media_preview_unloaded_drawable, android.R.color.black)
val mediaPreviewUnloaded = ColorDrawable(ThemeUtils.getColor(context, R.attr.colorBackgroundAccent))
val n = min(attachments.size, Status.MAX_MEDIA_ATTACHMENTS)
@ -141,8 +141,7 @@ class StatusViewHelper(private val itemView: View) {
val blurhashBitmap = decodeBlurHash(context, attachment.blurhash)
mediaPreviews[i].setImageDrawable(blurhashBitmap)
} else {
mediaPreviews[i].setImageDrawable(ColorDrawable(ThemeUtils.getColor(
context, R.attr.sensitive_media_warning_background_color)))
mediaPreviews[i].setImageDrawable(mediaPreviewUnloaded)
}
}
}