Added auto scroll to bottom

This commit is contained in:
itdominator 2024-09-07 20:46:18 -05:00
parent 63eec6f1af
commit e064dcc98b

View File

@ -5,6 +5,7 @@ import json
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
from gi.repository import GLib
# Application imports
@ -38,7 +39,12 @@ class LogList(Gtk.ListBox):
del frame
del revealer
def scroll_down(self, widget):
GLib.idle_add(self.scroll_down)
self.connect("row-activated", tggl_row_view)
self.connect("size-allocate", scroll_down)
def _subscribe_to_events(self):
...
@ -71,3 +77,7 @@ class LogList(Gtk.ListBox):
def clear(self):
for child in self.get_children():
self.remove(child)
def scroll_down(self):
vadjustment = self.get_parent().get_vadjustment()
vadjustment.set_value( vadjustment.get_upper())