| 29 | system.setNativeContextMenuDisabled(false); |
| 30 | }, |
| 31 | afterRender() { |
| 32 | const { value: settings } = appSettings; |
| 33 | const { $toggler } = quickTools; |
| 34 | const activeFile = editorManager.activeFile; |
| 35 | if (settings.floatingButton && !activeFile?.hideQuickTools) { |
| 36 | clearTimeout($toggler._hideTimeout); |
| 37 | $toggler._hideTimeout = null; |
| 38 | $toggler.classList.remove("hide"); |
| 39 | if (!$toggler.isConnected) { |
| 40 | root.appendOuter($toggler); |
| 41 | } |
| 42 | } else { |
| 43 | clearTimeout($toggler._hideTimeout); |
| 44 | $toggler.classList.add("hide"); |
| 45 | $toggler._hideTimeout = setTimeout(() => { |
| 46 | $toggler.remove(); |
| 47 | $toggler._hideTimeout = null; |
| 48 | }, 300); |
| 49 | } |
| 50 | |
| 51 | if (activeFile?.hideQuickTools) { |
| 52 | actions("set-height", { height: 0, save: false }); |
| 53 | } else { |
| 54 | actions("set-height", settings.quickTools); |
| 55 | } |
| 56 | fonts.setAppFont(settings.appFont); |
| 57 | fonts.setEditorFont(settings.editorFont); |
| 58 | if (!themes.applied) { |
| 59 | themes.apply("dark"); |
| 60 | } |
| 61 | }, |
| 62 | }; |