ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #06170
Re: [Merge] lp:~mrqtros/ubuntu-docviewer-app/ubuntu-docviewer-app-zoom-final into lp:ubuntu-docviewer-app
> One thing I noticed though is the zoom dropdown is always fixed on "Automatic
> (Fit width)" even if you choose another zoom level, or zoom in or out with the
> buttons. This means if you change the zoom level, you can never re-choose "Fit
> Width) because it thinks it's already ticked.
Honestly, I've missed that. Thanks!
Just had a look at it, it's not a bug introduced by this MP.
I've checked if the Viewer properly set the zoom mode to Manual when a "custom" (i.e. user-specified) value is set, and it does.
It's rather a bug in the ZoomSelector, from line 126:
selectedIndex: {
if (loPageContentLoader.item.loView.zoomMode == LibreOffice.View.FitToWidth)
return 0
for (var i=0; i<textField.values.length; i++) {
if (values[i] == loView.zoomFactor) {
return i
}
}
return -1
}
It returns:
ReferenceError: loView is not defined
The 'for' loop in the code does not return any index, since the comparison between values[i] and loView.zoomFactor is never executed.
For that reason, the first entry in the ZoomSelector ("Automatic (Fit width)") is always selected.
I didn't take care of the current code of the ZoomSelector, since it was already planned to be replaced with some properly designed code.
This bug is already fixed in the UITK 1.3 branch, since it introduces the new ZoomSelector.
--
https://code.launchpad.net/~mrqtros/ubuntu-docviewer-app/ubuntu-docviewer-app-zoom-final/+merge/278248
Your team Ubuntu Document Viewer Developers is subscribed to branch lp:ubuntu-docviewer-app.
References