* Shows the focusModeIcon space element. * @param {boolean} show
(show = true, force = false)
| 1879 | * @param {boolean} show |
| 1880 | */ |
| 1881 | showFocusModeIcon(show = true, force = false) { |
| 1882 | if (show && Settings.prefs.show_focus_mode_icon) { |
| 1883 | // if already shown then do nothing |
| 1884 | if (!force && this.focusModeIcon.is_visible()) { |
| 1885 | return; |
| 1886 | } |
| 1887 | |
| 1888 | Utils.actor_raise(this.focusModeIcon); |
| 1889 | this.focusModeIcon.opacity = 0; |
| 1890 | this.focusModeIcon.show(); |
| 1891 | Easer.addEase(this.focusModeIcon, { |
| 1892 | opacity: 255, |
| 1893 | time: Settings.prefs.animation_time, |
| 1894 | }); |
| 1895 | } else { |
| 1896 | // if already hidden then do nothing |
| 1897 | if (!force && !this.focusModeIcon.is_visible()) { |
| 1898 | return; |
| 1899 | } |
| 1900 | Easer.addEase(this.focusModeIcon, { |
| 1901 | opacity: 0, |
| 1902 | time: Settings.prefs.animation_time, |
| 1903 | onComplete: () => this.focusModeIcon.hide(), |
| 1904 | }); |
| 1905 | } |
| 1906 | } |
| 1907 | |
| 1908 | createBackground() { |
| 1909 | const monitor = this.monitor; |
no test coverage detected