From 086fb0bf9650af494b4d4ec551d7cf23077e38d3 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Sat, 17 May 2025 19:10:16 -0300 Subject: [PATCH] :sparkles: ags(control-center/page): add tooltip and onDestroy properties to `PageButton` --- ags/widget/control-center/pages/Page.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ags/widget/control-center/pages/Page.ts b/ags/widget/control-center/pages/Page.ts index d106f0b..33f673c 100644 --- a/ags/widget/control-center/pages/Page.ts +++ b/ags/widget/control-center/pages/Page.ts @@ -99,14 +99,20 @@ export function PageButton(props: { title: string | Binding; endWidget?: Gtk.Widget | Binding; extraButtons?: Array | Binding>; + onDestroy?: (self: Widget.Box) => void; onClick?: (self: Widget.Button) => void; + tooltipText?: string | Binding; + tooltipMarkup?: string | Binding; }): Gtk.Widget { return new Widget.Box({ + onDestroy: props.onDestroy, children: [ new Widget.Button({ onClick: props.onClick, className: props.className, hexpand: true, + tooltipText: props.tooltipText, + tooltipMarkup: props.tooltipMarkup, child: new Widget.Box({ className: "page-button", orientation: Gtk.Orientation.HORIZONTAL, @@ -135,7 +141,7 @@ export function PageButton(props: { } as Widget.BoxProps) } as Widget.ButtonProps), new Widget.Box({ - className: "button-row extra-buttons", + className: "extra-buttons button-row", visible: (props.extraButtons instanceof Binding) ? props.extraButtons.as(extra => extra.length > 0) : (props.extraButtons ? props.extraButtons.length > 0 : false),