From b7c8ddd6ee119588f8b17a7426702a6a77f4b9e8 Mon Sep 17 00:00:00 2001 From: Aylur Date: Tue, 7 Nov 2023 01:31:56 +0100 Subject: [PATCH] update example configs --- example/notification-center/notification.js | 14 +++++++------- example/notification-center/widgets.js | 6 +++--- example/simple-bar/config.js | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/example/notification-center/notification.js b/example/notification-center/notification.js index 0082cf7..71c64bb 100644 --- a/example/notification-center/notification.js +++ b/example/notification-center/notification.js @@ -4,10 +4,10 @@ import { lookUpIcon, timeout } from 'resource:///com/github/Aylur/ags/utils.js'; const NotificationIcon = ({ appEntry, appIcon, image }) => { if (image) { return Widget.Box({ - valign: 'start', + vpack: 'start', hexpand: false, className: 'icon img', - style: ` + css: ` background-image: url("${image}"); background-size: contain; background-repeat: no-repeat; @@ -26,17 +26,17 @@ const NotificationIcon = ({ appEntry, appIcon, image }) => { icon = appEntry; return Widget.Box({ - valign: 'start', + vpack: 'start', hexpand: false, className: 'icon', - style: ` + css: ` min-width: 78px; min-height: 78px; `, children: [Widget.Icon({ icon, size: 58, - halign: 'center', hexpand: true, - valign: 'center', vexpand: true, + hpack: 'center', hexpand: true, + vpack: 'center', vexpand: true, })], }); }; @@ -87,7 +87,7 @@ export const Notification = n => Widget.EventBox({ }), Widget.Button({ className: 'close-button', - valign: 'start', + vpack: 'start', child: Widget.Icon('window-close-symbolic'), onClicked: n.close.bind(n), }), diff --git a/example/notification-center/widgets.js b/example/notification-center/widgets.js index ecee080..6349a70 100644 --- a/example/notification-center/widgets.js +++ b/example/notification-center/widgets.js @@ -19,7 +19,7 @@ const Placeholder = () => Widget.Box({ className: 'placeholder', vertical: true, vexpand: true, - valign: 'center', + vpack: 'center', children: [ Widget.Icon('notifications-disabled-symbolic'), Widget.Label('Your inbox is empty'), @@ -62,7 +62,7 @@ export const ClearButton = () => Widget.Button({ export const DNDSwitch = () => Widget({ type: Gtk.Switch, - valign: 'center', + vpack: 'center', connections: [['notify::active', ({ active }) => { Notifications.dnd = active; }]], @@ -70,7 +70,7 @@ export const DNDSwitch = () => Widget({ export const PopupList = () => Widget.Box({ className: 'list', - style: 'padding: 1px;', // so it shows up + css: 'min-width: 1px;', // so it shows up vertical: true, binds: [['children', Notifications, 'popups', popups => popups.map(Notification)]], diff --git a/example/simple-bar/config.js b/example/simple-bar/config.js index 05690dd..8abf671 100644 --- a/example/simple-bar/config.js +++ b/example/simple-bar/config.js @@ -84,7 +84,7 @@ const Media = () => Widget.Button({ const Volume = () => Widget.Box({ className: 'volume', - style: 'min-width: 180px', + css: 'min-width: 180px', children: [ Widget.Stack({ items: [ @@ -130,7 +130,7 @@ const BatteryLabel = () => Widget.Box({ }]], }), Widget.ProgressBar({ - valign: 'center', + vpack: 'center', connections: [[Battery, self => { if (Battery.percent < 0) return; @@ -168,7 +168,7 @@ const Center = () => Widget.Box({ }); const Right = () => Widget.Box({ - halign: 'end', + hpack: 'end', children: [ Volume(), BatteryLabel(),