UI improvements
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
@define-color accent_color @purple_1;
|
@define-color accent_color @purple_1;
|
||||||
@define-color accent_bg_color @purple_4;
|
@define-color accent_bg_color @purple_4;
|
||||||
|
|
||||||
|
#details_view {
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
|
|
||||||
#details_view_play_button {
|
#details_view_play_button {
|
||||||
color: @dark_5;
|
color: @dark_5;
|
||||||
background-color: @light_1;
|
background-color: @light_1;
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
@define-color accent_color @purple_5;
|
@define-color accent_color @purple_5;
|
||||||
@define-color accent_bg_color @purple_3;
|
@define-color accent_bg_color @purple_3;
|
||||||
|
|
||||||
|
#details_view {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
#details_view_play_button {
|
#details_view_play_button {
|
||||||
color: @light_1;
|
color: @light_1;
|
||||||
background-color: @dark_5;
|
background-color: @dark_5;
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ template CartridgesWindow : Adw.ApplicationWindow {
|
|||||||
transition-type: over_left;
|
transition-type: over_left;
|
||||||
|
|
||||||
Overlay details_view {
|
Overlay details_view {
|
||||||
|
name: "details_view";
|
||||||
|
|
||||||
[overlay]
|
[overlay]
|
||||||
Box details_view_box {
|
Box details_view_box {
|
||||||
orientation: vertical;
|
orientation: vertical;
|
||||||
@@ -100,6 +102,7 @@ template CartridgesWindow : Adw.ApplicationWindow {
|
|||||||
label: _("Game Title");
|
label: _("Game Title");
|
||||||
hexpand: true;
|
hexpand: true;
|
||||||
halign: start;
|
halign: start;
|
||||||
|
max-width-chars: 24;
|
||||||
wrap: true;
|
wrap: true;
|
||||||
wrap-mode: word_char;
|
wrap-mode: word_char;
|
||||||
natural-wrap-mode: word;
|
natural-wrap-mode: word;
|
||||||
@@ -113,6 +116,7 @@ template CartridgesWindow : Adw.ApplicationWindow {
|
|||||||
margin-top: 3;
|
margin-top: 3;
|
||||||
hexpand: true;
|
hexpand: true;
|
||||||
halign: start;
|
halign: start;
|
||||||
|
max-width-chars: 36;
|
||||||
wrap: true;
|
wrap: true;
|
||||||
wrap-mode: word_char;
|
wrap-mode: word_char;
|
||||||
natural-wrap-mode: word;
|
natural-wrap-mode: word;
|
||||||
@@ -214,15 +218,8 @@ template CartridgesWindow : Adw.ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
styles [
|
|
||||||
"background",
|
|
||||||
]
|
|
||||||
|
|
||||||
Picture details_view_blurred_cover {
|
Picture details_view_blurred_cover {
|
||||||
can-shrink: true;
|
|
||||||
keep-aspect-ratio: false;
|
keep-aspect-ratio: false;
|
||||||
hexpand: true;
|
|
||||||
vexpand: true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ class CartridgesWindow(Adw.ApplicationWindow):
|
|||||||
style_manager.get_high_contrast()
|
style_manager.get_high_contrast()
|
||||||
or not style_manager.get_system_supports_color_schemes()
|
or not style_manager.get_system_supports_color_schemes()
|
||||||
):
|
):
|
||||||
self.details_view_blurred_cover.set_opacity(0.2)
|
self.details_view_blurred_cover.set_opacity(0.3)
|
||||||
return
|
return
|
||||||
|
|
||||||
pixels = self.scaled_pixbuf.get_pixels()
|
pixels = self.scaled_pixbuf.get_pixels()
|
||||||
@@ -356,7 +356,7 @@ class CartridgesWindow(Adw.ApplicationWindow):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.details_view_blurred_cover.set_opacity(
|
self.details_view_blurred_cover.set_opacity(
|
||||||
0.1 + (sum(luminances) / len(luminances) + min(luminances)) / 2
|
0.2 + (sum(luminances) / len(luminances) + min(luminances)) / 2
|
||||||
)
|
)
|
||||||
|
|
||||||
def a_z_sort(self, child1, child2):
|
def a_z_sort(self, child1, child2):
|
||||||
|
|||||||
Reference in New Issue
Block a user