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,55 +9,55 @@ template $Game : Box {
Adw.Clamp {
maximum-size: 200;
Box {
orientation: vertical;
Overlay {
[overlay]
Revealer play_revealer {
transition-type: crossfade;
valign: start;
halign: start;
Overlay {
[overlay]
Revealer play_revealer {
transition-type: crossfade;
Box {
halign: start;
valign: end;
Box {
halign: start;
valign: end;
Button play_button {
icon-name: "media-playback-start-symbolic";
margin-start: 6;
margin-end: 3;
margin-top: 6;
margin-bottom: 3;
Button play_button {
icon-name: "media-playback-start-symbolic";
margin-start: 6;
margin-bottom: 6;
margin-top: 3;
margin-end: 3;
styles [
"circular",
"osd",
]
}
styles [
"circular",
"osd",
]
}
MenuButton menu_button {
icon-name: "view-more-symbolic";
margin-start: 3;
margin-end: 3;
margin-top: 6;
margin-bottom: 3;
MenuButton menu_button {
icon-name: "view-more-symbolic";
margin-start: 3;
margin-bottom: 6;
margin-top: 3;
margin-end: 3;
direction: up;
styles [
"circular",
"osd",
]
}
styles [
"circular",
"osd",
]
}
}
}
Button cover_button {
name: "cover_button";
overflow: hidden;
Button cover_button {
name: "cover_button";
overflow: hidden;
accessibility {
labelled-by: title;
}
accessibility {
labelled-by: title;
}
Box {
orientation: vertical;
Overlay {
[overlay]
@@ -74,29 +74,24 @@ template $Game : Box {
}
}
styles [
"card",
"flat",
]
Label title {
label: _("Title");
ellipsize: end;
hexpand: true;
halign: start;
margin-top: 14;
margin-bottom: 14;
margin-start: 12;
margin-end: 12;
}
}
}
Label title {
label: _("Title");
ellipsize: end;
hexpand: true;
halign: start;
margin-top: 14;
margin-bottom: 14;
margin-start: 12;
margin-end: 12;
styles [
"card",
]
}
}
}
styles [
"card",
]
}
menu game_options {

View File

@@ -9,10 +9,4 @@
color: @light_1;
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;
MenuButton {
icon-name: "system-search-symbolic";
menu-model: search;
tooltip-text: _("Search");
always-show-arrow: true;
}
styles [
"circular",
styles [
"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,25 +442,30 @@ 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";
}
}
}
}