screenshot-ui: Add IconLabelButton
A button that has an icon and a subtitle label. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
This commit is contained in:

committed by
Marge Bot

parent
df0cd3457f
commit
7245f95165
@@ -20,6 +20,25 @@ const { DBusSenderChecker } = imports.misc.util;
|
||||
|
||||
const ScreenshotIface = loadInterfaceXML('org.gnome.Shell.Screenshot');
|
||||
|
||||
var IconLabelButton = GObject.registerClass(
|
||||
class IconLabelButton extends St.Button {
|
||||
_init(iconName, label, params) {
|
||||
super._init(params);
|
||||
|
||||
this._container = new St.BoxLayout({
|
||||
vertical: true,
|
||||
style_class: 'icon-label-button-container',
|
||||
});
|
||||
this.set_child(this._container);
|
||||
|
||||
this._container.add_child(new St.Icon({ icon_name: iconName }));
|
||||
this._container.add_child(new St.Label({
|
||||
text: label,
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
var ScreenshotUI = GObject.registerClass(
|
||||
class ScreenshotUI extends St.Widget {
|
||||
_init() {
|
||||
|
Reference in New Issue
Block a user