Inline listThumbSize
This commit is contained in:
1 parent
a2f0b4a64f
commit
257e247e23
4 files changed
+7
-8
No files matched your search
@@ -274,10 +274,6 @@ object Settings : DefaultPreferences() {
|
||||
.apply()
|
||||
}
|
||||
|
||||
private val _listThumbSize by intPref(KEY_LIST_THUMB_SIZE, 40)
|
||||
val listThumbSize: Int
|
||||
get() = 3 * _listThumbSize
|
||||
|
||||
var archivePasswds by stringSetOrNullPref("archive_passwds")
|
||||
|
||||
val downloadDelay by intFromStrPref("download_delay", 0)
|
||||
@@ -324,6 +320,7 @@ object Settings : DefaultPreferences() {
|
||||
var proxyType by intPref("proxy_type", EhProxySelector.TYPE_SYSTEM)
|
||||
var proxyPort by intPref("proxy_port", -1)
|
||||
var clipboardTextHashCode by intPref("clipboard_text_hash_code", 0)
|
||||
val listThumbSize by intPref(KEY_LIST_THUMB_SIZE, 40)
|
||||
|
||||
var recentDownloadLabel by stringOrNullPref("recent_download_label", null)
|
||||
var defaultDownloadLabel by stringOrNullPref("default_download_label", null)
|
||||
|
||||
@@ -60,6 +60,7 @@ import com.hippo.ehviewer.EhApplication.Companion.imageCache
|
||||
import com.hippo.ehviewer.EhDB
|
||||
import com.hippo.ehviewer.R
|
||||
import com.hippo.ehviewer.Settings
|
||||
import com.hippo.ehviewer.Settings.listThumbSize
|
||||
import com.hippo.ehviewer.client.EhUtils
|
||||
import com.hippo.ehviewer.client.data.GalleryInfo
|
||||
import com.hippo.ehviewer.coil.imageRequest
|
||||
@@ -841,7 +842,7 @@ class DownloadsScene :
|
||||
}
|
||||
}
|
||||
|
||||
private val height = (Settings.listThumbSize * 3).pxToDp.dp
|
||||
private val height = (3 * listThumbSize * 3).pxToDp.dp
|
||||
|
||||
fun bind(info: DownloadInfo) {
|
||||
binding.thumb.setMD3Content {
|
||||
|
||||
@@ -34,6 +34,7 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.accompanist.themeadapter.material3.Mdc3Theme
|
||||
import com.hippo.ehviewer.Settings
|
||||
import com.hippo.ehviewer.Settings.listThumbSize
|
||||
import com.hippo.ehviewer.client.data.GalleryInfo
|
||||
import com.hippo.ehviewer.ui.compose.data.GalleryInfoGridItem
|
||||
import com.hippo.ehviewer.ui.compose.data.GalleryInfoListItem
|
||||
@@ -49,7 +50,7 @@ abstract class GalleryHolder(composeView: CheckableComposeView) : RecyclerView.V
|
||||
|
||||
class ListGalleryHolder(private val composeView: CheckableComposeView, private val showFavourite: Boolean) : GalleryHolder(composeView) {
|
||||
|
||||
private val height = (Settings.listThumbSize * 3).pxToDp.dp
|
||||
private val height = (3 * listThumbSize * 3).pxToDp.dp
|
||||
private val showPages = Settings.showGalleryPages
|
||||
|
||||
override fun bind(galleryInfo: GalleryInfo, onClick: () -> Unit, onLongClick: () -> Unit) {
|
||||
|
||||
@@ -63,7 +63,7 @@ import androidx.paging.compose.itemKey
|
||||
import arrow.core.partially1
|
||||
import com.hippo.ehviewer.EhDB
|
||||
import com.hippo.ehviewer.R
|
||||
import com.hippo.ehviewer.Settings
|
||||
import com.hippo.ehviewer.Settings.listThumbSize
|
||||
import com.hippo.ehviewer.client.data.GalleryInfo
|
||||
import com.hippo.ehviewer.ui.compose.Deferred
|
||||
import com.hippo.ehviewer.ui.compose.data.GalleryInfoListItem
|
||||
@@ -205,5 +205,5 @@ class HistoryScene : BaseScene() {
|
||||
navigate(R.id.galleryDetailScene, args)
|
||||
}
|
||||
|
||||
private val cardHeight = (Settings.listThumbSize * 3).pxToDp.dp
|
||||
private val cardHeight = (3 * listThumbSize * 3).pxToDp.dp
|
||||
}
|
||||
Reference in new issue
Block a user