4
0
mirror of https://github.com/QuasarApp/SimpleQmlNotify.git synced 2025-04-29 15:14:32 +00:00

33 lines
1.0 KiB
QML
Raw Normal View History

2020-05-23 02:30:51 +03:00
/*
2022-12-31 11:28:53 +03:00
* Copyright (C) 2018-2023 QuasarApp.
2023-03-29 12:57:55 +02:00
* Distributed under the GPLv3 software license, see the accompanying
2020-05-23 02:30:51 +03:00
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
2019-11-19 18:09:01 +03:00
import QtQuick 2.0
import QtQuick.Window 2.12
import QtQuick.Controls.Material 2.0
import QtQuick.Controls 2.3
Item {
readonly property int pointCount: 100;
readonly property real mm: Screen.pixelDensity
readonly property real sm: 10 * mm
readonly property real dsm: Math.sqrt(Math.pow(Screen.desktopAvailableWidth, 2) + Math.pow(Screen.desktopAvailableHeight, 2)) / sm
readonly property real pt: getfactor(dsm) * sm
readonly property real controlPtMaterial: Material.buttonHeight
readonly property real gamePt: (width < height) ? width / pointCount : height / pointCount;
function getfactor(dsm) {
2021-05-05 13:04:35 +03:00
if ( dsm < 70) {
2019-11-19 18:09:01 +03:00
return 1
} else if (dsm < 140) {
return 2;
} else
return 4;
}
anchors.fill: parent;
}