Convert remaining icons to ImageVector
This commit is contained in:
1 parent
a33256d29f
commit
e1f473d301
33 files changed
+749
-158
No files matched your search
@@ -269,6 +269,9 @@ dependencies {
|
||||
coreLibraryDesugaring(libs.desugar)
|
||||
|
||||
"gmsImplementation"(libs.bundles.cronet)
|
||||
|
||||
debugImplementation(libs.compose.ui.tooling)
|
||||
implementation(libs.compose.ui.tooling.preview)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
||||
@@ -14,6 +14,8 @@ object EhIcons {
|
||||
val Default = Filled
|
||||
}
|
||||
|
||||
object Reader
|
||||
|
||||
val Default = Filled
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.hippo.ehviewer.icons.filled
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
@@ -37,3 +40,10 @@ val EhIcons.Filled.Crop by unsafeLazy {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconCropPreview() {
|
||||
Image(imageVector = EhIcons.Default.Crop, contentDescription = null)
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
package com.hippo.ehviewer.icons.filled
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
@Suppress("BooleanLiteralArgument")
|
||||
val EhIcons.Filled.CropOff by unsafeLazy {
|
||||
materialIcon(name = "CropOff") {
|
||||
materialPath {
|
||||
@@ -58,3 +62,10 @@ val EhIcons.Filled.CropOff by unsafeLazy {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconCropOffPreview() {
|
||||
Image(imageVector = EhIcons.Default.CropOff, contentDescription = null)
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.hippo.ehviewer.icons.filled
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
@@ -31,3 +34,10 @@ val EhIcons.Filled.GoTo by unsafeLazy {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconGoToPreview() {
|
||||
Image(imageVector = EhIcons.Default.GoTo, contentDescription = null)
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.hippo.ehviewer.icons.filled
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
@@ -45,3 +48,10 @@ val EhIcons.Filled.SadPanda by unsafeLazy {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconSadPandaPreview() {
|
||||
Image(imageVector = EhIcons.Default.SadPanda, contentDescription = null)
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.hippo.ehviewer.icons.filled
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
@@ -59,3 +62,10 @@ val EhIcons.Filled.Subscriptions by unsafeLazy {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconSubscriptionsPreview() {
|
||||
Image(imageVector = EhIcons.Default.Subscriptions, contentDescription = null)
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.hippo.ehviewer.icons.reader
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
@Suppress("BooleanLiteralArgument")
|
||||
val EhIcons.Reader.ContinuousVertical by unsafeLazy {
|
||||
materialIcon(name = "ContinuousVertical") {
|
||||
materialPath {
|
||||
moveTo(17.3159F, 1.0F)
|
||||
horizontalLineToRelative(-10.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, -2.0F, 2.0F)
|
||||
lineTo(5.3159F, 21.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, 2.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, -2.0F)
|
||||
lineTo(19.3159F, 3.0F)
|
||||
arcTo(2.0059F, 2.0059F, 0.0F, false, false, 17.3159F, 1.0F)
|
||||
close()
|
||||
moveTo(17.3159F, 21.0F)
|
||||
horizontalLineToRelative(-10.0F)
|
||||
lineTo(7.3159F, 3.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
close()
|
||||
moveTo(11.3083F, 5.0F)
|
||||
horizontalLineToRelative(2.0F)
|
||||
verticalLineToRelative(5.5F)
|
||||
horizontalLineToRelative(-2.0F)
|
||||
close()
|
||||
moveTo(15.308F, 16.0F)
|
||||
lineToRelative(-2.0F, 0.0F)
|
||||
lineToRelative(0.0F, -4.5F)
|
||||
lineToRelative(-2.0F, 0.0F)
|
||||
lineToRelative(0.0F, 4.5F)
|
||||
lineToRelative(-2.0F, 0.0F)
|
||||
lineToRelative(3.0F, 3.0F)
|
||||
lineToRelative(3.0F, -3.0F)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconContinuousVerticalPreview() {
|
||||
Image(imageVector = EhIcons.Reader.ContinuousVertical, contentDescription = null)
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.hippo.ehviewer.icons.reader
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
@Suppress("BooleanLiteralArgument")
|
||||
val EhIcons.Reader.Default by unsafeLazy {
|
||||
materialIcon(name = "Default") {
|
||||
materialPath {
|
||||
moveTo(6.9906F, 18.0F)
|
||||
lineTo(6.9906F, 6.0F)
|
||||
horizontalLineToRelative(12.0F)
|
||||
lineTo(18.9906F, 3.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, -2.0F, -2.0F)
|
||||
horizontalLineToRelative(-10.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, -2.0F, 2.0F)
|
||||
lineTo(4.9906F, 21.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, 2.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, -2.0F)
|
||||
lineTo(18.9906F, 18.0F)
|
||||
horizontalLineToRelative(-12.0F)
|
||||
close()
|
||||
moveTo(6.9906F, 3.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
lineTo(16.9906F, 4.0F)
|
||||
horizontalLineToRelative(-10.0F)
|
||||
close()
|
||||
moveTo(16.9906F, 21.0F)
|
||||
horizontalLineToRelative(-10.0F)
|
||||
lineTo(6.9906F, 20.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
close()
|
||||
moveTo(21.7706F, 12.44F)
|
||||
lineToRelative(-0.02F, 0.03F)
|
||||
arcToRelative(3.5546F, 3.5546F, 0.0F, false, false, 0.05F, -0.47F)
|
||||
arcToRelative(3.9031F, 3.9031F, 0.0F, false, false, -0.05F, -0.48F)
|
||||
lineToRelative(0.02F, 0.03F)
|
||||
lineToRelative(0.85F, -0.68F)
|
||||
arcToRelative(0.5068F, 0.5068F, 0.0F, false, false, 0.12F, -0.64F)
|
||||
lineToRelative(-0.84F, -1.46F)
|
||||
arcToRelative(0.4986F, 0.4986F, 0.0F, false, false, -0.61F, -0.22F)
|
||||
lineToRelative(-1.01F, 0.39F)
|
||||
lineToRelative(0.0099F, 0.04F)
|
||||
arcToRelative(3.6135F, 3.6135F, 0.0F, false, false, -0.8F, -0.48F)
|
||||
lineToRelative(-0.17F, -1.07F)
|
||||
arcToRelative(0.4879F, 0.4879F, 0.0F, false, false, -0.49F, -0.43F)
|
||||
horizontalLineToRelative(-1.68F)
|
||||
arcToRelative(0.4876F, 0.4876F, 0.0F, false, false, -0.49F, 0.42F)
|
||||
lineToRelative(-0.17F, 1.08F)
|
||||
arcToRelative(3.6149F, 3.6149F, 0.0F, false, false, -0.8F, 0.48F)
|
||||
lineToRelative(0.02F, -0.03F)
|
||||
lineToRelative(-1.01F, -0.39F)
|
||||
arcToRelative(0.4878F, 0.4878F, 0.0F, false, false, -0.61F, 0.22F)
|
||||
lineToRelative(-0.84F, 1.46F)
|
||||
arcToRelative(0.5068F, 0.5068F, 0.0F, false, false, 0.12F, 0.64F)
|
||||
lineToRelative(0.85F, 0.68F)
|
||||
lineToRelative(0.02F, -0.03F)
|
||||
arcToRelative(3.9148F, 3.9148F, 0.0F, false, false, -0.05F, 0.48F)
|
||||
arcToRelative(3.915F, 3.915F, 0.0F, false, false, 0.05F, 0.48F)
|
||||
lineToRelative(-0.02F, -0.03F)
|
||||
lineToRelative(-0.85F, 0.68F)
|
||||
arcToRelative(0.5068F, 0.5068F, 0.0F, false, false, -0.12F, 0.64F)
|
||||
lineToRelative(0.84F, 1.46F)
|
||||
arcToRelative(0.4985F, 0.4985F, 0.0F, false, false, 0.61F, 0.22F)
|
||||
lineToRelative(1.01F, -0.39F)
|
||||
lineToRelative(-0.02F, -0.03F)
|
||||
arcToRelative(4.4991F, 4.4991F, 0.0F, false, false, 0.8F, 0.46F)
|
||||
lineToRelative(0.17F, 1.08F)
|
||||
arcToRelative(0.4876F, 0.4876F, 0.0F, false, false, 0.49F, 0.42F)
|
||||
horizontalLineToRelative(1.68F)
|
||||
arcToRelative(0.4876F, 0.4876F, 0.0F, false, false, 0.49F, -0.42F)
|
||||
lineToRelative(0.17F, -1.08F)
|
||||
arcToRelative(3.6138F, 3.6138F, 0.0F, false, false, 0.8F, -0.48F)
|
||||
lineToRelative(-0.02F, 0.03F)
|
||||
lineToRelative(1.02F, 0.39F)
|
||||
arcToRelative(0.4879F, 0.4879F, 0.0F, false, false, 0.61F, -0.22F)
|
||||
lineToRelative(0.84F, -1.46F)
|
||||
arcToRelative(0.5068F, 0.5068F, 0.0F, false, false, -0.12F, -0.64F)
|
||||
close()
|
||||
moveTo(17.9906F, 14.0F)
|
||||
arcToRelative(2.0F, 2.0F, 0.0F, true, true, 2.0F, -2.0F)
|
||||
arcTo(2.0059F, 2.0059F, 0.0F, false, true, 17.9906F, 14.0F)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconDefaultPreview() {
|
||||
Image(imageVector = EhIcons.Reader.Default, contentDescription = null)
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.hippo.ehviewer.icons.reader
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
val EhIcons.Reader.Landscape by unsafeLazy {
|
||||
materialIcon(name = "Landscape") {
|
||||
materialPath {
|
||||
moveTo(1.01F, 7.0F)
|
||||
lineTo(1.0F, 17.0F)
|
||||
curveToRelative(0.0F, 1.1F, 0.9F, 2.0F, 2.0F, 2.0F)
|
||||
horizontalLineToRelative(18.0F)
|
||||
curveToRelative(1.1F, 0.0F, 2.0F, -0.9F, 2.0F, -2.0F)
|
||||
verticalLineTo(7.0F)
|
||||
curveToRelative(0.0F, -1.1F, -0.9F, -2.0F, -2.0F, -2.0F)
|
||||
horizontalLineTo(3.0F)
|
||||
curveToRelative(-1.1F, 0.0F, -1.99F, 0.9F, -1.99F, 2.0F)
|
||||
close()
|
||||
moveTo(19.0F, 7.0F)
|
||||
verticalLineToRelative(10.0F)
|
||||
horizontalLineTo(5.0F)
|
||||
verticalLineTo(7.0F)
|
||||
horizontalLineToRelative(14.0F)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconLandscapePreview() {
|
||||
Image(imageVector = EhIcons.Reader.Landscape, contentDescription = null)
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.hippo.ehviewer.icons.reader
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
val EhIcons.Reader.LandscapeLocked by unsafeLazy {
|
||||
materialIcon(name = "LandscapeLocked") {
|
||||
materialPath {
|
||||
moveTo(21.0F, 5.0F)
|
||||
lineTo(3.0F, 5.0F)
|
||||
curveToRelative(-1.1F, 0.0F, -2.0F, 0.9F, -2.0F, 2.0F)
|
||||
verticalLineToRelative(10.0F)
|
||||
curveToRelative(0.0F, 1.1F, 0.9F, 2.0F, 2.0F, 2.0F)
|
||||
horizontalLineToRelative(18.0F)
|
||||
curveToRelative(1.1F, 0.0F, 2.0F, -0.9F, 2.0F, -2.0F)
|
||||
lineTo(23.0F, 7.0F)
|
||||
curveToRelative(0.0F, -1.1F, -0.9F, -2.0F, -2.0F, -2.0F)
|
||||
close()
|
||||
moveTo(19.0F, 17.0F)
|
||||
lineTo(5.0F, 17.0F)
|
||||
lineTo(5.0F, 7.0F)
|
||||
horizontalLineToRelative(14.0F)
|
||||
verticalLineToRelative(10.0F)
|
||||
close()
|
||||
moveTo(10.0F, 16.0F)
|
||||
horizontalLineToRelative(4.0F)
|
||||
curveToRelative(0.55F, 0.0F, 1.0F, -0.45F, 1.0F, -1.0F)
|
||||
verticalLineToRelative(-3.0F)
|
||||
curveToRelative(0.0F, -0.55F, -0.45F, -1.0F, -1.0F, -1.0F)
|
||||
verticalLineToRelative(-1.0F)
|
||||
curveToRelative(0.0F, -1.11F, -0.9F, -2.0F, -2.0F, -2.0F)
|
||||
curveToRelative(-1.11F, 0.0F, -2.0F, 0.9F, -2.0F, 2.0F)
|
||||
verticalLineToRelative(1.0F)
|
||||
curveToRelative(-0.55F, 0.0F, -1.0F, 0.45F, -1.0F, 1.0F)
|
||||
verticalLineToRelative(3.0F)
|
||||
curveToRelative(0.0F, 0.55F, 0.45F, 1.0F, 1.0F, 1.0F)
|
||||
close()
|
||||
moveTo(10.8F, 10.0F)
|
||||
curveToRelative(0.0F, -0.66F, 0.54F, -1.2F, 1.2F, -1.2F)
|
||||
curveToRelative(0.66F, 0.0F, 1.2F, 0.54F, 1.2F, 1.2F)
|
||||
verticalLineToRelative(1.0F)
|
||||
horizontalLineToRelative(-2.4F)
|
||||
verticalLineToRelative(-1.0F)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconLandscapeLockedPreview() {
|
||||
Image(imageVector = EhIcons.Reader.LandscapeLocked, contentDescription = null)
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.hippo.ehviewer.icons.reader
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
@Suppress("BooleanLiteralArgument")
|
||||
val EhIcons.Reader.LeftToRight by unsafeLazy {
|
||||
materialIcon(name = "LeftToRight") {
|
||||
materialPath {
|
||||
moveTo(17.3159F, 18.0F)
|
||||
horizontalLineToRelative(-10.0F)
|
||||
lineTo(7.3159F, 16.0F)
|
||||
horizontalLineToRelative(-2.0F)
|
||||
verticalLineToRelative(5.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, 2.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, -2.0F)
|
||||
lineTo(19.3159F, 16.0F)
|
||||
horizontalLineToRelative(-2.0F)
|
||||
close()
|
||||
moveTo(17.3159F, 21.0F)
|
||||
horizontalLineToRelative(-10.0F)
|
||||
lineTo(7.3159F, 20.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
close()
|
||||
moveTo(7.3159F, 6.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
lineTo(17.3159F, 8.0F)
|
||||
horizontalLineToRelative(2.0F)
|
||||
lineTo(19.3159F, 3.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, -2.0F, -2.0F)
|
||||
horizontalLineToRelative(-10.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, -2.0F, 2.0F)
|
||||
lineTo(5.3159F, 8.0F)
|
||||
horizontalLineToRelative(2.0F)
|
||||
close()
|
||||
moveTo(7.3159F, 3.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
lineTo(17.3159F, 4.0F)
|
||||
horizontalLineToRelative(-10.0F)
|
||||
close()
|
||||
moveTo(22.311F, 12.0F)
|
||||
lineToRelative(-3.0F, -3.0F)
|
||||
lineToRelative(0.0F, 2.0F)
|
||||
lineToRelative(-11.99F, 0.0F)
|
||||
lineToRelative(0.0F, 2.0F)
|
||||
lineToRelative(11.99F, 0.0F)
|
||||
lineToRelative(0.0F, 2.0F)
|
||||
lineToRelative(3.0F, -3.0F)
|
||||
close()
|
||||
moveTo(2.3206F, 11.0F)
|
||||
horizontalLineToRelative(1.5F)
|
||||
verticalLineToRelative(2.0F)
|
||||
horizontalLineToRelative(-1.5F)
|
||||
close()
|
||||
moveTo(4.8206F, 11.0F)
|
||||
horizontalLineToRelative(1.5F)
|
||||
verticalLineToRelative(2.0F)
|
||||
horizontalLineToRelative(-1.5F)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconLeftToRightPreview() {
|
||||
Image(imageVector = EhIcons.Reader.LeftToRight, contentDescription = null)
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.hippo.ehviewer.icons.reader
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
val EhIcons.Reader.Portrait by unsafeLazy {
|
||||
materialIcon(name = "Portrait") {
|
||||
materialPath {
|
||||
moveTo(17.0F, 1.01F)
|
||||
lineTo(7.0F, 1.0F)
|
||||
curveToRelative(-1.1F, 0.0F, -1.99F, 0.9F, -1.99F, 2.0F)
|
||||
verticalLineToRelative(18.0F)
|
||||
curveToRelative(0.0F, 1.1F, 0.89F, 2.0F, 1.99F, 2.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
curveToRelative(1.1F, 0.0F, 2.0F, -0.9F, 2.0F, -2.0F)
|
||||
verticalLineTo(3.0F)
|
||||
curveToRelative(0.0F, -1.1F, -0.9F, -1.99F, -2.0F, -1.99F)
|
||||
close()
|
||||
moveTo(17.0F, 19.0F)
|
||||
horizontalLineTo(7.0F)
|
||||
verticalLineTo(5.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
verticalLineToRelative(14.0F)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconPortraitPreview() {
|
||||
Image(imageVector = EhIcons.Reader.Portrait, contentDescription = null)
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.hippo.ehviewer.icons.reader
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
val EhIcons.Reader.PortraitLocked by unsafeLazy {
|
||||
materialIcon(name = "PortraitLocked") {
|
||||
materialPath {
|
||||
moveTo(10.0F, 16.0F)
|
||||
horizontalLineToRelative(4.0F)
|
||||
curveToRelative(0.55F, 0.0F, 1.0F, -0.45F, 1.0F, -1.0F)
|
||||
verticalLineToRelative(-3.0F)
|
||||
curveToRelative(0.0F, -0.55F, -0.45F, -1.0F, -1.0F, -1.0F)
|
||||
verticalLineToRelative(-1.0F)
|
||||
curveToRelative(0.0F, -1.11F, -0.9F, -2.0F, -2.0F, -2.0F)
|
||||
curveToRelative(-1.11F, 0.0F, -2.0F, 0.9F, -2.0F, 2.0F)
|
||||
verticalLineToRelative(1.0F)
|
||||
curveToRelative(-0.55F, 0.0F, -1.0F, 0.45F, -1.0F, 1.0F)
|
||||
verticalLineToRelative(3.0F)
|
||||
curveToRelative(0.0F, 0.55F, 0.45F, 1.0F, 1.0F, 1.0F)
|
||||
close()
|
||||
moveTo(10.8F, 10.0F)
|
||||
curveToRelative(0.0F, -0.66F, 0.54F, -1.2F, 1.2F, -1.2F)
|
||||
curveToRelative(0.66F, 0.0F, 1.2F, 0.54F, 1.2F, 1.2F)
|
||||
verticalLineToRelative(1.0F)
|
||||
horizontalLineToRelative(-2.4F)
|
||||
verticalLineToRelative(-1.0F)
|
||||
close()
|
||||
moveTo(17.0F, 1.0F)
|
||||
lineTo(7.0F, 1.0F)
|
||||
curveToRelative(-1.1F, 0.0F, -2.0F, 0.9F, -2.0F, 2.0F)
|
||||
verticalLineToRelative(18.0F)
|
||||
curveToRelative(0.0F, 1.1F, 0.9F, 2.0F, 2.0F, 2.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
curveToRelative(1.1F, 0.0F, 2.0F, -0.9F, 2.0F, -2.0F)
|
||||
lineTo(19.0F, 3.0F)
|
||||
curveToRelative(0.0F, -1.1F, -0.9F, -2.0F, -2.0F, -2.0F)
|
||||
close()
|
||||
moveTo(17.0F, 19.0F)
|
||||
lineTo(7.0F, 19.0F)
|
||||
lineTo(7.0F, 5.0F)
|
||||
horizontalLineToRelative(10.0F)
|
||||
verticalLineToRelative(14.0F)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconPortraitLockedPreview() {
|
||||
Image(imageVector = EhIcons.Reader.PortraitLocked, contentDescription = null)
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.hippo.ehviewer.icons.reader
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
@Suppress("BooleanLiteralArgument")
|
||||
val EhIcons.Reader.RightToLeft by unsafeLazy {
|
||||
materialIcon(name = "RightToLeft") {
|
||||
materialPath {
|
||||
moveTo(7.0F, 6.0F)
|
||||
horizontalLineTo(17.0F)
|
||||
verticalLineTo(8.0F)
|
||||
horizontalLineToRelative(2.0F)
|
||||
verticalLineTo(3.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, -2.0F, -2.0F)
|
||||
horizontalLineTo(7.0F)
|
||||
arcTo(2.0059F, 2.0059F, 0.0F, false, false, 5.0F, 3.0F)
|
||||
verticalLineTo(8.0F)
|
||||
horizontalLineTo(7.0F)
|
||||
close()
|
||||
moveTo(7.0F, 3.0F)
|
||||
horizontalLineTo(17.0F)
|
||||
verticalLineTo(4.0F)
|
||||
horizontalLineTo(7.0F)
|
||||
close()
|
||||
moveTo(17.0F, 18.0F)
|
||||
lineTo(7.0F, 18.0F)
|
||||
lineTo(7.0F, 16.0F)
|
||||
lineTo(5.0F, 16.0F)
|
||||
verticalLineToRelative(5.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, 2.0F)
|
||||
lineTo(17.0F, 23.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, -2.0F)
|
||||
lineTo(19.0F, 16.0F)
|
||||
lineTo(17.0F, 16.0F)
|
||||
close()
|
||||
moveTo(17.0F, 21.0F)
|
||||
lineTo(7.0F, 21.0F)
|
||||
lineTo(7.0F, 20.0F)
|
||||
lineTo(17.0F, 20.0F)
|
||||
close()
|
||||
moveTo(5.005F, 13.0F)
|
||||
lineToRelative(11.99F, 0.0F)
|
||||
lineToRelative(0.0F, -2.0F)
|
||||
lineToRelative(-11.99F, 0.0F)
|
||||
lineToRelative(0.0F, -2.0F)
|
||||
lineToRelative(-3.0F, 3.0F)
|
||||
lineToRelative(3.0F, 3.0F)
|
||||
lineToRelative(0.0F, -2.0F)
|
||||
close()
|
||||
moveTo(20.4953F, 11.0F)
|
||||
horizontalLineToRelative(1.5F)
|
||||
verticalLineToRelative(2.0F)
|
||||
horizontalLineToRelative(-1.5F)
|
||||
close()
|
||||
moveTo(17.9953F, 11.0F)
|
||||
horizontalLineToRelative(1.5F)
|
||||
verticalLineToRelative(2.0F)
|
||||
horizontalLineToRelative(-1.5F)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconRightToLeftPreview() {
|
||||
Image(imageVector = EhIcons.Reader.RightToLeft, contentDescription = null)
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.hippo.ehviewer.icons.reader
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
val EhIcons.Reader.ScreenRotation by unsafeLazy {
|
||||
materialIcon(name = "ScreenRotation") {
|
||||
materialPath {
|
||||
moveTo(16.48F, 2.52F)
|
||||
curveToRelative(3.27F, 1.55F, 5.61F, 4.72F, 5.97F, 8.48F)
|
||||
horizontalLineToRelative(1.5F)
|
||||
curveTo(23.44F, 4.84F, 18.29F, 0.0F, 12.0F, 0.0F)
|
||||
lineToRelative(-0.66F, 0.03F)
|
||||
lineToRelative(3.81F, 3.81F)
|
||||
lineToRelative(1.33F, -1.32F)
|
||||
close()
|
||||
moveTo(10.23F, 1.75F)
|
||||
curveToRelative(-0.59F, -0.59F, -1.54F, -0.59F, -2.12F, 0.0F)
|
||||
lineTo(1.75F, 8.11F)
|
||||
curveToRelative(-0.59F, 0.59F, -0.59F, 1.54F, 0.0F, 2.12F)
|
||||
lineToRelative(12.02F, 12.02F)
|
||||
curveToRelative(0.59F, 0.59F, 1.54F, 0.59F, 2.12F, 0.0F)
|
||||
lineToRelative(6.36F, -6.36F)
|
||||
curveToRelative(0.59F, -0.59F, 0.59F, -1.54F, 0.0F, -2.12F)
|
||||
lineTo(10.23F, 1.75F)
|
||||
close()
|
||||
moveTo(14.83F, 21.19F)
|
||||
lineTo(2.81F, 9.17F)
|
||||
lineToRelative(6.36F, -6.36F)
|
||||
lineToRelative(12.02F, 12.02F)
|
||||
lineToRelative(-6.36F, 6.36F)
|
||||
close()
|
||||
moveTo(7.52F, 21.48F)
|
||||
curveTo(4.25F, 19.94F, 1.91F, 16.76F, 1.55F, 13.0F)
|
||||
lineTo(0.05F, 13.0F)
|
||||
curveTo(0.56F, 19.16F, 5.71F, 24.0F, 12.0F, 24.0F)
|
||||
lineToRelative(0.66F, -0.03F)
|
||||
lineToRelative(-3.81F, -3.81F)
|
||||
lineToRelative(-1.33F, 1.32F)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconScreenRotationPreview() {
|
||||
Image(imageVector = EhIcons.Reader.ScreenRotation, contentDescription = null)
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.hippo.ehviewer.icons.reader
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
@Suppress("BooleanLiteralArgument")
|
||||
val EhIcons.Reader.Vertical by unsafeLazy {
|
||||
materialIcon(name = "Vertical") {
|
||||
materialPath {
|
||||
moveTo(17.0F, 1.0F)
|
||||
lineTo(7.0F, 1.0F)
|
||||
arcTo(2.0059F, 2.0059F, 0.0F, false, false, 5.0F, 3.0F)
|
||||
lineTo(5.0F, 21.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, 2.0F)
|
||||
lineTo(17.0F, 23.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, -2.0F)
|
||||
lineTo(19.0F, 3.0F)
|
||||
arcTo(2.0059F, 2.0059F, 0.0F, false, false, 17.0F, 1.0F)
|
||||
close()
|
||||
moveTo(17.0F, 3.0F)
|
||||
verticalLineToRelative(1.0462F)
|
||||
lineTo(7.0F, 4.0462F)
|
||||
lineTo(7.0F, 3.0F)
|
||||
close()
|
||||
moveTo(17.0F, 6.0462F)
|
||||
verticalLineToRelative(12.0F)
|
||||
lineTo(7.0F, 18.0462F)
|
||||
verticalLineToRelative(-12.0F)
|
||||
close()
|
||||
moveTo(7.0F, 21.0F)
|
||||
verticalLineToRelative(-0.9538F)
|
||||
lineTo(17.0F, 20.0462F)
|
||||
lineTo(17.0F, 21.0F)
|
||||
close()
|
||||
moveTo(9.0F, 13.0F)
|
||||
lineToRelative(3.0F, 3.0F)
|
||||
lineToRelative(3.0F, -3.0F)
|
||||
lineToRelative(-2.0F, 0.0F)
|
||||
lineToRelative(0.0F, -5.0F)
|
||||
lineToRelative(-2.0F, 0.0F)
|
||||
lineToRelative(0.0F, 5.0F)
|
||||
lineToRelative(-2.0F, 0.0F)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconVerticalPreview() {
|
||||
Image(imageVector = EhIcons.Reader.Vertical, contentDescription = null)
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.hippo.ehviewer.icons.reader
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.material.icons.materialIcon
|
||||
import androidx.compose.material.icons.materialPath
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.util.unsafeLazy
|
||||
|
||||
@Suppress("BooleanLiteralArgument")
|
||||
val EhIcons.Reader.Webtoon by unsafeLazy {
|
||||
materialIcon(name = "Webtoon") {
|
||||
materialPath {
|
||||
moveTo(11.992F, 19.0F)
|
||||
lineToRelative(3.0F, -3.0F)
|
||||
lineToRelative(-2.0F, 0.0F)
|
||||
lineToRelative(0.0F, -11.0F)
|
||||
lineToRelative(-2.0F, 0.0F)
|
||||
lineToRelative(0.0F, 11.0F)
|
||||
lineToRelative(-2.0F, 0.0F)
|
||||
lineToRelative(3.0F, 3.0F)
|
||||
close()
|
||||
moveTo(17.0F, 1.0F)
|
||||
lineTo(7.0F, 1.0F)
|
||||
arcTo(2.0059F, 2.0059F, 0.0F, false, false, 5.0F, 3.0F)
|
||||
lineTo(5.0F, 21.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, 2.0F)
|
||||
lineTo(17.0F, 23.0F)
|
||||
arcToRelative(2.0059F, 2.0059F, 0.0F, false, false, 2.0F, -2.0F)
|
||||
lineTo(19.0F, 3.0F)
|
||||
arcTo(2.0059F, 2.0059F, 0.0F, false, false, 17.0F, 1.0F)
|
||||
close()
|
||||
moveTo(17.0F, 21.0F)
|
||||
lineTo(7.0F, 21.0F)
|
||||
lineTo(7.0F, 3.0F)
|
||||
lineTo(17.0F, 3.0F)
|
||||
close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun IconWebtoonPreview() {
|
||||
Image(imageVector = EhIcons.Reader.Webtoon, contentDescription = null)
|
||||
}
|
||||
@@ -25,7 +25,6 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.DpOffset
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -102,13 +101,13 @@ fun BottomReaderBar(onClickSettings: () -> Unit) {
|
||||
) {
|
||||
IconButton(onClick = { readingModeExpanded = true }) {
|
||||
Icon(
|
||||
painter = painterResource(readingMode.iconRes),
|
||||
imageVector = readingMode.icon,
|
||||
contentDescription = stringResource(R.string.viewer),
|
||||
)
|
||||
}
|
||||
IconButton(onClick = { orientationModeExpanded = true }) {
|
||||
Icon(
|
||||
painter = painterResource(orientationMode.iconRes),
|
||||
imageVector = orientationMode.icon,
|
||||
contentDescription = stringResource(R.string.pref_rotation_type),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
package eu.kanade.tachiyomi.ui.reader.setting
|
||||
|
||||
import android.content.pm.ActivityInfo
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import com.hippo.ehviewer.R
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.icons.reader.Landscape
|
||||
import com.hippo.ehviewer.icons.reader.LandscapeLocked
|
||||
import com.hippo.ehviewer.icons.reader.Portrait
|
||||
import com.hippo.ehviewer.icons.reader.PortraitLocked
|
||||
import com.hippo.ehviewer.icons.reader.ScreenRotation
|
||||
|
||||
enum class OrientationType(val prefValue: Int, val flag: Int, @StringRes val stringRes: Int, @DrawableRes val iconRes: Int, val flagValue: Int) {
|
||||
DEFAULT(0, ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED, R.string.label_default, R.drawable.ic_screen_rotation_24dp, 0x00000000),
|
||||
FREE(1, ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED, R.string.rotation_free, R.drawable.ic_screen_rotation_24dp, 0x00000008),
|
||||
PORTRAIT(2, ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT, R.string.rotation_portrait, R.drawable.ic_stay_current_portrait_24dp, 0x00000010),
|
||||
LANDSCAPE(3, ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE, R.string.rotation_landscape, R.drawable.ic_stay_current_landscape_24dp, 0x00000018),
|
||||
LOCKED_PORTRAIT(4, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT, R.string.rotation_force_portrait, R.drawable.ic_screen_lock_portrait_24dp, 0x00000020),
|
||||
LOCKED_LANDSCAPE(5, ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE, R.string.rotation_force_landscape, R.drawable.ic_screen_lock_landscape_24dp, 0x00000028),
|
||||
REVERSE_PORTRAIT(6, ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT, R.string.rotation_reverse_portrait, R.drawable.ic_stay_current_portrait_24dp, 0x00000030),
|
||||
enum class OrientationType(val prefValue: Int, val flag: Int, @StringRes val stringRes: Int, val icon: ImageVector, val flagValue: Int) {
|
||||
DEFAULT(0, ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED, R.string.label_default, EhIcons.Reader.ScreenRotation, 0x00000000),
|
||||
FREE(1, ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED, R.string.rotation_free, EhIcons.Reader.ScreenRotation, 0x00000008),
|
||||
PORTRAIT(2, ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT, R.string.rotation_portrait, EhIcons.Reader.Portrait, 0x00000010),
|
||||
LANDSCAPE(3, ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE, R.string.rotation_landscape, EhIcons.Reader.Landscape, 0x00000018),
|
||||
LOCKED_PORTRAIT(4, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT, R.string.rotation_force_portrait, EhIcons.Reader.PortraitLocked, 0x00000020),
|
||||
LOCKED_LANDSCAPE(5, ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE, R.string.rotation_force_landscape, EhIcons.Reader.LandscapeLocked, 0x00000028),
|
||||
REVERSE_PORTRAIT(6, ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT, R.string.rotation_reverse_portrait, EhIcons.Reader.Portrait, 0x00000030),
|
||||
;
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
package eu.kanade.tachiyomi.ui.reader.setting
|
||||
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import com.hippo.ehviewer.R
|
||||
import com.hippo.ehviewer.icons.EhIcons
|
||||
import com.hippo.ehviewer.icons.reader.ContinuousVertical
|
||||
import com.hippo.ehviewer.icons.reader.Default
|
||||
import com.hippo.ehviewer.icons.reader.LeftToRight
|
||||
import com.hippo.ehviewer.icons.reader.RightToLeft
|
||||
import com.hippo.ehviewer.icons.reader.Vertical
|
||||
import com.hippo.ehviewer.icons.reader.Webtoon
|
||||
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
||||
import eu.kanade.tachiyomi.ui.reader.viewer.BaseViewer
|
||||
import eu.kanade.tachiyomi.ui.reader.viewer.pager.L2RPagerViewer
|
||||
@@ -12,13 +19,13 @@ import eu.kanade.tachiyomi.ui.reader.viewer.pager.VerticalPagerViewer
|
||||
import eu.kanade.tachiyomi.ui.reader.viewer.webtoon.WebtoonViewer
|
||||
|
||||
@Stable
|
||||
enum class ReadingModeType(val prefValue: Int, @StringRes val stringRes: Int, @DrawableRes val iconRes: Int, val flagValue: Int) {
|
||||
DEFAULT(0, R.string.label_default, R.drawable.ic_reader_default_24dp, 0x00000000),
|
||||
LEFT_TO_RIGHT(1, R.string.left_to_right_viewer, R.drawable.ic_reader_ltr_24dp, 0x00000001),
|
||||
RIGHT_TO_LEFT(2, R.string.right_to_left_viewer, R.drawable.ic_reader_rtl_24dp, 0x00000002),
|
||||
VERTICAL(3, R.string.vertical_viewer, R.drawable.ic_reader_vertical_24dp, 0x00000003),
|
||||
WEBTOON(4, R.string.webtoon_viewer, R.drawable.ic_reader_webtoon_24dp, 0x00000004),
|
||||
CONTINUOUS_VERTICAL(5, R.string.vertical_plus_viewer, R.drawable.ic_reader_continuous_vertical_24dp, 0x00000005),
|
||||
enum class ReadingModeType(val prefValue: Int, @StringRes val stringRes: Int, val icon: ImageVector, val flagValue: Int) {
|
||||
DEFAULT(0, R.string.label_default, EhIcons.Reader.Default, 0x00000000),
|
||||
LEFT_TO_RIGHT(1, R.string.left_to_right_viewer, EhIcons.Reader.LeftToRight, 0x00000001),
|
||||
RIGHT_TO_LEFT(2, R.string.right_to_left_viewer, EhIcons.Reader.RightToLeft, 0x00000002),
|
||||
VERTICAL(3, R.string.vertical_viewer, EhIcons.Reader.Vertical, 0x00000003),
|
||||
WEBTOON(4, R.string.webtoon_viewer, EhIcons.Reader.Webtoon, 0x00000004),
|
||||
CONTINUOUS_VERTICAL(5, R.string.vertical_plus_viewer, EhIcons.Reader.ContinuousVertical, 0x00000005),
|
||||
;
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M17.3159,1h-10a2.0059,2.0059 0,0 0,-2 2L5.3159,21a2.0059,2.0059 0,0 0,2 2h10a2.0059,2.0059 0,0 0,2 -2L19.3159,3A2.0059,2.0059 0,0 0,17.3159 1ZM17.3159,21h-10L7.3159,3h10Z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M11.3083,5h2v5.5h-2z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M15.308,16l-2,0l0,-4.5l-2,0l0,4.5l-2,0l3,3l3,-3z" />
|
||||
</vector>
|
||||
@@ -1,12 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M6.9906,18L6.9906,6h12L18.9906,3a2.0059,2.0059 0,0 0,-2 -2h-10a2.0059,2.0059 0,0 0,-2 2L4.9906,21a2.0059,2.0059 0,0 0,2 2h10a2.0059,2.0059 0,0 0,2 -2L18.9906,18h-12ZM6.9906,3h10L16.9906,4h-10ZM16.9906,21h-10L6.9906,20h10Z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M21.7706,12.44l-0.02,0.03a3.5546,3.5546 0,0 0,0.05 -0.47,3.9031 3.9031,0 0,0 -0.05,-0.48l0.02,0.03 0.85,-0.68a0.5068,0.5068 0,0 0,0.12 -0.64l-0.84,-1.46a0.4986,0.4986 0,0 0,-0.61 -0.22l-1.01,0.39 0.0099,0.04a3.6135,3.6135 0,0 0,-0.8 -0.48l-0.17,-1.07a0.4879,0.4879 0,0 0,-0.49 -0.43h-1.68a0.4876,0.4876 0,0 0,-0.49 0.42l-0.17,1.08a3.6149,3.6149 0,0 0,-0.8 0.48l0.02,-0.03 -1.01,-0.39a0.4878,0.4878 0,0 0,-0.61 0.22l-0.84,1.46a0.5068,0.5068 0,0 0,0.12 0.64l0.85,0.68 0.02,-0.03a3.9148,3.9148 0,0 0,-0.05 0.48,3.915 3.915,0 0,0 0.05,0.48l-0.02,-0.03 -0.85,0.68a0.5068,0.5068 0,0 0,-0.12 0.64l0.84,1.46a0.4985,0.4985 0,0 0,0.61 0.22l1.01,-0.39 -0.02,-0.03a4.4991,4.4991 0,0 0,0.8 0.46l0.17,1.08a0.4876,0.4876 0,0 0,0.49 0.42h1.68a0.4876,0.4876 0,0 0,0.49 -0.42l0.17,-1.08a3.6138,3.6138 0,0 0,0.8 -0.48l-0.02,0.03 1.02,0.39a0.4879,0.4879 0,0 0,0.61 -0.22l0.84,-1.46a0.5068,0.5068 0,0 0,-0.12 -0.64ZM17.9906,14a2,2 0,1 1,2 -2A2.0059,2.0059 0,0 1,17.9906 14Z" />
|
||||
</vector>
|
||||
@@ -1,21 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M17.3159,18h-10L7.3159,16h-2v5a2.0059,2.0059 0,0 0,2 2h10a2.0059,2.0059 0,0 0,2 -2L19.3159,16h-2ZM17.3159,21h-10L7.3159,20h10Z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M7.3159,6h10L17.3159,8h2L19.3159,3a2.0059,2.0059 0,0 0,-2 -2h-10a2.0059,2.0059 0,0 0,-2 2L5.3159,8h2ZM7.3159,3h10L17.3159,4h-10Z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M22.311,12l-3,-3l0,2l-11.99,0l0,2l11.99,0l0,2l3,-3z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M2.3206,11h1.5v2h-1.5z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M4.8206,11h1.5v2h-1.5z" />
|
||||
</vector>
|
||||
@@ -1,21 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M7,6H17V8h2V3a2.0059,2.0059 0,0 0,-2 -2H7A2.0059,2.0059 0,0 0,5 3V8H7ZM7,3H17V4H7Z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M17,18L7,18L7,16L5,16v5a2.0059,2.0059 0,0 0,2 2L17,23a2.0059,2.0059 0,0 0,2 -2L19,16L17,16ZM17,21L7,21L7,20L17,20Z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M5.005,13l11.99,0l0,-2l-11.99,0l0,-2l-3,3l3,3l0,-2z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M20.4953,11h1.5v2h-1.5z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M17.9953,11h1.5v2h-1.5z" />
|
||||
</vector>
|
||||
@@ -1,12 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M17,1L7,1A2.0059,2.0059 0,0 0,5 3L5,21a2.0059,2.0059 0,0 0,2 2L17,23a2.0059,2.0059 0,0 0,2 -2L19,3A2.0059,2.0059 0,0 0,17 1ZM17,3v1.0462L7,4.0462L7,3ZM17,6.0462v12L7,18.0462v-12ZM7,21v-0.9538L17,20.0462L17,21Z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M9,13l3,3l3,-3l-2,0l0,-5l-2,0l0,5l-2,0z" />
|
||||
</vector>
|
||||
@@ -1,12 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M11.992,19l3,-3l-2,0l0,-11l-2,0l0,11l-2,0l3,3z" />
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M17,1L7,1A2.0059,2.0059 0,0 0,5 3L5,21a2.0059,2.0059 0,0 0,2 2L17,23a2.0059,2.0059 0,0 0,2 -2L19,3A2.0059,2.0059 0,0 0,17 1ZM17,21L7,21L7,3L17,3Z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M21,5L3,5c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,7c0,-1.1 -0.9,-2 -2,-2zM19,17L5,17L5,7h14v10zM10,16h4c0.55,0 1,-0.45 1,-1v-3c0,-0.55 -0.45,-1 -1,-1v-1c0,-1.11 -0.9,-2 -2,-2 -1.11,0 -2,0.9 -2,2v1c-0.55,0 -1,0.45 -1,1v3c0,0.55 0.45,1 1,1zM10.8,10c0,-0.66 0.54,-1.2 1.2,-1.2 0.66,0 1.2,0.54 1.2,1.2v1h-2.4v-1z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M10,16h4c0.55,0 1,-0.45 1,-1v-3c0,-0.55 -0.45,-1 -1,-1v-1c0,-1.11 -0.9,-2 -2,-2 -1.11,0 -2,0.9 -2,2v1c-0.55,0 -1,0.45 -1,1v3c0,0.55 0.45,1 1,1zM10.8,10c0,-0.66 0.54,-1.2 1.2,-1.2 0.66,0 1.2,0.54 1.2,1.2v1h-2.4v-1zM17,1L7,1c-1.1,0 -2,0.9 -2,2v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2L19,3c0,-1.1 -0.9,-2 -2,-2zM17,19L7,19L7,5h10v14z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M16.48,2.52c3.27,1.55 5.61,4.72 5.97,8.48h1.5C23.44,4.84 18.29,0 12,0l-0.66,0.03 3.81,3.81 1.33,-1.32zM10.23,1.75c-0.59,-0.59 -1.54,-0.59 -2.12,0L1.75,8.11c-0.59,0.59 -0.59,1.54 0,2.12l12.02,12.02c0.59,0.59 1.54,0.59 2.12,0l6.36,-6.36c0.59,-0.59 0.59,-1.54 0,-2.12L10.23,1.75zM14.83,21.19L2.81,9.17l6.36,-6.36 12.02,12.02 -6.36,6.36zM7.52,21.48C4.25,19.94 1.91,16.76 1.55,13L0.05,13C0.56,19.16 5.71,24 12,24l0.66,-0.03 -3.81,-3.81 -1.33,1.32z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M1.01,7L1,17c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2V7c0,-1.1 -0.9,-2 -2,-2H3c-1.1,0 -1.99,0.9 -1.99,2zM19,7v10H5V7h14z" />
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M17,1.01L7,1c-1.1,0 -1.99,0.9 -1.99,2v18c0,1.1 0.89,2 1.99,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-1.99 -2,-1.99zM17,19H7V5h10v14z" />
|
||||
</vector>
|
||||
@@ -73,6 +73,8 @@ compose-foundation = { module = "androidx.compose.foundation:foundation-android"
|
||||
compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
|
||||
compose-material3 = { module = "androidx.compose.material3:material3", version = "1.3.0-SNAPSHOT" }
|
||||
compose-material3-windowsizeclass = { module = "androidx.compose.material3:material3-window-size-class" }
|
||||
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
|
||||
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
|
||||
compose-ui-util = { module = "androidx.compose.ui:ui-util" }
|
||||
|
||||
compose-destinations-core = { module = "io.github.raamcosta.compose-destinations:core", version.ref = "compose-destinations" }
|
||||
|
||||
Reference in new issue
Block a user