rschroll / beru

The Basic Epub Reader for Ubuntu
http://rschroll.github.io/beru/
GNU General Public License v3.0
24 stars 12 forks source link

No toolbar for bookPage #60

Closed rschroll closed 10 years ago

rschroll commented 10 years ago

On emulators and devices, it's impossible to trigger the toolbar on the bookPage. @randy-jr-olive has a video demonstrating the problem.

rschroll commented 10 years ago

Part of the problem with emulators is that the registration is off -- clicks register a bit above the mouse cursor. This makes it impossible to touch the bottom of the screen, where you need to touch to open the toolbar.

Here is a simple test of a Panel (the thing driving the toolbar). It works on the desktop and fails on the emulator. I'd like to know if it works on a device. If not, it means the toolkit has completely broken panels. If it works, then there's likely some problematic interaction between the webview and the panel.

randy-jr-olive commented 10 years ago

I set the toolbar to be open: true and locked: true, and this is what it looks like. Visible, but not useable.

The white bar at the bottom is the toolbar, with no buttons on it.

capture001

rschroll commented 10 years ago

Well isn't that lovely.

I've reported this upstream: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1359921. But given my track record of getting toolkit bugs fixed, I'm not holding out a lot of hope for this one. Let me know if that panel test case works for you. If so, we can build our version of the toolbar.

randy-jr-olive commented 10 years ago

I ran the panel-test qml on my nexus 4, and it worked exactly as it did on the desktop (button colours are different now?).

Panel Test demo: https://www.youtube.com/watch?v=gFImVnYvNpU

rschroll commented 10 years ago

Great! I was worried that panels were broken completely. As a further test, could you try copying to panel code into the BookPage, and see if you can open and close it there. If so, I'll replace the default toolbar with a custom one. It had to happen eventually.

Re the button colors: I've been yelling about this over on Google+ (https://plus.google.com/108747901910183509998/posts/GZLFqo3GJVS) and I've opened a bug on Launchpad (https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1358929). But, as I said, my track record with these sorts of bugs isn't great.

randy-jr-olive commented 10 years ago

Done. It works with the custom panel (I did have to remove all references to the regular "toolbar" including the onVisibleChanged: {mainView.useDeprecatedToolbar = visible )

Video: http://youtu.be/1rG2ID-weIw

rschroll commented 10 years ago

Good to hear. After a bit of confusion with the internals of Toolbar, I think I have a solution that'll work. Can you check out the toolbar branch and confirm that it works on a device? Thanks!

randy-jr-olive commented 10 years ago

The toolbar is working on the device, so there's that at least. I used the toolbar branch, so that code is good. So you can check the look - Video: https://www.youtube.com/watch?v=bpFLWqF1brI