chore: bootstrap project scaffold
This commit is contained in:
37
sidebar_window.py
Normal file
37
sidebar_window.py
Normal file
@@ -0,0 +1,37 @@
|
||||
"""GTK sidebar window definitions."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version("Gtk", "4.0")
|
||||
from gi.repository import Gtk # noqa: E402
|
||||
|
||||
|
||||
class SidebarWindow(Gtk.ApplicationWindow):
|
||||
"""Minimal window placeholder to confirm the GTK application starts."""
|
||||
|
||||
def __init__(self, **kwargs) -> None:
|
||||
super().__init__(**kwargs)
|
||||
self.set_default_size(360, 640)
|
||||
self.set_title("Niri AI Sidebar")
|
||||
|
||||
layout = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
|
||||
layout.set_margin_top(24)
|
||||
layout.set_margin_bottom(24)
|
||||
layout.set_margin_start(24)
|
||||
layout.set_margin_end(24)
|
||||
|
||||
title = Gtk.Label(label="AI Sidebar")
|
||||
title.set_halign(Gtk.Align.START)
|
||||
title.get_style_context().add_class("title-1")
|
||||
|
||||
message = Gtk.Label(
|
||||
label="GTK app is running. Replace this view with the chat interface."
|
||||
)
|
||||
message.set_wrap(True)
|
||||
message.set_halign(Gtk.Align.START)
|
||||
|
||||
layout.append(title)
|
||||
layout.append(message)
|
||||
self.set_child(layout)
|
||||
Reference in New Issue
Block a user