Initial port to Libadwaita 1.4
This commit is contained in:
@@ -47,323 +47,314 @@ template $CartridgesWindow : Adw.ApplicationWindow {
|
||||
title: _("Cartridges");
|
||||
|
||||
Adw.ToastOverlay toast_overlay {
|
||||
Stack stack {
|
||||
visible-child: library_view;
|
||||
transition-type: over_left;
|
||||
Adw.NavigationView navigation_view {
|
||||
Adw.NavigationPage library_page {
|
||||
title: _("Cartridges");
|
||||
|
||||
Overlay details_view {
|
||||
name: "details_view";
|
||||
Adw.ToolbarView library_view {
|
||||
[top]
|
||||
Adw.HeaderBar header_bar {
|
||||
[start]
|
||||
MenuButton {
|
||||
tooltip-text: _("Add Game");
|
||||
icon-name: "list-add-symbolic";
|
||||
menu-model: add_games;
|
||||
}
|
||||
|
||||
[overlay]
|
||||
Box details_view_box {
|
||||
orientation: vertical;
|
||||
[end]
|
||||
MenuButton primary_menu_button {
|
||||
tooltip-text: _("Main Menu");
|
||||
icon-name: "open-menu-symbolic";
|
||||
menu-model: primary_menu;
|
||||
}
|
||||
|
||||
Adw.HeaderBar {
|
||||
[start]
|
||||
Button back_button {
|
||||
tooltip-text: _("Back");
|
||||
action-name: "win.go_back";
|
||||
icon-name: "go-previous-symbolic";
|
||||
[end]
|
||||
ToggleButton search_button {
|
||||
tooltip-text: _("Search");
|
||||
icon-name: "system-search-symbolic";
|
||||
action-name: "win.toggle_search";
|
||||
}
|
||||
}
|
||||
|
||||
[title]
|
||||
Adw.WindowTitle details_view_header_bar_title {
|
||||
title: _("Game Details");
|
||||
}
|
||||
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
|
||||
Adw.Bin {
|
||||
hexpand: true;
|
||||
vexpand: true;
|
||||
|
||||
Box {
|
||||
halign: center;
|
||||
valign: center;
|
||||
margin-start: 24;
|
||||
margin-end: 24;
|
||||
margin-top: 24;
|
||||
margin-bottom: 24;
|
||||
[top]
|
||||
SearchBar search_bar {
|
||||
search-mode-enabled: bind-property search_button.active bidirectional;
|
||||
key-capture-widget: library_view;
|
||||
|
||||
Adw.Clamp {
|
||||
maximum-size: 200;
|
||||
maximum-size: 500;
|
||||
tightening-threshold: 500;
|
||||
|
||||
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",
|
||||
]
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.NavigationPage hidden_library_page {
|
||||
title: _("Hidden Games");
|
||||
|
||||
Adw.ToolbarView hidden_library_view {
|
||||
[top]
|
||||
Adw.HeaderBar hidden_header_bar {
|
||||
[end]
|
||||
MenuButton hidden_primary_menu_button {
|
||||
tooltip-text: _("Main Menu");
|
||||
icon-name: "open-menu-symbolic";
|
||||
menu-model: primary_menu;
|
||||
}
|
||||
|
||||
[end]
|
||||
ToggleButton hidden_search_button {
|
||||
tooltip-text: _("Search");
|
||||
icon-name: "system-search-symbolic";
|
||||
action-name: "win.toggle_search";
|
||||
}
|
||||
}
|
||||
|
||||
[top]
|
||||
SearchBar hidden_search_bar {
|
||||
search-mode-enabled: bind-property hidden_search_button.active bidirectional;
|
||||
key-capture-widget: hidden_library_view;
|
||||
|
||||
Adw.Clamp {
|
||||
maximum-size: 500;
|
||||
tightening-threshold: 500;
|
||||
|
||||
SearchEntry hidden_search_entry {
|
||||
hexpand: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Overlay hidden_library_overlay {
|
||||
ScrolledWindow hidden_scrolledwindow {
|
||||
FlowBox hidden_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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
styles [
|
||||
"background",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Adw.NavigationPage details_page {
|
||||
title: _("Game Details");
|
||||
|
||||
Overlay details_view {
|
||||
name: "details_view";
|
||||
|
||||
[overlay]
|
||||
Box details_view_box {
|
||||
orientation: vertical;
|
||||
|
||||
Adw.HeaderBar {
|
||||
styles [
|
||||
"flat",
|
||||
]
|
||||
}
|
||||
|
||||
Adw.Bin {
|
||||
hexpand: true;
|
||||
vexpand: true;
|
||||
|
||||
Box {
|
||||
halign: center;
|
||||
valign: center;
|
||||
margin-start: 24;
|
||||
margin-end: 24;
|
||||
margin-top: 24;
|
||||
margin-bottom: 24;
|
||||
|
||||
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",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Box {
|
||||
orientation: vertical;
|
||||
margin-start: 48;
|
||||
vexpand: true;
|
||||
valign: center;
|
||||
|
||||
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;
|
||||
|
||||
styles [
|
||||
"title-1",
|
||||
]
|
||||
}
|
||||
|
||||
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 [
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
Box {
|
||||
orientation: horizontal;
|
||||
margin-top: 15;
|
||||
hexpand: true;
|
||||
halign: start;
|
||||
|
||||
Label details_view_added {
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
}
|
||||
|
||||
Label details_view_last_played {
|
||||
margin-start: 12;
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
}
|
||||
}
|
||||
|
||||
Box {
|
||||
hexpand: true;
|
||||
vexpand: true;
|
||||
valign: center;
|
||||
|
||||
Button details_view_play_button {
|
||||
name: "details_view_play_button";
|
||||
action-name: "app.launch_game";
|
||||
label: _("Play");
|
||||
halign: start;
|
||||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"opaque",
|
||||
"pill",
|
||||
]
|
||||
}
|
||||
|
||||
Box {
|
||||
orientation: vertical;
|
||||
margin-start: 48;
|
||||
vexpand: true;
|
||||
halign: start;
|
||||
valign: center;
|
||||
margin-top: 24;
|
||||
margin-start: 9;
|
||||
|
||||
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;
|
||||
Button {
|
||||
icon-name: "document-edit-symbolic";
|
||||
action-name: "app.edit_game";
|
||||
tooltip-text: _("Edit");
|
||||
|
||||
styles [
|
||||
"title-1",
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
|
||||
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;
|
||||
Button details_view_hide_button {
|
||||
action-name: "app.hide_game";
|
||||
|
||||
styles [
|
||||
"heading",
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
|
||||
Box {
|
||||
orientation: horizontal;
|
||||
margin-top: 15;
|
||||
hexpand: true;
|
||||
halign: start;
|
||||
Button {
|
||||
icon-name: "user-trash-symbolic";
|
||||
action-name: "app.remove_game";
|
||||
tooltip-text: _("Remove");
|
||||
|
||||
Label details_view_added {
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
}
|
||||
|
||||
Label details_view_last_played {
|
||||
margin-start: 12;
|
||||
wrap: true;
|
||||
wrap-mode: word_char;
|
||||
natural-wrap-mode: word;
|
||||
}
|
||||
styles [
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
|
||||
Box {
|
||||
hexpand: true;
|
||||
vexpand: true;
|
||||
valign: center;
|
||||
MenuButton {
|
||||
icon-name: "system-search-symbolic";
|
||||
menu-model: search;
|
||||
tooltip-text: _("Search");
|
||||
|
||||
Button details_view_play_button {
|
||||
name: "details_view_play_button";
|
||||
action-name: "app.launch_game";
|
||||
label: _("Play");
|
||||
halign: start;
|
||||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"opaque",
|
||||
"pill",
|
||||
]
|
||||
}
|
||||
|
||||
Box {
|
||||
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"]
|
||||
}
|
||||
|
||||
styles [
|
||||
"toolbar",
|
||||
]
|
||||
}
|
||||
styles [
|
||||
"raised",
|
||||
"circular",
|
||||
]
|
||||
}
|
||||
|
||||
styles [
|
||||
"toolbar",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Picture details_view_blurred_cover {
|
||||
keep-aspect-ratio: false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Box library_view {
|
||||
orientation: vertical;
|
||||
|
||||
Adw.HeaderBar header_bar {
|
||||
[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";
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.Bin library_bin {
|
||||
ScrolledWindow scrolledwindow {
|
||||
hexpand: true;
|
||||
vexpand: true;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Box hidden_library_view {
|
||||
orientation: vertical;
|
||||
|
||||
Adw.HeaderBar hidden_header_bar {
|
||||
[start]
|
||||
Button hidden_back_button {
|
||||
tooltip-text: _("Back");
|
||||
action-name: "win.go_back";
|
||||
icon-name: "go-previous-symbolic";
|
||||
}
|
||||
|
||||
[title]
|
||||
Adw.WindowTitle {
|
||||
title: _("Hidden Games");
|
||||
}
|
||||
|
||||
[end]
|
||||
MenuButton hidden_primary_menu_button {
|
||||
tooltip-text: _("Main Menu");
|
||||
icon-name: "open-menu-symbolic";
|
||||
menu-model: primary_menu;
|
||||
}
|
||||
|
||||
[end]
|
||||
ToggleButton hidden_search_button {
|
||||
tooltip-text: _("Search");
|
||||
icon-name: "system-search-symbolic";
|
||||
action-name: "win.toggle_search";
|
||||
}
|
||||
}
|
||||
|
||||
SearchBar hidden_search_bar {
|
||||
search-mode-enabled: bind-property hidden_search_button.active bidirectional;
|
||||
key-capture-widget: hidden_library_view;
|
||||
|
||||
Adw.Clamp {
|
||||
maximum-size: 500;
|
||||
tightening-threshold: 500;
|
||||
|
||||
SearchEntry hidden_search_entry {
|
||||
hexpand: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.Bin hidden_library_bin {
|
||||
ScrolledWindow hidden_scrolledwindow {
|
||||
hexpand: true;
|
||||
vexpand: true;
|
||||
|
||||
FlowBox hidden_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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
styles [
|
||||
"background",
|
||||
]
|
||||
}
|
||||
Picture details_view_blurred_cover {
|
||||
keep-aspect-ratio: false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<default>1110</default>
|
||||
</key>
|
||||
<key name="height" type="i">
|
||||
<default>820</default>
|
||||
<default>795</default>
|
||||
</key>
|
||||
<key name="is-maximized" type="b">
|
||||
<default>false</default>
|
||||
|
||||
Reference in New Issue
Block a user