<commit_before>/*******************************************************************************
 * Copyright 2012-2014 Esri
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 ******************************************************************************/

import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1

import ArcGIS.Runtime.AppKit 1.0
import ArcGIS.Runtime 10.3

Column {
    id: zoomButtons

    property Map map: null
    property real size: 40
    property real zoomRatio: 2

    property color color: "#4C4C4C"
    property color disabledColor: "#E5E6E7"
    property color hoveredColor: "#E1F0FB"
    property color pressedColor: "#90CDF2"
    property color backgroundColor: "#F7F8F8"
    property color focusBorderColor: "#AADBFA"
    property color borderColor: "#CBCBCB"

    property Envelope homeExtent

    property alias fader: fader

    readonly property int buttonZoomIn: 0x01
    readonly property int buttonZoomOut: 0x02
    readonly property int buttonHome: 0x04
    readonly property int buttonPosition: 0x08

    property int buttons: buttonZoomIn + buttonZoomOut + buttonHome + buttonPosition

    spacing: 1

    //--------------------------------------------------------------------------

    Component.onCompleted: {
        if (!map && parent && parent.objectType && parent.objectType === "Map") {
            map = parent;
        }
    }

    //--------------------------------------------------------------------------

    QtObject {
        id: internal

        property real _size: size * System.displayScaleFactor
    }

    //--------------------------------------------------------------------------

    Fader {
        id: fader
    }

    //--------------------------------------------------------------------------

    Button {
        visible: buttons & buttonZoomIn && map<commit_msg>changing from column to gridlayout in order to support https://github.com/ArcGIS/arcgis-runtime-toolkit-qt/issues/5<commit_after>/*******************************************************************************
 * Copyright 2012-2014 Esri
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 ******************************************************************************/

import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
import QtQuick.Layouts 1.1
import ArcGIS.Runtime.AppKit 1.0
import ArcGIS.Runtime 10.3

GridLayout {
    id: zoomButtons

    property Map map: null
    property real size: 40
    property real zoomRatio: 2

    property color color: "#4C4C4C"
    property color disabledColor: "#E5E6E7"
    property color hoveredColor: "#E1F0FB"
    property color pressedColor: "#90CDF2"
    property color backgroundColor: "#F7F8F8"
    property color focusBorderColor: "#AADBFA"
    property color borderColor: "#CBCBCB"
    property string orientation: "portrait"

    property Envelope homeExtent

    property alias fader: fader

    readonly property int buttonZoomIn: 0x01
    readonly property int buttonZoomOut: 0x02
    readonly property int buttonHome: 0x04
    readonly property int buttonPosition: 0x08

    property int buttons: buttonZoomIn + buttonZoomOut + buttonHome + buttonPosition
    columns: orientation === "portrait" ? 1 : 4
    rows: orientation === "portrait" ? 4 : 1
    rowSpacing: orientation === "landscape" ? 0 : 1
    columnSpacing: orientation === "portrait" ? 0 : 1

    //--------------------------------------------------------------------------

    Component.onCompleted: {
        if (!map && parent && parent.objectType && parent.objectType === "Map") {
            map = parent;
        }
    }

    //--------------------------------------------------------------------------

    QtObject {
        id: internal

        property real _size: size * System.displayScaleFactor
    }

    //--------------------------------------------------------------------------

    Fader {
        id: fader
    }

    //--------------------------------------------------------------------------

    Button {
        visible: buttons & buttonZoomIn && map
{'fraction_non_alphanumeric': 0.2417560975609756, 'fraction_numerical': 0.022634146341463414, 'mean_word_length': 2.0639569635385535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, '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': '6344353', 'n_tokens_mistral': 1309, 'n_tokens_neox': 1203, 'n_words': 435}