Update icons and move remaining to Material Symbols (#4057)

* Update Simple Icons to 16.34.0

The brand paths are unchanged; only the version in the headers moves.

* Use the current Material Symbols names

Several symbols were renamed after the Valkyrie migration. people_alt,
new_releases, screen_lock_*, screen_rotation and stay_current_* are only
aliases in the font now, for group, verified and the mobile_* symbols.
done, push_pin and expand_less/expand_more become check, keep and
keyboard_arrow_up/down, which draw the same or an almost identical glyph.

* Use filled icons where the Material Symbols migration dropped the fill

The migration mapped Filled and Default references to the outline symbols,
but the classic glyph was often solid, and Outlined Warning, Error and
Pause were solid as well. Each call site was compared against the rendered
classic glyph, and the solid ones now use RoundedFilled. view_list needs an
auto-mirrored filled pack. The outline SVGs this leaves unused are removed.

* Show a compact grid icon for the compact display modes

Compact and cover-only grids showed the same view_module icon as the
comfortable grid.

* Generate notification and layout drawables from Material Symbols

Notifications and XML layouts can't use ImageVectors, so they relied on
hand-kept copies of classic Material drawables. A build-logic task now
converts an opt-in list of the module's SVGs with AGP's Svg2Vector into
generated resources. sdk-common is taken from AGP's own dependency metadata,
so its version always matches AGP.

Compose call sites that only needed a drawable (tab close, crop) use the
ImageVectors instead. The icons module's R class must be imported as
MaterialSymbolsR, enforced by spotless, so it isn't mistaken for the app's R.

* Redraw custom icons in the Material Symbols style

The reading mode, crop off, mark previous as read and chapter download
icons were drawn in the classic style. They are rebuilt from Material
Symbols shapes (mobile_gear, mobile_arrow_right/down, crop,
arrow_circle_down, downloading) in a new custom-material-symbols module;
each SVG header lists where its parts come from. The default reading mode
and incognito use mobile_gear and eyeglasses_2 as they are.

ReadingMode holds an ImageVector now, and the module's R class follows the
same alias rule as MaterialSymbolsR.

* Use Material Symbols for the launcher shortcuts

Updates uses release_alert because the symbol named new_releases is now a
check badge.

* Rename the animated icon drawables

anim_*_enter no longer fits now that the icons play in both directions.
This is a pure rename so the following commits show only content changes.

* Use Material Symbols for the bottom navigation icons

The library, updates, history and browse animations are rebuilt from the
outline and filled symbols but keep their original motion: the white inside
is pushed into the ribbon, the "!" and the needle, and the history ring
still spins. Updates uses release_alert, like the shortcut. More already
matches more_horiz and is unchanged.

* Use rounded bars for the manga description caret

The animation is unchanged; the bars get rounded ends to match the
Material Symbols stroke.

* Settle the browse tab icon when selecting and deselecting

The compass turns a full turn and settles with overshoot both ways, instead
of deselecting by playing the select animation backwards. A
rememberAnimatedVectorPainter overload takes separate enter and exit
animations and doesn't animate on the first composition.
This commit is contained in:
AntsyLich
2026-10-09 23:50:12 +06:00
committed by GitHub
parent dd46413e10
commit a80027ff36
151 changed files with 804 additions and 747 deletions
@@ -34,10 +34,8 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
@@ -51,13 +49,13 @@ import eu.kanade.presentation.components.AppBarActions
import eu.kanade.presentation.components.WarningBanner
import eu.kanade.presentation.more.settings.widget.TextPreferenceWidget
import eu.kanade.presentation.more.settings.widget.TrailingWidgetBuffer
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.extension.model.Extension
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.ui.browse.extension.details.ExtensionDetailsViewModel
import eu.kanade.tachiyomi.util.system.LocaleHelper
import eu.kanade.tachiyomi.util.system.copyToClipboard
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.Eyeglasses2
import mihon.icons.materialsymbols.rounded.Settings
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.ScrollbarLazyColumn
@@ -351,7 +349,7 @@ private fun DetailsHeader(
modifier = Modifier.padding(horizontal = MaterialTheme.padding.small),
title = stringResource(MR.strings.pref_incognito_mode),
subtitle = stringResource(MR.strings.pref_incognito_mode_extension_summary),
icon = ImageVector.vectorResource(R.drawable.ic_glasses_24dp),
icon = MaterialSymbols.Rounded.Eyeglasses2,
widget = {
Row(
verticalAlignment = Alignment.CenterVertically,
@@ -64,8 +64,8 @@ import mihon.domain.extension.model.ExtensionStore
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.Close
import mihon.icons.materialsymbols.rounded.Download
import mihon.icons.materialsymbols.rounded.ExpandMore
import mihon.icons.materialsymbols.rounded.Info
import mihon.icons.materialsymbols.rounded.KeyboardArrowDown
import mihon.icons.materialsymbols.rounded.Refresh
import mihon.icons.materialsymbols.rounded.Settings
import mihon.icons.materialsymbols.rounded.VerifiedUser
@@ -641,7 +641,7 @@ private fun ExtensionSplitButton(
contentPadding = SplitButtonDefaults.trailingButtonContentPaddingFor(size),
) {
Icon(
imageVector = MaterialSymbols.Rounded.ExpandMore,
imageVector = MaterialSymbols.Rounded.KeyboardArrowDown,
contentDescription = stringResource(MR.strings.action_menu),
modifier = Modifier.size(SplitButtonDefaults.trailingButtonIconSizeFor(size)),
)
@@ -22,8 +22,8 @@ import eu.kanade.tachiyomi.ui.browse.source.SourcesViewModel
import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceViewModel.Listing
import eu.kanade.tachiyomi.util.system.LocaleHelper
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.PushPin
import mihon.icons.materialsymbols.roundedfilled.PushPin
import mihon.icons.materialsymbols.rounded.Keep
import mihon.icons.materialsymbols.roundedfilled.Keep
import tachiyomi.domain.source.model.Pin
import tachiyomi.domain.source.model.Source
import tachiyomi.i18n.MR
@@ -143,7 +143,7 @@ private fun SourcePinButton(
isPinned: Boolean,
onClick: () -> Unit,
) {
val icon = if (isPinned) MaterialSymbols.RoundedFilled.PushPin else MaterialSymbols.Rounded.PushPin
val icon = if (isPinned) MaterialSymbols.RoundedFilled.Keep else MaterialSymbols.Rounded.Keep
val tint = if (isPinned) {
MaterialTheme.colorScheme.primary
} else {
@@ -29,8 +29,8 @@ import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.extension.model.Extension
import eu.kanade.tachiyomi.extension.util.ExtensionLoader
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.Dangerous
import mihon.icons.materialsymbols.rounded.Warning
import mihon.icons.materialsymbols.roundedfilled.Dangerous
import mihon.icons.materialsymbols.roundedfilled.Warning
import tachiyomi.core.common.util.lang.withIOContext
import tachiyomi.domain.source.model.Source
import tachiyomi.source.local.isLocal
@@ -49,7 +49,7 @@ fun SourceIcon(
when {
source.isStub && icon == null -> {
Image(
imageVector = MaterialSymbols.Rounded.Warning,
imageVector = MaterialSymbols.RoundedFilled.Warning,
contentDescription = null,
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.error),
modifier = modifier.then(defaultModifier),
@@ -113,7 +113,7 @@ fun ExtensionIcon(
}
}
is Extension.NotLoaded -> Image(
imageVector = MaterialSymbols.Rounded.Dangerous,
imageVector = MaterialSymbols.RoundedFilled.Dangerous,
contentDescription = null,
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.error),
modifier = modifier.then(defaultModifier),
@@ -16,8 +16,9 @@ import eu.kanade.presentation.components.SearchToolbar
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.source.Source
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.automirroredrounded.ViewList
import mihon.icons.materialsymbols.rounded.ViewModule
import mihon.icons.materialsymbols.automirroredroundedfilled.ViewList
import mihon.icons.materialsymbols.roundedfilled.ViewCompact
import mihon.icons.materialsymbols.roundedfilled.ViewModule
import tachiyomi.domain.library.model.LibraryDisplayMode
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.i18n.stringResource
@@ -57,10 +58,12 @@ fun BrowseSourceToolbar(
add(
AppBar.Action(
title = stringResource(MR.strings.action_display_mode),
icon = if (displayMode == LibraryDisplayMode.List) {
MaterialSymbols.AutoMirroredRounded.ViewList
} else {
MaterialSymbols.Rounded.ViewModule
icon = when (displayMode) {
LibraryDisplayMode.List -> MaterialSymbols.AutoMirroredRoundedFilled.ViewList
LibraryDisplayMode.ComfortableGrid -> MaterialSymbols.RoundedFilled.ViewModule
LibraryDisplayMode.CompactGrid,
LibraryDisplayMode.CoverOnlyGrid,
-> MaterialSymbols.RoundedFilled.ViewCompact
},
onClick = { selectingDisplayMode = true },
),
@@ -22,7 +22,7 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.automirroredrounded.ArrowForward
import mihon.icons.materialsymbols.rounded.Error
import mihon.icons.materialsymbols.roundedfilled.Error
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.material.padding
import tachiyomi.presentation.core.i18n.stringResource
@@ -90,7 +90,7 @@ fun GlobalSearchErrorResultItem(message: String?) {
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center,
) {
Icon(imageVector = MaterialSymbols.Rounded.Error, contentDescription = null)
Icon(imageVector = MaterialSymbols.RoundedFilled.Error, contentDescription = null)
Spacer(Modifier.height(4.dp))
Text(
text = message ?: stringResource(MR.strings.unknown_error),
@@ -28,7 +28,7 @@ import eu.kanade.tachiyomi.ui.browse.source.globalsearch.SourceFilter
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.DoneAll
import mihon.icons.materialsymbols.rounded.FilterList
import mihon.icons.materialsymbols.rounded.PushPin
import mihon.icons.materialsymbols.rounded.Keep
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.material.padding
import tachiyomi.presentation.core.i18n.stringResource
@@ -82,7 +82,7 @@ fun GlobalSearchToolbar(
onClick = { onChangeSearchFilter(SourceFilter.PinnedOnly) },
leadingIcon = {
Icon(
imageVector = MaterialSymbols.Rounded.PushPin,
imageVector = MaterialSymbols.Rounded.Keep,
contentDescription = null,
modifier = Modifier
.size(FilterChipDefaults.IconSize),
@@ -31,7 +31,7 @@ import eu.kanade.presentation.components.TabbedDialog
import eu.kanade.presentation.components.TabbedDialogPaddings
import mihon.app.di.appGraph
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.PeopleAlt
import mihon.icons.materialsymbols.rounded.Group
import tachiyomi.core.common.preference.TriState
import tachiyomi.domain.manga.model.Manga
import tachiyomi.i18n.MR
@@ -174,7 +174,7 @@ fun ScanlatorFilterItem(
horizontalArrangement = Arrangement.spacedBy(24.dp),
) {
Icon(
imageVector = MaterialSymbols.Rounded.PeopleAlt,
imageVector = MaterialSymbols.Rounded.Group,
contentDescription = null,
tint = if (active) {
MaterialTheme.colorScheme.active
@@ -58,14 +58,14 @@ import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.Add
import mihon.icons.materialsymbols.rounded.AttachMoney
import mihon.icons.materialsymbols.rounded.Block
import mihon.icons.materialsymbols.rounded.Brush
import mihon.icons.materialsymbols.rounded.Check
import mihon.icons.materialsymbols.rounded.Close
import mihon.icons.materialsymbols.rounded.Done
import mihon.icons.materialsymbols.rounded.DoneAll
import mihon.icons.materialsymbols.rounded.Pause
import mihon.icons.materialsymbols.rounded.Person
import mihon.icons.materialsymbols.rounded.Schedule
import mihon.icons.materialsymbols.rounded.Warning
import mihon.icons.materialsymbols.roundedfilled.Brush
import mihon.icons.materialsymbols.roundedfilled.Pause
import mihon.icons.materialsymbols.roundedfilled.Warning
import tachiyomi.domain.manga.model.Manga
import tachiyomi.domain.manga.model.MangaWithChapterCount
import tachiyomi.domain.source.model.StubSource
@@ -238,7 +238,7 @@ private fun DuplicateMangaListItem(
if (!manga.artist.isNullOrBlank() && manga.author != manga.artist) {
MangaDetailRow(
text = manga.artist!!,
iconImageVector = MaterialSymbols.Rounded.Brush,
iconImageVector = MaterialSymbols.RoundedFilled.Brush,
maxLines = 2,
)
}
@@ -257,9 +257,9 @@ private fun DuplicateMangaListItem(
SManga.ONGOING.toLong() -> MaterialSymbols.Rounded.Schedule
SManga.COMPLETED.toLong() -> MaterialSymbols.Rounded.DoneAll
SManga.LICENSED.toLong() -> MaterialSymbols.Rounded.AttachMoney
SManga.PUBLISHING_FINISHED.toLong() -> MaterialSymbols.Rounded.Done
SManga.PUBLISHING_FINISHED.toLong() -> MaterialSymbols.Rounded.Check
SManga.CANCELLED.toLong() -> MaterialSymbols.Rounded.Close
SManga.ON_HIATUS.toLong() -> MaterialSymbols.Rounded.Pause
SManga.ON_HIATUS.toLong() -> MaterialSymbols.RoundedFilled.Pause
else -> MaterialSymbols.Rounded.Block
},
)
@@ -272,7 +272,7 @@ private fun DuplicateMangaListItem(
) {
if (source is StubSource) {
Icon(
imageVector = MaterialSymbols.Rounded.Warning,
imageVector = MaterialSymbols.RoundedFilled.Warning,
contentDescription = null,
modifier = Modifier.size(16.dp),
tint = MaterialTheme.colorScheme.error,
@@ -24,14 +24,14 @@ import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.hapticfeedback.HapticFeedback
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
import androidx.compose.ui.platform.LocalHapticFeedback
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.unit.dp
import eu.kanade.presentation.components.DropdownMenu
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.download.model.Download
import mihon.icons.custommaterialsymbols.CustomMaterialSymbols
import mihon.icons.custommaterialsymbols.rounded.DownloadArrow
import mihon.icons.custommaterialsymbols.rounded.DownloadCircle
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.ArrowDownward
import mihon.icons.materialsymbols.rounded.Error
import mihon.icons.materialsymbols.roundedfilled.CheckCircle
import tachiyomi.i18n.MR
@@ -99,7 +99,7 @@ private fun NotDownloadedIndicator(
contentAlignment = Alignment.Center,
) {
Icon(
painter = painterResource(R.drawable.ic_download_chapter_24dp),
imageVector = CustomMaterialSymbols.Rounded.DownloadCircle,
contentDescription = stringResource(MR.strings.manga_download),
modifier = Modifier.size(IndicatorSize),
tint = MaterialTheme.colorScheme.onSurfaceVariant,
@@ -179,7 +179,7 @@ private fun DownloadingIndicator(
)
}
Icon(
imageVector = MaterialSymbols.Rounded.ArrowDownward,
imageVector = CustomMaterialSymbols.Rounded.DownloadArrow,
contentDescription = null,
modifier = ArrowModifier,
tint = arrowColor,
@@ -279,4 +279,4 @@ private val IndicatorModifier = Modifier
.size(IndicatorSize)
.padding(IndicatorPadding)
private val ArrowModifier = Modifier
.size(IndicatorSize - 7.dp)
.size(IndicatorSize)
@@ -40,18 +40,18 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
import androidx.compose.ui.platform.LocalHapticFeedback
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.DpOffset
import androidx.compose.ui.unit.dp
import eu.kanade.presentation.components.DownloadDropdownMenu
import eu.kanade.presentation.components.DropdownMenu
import eu.kanade.presentation.manga.DownloadAction
import eu.kanade.tachiyomi.R
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch
import mihon.icons.custommaterialsymbols.CustomMaterialSymbols
import mihon.icons.custommaterialsymbols.rounded.DonePrevious
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.automirroredrounded.Label
import mihon.icons.materialsymbols.rounded.BookmarkAdd
@@ -149,7 +149,7 @@ fun MangaBottomActionMenu(
if (onMarkPreviousAsReadClicked != null) {
Button(
title = stringResource(MR.strings.action_mark_previous_as_read),
icon = ImageVector.vectorResource(R.drawable.ic_done_prev_24dp),
icon = CustomMaterialSymbols.Rounded.DonePrevious,
toConfirm = confirm[4],
onLongClick = { onLongClickItem(4) },
onClick = onMarkPreviousAsReadClicked,
@@ -31,8 +31,8 @@ import me.saket.swipe.SwipeableActionsBox
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.BookmarkAdd
import mihon.icons.materialsymbols.rounded.BookmarkRemove
import mihon.icons.materialsymbols.rounded.Check
import mihon.icons.materialsymbols.rounded.Delete
import mihon.icons.materialsymbols.rounded.Done
import mihon.icons.materialsymbols.rounded.Download
import mihon.icons.materialsymbols.rounded.FileDownloadOff
import mihon.icons.materialsymbols.rounded.RemoveDone
@@ -192,7 +192,7 @@ private fun getSwipeAction(
): me.saket.swipe.SwipeAction? {
return when (action) {
LibraryPreferences.ChapterSwipeAction.ToggleRead -> swipeAction(
icon = if (!read) MaterialSymbols.Rounded.Done else MaterialSymbols.Rounded.RemoveDone,
icon = if (!read) MaterialSymbols.Rounded.Check else MaterialSymbols.Rounded.RemoveDone,
background = background,
isUndo = read,
onSwipe = onSwipe,
@@ -82,19 +82,19 @@ import mihon.app.di.appGraph
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.AttachMoney
import mihon.icons.materialsymbols.rounded.Block
import mihon.icons.materialsymbols.rounded.Brush
import mihon.icons.materialsymbols.rounded.Check
import mihon.icons.materialsymbols.rounded.Close
import mihon.icons.materialsymbols.rounded.Done
import mihon.icons.materialsymbols.rounded.DoneAll
import mihon.icons.materialsymbols.rounded.Favorite
import mihon.icons.materialsymbols.rounded.HourglassEmpty
import mihon.icons.materialsymbols.rounded.Pause
import mihon.icons.materialsymbols.rounded.Person
import mihon.icons.materialsymbols.rounded.Public
import mihon.icons.materialsymbols.rounded.Schedule
import mihon.icons.materialsymbols.rounded.Sync
import mihon.icons.materialsymbols.rounded.Warning
import mihon.icons.materialsymbols.roundedfilled.Brush
import mihon.icons.materialsymbols.roundedfilled.Favorite
import mihon.icons.materialsymbols.roundedfilled.Pause
import mihon.icons.materialsymbols.roundedfilled.Warning
import org.intellij.markdown.MarkdownElementTypes
import org.intellij.markdown.MarkdownTokenTypes
import org.intellij.markdown.ast.findChildOfType
@@ -230,7 +230,7 @@ fun MangaActionRow(
} else {
pluralStringResource(MR.plurals.num_trackers, count = trackingCount, trackingCount)
},
icon = if (trackingCount == 0) MaterialSymbols.Rounded.Sync else MaterialSymbols.Rounded.Done,
icon = if (trackingCount == 0) MaterialSymbols.Rounded.Sync else MaterialSymbols.Rounded.Check,
color = if (trackingCount == 0) defaultActionButtonColor else MaterialTheme.colorScheme.primary,
onClick = onTrackingClicked,
)
@@ -491,7 +491,7 @@ private fun ColumnScope.MangaContentInfo(
verticalAlignment = Alignment.CenterVertically,
) {
Icon(
imageVector = MaterialSymbols.Rounded.Brush,
imageVector = MaterialSymbols.RoundedFilled.Brush,
contentDescription = null,
modifier = Modifier.size(16.dp),
)
@@ -519,9 +519,9 @@ private fun ColumnScope.MangaContentInfo(
SManga.ONGOING.toLong() -> MaterialSymbols.Rounded.Schedule
SManga.COMPLETED.toLong() -> MaterialSymbols.Rounded.DoneAll
SManga.LICENSED.toLong() -> MaterialSymbols.Rounded.AttachMoney
SManga.PUBLISHING_FINISHED.toLong() -> MaterialSymbols.Rounded.Done
SManga.PUBLISHING_FINISHED.toLong() -> MaterialSymbols.Rounded.Check
SManga.CANCELLED.toLong() -> MaterialSymbols.Rounded.Close
SManga.ON_HIATUS.toLong() -> MaterialSymbols.Rounded.Pause
SManga.ON_HIATUS.toLong() -> MaterialSymbols.RoundedFilled.Pause
else -> MaterialSymbols.Rounded.Block
},
contentDescription = null,
@@ -546,7 +546,7 @@ private fun ColumnScope.MangaContentInfo(
DotSeparatorText()
if (isStubSource) {
Icon(
imageVector = MaterialSymbols.Rounded.Warning,
imageVector = MaterialSymbols.RoundedFilled.Warning,
contentDescription = null,
modifier = Modifier
.padding(end = 4.dp)
@@ -667,7 +667,7 @@ private fun MangaSummary(
modifier = Modifier.background(Brush.verticalGradient(colors = colors)),
contentAlignment = Alignment.Center,
) {
val image = AnimatedImageVector.animatedVectorResource(R.drawable.anim_caret_down)
val image = AnimatedImageVector.animatedVectorResource(R.drawable.animated_caret_flip)
Icon(
painter = rememberAnimatedVectorPainter(image, !expanded),
contentDescription = stringResource(
@@ -3,24 +3,22 @@ package eu.kanade.presentation.more
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.material3.HorizontalDivider
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.unit.dp
import eu.kanade.presentation.more.settings.widget.SwitchPreferenceWidget
import eu.kanade.presentation.more.settings.widget.TextPreferenceWidget
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.ui.more.DownloadQueueState
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.automirroredrounded.Help
import mihon.icons.materialsymbols.automirroredrounded.Label
import mihon.icons.materialsymbols.rounded.CloudOff
import mihon.icons.materialsymbols.rounded.Download
import mihon.icons.materialsymbols.rounded.Eyeglasses2
import mihon.icons.materialsymbols.rounded.Info
import mihon.icons.materialsymbols.rounded.QueryStats
import mihon.icons.materialsymbols.rounded.Settings
import mihon.icons.materialsymbols.rounded.Storage
import mihon.icons.materialsymbols.rounded.VolunteerActivism
import mihon.icons.materialsymbols.roundedfilled.VolunteerActivism
import tachiyomi.core.common.Constants
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.ScrollbarLazyColumn
@@ -65,7 +63,7 @@ fun MoreScreen(
SwitchPreferenceWidget(
title = stringResource(MR.strings.pref_incognito_mode),
subtitle = stringResource(MR.strings.pref_incognito_mode_summary),
icon = ImageVector.vectorResource(R.drawable.ic_glasses_24dp),
icon = MaterialSymbols.Rounded.Eyeglasses2,
checked = incognitoMode,
onCheckedChanged = onIncognitoModeChange,
)
@@ -136,7 +134,7 @@ fun MoreScreen(
item {
TextPreferenceWidget(
title = stringResource(MR.strings.label_support_us),
icon = MaterialSymbols.Rounded.VolunteerActivism,
icon = MaterialSymbols.RoundedFilled.VolunteerActivism,
onPreferenceClick = onClickSupport,
)
}
@@ -18,7 +18,7 @@ import eu.kanade.presentation.theme.TachiyomiPreviewTheme
import eu.kanade.tachiyomi.ui.more.NewUpdateScreenModel
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.automirroredrounded.OpenInNew
import mihon.icons.materialsymbols.rounded.NewReleases
import mihon.icons.materialsymbols.rounded.Verified
import org.intellij.markdown.flavours.gfm.GFMFlavourDescriptor
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.material.padding
@@ -36,7 +36,7 @@ fun NewUpdateScreen(
onRejectUpdate: () -> Unit,
) {
InfoScreen(
icon = MaterialSymbols.Rounded.NewReleases,
icon = MaterialSymbols.Rounded.Verified,
headingText = stringResource(MR.strings.update_check_notification_update_available),
subtitleText = versionName,
acceptText = when (stage) {
@@ -56,8 +56,8 @@ import mihon.app.di.appGraph
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.automirroredrounded.Help
import mihon.icons.materialsymbols.rounded.Close
import mihon.icons.materialsymbols.rounded.Visibility
import mihon.icons.materialsymbols.rounded.VisibilityOff
import mihon.icons.materialsymbols.roundedfilled.Visibility
import mihon.icons.materialsymbols.roundedfilled.VisibilityOff
import tachiyomi.core.common.util.lang.launchIO
import tachiyomi.core.common.util.lang.withUIContext
import tachiyomi.i18n.MR
@@ -250,9 +250,9 @@ object SettingsTrackingScreen : SearchableSettings {
IconButton(onClick = { hidePassword = !hidePassword }) {
Icon(
imageVector = if (hidePassword) {
MaterialSymbols.Rounded.Visibility
MaterialSymbols.RoundedFilled.Visibility
} else {
MaterialSymbols.Rounded.VisibilityOff
MaterialSymbols.RoundedFilled.VisibilityOff
},
contentDescription = null,
)
@@ -20,8 +20,8 @@ import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.window.DialogProperties
import kotlinx.coroutines.launch
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.Cancel
import mihon.icons.materialsymbols.rounded.Error
import mihon.icons.materialsymbols.roundedfilled.Cancel
import mihon.icons.materialsymbols.roundedfilled.Error
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.i18n.stringResource
@@ -57,10 +57,10 @@ fun EditTextPreferenceWidget(
onValueChange = { textFieldValue = it },
trailingIcon = {
if (textFieldValue.text.isBlank()) {
Icon(imageVector = MaterialSymbols.Rounded.Error, contentDescription = null)
Icon(imageVector = MaterialSymbols.RoundedFilled.Error, contentDescription = null)
} else {
IconButton(onClick = { textFieldValue = TextFieldValue("") }) {
Icon(imageVector = MaterialSymbols.Rounded.Cancel, contentDescription = null)
Icon(imageVector = MaterialSymbols.RoundedFilled.Cancel, contentDescription = null)
}
}
},
@@ -27,7 +27,7 @@ import eu.kanade.tachiyomi.data.track.Tracker
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.Done
import mihon.icons.materialsymbols.rounded.Check
import mihon.icons.materialsymbols.rounded.Refresh
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.i18n.stringResource
@@ -107,7 +107,7 @@ fun TrackingPreferenceWidget(
}
}
Icon(
imageVector = MaterialSymbols.Rounded.Done,
imageVector = MaterialSymbols.Rounded.Check,
modifier = Modifier
.padding(4.dp)
.size(32.dp),
@@ -35,8 +35,8 @@ import eu.kanade.tachiyomi.ui.reader.model.ChapterTransition
import eu.kanade.tachiyomi.ui.reader.model.ReaderChapter
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.Info
import mihon.icons.materialsymbols.rounded.Warning
import mihon.icons.materialsymbols.roundedfilled.CheckCircle
import mihon.icons.materialsymbols.roundedfilled.Warning
import tachiyomi.domain.chapter.model.Chapter
import tachiyomi.domain.chapter.service.calculateChapterGap
import tachiyomi.i18n.MR
@@ -184,7 +184,7 @@ private fun ChapterGapWarning(
verticalAlignment = Alignment.CenterVertically,
) {
Icon(
imageVector = MaterialSymbols.Rounded.Warning,
imageVector = MaterialSymbols.RoundedFilled.Warning,
tint = MaterialTheme.colorScheme.error,
contentDescription = null,
)
@@ -11,8 +11,6 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.tooling.preview.PreviewLightDark
import dev.icerock.moko.resources.StringResource
import eu.kanade.domain.manga.model.readingMode
@@ -68,7 +66,7 @@ private fun DialogContent(
selected = mode
},
modifier = Modifier.fillMaxWidth(),
imageVector = ImageVector.vectorResource(mode.iconRes),
imageVector = mode.icon,
title = stringResource(mode.stringRes),
)
}
@@ -8,11 +8,12 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.res.painterResource
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.ui.reader.setting.ReaderOrientation
import eu.kanade.tachiyomi.ui.reader.setting.ReadingMode
import mihon.icons.custommaterialsymbols.CustomMaterialSymbols
import mihon.icons.custommaterialsymbols.rounded.CropOff
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.Crop
import mihon.icons.materialsymbols.rounded.Settings
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.i18n.stringResource
@@ -36,7 +37,7 @@ fun ReaderBottomBar(
) {
IconButton(onClick = onClickReadingMode) {
Icon(
painter = painterResource(readingMode.iconRes),
imageVector = readingMode.icon,
contentDescription = stringResource(MR.strings.viewer),
)
}
@@ -50,7 +51,7 @@ fun ReaderBottomBar(
IconButton(onClick = onClickCropBorder) {
Icon(
painter = painterResource(if (cropEnabled) R.drawable.ic_crop_24dp else R.drawable.ic_crop_off_24dp),
imageVector = if (cropEnabled) MaterialSymbols.Rounded.Crop else CustomMaterialSymbols.Rounded.CropOff,
contentDescription = stringResource(MR.strings.pref_crop_borders),
)
}
@@ -59,7 +59,7 @@ import eu.kanade.tachiyomi.util.system.copyToClipboard
import kotlinx.datetime.toJavaLocalDate
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.rounded.MoreVert
import mihon.icons.materialsymbols.rounded.VisibilityOff
import mihon.icons.materialsymbols.roundedfilled.VisibilityOff
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.i18n.stringResource
import java.time.format.DateTimeFormatter
@@ -175,7 +175,7 @@ private fun TrackInfoItem(
modifier = Modifier.absoluteOffset(x = (-5).dp),
) {
Icon(
imageVector = MaterialSymbols.Rounded.VisibilityOff,
imageVector = MaterialSymbols.RoundedFilled.VisibilityOff,
contentDescription = stringResource(MR.strings.tracked_privately),
modifier = Modifier.size(14.dp),
)
@@ -74,8 +74,8 @@ import kotlinx.coroutines.launch
import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.automirroredrounded.ArrowBack
import mihon.icons.materialsymbols.rounded.Close
import mihon.icons.materialsymbols.rounded.VisibilityOff
import mihon.icons.materialsymbols.roundedfilled.CheckCircle
import mihon.icons.materialsymbols.roundedfilled.VisibilityOff
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.ScrollbarLazyColumn
import tachiyomi.presentation.core.components.material.Scaffold
@@ -189,7 +189,7 @@ fun TrackerSearch(
elevation = ButtonDefaults.elevatedButtonElevation(),
) {
Icon(
imageVector = MaterialSymbols.Rounded.VisibilityOff,
imageVector = MaterialSymbols.RoundedFilled.VisibilityOff,
contentDescription = stringResource(MR.strings.action_toggle_private_on),
)
}
@@ -0,0 +1,33 @@
package eu.kanade.presentation.util
import androidx.compose.animation.graphics.res.rememberAnimatedVectorPainter
import androidx.compose.animation.graphics.vector.AnimatedImageVector
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.key
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.graphics.painter.Painter
/**
* Plays [enter] forwards when [atEnd] becomes true and [exit] forwards when it becomes false,
* instead of reversing a single animation. Nothing animates on the first composition.
*/
@Composable
fun rememberAnimatedVectorPainter(
enter: AnimatedImageVector,
exit: AnimatedImageVector,
atEnd: Boolean,
): Painter {
val composed = remember { mutableStateOf(false) }
SideEffect { composed.value = true }
return key(atEnd) {
// A fresh group per change, so the new animation starts from its first frame
var playing by remember { mutableStateOf(!composed.value) }
LaunchedEffect(Unit) { playing = true }
rememberAnimatedVectorPainter(if (atEnd) enter else exit, playing)
}
}
@@ -28,9 +28,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.unit.dp
import cafe.adriel.voyager.core.stack.mutableStateStackOf
import com.kevinnzou.web.AccompanistWebChromeClient
@@ -44,7 +42,6 @@ import eu.kanade.presentation.components.AppBar
import eu.kanade.presentation.components.AppBarActions
import eu.kanade.presentation.components.WarningBanner
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.util.system.getHtml
import eu.kanade.tachiyomi.util.system.setDefaultSettings
import eu.kanade.tachiyomi.util.system.setUserAgent
@@ -53,6 +50,7 @@ import mihon.icons.materialsymbols.MaterialSymbols
import mihon.icons.materialsymbols.automirroredrounded.ArrowBack
import mihon.icons.materialsymbols.automirroredrounded.ArrowForward
import mihon.icons.materialsymbols.rounded.Close
import mihon.icons.materialsymbols.rounded.TabClose
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.material.Scaffold
import tachiyomi.presentation.core.i18n.stringResource
@@ -278,7 +276,7 @@ fun WebViewScreenContent(
0,
AppBar.Action(
title = stringResource(MR.strings.action_webview_close_tab),
icon = ImageVector.vectorResource(R.drawable.ic_tab_close_24px),
icon = MaterialSymbols.Rounded.TabClose,
onClick = popState,
),
)