rschroll / beru

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

Book icons do not return to original position when returning to library #63

Closed randy-jr-olive closed 9 years ago

randy-jr-olive commented 10 years ago

The book cover icons line themselves up top to bottom, left to right. When I open a book, and click the Library button to return to the library, the book covers appear to be lower than original. Image shows before and after issue.

beru-visual-bug

This issue appears on the device and the desktop

rschroll commented 10 years ago

I've seen the opposite behavior -- the covers are too high, partially hidden by the header. I suspect this is somehow related to hiding and showing the header. Despite full-screen views being part of the initial design documents, the UITK has never really supported them well.

Does the scrolling fix itself after you drag it a bit?

randy-jr-olive commented 10 years ago

It does indeed, in fact, all I have to do is tap the screen and it corrects itself.

rschroll commented 10 years ago

I don't know if it's related, but:

The cover view is supposed to scroll itself back to the beginning when you return to it (so you can see the book you just read, which is now at the beginning). That doesn't seem to be happening any more.

rschroll commented 9 years ago

This fixes the problem mentioned in my last comment. I don't know if it'll solve the original problem or not. Note that the other lists are still slightly misplaced when returning to them from the BookView.

randy-jr-olive commented 9 years ago

I changed the back button code to fix this issue, but my commit merge is all messed up. here's the code that worked for me on desktop and Nexus 4

ToolbarItems {
    id: bookPageToolbar

    back: ToolbarButton {
        action: Action {
            text: i18n.tr("Library")
            iconName: "back"
            //this 3 step process forces book covers to return to top of page by force pushing the localBooks page
            onTriggered: {pageStack.pop(); pageStack.push(localBooks); pageStack.pop()}
        }
    }
rschroll commented 9 years ago

That's odd....

I'm hesitant to put in a kludge like this. Hopefully we can use this as a clue to figure out what's really going on. But if neither of us figure anything out, I'll commit it.

randy-jr-olive commented 9 years ago

I'll keep looking at it too.