set icon to button, click show/hide list
This commit is contained in:
@@ -25,17 +25,24 @@ export default class ExamplePreferences extends ExtensionPreferences {
|
||||
icon_name = this.dir.get_path() + '/gnome.svg';
|
||||
const icon = new Gtk.Image({
|
||||
gicon: Gio.icon_new_for_string(icon_name),
|
||||
pixel_size: 64
|
||||
pixel_size: 32
|
||||
});
|
||||
group.add(icon);
|
||||
//group.add(icon);
|
||||
|
||||
const button = new Gtk.Button({
|
||||
label: _('Browse'),
|
||||
//label: _('Browse'),
|
||||
valign: Gtk.Align.CENTER
|
||||
});
|
||||
//button.container.add(icon);
|
||||
button.set_child(icon);
|
||||
button.connect('clicked', () => {
|
||||
console.log('button clicked!');
|
||||
if (scrollWindow.visible) {
|
||||
searchEntry.hide();
|
||||
scrollWindow.hide();
|
||||
} else {
|
||||
searchEntry.show();
|
||||
scrollWindow.show();
|
||||
}
|
||||
});
|
||||
const row_icon = new Adw.ActionRow({
|
||||
title: _('Choose a New Icon'),
|
||||
@@ -130,6 +137,9 @@ export default class ExamplePreferences extends ExtensionPreferences {
|
||||
});
|
||||
group.add(scrollWindow);
|
||||
|
||||
searchEntry.hide();
|
||||
scrollWindow.hide();
|
||||
|
||||
|
||||
// /usr/share/gnome-shell/extensions/arcmenu@arcmenu.com/settings/AboutPage.js
|
||||
const page_about = new Adw.PreferencesPage({
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 4.5 MiB |
Reference in New Issue
Block a user