Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions src/animatedList/animatedList.vala
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,37 @@ private struct WidgetHeights {
private struct WidgetAlloc {
float y;
int height;

public WidgetAlloc () {
y = 0;
height = 0;
}
}

private class AnimationValueTarget : Object {
private double _progress = 0;
public double progress {
get {
return _progress;
}
set {
_progress = value;
cb (_progress);
}
}

public delegate void callback (double value);

private unowned callback ?cb;

public AnimationValueTarget (float init_value, callback cb) {
this._progress = init_value;
this.cb = cb;
}

public Adw.PropertyAnimationTarget get_animation_target () {
return new Adw.PropertyAnimationTarget (this, "progress");
}
}

public class AnimatedList : Gtk.Widget, Gtk.Scrollable {
Expand Down
2 changes: 1 addition & 1 deletion src/controlCenter/widgets/notifications/notifications.vala
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ namespace SwayNotificationCenter.Widgets {
noti_groups_name.lookup_extended (param.name_id, null, out group);
}
if (group == null || ConfigModel.instance.notification_grouping == false) {
group = new NotificationGroup (param.name_id, param.display_name);
group = new NotificationGroup (param.name_id, param.display_name, viewport);
// Collapse other groups on expand
group.on_expand_change.connect ((expanded) => {
if (!expanded) {
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ app_sources = [
'dismissableWidget/dismissableWidget.vala',
'notification/notification.vala',
'notificationGroup/notificationGroup.vala',
'notificationGroup/expandableGroup.vala',
'controlCenter/controlCenter.vala',
widget_sources,
'blankWindow/blankWindow.vala',
Expand Down
Loading