overview.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import Adw from 'gi://Adw';
  2. import GLib from 'gi://GLib';
  3. import GObject from 'gi://GObject';
  4. import Gio from 'gi://Gio';
  5. export const Overview = GObject.registerClass({
  6. GTypeName: 'Overview',
  7. Template: GLib.uri_resolve_relative(import.meta.url, '../ui/overview.ui', GLib.UriFlags.NONE),
  8. InternalChildren: [
  9. 'overview_blur',
  10. 'overview_customize',
  11. 'overview_style_components',
  12. 'appfolder_blur',
  13. 'appfolder_customize',
  14. 'appfolder_style_dialogs'
  15. ],
  16. }, class Overview extends Adw.PreferencesPage {
  17. constructor(preferences) {
  18. super({});
  19. this.preferences = preferences;
  20. this.preferences.overview.settings.bind(
  21. 'blur', this._overview_blur, 'active',
  22. Gio.SettingsBindFlags.DEFAULT
  23. );
  24. this.preferences.overview.settings.bind(
  25. 'style-components', this._overview_style_components, 'selected',
  26. Gio.SettingsBindFlags.DEFAULT
  27. );
  28. this._overview_customize.connect_to(this.preferences, this.preferences.overview);
  29. this.preferences.appfolder.settings.bind(
  30. 'blur', this._appfolder_blur, 'active',
  31. Gio.SettingsBindFlags.DEFAULT
  32. );
  33. this.preferences.appfolder.settings.bind(
  34. 'style-dialogs', this._appfolder_style_dialogs, 'selected',
  35. Gio.SettingsBindFlags.DEFAULT
  36. );
  37. this._appfolder_customize.connect_to(this.preferences, this.preferences.appfolder, false);
  38. }
  39. });