diff --git a/app/src/main/java/eu/kanade/presentation/reader/OrientationSelectDialog.kt b/app/src/main/java/eu/kanade/presentation/reader/OrientationSelectDialog.kt
index ea6f3d58ff..22a02444cf 100644
--- a/app/src/main/java/eu/kanade/presentation/reader/OrientationSelectDialog.kt
+++ b/app/src/main/java/eu/kanade/presentation/reader/OrientationSelectDialog.kt
@@ -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.readerOrientation
@@ -72,7 +70,7 @@ private fun DialogContent(
selected = mode
},
modifier = Modifier.fillMaxWidth(),
- imageVector = ImageVector.vectorResource(mode.iconRes),
+ imageVector = mode.icon,
title = stringResource(mode.stringRes),
)
}
diff --git a/app/src/main/java/eu/kanade/presentation/reader/appbars/BottomReaderBar.kt b/app/src/main/java/eu/kanade/presentation/reader/appbars/BottomReaderBar.kt
index b1f7189edf..8d0cae57b2 100644
--- a/app/src/main/java/eu/kanade/presentation/reader/appbars/BottomReaderBar.kt
+++ b/app/src/main/java/eu/kanade/presentation/reader/appbars/BottomReaderBar.kt
@@ -49,7 +49,7 @@ fun BottomReaderBar(
IconButton(onClick = onClickOrientation) {
Icon(
- painter = painterResource(orientation.iconRes),
+ imageVector = orientation.icon,
contentDescription = stringResource(MR.strings.rotation_type),
)
}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderOrientation.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderOrientation.kt
index 01073cd606..ad0e58a15e 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderOrientation.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderOrientation.kt
@@ -1,57 +1,62 @@
package eu.kanade.tachiyomi.ui.reader.setting
import android.content.pm.ActivityInfo
-import androidx.annotation.DrawableRes
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ScreenLockLandscape
+import androidx.compose.material.icons.filled.ScreenLockPortrait
+import androidx.compose.material.icons.filled.ScreenRotation
+import androidx.compose.material.icons.filled.StayCurrentLandscape
+import androidx.compose.material.icons.filled.StayCurrentPortrait
+import androidx.compose.ui.graphics.vector.ImageVector
import dev.icerock.moko.resources.StringResource
-import eu.kanade.tachiyomi.R
import tachiyomi.i18n.MR
enum class ReaderOrientation(
val flag: Int,
val stringRes: StringResource,
- @DrawableRes val iconRes: Int,
+ val icon: ImageVector,
val flagValue: Int,
) {
DEFAULT(
ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED,
MR.strings.label_default,
- R.drawable.ic_screen_rotation_24dp,
+ Icons.Default.ScreenRotation,
0x00000000,
),
FREE(
ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED,
MR.strings.rotation_free,
- R.drawable.ic_screen_rotation_24dp,
+ Icons.Default.ScreenRotation,
0x00000008,
),
PORTRAIT(
ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT,
MR.strings.rotation_portrait,
- R.drawable.ic_stay_current_portrait_24dp,
+ Icons.Default.StayCurrentPortrait,
0x00000010,
),
LANDSCAPE(
ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE,
MR.strings.rotation_landscape,
- R.drawable.ic_stay_current_landscape_24dp,
+ Icons.Default.StayCurrentLandscape,
0x00000018,
),
LOCKED_PORTRAIT(
ActivityInfo.SCREEN_ORIENTATION_PORTRAIT,
MR.strings.rotation_force_portrait,
- R.drawable.ic_screen_lock_portrait_24dp,
+ Icons.Default.ScreenLockPortrait,
0x00000020,
),
LOCKED_LANDSCAPE(
ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE,
MR.strings.rotation_force_landscape,
- R.drawable.ic_screen_lock_landscape_24dp,
+ Icons.Default.ScreenLockLandscape,
0x00000028,
),
REVERSE_PORTRAIT(
ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT,
MR.strings.rotation_reverse_portrait,
- R.drawable.ic_stay_current_portrait_24dp,
+ Icons.Default.StayCurrentPortrait,
0x00000030,
),
;
diff --git a/app/src/main/res/drawable/ic_screen_lock_landscape_24dp.xml b/app/src/main/res/drawable/ic_screen_lock_landscape_24dp.xml
deleted file mode 100644
index 6c46c7b8a1..0000000000
--- a/app/src/main/res/drawable/ic_screen_lock_landscape_24dp.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/app/src/main/res/drawable/ic_screen_lock_portrait_24dp.xml b/app/src/main/res/drawable/ic_screen_lock_portrait_24dp.xml
deleted file mode 100644
index c7ee82f6b1..0000000000
--- a/app/src/main/res/drawable/ic_screen_lock_portrait_24dp.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/app/src/main/res/drawable/ic_screen_rotation_24dp.xml b/app/src/main/res/drawable/ic_screen_rotation_24dp.xml
deleted file mode 100644
index 04460bd85a..0000000000
--- a/app/src/main/res/drawable/ic_screen_rotation_24dp.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/app/src/main/res/drawable/ic_stay_current_landscape_24dp.xml b/app/src/main/res/drawable/ic_stay_current_landscape_24dp.xml
deleted file mode 100644
index a36b366c4b..0000000000
--- a/app/src/main/res/drawable/ic_stay_current_landscape_24dp.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/app/src/main/res/drawable/ic_stay_current_portrait_24dp.xml b/app/src/main/res/drawable/ic_stay_current_portrait_24dp.xml
deleted file mode 100644
index 25ce497393..0000000000
--- a/app/src/main/res/drawable/ic_stay_current_portrait_24dp.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-