Skip to content

Commit

Permalink
Fix some woes with color
Browse files Browse the repository at this point in the history
  • Loading branch information
lainsce committed Aug 13, 2024
1 parent e27ce94 commit 2b14074
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-gtk-icon-size: 24px;
background: @success_container_fg_color;
color: @success_container_bg_color;
box-shadow: 0 0 0 1px @success_container_bg_color;
box-shadow: 0 0 0 2px @success_container_bg_color;
}
.play-button:hover {
background: mix(@success_container_fg_color, @view_fg_color, 0.05);
Expand Down
2 changes: 1 addition & 1 deletion src/application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ namespace Victrola {
protected override void startup () {
Gdk.RGBA accent_color = { 0 };
accent_color.parse ("#F7812B");
default_accent_color = He.from_gdk_rgba (accent_color);
default_accent_color = { accent_color.red * 255, accent_color.green * 255, accent_color.blue * 255 };
override_accent_color = true;
default_scheme_variant = He.SchemeVariant.CONTENT;

Expand Down
5 changes: 2 additions & 3 deletions src/window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -442,16 +442,15 @@ namespace Victrola {
He.Ensor.accent_from_pixels_async.begin (pixbuf.get_pixels_with_length (), pixbuf.get_has_alpha (), (obj, res) => {
GLib.Array<int?> result = He.Ensor.accent_from_pixels_async.end (res);
int top = result.index (0);
print ("FIRST VICTROLA ARGB RESULT (should be the same as Ensor's): %d\n".printf (top));

if (top != 0) {
Gdk.RGBA accent_color = { 0 };
accent_color.parse (He.hexcode_argb (top));
app.default_accent_color = He.from_gdk_rgba (accent_color);
app.default_accent_color = { accent_color.red * 255, accent_color.green * 255, accent_color.blue * 255 };
} else {
Gdk.RGBA accent_color = { 0 };
accent_color.parse ("#F7812B");
app.default_accent_color = He.from_gdk_rgba (accent_color);
app.default_accent_color = { accent_color.red * 255, accent_color.green * 255, accent_color.blue * 255 };
}
loop.quit ();
});
Expand Down

0 comments on commit 2b14074

Please sign in to comment.