Don't horizontally scroll sidebar

This commit is contained in:
kramo
2024-07-08 15:49:31 +02:00
parent 8504689426
commit c1226197f8
2 changed files with 9 additions and 1 deletions

View File

@@ -19,7 +19,7 @@
from typing import Any, Optional from typing import Any, Optional
from gi.repository import Adw, Gio, GLib, Gtk from gi.repository import Adw, Gio, GLib, Gtk, Pango
from cartridges import shared from cartridges import shared
from cartridges.game import Game from cartridges.game import Game
@@ -152,6 +152,8 @@ class CartridgesWindow(Adw.ApplicationWindow):
Gtk.Label( Gtk.Label(
label=self.get_application().get_source_name(source_id), label=self.get_application().get_source_name(source_id),
halign=Gtk.Align.START, halign=Gtk.Align.START,
wrap=True,
wrap_mode=Pango.WrapMode.CHAR,
) )
) )

View File

@@ -94,6 +94,8 @@ template $CartridgesWindow: Adw.ApplicationWindow {
} }
ScrolledWindow { ScrolledWindow {
hscrollbar-policy: never;
ListBox sidebar { ListBox sidebar {
Box all_games_row_box { Box all_games_row_box {
margin-top: 12; margin-top: 12;
@@ -109,6 +111,8 @@ template $CartridgesWindow: Adw.ApplicationWindow {
Label { Label {
halign: start; halign: start;
label: _("All Games"); label: _("All Games");
wrap: true;
wrap-mode: char;
} }
Label all_games_no_label { Label all_games_no_label {
@@ -135,6 +139,8 @@ template $CartridgesWindow: Adw.ApplicationWindow {
halign: start; halign: start;
label: _("Added"); label: _("Added");
margin-end: 6; margin-end: 6;
wrap: true;
wrap-mode: char;
} }
Label added_games_no_label { Label added_games_no_label {