focus on your browsing
browser web-browser

fix zoom schema

fix zooming out at 110% zoom

woof.monster 7603da4e f8ccdeac

verified
+11 -24
+3 -23
OuchBrowser/OuchBrowser.gschema.xml
··· 29 29 </description> 30 30 </key> 31 31 32 - <key type="i" name="zoom"> 33 - <choices> 34 - <choice value="25" /> 35 - <choice value="33" /> 36 - <choice value="50" /> 37 - <choice value="67" /> 38 - <choice value="75" /> 39 - <choice value="80" /> 40 - <choice value="90" /> 41 - <choice value="100" /> 42 - <choice value="110" /> 43 - <choice value="125" /> 44 - <choice value="150" /> 45 - <choice value="175" /> 46 - <choice value="175" /> 47 - <choice value="200" /> 48 - <choice value="250" /> 49 - <choice value="300" /> 50 - <choice value="400" /> 51 - <choice value="500" /> 52 - </choices> 53 - 54 - <default>100</default> 32 + <key type="d" name="zoom"> 33 + <range min="0.25" max="5.0" /> 34 + <default>1.0</default> 55 35 <summary>Zoom</summary> 56 36 <description> 57 37 This value is the zoom level of the browser.
+1 -1
OuchBrowser/View.cs
··· 35 35 36 36 webview.SetSettings(settings); 37 37 webview.LoadUri(url); 38 - webview.SetZoomLevel(Window.settings.GetInt("zoom")); 38 + webview.SetZoomLevel(Window.settings.GetDouble("zoom")); 39 39 TabPage page; 40 40 41 41 if (pinned)
+7
OuchBrowser/Window.cs
··· 392 392 window.toast_overlay!.AddToast(toast); 393 393 break; 394 394 case 1.25: // 125% 395 + webview.SetZoomLevel(1.1); // 400% 396 + toast.SetTitle("110%"); 397 + toast.SetTimeout(1); 398 + window.toast_overlay!.DismissAll(); 399 + window.toast_overlay!.AddToast(toast); 400 + break; 401 + case 1.1: // 125% 395 402 webview.SetZoomLevel(1); // 400% 396 403 toast.SetTitle("100%"); 397 404 toast.SetTimeout(1);