fix(zoom): connect notify::zoom-level signal to persist zoom changes
- commit
- 7928d626fbd842f1b660181960976be47f40ffe5
- author
- bamen · · 2025-10-15 16:22 UTC
- parent
- 8abf46b
- signature
- unsigned
2 files · +9 -0
M CHANGELOG.md +1 -0
| @@ -43,6 +43,7 @@ All notable changes to this project will be documented in this file. | |||
| 43 | 43 | - **Stacked pane active border**: Fixed active border incorrectly appearing on stacked pane containers instead of individual panes | |
| 44 | 44 | - **Stacked pane creation**: Fixed premature Realize() call causing widget lifecycle issues during stack creation | |
| 45 | 45 | - **Browser exit on last pane close**: Fixed browser not properly quitting when closing the last webview via Ctrl+P x by calling GTK main loop quit instead of window close | |
| 46 | + | - **Zoom level persistence restored**: Fixed per-domain zoom settings not being saved to database (broken during gotk4 migration). Added missing `notify::zoom-level` signal connection in setupEventHandlers to properly persist zoom changes | |
| 46 | 47 | ||
| 47 | 48 | ## [0.11.0] - 2025-10-07 | |
| 48 | 49 | ||
| @@ -43,6 +43,7 @@ All notable changes to this project will be documented in this file. | |||||
| 43 | - **Stacked pane active border**: Fixed active border incorrectly appearing on stacked pane containers instead of individual panes | 43 | - **Stacked pane active border**: Fixed active border incorrectly appearing on stacked pane containers instead of individual panes | ||
| 44 | - **Stacked pane creation**: Fixed premature Realize() call causing widget lifecycle issues during stack creation | 44 | - **Stacked pane creation**: Fixed premature Realize() call causing widget lifecycle issues during stack creation | ||
| 45 | - **Browser exit on last pane close**: Fixed browser not properly quitting when closing the last webview via Ctrl+P x by calling GTK main loop quit instead of window close | 45 | - **Browser exit on last pane close**: Fixed browser not properly quitting when closing the last webview via Ctrl+P x by calling GTK main loop quit instead of window close | ||
| 46 | + | - **Zoom level persistence restored**: Fixed per-domain zoom settings not being saved to database (broken during gotk4 migration). Added missing `notify::zoom-level` signal connection in setupEventHandlers to properly persist zoom changes | |||
| 46 | 47 | ||||
| 47 | ## [0.11.0] - 2025-10-07 | 48 | ## [0.11.0] - 2025-10-07 | ||
| 48 | 49 | ||||
M pkg/webkit/webview.go +8 -0
| @@ -201,6 +201,14 @@ func (w *WebView) setupEventHandlers() { | |||
| 201 | 201 | } | |
| 202 | 202 | }) | |
| 203 | 203 | ||
| 204 | + | // Zoom level changed - connect to notify::zoom-level signal | |
| 205 | + | w.view.Connect("notify::zoom-level", func() { | |
| 206 | + | if w.onZoomChanged != nil { | |
| 207 | + | zoomLevel := w.view.ZoomLevel() | |
| 208 | + | w.onZoomChanged(zoomLevel) | |
| 209 | + | } | |
| 210 | + | }) | |
| 211 | + | ||
| 204 | 212 | // Favicon changed - connect to FaviconDatabase | |
| 205 | 213 | w.setupFaviconHandlers() | |
| 206 | 214 | ||
| @@ -201,6 +201,14 @@ func (w *WebView) setupEventHandlers() { | |||||
| 201 | } | 201 | } | ||
| 202 | }) | 202 | }) | ||
| 203 | 203 | ||||
| 204 | + | // Zoom level changed - connect to notify::zoom-level signal | |||
| 205 | + | w.view.Connect("notify::zoom-level", func() { | |||
| 206 | + | if w.onZoomChanged != nil { | |||
| 207 | + | zoomLevel := w.view.ZoomLevel() | |||
| 208 | + | w.onZoomChanged(zoomLevel) | |||
| 209 | + | } | |||
| 210 | + | }) | |||
| 211 | + | ||||
| 204 | // Favicon changed - connect to FaviconDatabase | 212 | // Favicon changed - connect to FaviconDatabase | ||
| 205 | w.setupFaviconHandlers() | 213 | w.setupFaviconHandlers() | ||
| 206 | 214 | ||||