GTK cleanups

This commit is contained in:
kramo
2023-05-22 20:25:06 +02:00
parent d6a2108e42
commit 292e1f8f97
4 changed files with 73 additions and 93 deletions

View File

@@ -127,10 +127,7 @@ template $DetailsWindow : Adw.Window {
Gtk.MenuButton exec_info_button { Gtk.MenuButton exec_info_button {
valign: center; valign: center;
icon-name: "help-about-symbolic"; icon-name: "help-about-symbolic";
tooltip-text: _("More Info");
accessibility {
label: _("Info");
}
popover: Popover { popover: Popover {
visible: bind-property exec_info_button.active bidirectional; visible: bind-property exec_info_button.active bidirectional;

View File

@@ -9,14 +9,12 @@ template $Game : Box {
Adw.Clamp { Adw.Clamp {
maximum-size: 200; maximum-size: 200;
Box {
orientation: vertical;
Overlay { Overlay {
[overlay] [overlay]
Revealer play_revealer { Revealer play_revealer {
transition-type: crossfade; transition-type: crossfade;
valign: end; valign: start;
halign: start;
Box { Box {
halign: start; halign: start;
@@ -25,9 +23,9 @@ template $Game : Box {
Button play_button { Button play_button {
icon-name: "media-playback-start-symbolic"; icon-name: "media-playback-start-symbolic";
margin-start: 6; margin-start: 6;
margin-bottom: 6;
margin-top: 3;
margin-end: 3; margin-end: 3;
margin-top: 6;
margin-bottom: 3;
styles [ styles [
"circular", "circular",
@@ -38,10 +36,9 @@ template $Game : Box {
MenuButton menu_button { MenuButton menu_button {
icon-name: "view-more-symbolic"; icon-name: "view-more-symbolic";
margin-start: 3; margin-start: 3;
margin-bottom: 6;
margin-top: 3;
margin-end: 3; margin-end: 3;
direction: up; margin-top: 6;
margin-bottom: 3;
styles [ styles [
"circular", "circular",
@@ -59,6 +56,9 @@ template $Game : Box {
labelled-by: title; labelled-by: title;
} }
Box {
orientation: vertical;
Overlay { Overlay {
[overlay] [overlay]
Spinner spinner { Spinner spinner {
@@ -74,13 +74,6 @@ template $Game : Box {
} }
} }
styles [
"card",
"flat",
]
}
}
Label title { Label title {
label: _("Title"); label: _("Title");
ellipsize: end; ellipsize: end;
@@ -92,12 +85,14 @@ template $Game : Box {
margin-end: 12; margin-end: 12;
} }
} }
}
styles [ styles [
"card", "card",
] ]
} }
}
}
}
menu game_options { menu game_options {
section { section {

View File

@@ -10,9 +10,3 @@
background-color: @dark_5; background-color: @dark_5;
opacity: 0.8; opacity: 0.8;
} }
/* The HIG claims another victim... */
#cover_button {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}

View File

@@ -91,6 +91,7 @@ template $CartridgesWindow : Adw.ApplicationWindow {
Adw.Clamp { Adw.Clamp {
maximum-size: 200; maximum-size: 200;
Overlay { Overlay {
[overlay] [overlay]
Spinner details_view_spinner { Spinner details_view_spinner {
@@ -141,7 +142,7 @@ template $CartridgesWindow : Adw.ApplicationWindow {
natural-wrap-mode: word; natural-wrap-mode: word;
styles [ styles [
"heading" "heading",
] ]
} }
@@ -156,6 +157,7 @@ template $CartridgesWindow : Adw.ApplicationWindow {
wrap-mode: word_char; wrap-mode: word_char;
natural-wrap-mode: word; natural-wrap-mode: word;
} }
Label details_view_last_played { Label details_view_last_played {
margin-start: 12; margin-start: 12;
wrap: true; wrap: true;
@@ -163,6 +165,7 @@ template $CartridgesWindow : Adw.ApplicationWindow {
natural-wrap-mode: word; natural-wrap-mode: word;
} }
} }
Box { Box {
hexpand: true; hexpand: true;
vexpand: true; vexpand: true;
@@ -191,44 +194,27 @@ template $CartridgesWindow : Adw.ApplicationWindow {
icon-name: "document-edit-symbolic"; icon-name: "document-edit-symbolic";
action-name: "app.edit_game"; action-name: "app.edit_game";
tooltip-text: _("Edit"); tooltip-text: _("Edit");
styles [
"circular",
]
} }
Button details_view_hide_button { Button details_view_hide_button {
action-name: "app.hide_game"; action-name: "app.hide_game";
styles [
"circular",
]
} }
Button { Button {
icon-name: "user-trash-symbolic"; icon-name: "user-trash-symbolic";
action-name: "app.remove_game"; action-name: "app.remove_game";
tooltip-text: _("Remove"); tooltip-text: _("Remove");
styles [
"circular",
]
}
styles [
"linked",
]
} }
MenuButton { MenuButton {
halign: start;
valign: center;
margin-top: 24;
margin-start: 12;
icon-name: "system-search-symbolic"; icon-name: "system-search-symbolic";
menu-model: search; menu-model: search;
tooltip-text: _("Search"); tooltip-text: _("Search");
always-show-arrow: true;
}
styles [ styles [
"circular", "toolbar",
] ]
} }
} }
@@ -271,6 +257,7 @@ template $CartridgesWindow : Adw.ApplicationWindow {
SearchBar search_bar { SearchBar search_bar {
search-mode-enabled: bind-property search_button.active bidirectional; search-mode-enabled: bind-property search_button.active bidirectional;
key-capture-widget: library_view; key-capture-widget: library_view;
Adw.Clamp { Adw.Clamp {
maximum-size: 500; maximum-size: 500;
tightening-threshold: 500; tightening-threshold: 500;
@@ -336,6 +323,7 @@ template $CartridgesWindow : Adw.ApplicationWindow {
SearchBar hidden_search_bar { SearchBar hidden_search_bar {
search-mode-enabled: bind-property hidden_search_button.active bidirectional; search-mode-enabled: bind-property hidden_search_button.active bidirectional;
key-capture-widget: hidden_library_view; key-capture-widget: hidden_library_view;
Adw.Clamp { Adw.Clamp {
maximum-size: 500; maximum-size: 500;
tightening-threshold: 500; tightening-threshold: 500;
@@ -442,6 +430,7 @@ menu add_games {
action: "app.add_game"; action: "app.add_game";
} }
} }
section { section {
item { item {
label: _("Import"); label: _("Import");
@@ -453,22 +442,27 @@ menu add_games {
menu search { menu search {
section { section {
label: "Search on…"; label: "Search on…";
item { item {
label: "IGDB"; label: "IGDB";
action: "app.igdb_search"; action: "app.igdb_search";
} }
item { item {
label: "SteamGridDB"; label: "SteamGridDB";
action: "app.sgdb_search"; action: "app.sgdb_search";
} }
item { item {
label: "ProtonDB"; label: "ProtonDB";
action: "app.protondb_search"; action: "app.protondb_search";
} }
item { item {
label: "Lutris"; label: "Lutris";
action: "app.lutris_search"; action: "app.lutris_search";
} }
item { item {
label: "HowLongToBeat"; label: "HowLongToBeat";
action: "app.hltb_search"; action: "app.hltb_search";