Beautify x2

Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
Vasiliy Doylov 2025-07-10 07:25:01 +03:00
parent 3368efc950
commit 2efd467a2d
3 changed files with 13 additions and 6 deletions

View file

@ -25,6 +25,8 @@ template $ExtensionPlayer: Box {
Label title {
label: "Cool title";
single-line-mode: true;
ellipsize: end;
visible: true;
styles [
@ -34,6 +36,8 @@ template $ExtensionPlayer: Box {
Label artist {
label: "Cool artist";
single-line-mode: true;
ellipsize: end;
visible: true;
}
@ -71,7 +75,7 @@ template $ExtensionPlayer: Box {
halign: center;
visible: true;
icon-name: "media-playback-pause-symbolic";
pixel-size: 40;
pixel-size: 30;
}
}

View file

@ -127,7 +127,8 @@ public class Extension.Player : Gtk.Box {
} else {
return icon;
}
pixbuff = pixbuff.scale_simple (120, 120, Gdk.InterpType.BILINEAR);
pixbuff = pixbuff.scale_simple (110, 110, Gdk.InterpType.BILINEAR);
quanitize.begin (pixbuff);
var radius = 10;
var width = pixbuff.width;
var height = pixbuff.height;
@ -136,10 +137,10 @@ public class Extension.Player : Gtk.Box {
var cr = new Cairo.Context (surface);
{ // That's a hack for GTK3. TODO: Remove when phosh will be moved to gtk4
cr.new_path ();
radius = 0; // Don't cut that edges;
radius = 10; // Don't cut that edges;
cr.arc (width - radius, radius, radius, deg (-90), deg (0));
cr.arc (width - radius, height - radius, radius, deg (0), deg (90));
radius = 10;
// radius = 60;
cr.arc (radius, height - radius, radius, deg (90), deg (180));
cr.arc (radius, radius, radius, deg (180), deg (270));
@ -152,7 +153,6 @@ public class Extension.Player : Gtk.Box {
pixbuff = Gdk.pixbuf_get_from_surface (surface, 0, 0, width, height);
image.gicon = pixbuff;
quanitize.begin (pixbuff);
return pixbuff;
}

View file

@ -6,7 +6,7 @@
.nekoplayer-controls button {
background: none;
border-radius: 999px;
padding: 10px;
padding: 5px;
}
.nekoplayer-controls button:hover {
background-color: rgba(0, 0, 0, 0.1);
@ -18,3 +18,6 @@
font-weight: bold;
font-size: 120%;
}
.nekoplayer image {
padding: 10px;
}