<commit_before>import QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Window 2.0

import Qak 1.0

ApplicationWindow {

    id: app

    title: qsTr('Qak (%1x%2)').arg(width).arg(height)

    //flags: Qt.FramelessWindowHint | Qt.CustomizeWindowHint

    visible: true

    //color: "transparent"
    color: "black"

    property bool paused: Qak.paused

    readonly property bool multiMonitor: multiMonitorHorizontal || multiMonitorVertical
    readonly property bool multiMonitorHorizontal: Screen.desktopAvailableWidth > Screen.width
    readonly property bool multiMonitorVertical: Screen.desktopAvailableHeight > Screen.height

    property string screenMode: "windowed"

    onScreenModeChanged: {
        if(screenMode == "full")
            showFullScreen()
        else if(screenMode == "windowed")
            showNormal()
        else
            showNormal()
//        Qak.debug("ApplicationWindow","onScreenModeChanged",screenMode) //¤qakdbg
    }

    function toggleScreenMode() {
        if(screenMode === "windowed")
           screenMode = "full"
        else
           screenMode = "windowed"
    }

    //onScreenChanged: Qak.debug("ApplicationWindow","onScreenChanged",screen) //-¤qakdbg (only available from Qt 5.9)
}
<commit_msg>Added resizable property to ApplicationWindow helper<commit_after>import QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Window 2.0

import Qak 1.0

ApplicationWindow {

    id: app

    title: qsTr('Qak (%1x%2)').arg(width).arg(height)

    //flags: Qt.FramelessWindowHint | Qt.CustomizeWindowHint

    visible: true

    //color: "transparent"
    color: "black"

    property bool paused: Qak.paused

    readonly property bool multiMonitor: multiMonitorHorizontal || multiMonitorVertical
    readonly property bool multiMonitorHorizontal: Screen.desktopAvailableWidth > Screen.width
    readonly property bool multiMonitorVertical: Screen.desktopAvailableHeight > Screen.height

    property string screenMode: "windowed"

    property bool resizable: true
    onResizableChanged: {
        if(!resizable) {
            maximumWidth = width
            maximumHeight = height

            minimumWidth = width
            minimumHeight = height
        } else {
            maximumWidth = 16777215
            maximumHeight = 16777215

            minimumWidth = 0
            minimumHeight = 0
        }
    }

    signal beforeScreenModeChange

    onScreenModeChanged: {
        beforeScreenModeChange()
        if(screenMode == "full")
            showFullScreen()
        else if(screenMode == "windowed")
            showNormal()
        else
            showNormal()
//        Qak.debug("ApplicationWindow","onScreenModeChanged",screenMode) //¤qakdbg
    }

    function toggleScreenMode() {
        if(screenMode === "windowed")
           screenMode = "full"
        else
           screenMode = "windowed"
    }

    //onScreenChanged: Qak.debug("ApplicationWindow","onScreenChanged",screen) //-¤qakdbg (only available from Qt 5.9)
}

{'fraction_non_alphanumeric': 0.09256801592568016, 'fraction_numerical': 0.013934970139349702, 'mean_word_length': 2.6948529411764706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3213472', 'n_tokens_mistral': 855, 'n_tokens_neox': 800, 'n_words': 195}