Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Animated menu back button. #17

Open
molchanoviv opened this issue Jan 16, 2016 · 1 comment
Open

Animated menu back button. #17

molchanoviv opened this issue Jan 16, 2016 · 1 comment

Comments

@molchanoviv
Copy link

Hello @benlau Thank you for quick update of qpm version. But I also have a question. I want to use this animated menu back icon https://gist.github.com/cyberbobs/8d62ab257d332914a72c instead of the static one from ActionBar. How I can do this without copying all the action bar contents to my project and adding it there.

P.S. Thank you for such a great project. It really helpful.

@benlau
Copy link
Owner

benlau commented Jan 26, 2016

Hi @molchanoviv,

It is a bit tricky to do so. It need to set following things:

  1. iconSource to empty string
  2. Set keyline1 from 16dp to 72dp.
  3. Place your custom icon over Action Bar.

Example (Modified from example program - Components.qml):

    actionBar: ActionBar {
        id : actionBar
//        iconSource: A.drawable("ic_menu",Constants.black87)
        title: "Component List"
        showIcon: true
        iconSource: ""
        actionButtonEnabled: false

        material : ActionBarMaterial {
            Component.onCompleted: {
                merge(this,ThemeManager.currentTheme.actionBar);
                keyline1 = 72 * A.dp;
            }
        }

        Rectangle {
            width: 48 * A.dp
            height: parent.height
            color: "red"
            opacity: 0.5
            NumberAnimation on rotation {
                duration: 400
                from: 0
                to : 360
                loops: Animation.Infinite;
                easing.type: Easing.Linear
            }
        }
    }

By the way, I will add custom icon component in next release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants