<commit_before>/*
The MIT License (MIT)

Copyright (c) 2016 <NAME> <<EMAIL>>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

import QtQuick 2.0
import Sailfish.Silica 1.0

Dialog {
    id: authorizeDialog

    property alias login: loginField.text
    property alias password: passwordField.text

    canAccept: login.length > 0 && password.length > 0

    Column {
        width: parent.width

        DialogHeader {
            dialog: authorizeDialog

            acceptText: qsTr("Login")
            cancelText: qsTr("Cancel")
        }

        Image {
            id: ljLogo

            anchors.left: parent.left
            anchors.leftMargin: Theme.paddingMedium

            clip: true
            smooth: true
            asynchronous: true
            fillMode: Image.PreserveAspectFit
            sourceSize.width: 128
            sourceSize.height: 128

            source: "qrc:/images/livejournal.png"
        }

        TextField {
            id: loginField

            anchors.left: parent.left
            anchors.right: parent.right

            placeholderText: qsTr("Login")
        }

        TextField {
            id: passwordField

            anchors.left: parent.left
            anchors.right: parent.right

            placeholderText: qsTr("Password")
            echoMode: TextInput.Password
        }
    }
}<commit_msg>Make AuthorizationDialog content properly scrollable<commit_after>/*
The MIT License (MIT)

Copyright (c) 2016 <NAME> <<EMAIL>>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

import QtQuick 2.0
import Sailfish.Silica 1.0

Dialog {
    id: authorizeDialog

    property alias login: loginField.text
    property alias password: passwordField.text

    canAccept: login.length > 0 && password.length > 0

    DialogHeader {
        id: dlgHeader
        dialog: authorizeDialog

        acceptText: qsTr("Login")
        cancelText: qsTr("Cancel")

        z: 1
    }

    SilicaFlickable {

        anchors.top: dlgHeader.bottom

        width: parent.width
        height: parent.height - dlgHeader.height

        contentHeight: column.height

        Column {
            id: column

            width: parent.width

            spacing: Theme.paddingMedium

            Image {
                id: ljLogo

                anchors.left: parent.left
                anchors.leftMargin: Theme.paddingMedium

                clip: true
                smooth: true
                asynchronous: true
                fillMode: Image.PreserveAspectFit
                sourceSize.width: 128
                sourceSize.height: 128

                source: "qrc:/images/livejournal.png"
            }

            TextField {
                id: loginField

                anchors.left: parent.left
                anchors.right: parent.right

                placeholderText: qsTr("Login")
            }

            TextField {
                id: passwordField

                anchors.left: parent.left
                anchors.right: parent.right

                placeholderText: qsTr("Password")
                echoMode: TextInput.Password
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.058141818896091144, 'fraction_numerical': 0.00648202710665881, 'mean_word_length': 2.262011531069827, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7200456', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1222, 'n_words': 512}