fix(settings): ensure global settings sync across all open panes (#2818)

* fix(settings): ensure global settings sync across all open panes

Previously, changing a global setting (like font size) only updated the currently active book pane, causing split-view panes to desynchronize.

This commit updates the settings logic to propagate global changes to all open book instances immediately. It also ensures that settings UI panels correctly re-render when preferences are updated from outside the component.

* refactor to reuse some code

* fix: pointer in doc check

---------

Co-authored-by: André Angelantoni <andre.angelantoni@performantlabs.com>
Co-authored-by: Huang Xin <chrox.huang@gmail.com>
This commit is contained in:
André Angelantoni
2025-12-31 23:12:07 -07:00
committed by GitHub
parent 71e97998b6
commit e21ef53a3d
2 changed files with 23 additions and 15 deletions
@@ -62,7 +62,7 @@ const HeaderBar: React.FC<HeaderBarProps> = ({
const windowButtonVisible = appService?.hasWindowBar && !isTrafficLightVisible;
const docs = view?.renderer.getContents() ?? [];
const pointerInDoc = docs.some(({ doc }) => doc.body.style.cursor === 'pointer');
const pointerInDoc = docs.some(({ doc }) => doc.body?.style.cursor === 'pointer');
const enableAnnotationQuickActions = viewSettings?.enableAnnotationQuickActions;
const annotationQuickActionButton =