Initial sidebar filter work
This commit is contained in:
@@ -45,65 +45,132 @@ Adw.StatusPage hidden_notice_empty {
|
||||
|
||||
template $CartridgesWindow : Adw.ApplicationWindow {
|
||||
title: _("Cartridges");
|
||||
width-request: 281;
|
||||
height-request: 100;
|
||||
|
||||
Adw.Breakpoint {
|
||||
condition ("max-width: 564px")
|
||||
setters {
|
||||
overlay_split_view.collapsed: true;
|
||||
details_view_box.orientation: vertical;
|
||||
details_view_box.margin-top: 12;
|
||||
details_view_box.margin-start: 12;
|
||||
details_view_box.margin-end: 12;
|
||||
details_view_details_box.margin-start: 0;
|
||||
details_view_details_box.margin-end: 0;
|
||||
details_view_title.margin-top: 30;
|
||||
details_view_title.halign: center;
|
||||
details_view_developer.halign: center;
|
||||
details_view_date_box.halign: center;
|
||||
details_view_toolbar.halign: center;
|
||||
details_view_toolbar.orientation: vertical;
|
||||
details_view_play_button.halign: center;
|
||||
details_view_toolbar_buttons.margin-start: 0;
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ToastOverlay toast_overlay {
|
||||
Adw.NavigationView navigation_view {
|
||||
Adw.NavigationPage library_page {
|
||||
title: _("Cartridges");
|
||||
|
||||
Adw.ToolbarView library_view {
|
||||
[top]
|
||||
Adw.HeaderBar header_bar {
|
||||
[start]
|
||||
MenuButton {
|
||||
tooltip-text: _("Add Game");
|
||||
icon-name: "list-add-symbolic";
|
||||
menu-model: add_games;
|
||||
}
|
||||
Adw.OverlaySplitView overlay_split_view {
|
||||
[sidebar]
|
||||
Adw.NavigationPage {
|
||||
title: _("Sources");
|
||||
Adw.ToolbarView {
|
||||
[top]
|
||||
Adw.HeaderBar {
|
||||
[start]
|
||||
Button {
|
||||
icon-name: "sidebar-show-symbolic";
|
||||
action-name: "win.show_sidebar";
|
||||
}
|
||||
}
|
||||
|
||||
[end]
|
||||
MenuButton primary_menu_button {
|
||||
tooltip-text: _("Main Menu");
|
||||
icon-name: "open-menu-symbolic";
|
||||
menu-model: primary_menu;
|
||||
}
|
||||
|
||||
[end]
|
||||
ToggleButton search_button {
|
||||
tooltip-text: _("Search");
|
||||
icon-name: "system-search-symbolic";
|
||||
action-name: "win.toggle_search";
|
||||
}
|
||||
}
|
||||
|
||||
[top]
|
||||
SearchBar search_bar {
|
||||
search-mode-enabled: bind-property search_button.active bidirectional;
|
||||
key-capture-widget: library_view;
|
||||
|
||||
Adw.Clamp {
|
||||
maximum-size: 500;
|
||||
tightening-threshold: 500;
|
||||
|
||||
SearchEntry search_entry {
|
||||
hexpand: true;
|
||||
ListBox {
|
||||
Box {
|
||||
Image {
|
||||
icon-name: "view-grid";
|
||||
margin-start: 3;
|
||||
margin-end: 9;
|
||||
}
|
||||
Label {
|
||||
halign: start;
|
||||
label: _("All");
|
||||
}
|
||||
}
|
||||
styles ["navigation-sidebar"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Overlay library_overlay {
|
||||
ScrolledWindow scrolledwindow {
|
||||
FlowBox library {
|
||||
homogeneous: true;
|
||||
halign: center;
|
||||
valign: start;
|
||||
column-spacing: 12;
|
||||
row-spacing: 12;
|
||||
margin-top: 15;
|
||||
margin-bottom: 15;
|
||||
margin-start: 15;
|
||||
margin-end: 15;
|
||||
selection-mode: none;
|
||||
Adw.ToolbarView library_view {
|
||||
|
||||
[top]
|
||||
Adw.HeaderBar header_bar {
|
||||
|
||||
[start]
|
||||
Revealer {
|
||||
transition-type: slide_right;
|
||||
reveal-child: bind-property overlay_split_view.show-sidebar inverted;
|
||||
Button show_sidebar_button {
|
||||
icon-name: "sidebar-show-symbolic";
|
||||
action-name: "win.show_sidebar";
|
||||
}
|
||||
}
|
||||
|
||||
[start]
|
||||
MenuButton {
|
||||
tooltip-text: _("Add Game");
|
||||
icon-name: "list-add-symbolic";
|
||||
menu-model: add_games;
|
||||
}
|
||||
|
||||
[end]
|
||||
MenuButton primary_menu_button {
|
||||
tooltip-text: _("Main Menu");
|
||||
icon-name: "open-menu-symbolic";
|
||||
menu-model: primary_menu;
|
||||
}
|
||||
|
||||
[end]
|
||||
ToggleButton search_button {
|
||||
tooltip-text: _("Search");
|
||||
icon-name: "system-search-symbolic";
|
||||
action-name: "win.toggle_search";
|
||||
}
|
||||
}
|
||||
|
||||
[top]
|
||||
SearchBar search_bar {
|
||||
search-mode-enabled: bind-property search_button.active bidirectional;
|
||||
key-capture-widget: library_view;
|
||||
|
||||
Adw.Clamp {
|
||||
maximum-size: 500;
|
||||
tightening-threshold: 500;
|
||||
|
||||
SearchEntry search_entry {
|
||||
hexpand: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Overlay library_overlay {
|
||||
ScrolledWindow scrolledwindow {
|
||||
FlowBox library {
|
||||
homogeneous: true;
|
||||
halign: center;
|
||||
valign: start;
|
||||
column-spacing: 12;
|
||||
row-spacing: 12;
|
||||
margin-top: 15;
|
||||
margin-bottom: 15;
|
||||
margin-start: 15;
|
||||
margin-end: 15;
|
||||
selection-mode: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -185,190 +252,163 @@ Adw.NavigationPage details_page {
|
||||
Adw.HeaderBar {
|
||||
}
|
||||
|
||||
Adw.BreakpointBin {
|
||||
hexpand: true;
|
||||
vexpand: true;
|
||||
width-request: 229;
|
||||
height-request: 54;
|
||||
ScrolledWindow {
|
||||
Box details_view_box {
|
||||
halign: center;
|
||||
valign: center;
|
||||
margin-start: 24;
|
||||
margin-end: 24;
|
||||
margin-top: 24;
|
||||
margin-bottom: 24;
|
||||
|
||||
Adw.Breakpoint {
|
||||
condition ("max-width: 564px")
|
||||
setters {
|
||||
details_view_box.orientation: vertical;
|
||||
details_view_box.margin-top: 12;
|
||||
details_view_box.margin-start: 12;
|
||||
details_view_box.margin-end: 12;
|
||||
details_view_details_box.margin-start: 0;
|
||||
details_view_details_box.margin-end: 0;
|
||||
details_view_title.margin-top: 30;
|
||||
details_view_title.halign: center;
|
||||
details_view_developer.halign: center;
|
||||
details_view_date_box.halign: center;
|
||||
details_view_toolbar.halign: center;
|
||||
details_view_toolbar.orientation: vertical;
|
||||
details_view_play_button.halign: center;
|
||||
details_view_toolbar_buttons.margin-start: 0;
|
||||
Adw.Clamp {
|
||||
maximum-size: 200;
|
||||
|
||||
Overlay {
|
||||
[overlay]
|
||||
Spinner details_view_spinner {
|
||||
margin-start: 72;
|
||||
margin-end: 72;
|
||||
}
|
||||
|
||||
Picture details_view_cover {
|
||||
halign: end;
|
||||
valign: start;
|
||||
width-request: 200;
|
||||
height-request: 300;
|
||||
|
||||
styles [
|
||||
"card",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ScrolledWindow {
|
||||
Box details_view_box {
|
||||
halign: center;
|
||||
Box details_view_details_box {
|
||||
orientation: vertical;
|
||||
margin-start: 48;
|
||||
vexpand: true;
|
||||
valign: center;
|
||||
margin-start: 24;
|
||||
margin-end: 24;
|
||||
margin-top: 24;
|
||||
margin-bottom: 24;
|
||||
|
||||
Adw.Clamp {
|
||||
maximum-size: 200;
|
||||
Label details_view_title {
|
||||
label: _("Game Title");
|
||||
hexpand: true;
|
||||
halign: start;
|
||||
max-width-chars: 24;
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
|
||||
Overlay {
|
||||
[overlay]
|
||||
Spinner details_view_spinner {
|
||||
margin-start: 72;
|
||||
margin-end: 72;
|
||||
}
|
||||
styles [
|
||||
"title-1",
|
||||
]
|
||||
}
|
||||
|
||||
Picture details_view_cover {
|
||||
halign: end;
|
||||
valign: start;
|
||||
width-request: 200;
|
||||
height-request: 300;
|
||||
Label details_view_developer {
|
||||
margin-top: 6;
|
||||
hexpand: true;
|
||||
halign: start;
|
||||
max-width-chars: 36;
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
|
||||
styles [
|
||||
"card",
|
||||
]
|
||||
}
|
||||
styles [
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
Box details_view_date_box {
|
||||
orientation: horizontal;
|
||||
margin-top: 15;
|
||||
hexpand: true;
|
||||
halign: start;
|
||||
|
||||
Label details_view_added {
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
justify: center;
|
||||
}
|
||||
|
||||
Label details_view_last_played {
|
||||
margin-start: 12;
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
justify: center;
|
||||
}
|
||||
}
|
||||
|
||||
Box details_view_details_box {
|
||||
orientation: vertical;
|
||||
margin-start: 48;
|
||||
Box details_view_toolbar {
|
||||
hexpand: true;
|
||||
vexpand: true;
|
||||
valign: center;
|
||||
|
||||
Label details_view_title {
|
||||
label: _("Game Title");
|
||||
hexpand: true;
|
||||
Button details_view_play_button {
|
||||
name: "details_view_play_button";
|
||||
action-name: "app.launch_game";
|
||||
label: _("Play");
|
||||
halign: start;
|
||||
max-width-chars: 24;
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"title-1",
|
||||
"opaque",
|
||||
"pill",
|
||||
]
|
||||
}
|
||||
|
||||
Label details_view_developer {
|
||||
margin-top: 6;
|
||||
hexpand: true;
|
||||
Box details_view_toolbar_buttons {
|
||||
halign: start;
|
||||
max-width-chars: 36;
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
|
||||
styles [
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
Box details_view_date_box {
|
||||
orientation: horizontal;
|
||||
margin-top: 15;
|
||||
hexpand: true;
|
||||
halign: start;
|
||||
|
||||
Label details_view_added {
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
justify: center;
|
||||
}
|
||||
|
||||
Label details_view_last_played {
|
||||
margin-start: 12;
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
justify: center;
|
||||
}
|
||||
}
|
||||
|
||||
Box details_view_toolbar {
|
||||
hexpand: true;
|
||||
vexpand: true;
|
||||
valign: center;
|
||||
margin-top: 24;
|
||||
margin-start: 9;
|
||||
|
||||
Button details_view_play_button {
|
||||
name: "details_view_play_button";
|
||||
action-name: "app.launch_game";
|
||||
label: _("Play");
|
||||
halign: start;
|
||||
margin-top: 24;
|
||||
Button {
|
||||
icon-name: "document-edit-symbolic";
|
||||
action-name: "app.edit_game";
|
||||
tooltip-text: _("Edit");
|
||||
|
||||
styles [
|
||||
"opaque",
|
||||
"pill",
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
|
||||
Box details_view_toolbar_buttons {
|
||||
halign: start;
|
||||
valign: center;
|
||||
margin-top: 24;
|
||||
margin-start: 9;
|
||||
|
||||
Button {
|
||||
icon-name: "document-edit-symbolic";
|
||||
action-name: "app.edit_game";
|
||||
tooltip-text: _("Edit");
|
||||
|
||||
styles [
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
|
||||
Button details_view_hide_button {
|
||||
action-name: "app.hide_game";
|
||||
|
||||
styles [
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
|
||||
Button {
|
||||
icon-name: "user-trash-symbolic";
|
||||
action-name: "app.remove_game";
|
||||
tooltip-text: _("Remove");
|
||||
|
||||
styles [
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
|
||||
MenuButton {
|
||||
icon-name: "system-search-symbolic";
|
||||
menu-model: search;
|
||||
tooltip-text: _("Search");
|
||||
|
||||
styles [
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
Button details_view_hide_button {
|
||||
action-name: "app.hide_game";
|
||||
|
||||
styles [
|
||||
"toolbar",
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
|
||||
Button {
|
||||
icon-name: "user-trash-symbolic";
|
||||
action-name: "app.remove_game";
|
||||
tooltip-text: _("Remove");
|
||||
|
||||
styles [
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
|
||||
MenuButton {
|
||||
icon-name: "system-search-symbolic";
|
||||
menu-model: search;
|
||||
tooltip-text: _("Search");
|
||||
|
||||
styles [
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
|
||||
styles [
|
||||
"toolbar",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user