other.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 Other = GObject.registerClass({
  6. GTypeName: 'Other',
  7. Template: GLib.uri_resolve_relative(import.meta.url, '../ui/other.ui', GLib.UriFlags.NONE),
  8. InternalChildren: [
  9. 'lockscreen_blur',
  10. 'lockscreen_customize',
  11. 'screenshot_blur',
  12. 'screenshot_customize',
  13. 'window_list_blur',
  14. 'window_list_customize',
  15. ],
  16. }, class Overview extends Adw.PreferencesPage {
  17. constructor(preferences) {
  18. super({});
  19. this.preferences = preferences;
  20. this.preferences.lockscreen.settings.bind(
  21. 'blur', this._lockscreen_blur, 'active',
  22. Gio.SettingsBindFlags.DEFAULT
  23. );
  24. this._lockscreen_customize.connect_to(this.preferences, this.preferences.lockscreen);
  25. this.preferences.screenshot.settings.bind(
  26. 'blur', this._screenshot_blur, 'active',
  27. Gio.SettingsBindFlags.DEFAULT
  28. );
  29. this._screenshot_customize.connect_to(this.preferences, this.preferences.screenshot);
  30. this.preferences.window_list.settings.bind(
  31. 'blur', this._window_list_blur, 'active',
  32. Gio.SettingsBindFlags.DEFAULT
  33. );
  34. this._window_list_customize.connect_to(
  35. this.preferences, this.preferences.window_list, false
  36. );
  37. }
  38. });