From 12af2dc63b1747328460839b39847db7e3d07d7b Mon Sep 17 00:00:00 2001
From: SomberNight <somber.night@protonmail.com>
Date: Tue, 19 Jun 2018 14:19:36 +0200
Subject: [PATCH] kivy history tab: allow scrolling with bar

follow kivy/kivy@0edae84139113c4f1b02c4c65164a1156f0d343f
---
 gui/kivy/data/style.kv             | 12 ++++++++----
 gui/kivy/uix/ui_screens/history.kv |  2 ++
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gui/kivy/data/style.kv b/gui/kivy/data/style.kv
index 927e5059b..1bbc60093 100644
--- a/gui/kivy/data/style.kv
+++ b/gui/kivy/data/style.kv
@@ -691,17 +691,21 @@
 
 
 <ScrollView>:
+    _handle_y_pos: (self.right - self.bar_width - self.bar_margin) if self.bar_pos_y == 'right' else (self.x + self.bar_margin), self.y + self.height * self.vbar[0]
+    _handle_y_size: min(self.bar_width, self.width), self.height * self.vbar[1]
+    _handle_x_pos: self.x + self.width * self.hbar[0], (self.y + self.bar_margin) if self.bar_pos_x == 'bottom' else (self.top - self.bar_margin - self.bar_width)
+    _handle_x_size: self.width * self.hbar[1], min(self.bar_width, self.height)
     canvas.after:
         Color:
             rgba: self._bar_color if (self.do_scroll_y and self.viewport_size[1] > self.height) else [0, 0, 0, 0]
         Rectangle:
-            pos: (self.right - self.bar_width - self.bar_margin) if self.bar_pos_y == 'right' else (self.x + self.bar_margin), self.y + self.height * self.vbar[0]
-            size: min(self.bar_width, self.width), self.height * self.vbar[1]
+            pos: root._handle_y_pos or (0, 0)
+            size: root._handle_y_size or (0, 0)
         Color:
             rgba: self._bar_color if (self.do_scroll_x and self.viewport_size[0] > self.width) else [0, 0, 0, 0]
         Rectangle:
-            pos: self.x + self.width * self.hbar[0], (self.y + self.bar_margin) if self.bar_pos_x == 'bottom' else (self.top - self.bar_margin - self.bar_width)
-            size: self.width * self.hbar[1], min(self.bar_width, self.height)
+            pos: root._handle_x_pos or (0, 0)
+            size: root._handle_x_size or (0, 0)
 
 
 <CheckBox>:
diff --git a/gui/kivy/uix/ui_screens/history.kv b/gui/kivy/uix/ui_screens/history.kv
index 3b4540803..1112f0e16 100644
--- a/gui/kivy/uix/ui_screens/history.kv
+++ b/gui/kivy/uix/ui_screens/history.kv
@@ -68,6 +68,8 @@ HistoryScreen:
             id: content
             do_scroll_x: False
             size_hint: 1, 0.75
+            scroll_type: ['bars', 'content']
+            bar_width: 15
             GridLayout
                 id: history_container
                 cols: 1