Skip to content

Commit

Permalink
Fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Dec 1, 2024
1 parent 9ee62a6 commit bb8f2f0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 252 deletions.
15 changes: 7 additions & 8 deletions data/application.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
decoration,
window,
.titlebar {
background: transparent;
Expand All @@ -18,19 +17,19 @@ window,
@BLACK_500
);
box-shadow:
inset 0 0 0 1px alpha (#fff, 0.02),
inset 0 1px 0 0 alpha (#fff, 0.07),
inset 0 -1px 0 0 alpha (#fff, 0.01),
0 0 0 1px alpha (#000, 0.7),
0 1px 2px alpha (#000, 0.16),
0 2px 3px alpha (#000, 0.23);
inset 0 0 0 1px alpha(#fff, 0.02),
inset 0 1px 0 0 alpha(#fff, 0.07),
inset 0 -1px 0 0 alpha(#fff, 0.01),
0 0 0 1px alpha(#000, 0.7),
0 1px 2px alpha(#000, 0.16),
0 2px 3px alpha(#000, 0.23);
margin: 3px;
-gtk-icon-size: 24px;
}

.close image {
color: #fff;
-gtk-icon-shadow: 0 1px 1px alpha (#000, 0.6);
-gtk-icon-shadow: 0 1px 1px alpha(#000, 0.6);
}

.notification stack > grid {
Expand Down
235 changes: 0 additions & 235 deletions data/image-mask.svg

This file was deleted.

3 changes: 1 addition & 2 deletions data/notifications.gresource.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/io/elementary/notifications">
<file alias="application.css" compressed="true">application.css</file>
<file alias="image-mask.svg" compressed="true">image-mask.svg</file>
<file alias="Application.css" compressed="true">application.css</file>
</gresource>
</gresources>
5 changes: 3 additions & 2 deletions src/AbstractBubble.vala
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public class Notifications.AbstractBubble : Gtk.Window {
transition_type = Gtk.RevealerTransitionType.CROSSFADE,
halign = Gtk.Align.START,
valign = Gtk.Align.START,
child = close_button
child = close_button,
overflow = VISIBLE
};

var overlay = new Gtk.Overlay () {
Expand Down Expand Up @@ -122,7 +123,7 @@ public class Notifications.AbstractBubble : Gtk.Window {
timeout_id = 0;
}

show ();
base.present ();

if (timeout != 0) {
timeout_id = Timeout.add (timeout, timeout_expired);
Expand Down
6 changes: 1 addition & 5 deletions src/Widgets/MaskedImage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
*/

public class Notifications.MaskedImage : Gtk.Overlay {
public class Notifications.MaskedImage : Granite.Bin {
private const int ICON_SIZE = 48;

public Gdk.Pixbuf pixbuf { get; construct; }
Expand All @@ -28,15 +28,11 @@ public class Notifications.MaskedImage : Gtk.Overlay {
}

construct {
var mask = new Gtk.Image.from_resource ("/io/elementary/notifications/image-mask.svg");
mask.pixel_size = ICON_SIZE;

var image = new Gtk.Image ();
image.gicon = mask_pixbuf (pixbuf, scale_factor);
image.pixel_size = ICON_SIZE;

child = image;
add_overlay (mask);
}

private static Gdk.Pixbuf? mask_pixbuf (Gdk.Pixbuf pixbuf, int scale) {
Expand Down

0 comments on commit bb8f2f0

Please sign in to comment.