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 {
valign: center;
icon-name: "help-about-symbolic";
accessibility {
label: _("Info");
}
tooltip-text: _("More Info");
popover: Popover {
visible: bind-property exec_info_button.active bidirectional;

View File

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

View File

@@ -10,9 +10,3 @@
background-color: @dark_5;
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 {
maximum-size: 200;
Overlay {
[overlay]
Spinner details_view_spinner {
@@ -141,7 +142,7 @@ template $CartridgesWindow : Adw.ApplicationWindow {
natural-wrap-mode: word;
styles [
"heading"
"heading",
]
}
@@ -156,6 +157,7 @@ template $CartridgesWindow : Adw.ApplicationWindow {
wrap-mode: word_char;
natural-wrap-mode: word;
}
Label details_view_last_played {
margin-start: 12;
wrap: true;
@@ -163,6 +165,7 @@ template $CartridgesWindow : Adw.ApplicationWindow {
natural-wrap-mode: word;
}
}
Box {
hexpand: true;
vexpand: true;
@@ -191,44 +194,27 @@ template $CartridgesWindow : Adw.ApplicationWindow {
icon-name: "document-edit-symbolic";
action-name: "app.edit_game";
tooltip-text: _("Edit");
styles [
"circular",
]
}
Button details_view_hide_button {
action-name: "app.hide_game";
styles [
"circular",
]
}
Button {
icon-name: "user-trash-symbolic";
action-name: "app.remove_game";
tooltip-text: _("Remove");
styles [
"circular",
]
}
styles [
"linked",
]
}
MenuButton {
halign: start;
valign: center;
margin-top: 24;
margin-start: 12;
icon-name: "system-search-symbolic";
menu-model: search;
tooltip-text: _("Search");
always-show-arrow: true;
}
styles [
"circular",
"toolbar",
]
}
}
@@ -271,6 +257,7 @@ template $CartridgesWindow : Adw.ApplicationWindow {
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;
@@ -336,6 +323,7 @@ template $CartridgesWindow : Adw.ApplicationWindow {
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;
@@ -442,6 +430,7 @@ menu add_games {
action: "app.add_game";
}
}
section {
item {
label: _("Import");
@@ -453,22 +442,27 @@ menu add_games {
menu search {
section {
label: "Search on…";
item {
label: "IGDB";
action: "app.igdb_search";
}
item {
label: "SteamGridDB";
action: "app.sgdb_search";
}
item {
label: "ProtonDB";
action: "app.protondb_search";
}
item {
label: "Lutris";
action: "app.lutris_search";
}
item {
label: "HowLongToBeat";
action: "app.hltb_search";