papyros / qml-material

:book: Material Design implemented in QtQuick
GNU Lesser General Public License v2.1
2.57k stars 476 forks source link

clientSideDecorations with tabs not aligned correctly #465

Open flipflop97 opened 8 years ago

flipflop97 commented 8 years ago

screenshot from 2016-06-30 19-11-06 when clientSideDecorations: true and ActionBar tabs are both enabled the X displays in the top right corner but is vertically incorrectly aligned (should be at the top).

Full code of the form in the screenshot:

import QtQuick 2.7
import Material 0.2

ApplicationWindow {
    id: rootWindow
    flags: Qt.FramelessWindowHint
    title: "QML test"
    width: Units.dp(600)
    height: Units.dp(600)
    clientSideDecorations: true
    initialPage: mainPage
    theme {
        id: theme
        primaryColor: Palette.colors.indigo["500"]
        primaryDarkColor: Palette.colors.indigo["700"]
        accentColor: Palette.colors.amber["500"]
    }

    Page {
        id: mainPage
        title: "Main"
        actions: [
            Action {
                name: "Print"
                iconName: "action/print"
            }
        ]

        actionBar {
            tabs: [mainPage, emptyPage]
        }

        Column {
            anchors.centerIn: parent
            spacing: Units.dp(16)

            Button {
                objectName: "testButton"
                text: "Simple Button"
                width: Units.dp(200)
                elevation: 0
                anchors.horizontalCenter: parent.horizontalCenter
                onClicked: snackbar.open("Simple, isn't it?")
            }

            Button {
                text: "Raised Button"
                width: Units.dp(200)
                elevation: 1
                anchors.horizontalCenter: parent.horizontalCenter
                onClicked: pus
            }
        }
    }

    Page {
        id: emptyPage
        title: "Empty"
    }

    ActionButton {
        anchors {
            right: parent.right
            bottom: parent.bottom
            margins: Units.dp(16)
        }

        action: Action {
            id: addContent
            text: "&Copy"
            shortcut: "Ctrl+C"
            onTriggered: snackbar.open("We do actions too!")
        }
        iconName: "content/add"
    }

    Snackbar {
        id: snackbar
        duration: 3000
    }
}