22 lines
557 B
Python
22 lines
557 B
Python
# Copyright 2021 (c) Anna Schumaker.
|
|
from lib import settings
|
|
from gi.repository import Gtk
|
|
import audio
|
|
import playlist
|
|
import sidebar
|
|
|
|
Pane = Gtk.Paned.new(Gtk.Orientation.HORIZONTAL)
|
|
|
|
def initialize():
|
|
settings.initialize("sidebar.width", 200)
|
|
initialize()
|
|
|
|
Pane.set_position(settings.get_int("sidebar.width"))
|
|
Pane.set_start_child(sidebar.Box)
|
|
Pane.set_end_child(playlist.Box)
|
|
Pane.set_vexpand(True)
|
|
|
|
def on_change_position(pane, position):
|
|
settings.set("sidebar.width", pane.get_position())
|
|
Pane.connect("notify::position", on_change_position)
|