From fd5f97a5b688096ada9d34459bab42c417eec82b Mon Sep 17 00:00:00 2001
From: Zéro~Informatique
Date: Sun, 26 Mar 2023 00:29:32 +0100
Subject: viewer: cannot scroll in text viewer

GitHub: closes #360
---
 viewer/src/views/item_handlers/PlainTextViewer.vue | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'viewer/src/views/item_handlers/PlainTextViewer.vue')

diff --git a/viewer/src/views/item_handlers/PlainTextViewer.vue b/viewer/src/views/item_handlers/PlainTextViewer.vue
index 2ab429a..986e0ae 100644
--- a/viewer/src/views/item_handlers/PlainTextViewer.vue
+++ b/viewer/src/views/item_handlers/PlainTextViewer.vue
@@ -26,6 +26,7 @@
   >
     <pre
       v-if="isFinished"
+      class="scrollbar"
       v-text="data"
     />
     <LdLoading v-else />
@@ -63,7 +64,7 @@ const { isFinished, data } = useFetch(itemResourceUrl).text();
     border: none;
     white-space: pre-wrap;
     resize: horizontal; // Allow the user to adjust the width of the text view for easier column reading.
-    overflow: hidden; // Necessary for the resize handle to be shown in Chromium.
+    overflow-x: hidden !important; // Necessary for the resize handle to be shown in Chromium.
   }
 }
 </style>
-- 
cgit v1.2.3


From 1f92cc4f17debdb6991a7f388f8e313d461744ff Mon Sep 17 00:00:00 2001
From: Zéro~Informatique
Date: Sun, 26 Mar 2023 18:14:13 +0200
Subject: viewer: cannot scroll in text viewer

- Horizontal resize is now available everywhere in LdGallery
- Increased slightly the PlainText font size for easier read
---
 viewer/src/views/item_handlers/PlainTextViewer.vue | 31 ++++++----------------
 1 file changed, 8 insertions(+), 23 deletions(-)

(limited to 'viewer/src/views/item_handlers/PlainTextViewer.vue')

diff --git a/viewer/src/views/item_handlers/PlainTextViewer.vue b/viewer/src/views/item_handlers/PlainTextViewer.vue
index 986e0ae..71b5d15 100644
--- a/viewer/src/views/item_handlers/PlainTextViewer.vue
+++ b/viewer/src/views/item_handlers/PlainTextViewer.vue
@@ -19,18 +19,12 @@
 -->
 
 <template>
-  <!-- Outer div necessary for the resize handle to appear on Firefox. -->
-  <div
+  <pre
+    v-if="isFinished"
     :class="$style.content"
-    class="fill"
-  >
-    <pre
-      v-if="isFinished"
-      class="scrollbar"
-      v-text="data"
-    />
-    <LdLoading v-else />
-  </div>
+    v-text="data"
+  />
+  <LdLoading v-else />
 </template>
 
 <script setup lang="ts">
@@ -52,19 +46,10 @@ const { isFinished, data } = useFetch(itemResourceUrl).text();
 @import "~@/assets/scss/theme";
 
 .content {
-  display: flex;
-  justify-content: center;
+  margin: 1em;
   background: $viewer-text-background;
   color: $viewer-text;
-
-  > pre {
-    width: 100%;
-    max-width: 100%; // Forbid overflow when resizing.
-    margin: 1em; // Necessary for the resize handle to be selectable on qutebrowser.
-    border: none;
-    white-space: pre-wrap;
-    resize: horizontal; // Allow the user to adjust the width of the text view for easier column reading.
-    overflow-x: hidden !important; // Necessary for the resize handle to be shown in Chromium.
-  }
+  white-space: pre-wrap;
+  font-size: 1.5em;
 }
 </style>
-- 
cgit v1.2.3


From ca9cb0d767c6dda5e73290d588d4d21b30adf198 Mon Sep 17 00:00:00 2001
From: Zéro~Informatique
Date: Sun, 26 Mar 2023 19:19:55 +0200
Subject: viewer: removed font-size change

---
 viewer/src/views/item_handlers/PlainTextViewer.vue | 1 -
 1 file changed, 1 deletion(-)

(limited to 'viewer/src/views/item_handlers/PlainTextViewer.vue')

diff --git a/viewer/src/views/item_handlers/PlainTextViewer.vue b/viewer/src/views/item_handlers/PlainTextViewer.vue
index 71b5d15..96c4d4c 100644
--- a/viewer/src/views/item_handlers/PlainTextViewer.vue
+++ b/viewer/src/views/item_handlers/PlainTextViewer.vue
@@ -50,6 +50,5 @@ const { isFinished, data } = useFetch(itemResourceUrl).text();
   background: $viewer-text-background;
   color: $viewer-text;
   white-space: pre-wrap;
-  font-size: 1.5em;
 }
 </style>
-- 
cgit v1.2.3

