From a0e17f8c0f88c2510fb61cb9813d77bbd7df7426 Mon Sep 17 00:00:00 2001 From: FMaz Date: Mon, 19 Aug 2024 10:12:52 -0300 Subject: [PATCH] Made the listview compatible with smallitems and the mobile stylesheets. --- resource/css/listView.css | 10 +++++++--- scripts/bootloader.js | 9 +++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/resource/css/listView.css b/resource/css/listView.css index b45b5f5..2ffba06 100644 --- a/resource/css/listView.css +++ b/resource/css/listView.css @@ -2,7 +2,7 @@ #tab-unavailable.tab-grid, #tab-hidden.tab-grid, #tab-pinned.tab-grid { - grid-template-columns: auto; + grid-template-columns: auto !important; } #vh-tabs > .tab-grid > .vvp-item-tile { @@ -15,14 +15,18 @@ display: flex; flex-direction: column; margin-left: 10px; - width: 80%; + width: 100% !important; } #vh-tabs > .tab-grid > .vvp-item-tile .vvp-details-btn { width: 150px; - margin: 0 auto; + margin: 0 auto !important; } div.vh-status-container { position: relative; } + +#vh-tabs.smallitems .vh-img-container { + width: 130px; +} diff --git a/scripts/bootloader.js b/scripts/bootloader.js index 2e320aa..4bb0e8a 100644 --- a/scripts/bootloader.js +++ b/scripts/bootloader.js @@ -500,6 +500,15 @@ function generateTile(obj) { console.log(full.classList); obj.querySelector(".a-truncate-cut").classList.add("a-offscreen"); */ + + //If small items stylesheet are used, add a class to resize-down the thumnails. + if ( + appSettings.thorvarium.mobileios || + appSettings.thorvarium.mobileandroid || + appSettings.thorvarium.smallItems + ) { + document.querySelector("#vh-tabs").classList.add("smallitems"); + } } //Move the hidden item to the hidden tab