mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-25 02:18:24 +01:00
parent
2f6d163a7a
commit
75cb94b51a
@ -6,7 +6,9 @@ import eu.davidea.viewholders.FlexibleViewHolder
|
|||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
import eu.kanade.tachiyomi.data.download.model.Download
|
import eu.kanade.tachiyomi.data.download.model.Download
|
||||||
|
import eu.kanade.tachiyomi.util.getResourceColor
|
||||||
import eu.kanade.tachiyomi.util.gone
|
import eu.kanade.tachiyomi.util.gone
|
||||||
|
import eu.kanade.tachiyomi.util.setVectorCompat
|
||||||
import kotlinx.android.synthetic.main.chapters_item.view.*
|
import kotlinx.android.synthetic.main.chapters_item.view.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@ -33,6 +35,9 @@ class ChapterHolder(
|
|||||||
else -> chapter.name
|
else -> chapter.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the correct drawable for dropdown and update the tint to match theme.
|
||||||
|
view.chapter_menu.setVectorCompat(R.drawable.ic_more_horiz_black_24dp, view.context.getResourceColor(R.attr.icon_color))
|
||||||
|
|
||||||
// Set correct text color
|
// Set correct text color
|
||||||
chapter_title.setTextColor(if (chapter.read) adapter.readColor else adapter.unreadColor)
|
chapter_title.setTextColor(if (chapter.read) adapter.readColor else adapter.unreadColor)
|
||||||
if (chapter.bookmark) chapter_title.setTextColor(adapter.bookmarkedColor)
|
if (chapter.bookmark) chapter_title.setTextColor(adapter.bookmarkedColor)
|
||||||
|
@ -8,6 +8,7 @@ import eu.davidea.viewholders.FlexibleViewHolder
|
|||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.download.model.Download
|
import eu.kanade.tachiyomi.data.download.model.Download
|
||||||
import eu.kanade.tachiyomi.util.getResourceColor
|
import eu.kanade.tachiyomi.util.getResourceColor
|
||||||
|
import eu.kanade.tachiyomi.util.setVectorCompat
|
||||||
import jp.wasabeef.glide.transformations.CropCircleTransformation
|
import jp.wasabeef.glide.transformations.CropCircleTransformation
|
||||||
import kotlinx.android.synthetic.main.recent_chapters_item.view.*
|
import kotlinx.android.synthetic.main.recent_chapters_item.view.*
|
||||||
|
|
||||||
@ -63,6 +64,9 @@ class RecentChapterHolder(private val view: View, private val adapter: RecentCha
|
|||||||
// Set manga title
|
// Set manga title
|
||||||
view.manga_title.text = item.manga.title
|
view.manga_title.text = item.manga.title
|
||||||
|
|
||||||
|
// Set the correct drawable for dropdown and update the tint to match theme.
|
||||||
|
view.chapter_menu_icon.setVectorCompat(R.drawable.ic_more_horiz_black_24dp, view.context.getResourceColor(R.attr.icon_color))
|
||||||
|
|
||||||
// Set cover
|
// Set cover
|
||||||
Glide.clear(itemView.manga_cover)
|
Glide.clear(itemView.manga_cover)
|
||||||
if (!item.manga.thumbnail_url.isNullOrEmpty()) {
|
if (!item.manga.thumbnail_url.isNullOrEmpty()) {
|
||||||
|
@ -76,12 +76,12 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/chapter_menu_icon"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center|end"
|
android:layout_gravity="center|end"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp" />
|
||||||
app:srcCompat="@drawable/ic_more_horiz_black_24dp" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
@ -25,4 +25,5 @@
|
|||||||
<attr name="selectable_library_drawable" format="reference|integer"/>
|
<attr name="selectable_library_drawable" format="reference|integer"/>
|
||||||
<attr name="text_color_primary" format="reference|integer"/>
|
<attr name="text_color_primary" format="reference|integer"/>
|
||||||
<attr name="background_card" format="reference|integer"/>
|
<attr name="background_card" format="reference|integer"/>
|
||||||
|
<attr name="icon_color" format="reference|integer"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
<color name="dialogLight">@color/md_white_1000</color>
|
<color name="dialogLight">@color/md_white_1000</color>
|
||||||
|
|
||||||
<color name="selectorColorLight">@color/md_blue_A400_38</color>
|
<color name="selectorColorLight">@color/md_blue_A400_38</color>
|
||||||
|
<color name="iconColorLight">@color/md_black_1000</color>
|
||||||
|
|
||||||
<!-- Dark Theme -->
|
<!-- Dark Theme -->
|
||||||
<color name="colorAccentDark">#3399ff</color>
|
<color name="colorAccentDark">#3399ff</color>
|
||||||
@ -35,6 +36,7 @@
|
|||||||
<color name="dialogDark">@color/md_grey_800</color>
|
<color name="dialogDark">@color/md_grey_800</color>
|
||||||
|
|
||||||
<color name="selectorColorDark">@color/md_blue_A200_50</color>
|
<color name="selectorColorDark">@color/md_blue_A200_50</color>
|
||||||
|
<color name="iconColorDark">@color/md_white_1000_54</color>
|
||||||
|
|
||||||
<!-- Reader Theme -->
|
<!-- Reader Theme -->
|
||||||
<color name="pageNumberBackgroundLight">@color/md_grey_50_75</color>
|
<color name="pageNumberBackgroundLight">@color/md_grey_50_75</color>
|
||||||
@ -48,6 +50,7 @@
|
|||||||
|
|
||||||
<color name="md_white_1000">#FFFFFFFF</color>
|
<color name="md_white_1000">#FFFFFFFF</color>
|
||||||
<color name="md_white_1000_70">#B3FFFFFF</color>
|
<color name="md_white_1000_70">#B3FFFFFF</color>
|
||||||
|
<color name="md_white_1000_54">#8AFFFFFF</color>
|
||||||
<color name="md_white_1000_50">#80FFFFFF</color>
|
<color name="md_white_1000_50">#80FFFFFF</color>
|
||||||
<color name="md_white_1000_20">#33FFFFFF</color>
|
<color name="md_white_1000_20">#33FFFFFF</color>
|
||||||
<color name="md_white_1000_12">#1FFFFFFF</color>
|
<color name="md_white_1000_12">#1FFFFFFF</color>
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
<item name="selectable_library_drawable">@drawable/library_item_selector_light</item>
|
<item name="selectable_library_drawable">@drawable/library_item_selector_light</item>
|
||||||
<item name="text_color_primary">@color/textColorPrimaryLight</item>
|
<item name="text_color_primary">@color/textColorPrimaryLight</item>
|
||||||
<item name="background_card">@color/dialogLight</item>
|
<item name="background_card">@color/dialogLight</item>
|
||||||
|
<item name="icon_color">@color/iconColorLight</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Tachiyomi" parent="Theme.Base">
|
<style name="Theme.Tachiyomi" parent="Theme.Base">
|
||||||
@ -74,6 +75,7 @@
|
|||||||
<item name="selectable_library_drawable">@drawable/library_item_selector_dark</item>
|
<item name="selectable_library_drawable">@drawable/library_item_selector_dark</item>
|
||||||
<item name="text_color_primary">@color/textColorPrimaryDark</item>
|
<item name="text_color_primary">@color/textColorPrimaryDark</item>
|
||||||
<item name="background_card">@color/dialogDark</item>
|
<item name="background_card">@color/dialogDark</item>
|
||||||
|
<item name="icon_color">@color/iconColorDark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Tachiyomi.Dark" parent="Theme.Base.Dark">
|
<style name="Theme.Tachiyomi.Dark" parent="Theme.Base.Dark">
|
||||||
|
Loading…
Reference in New Issue
Block a user