1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-02 08:39:49 +02:00

Replace pixelSize with device dpi independent pointSize

This commit is contained in:
Elias 2019-03-28 20:09:55 +01:00
parent 0352a88e02
commit cea7d0b214
26 changed files with 51 additions and 511 deletions

View File

@ -79,8 +79,6 @@
<file>qml/Community/Feedback.qml</file>
<file>qml/Controls/Slider.qml</file>
<file>qml/Create/Create.qml</file>
<file>qml/Create/CreateImport.qml</file>
<file>qml/Create/CreateImportStatus.qml</file>
<file>qml/Create/CreateNew.qml</file>
<file>qml/Create/CreateUpload.qml</file>
<file>qml/Create/CreateWallpaper.qml</file>

View File

@ -61,7 +61,7 @@ GridView {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pixelSize: 32
font.pointSize: 32
font.family: "Roboto"
anchors {
@ -140,7 +140,7 @@ GridView {
color: "white"
font.family: "Roboto"
font.weight: Font.Normal
font.pixelSize: 18
font.pointSize: 18
wrapMode: Text.WordWrap
}
Text {
@ -160,7 +160,7 @@ GridView {
font.family: "Roboto"
font.weight: Font.Normal
font.pixelSize: 14
font.pointSize: 14
wrapMode: Text.WordWrap
}
MouseArea {

View File

@ -18,7 +18,7 @@ Item {
id: txtHeadline
text: headline
height: 20
font.pixelSize: 14
font.pointSize: 14
font.family: "Roboto"
color: "#5D5D5D"

View File

@ -196,7 +196,7 @@ Item {
text: qsTr("Create wallpapers and widgets for local usage or the steam workshop!")
font.family: "Roboto"
font.pixelSize: 14
font.pointSize: 10
color: "white"
anchors {
horizontalCenter: parent.horizontalCenter

View File

@ -1,272 +0,0 @@
import QtQuick 2.12
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.3
import Qt.labs.platform 1.0
import QtQuick.Controls.Material 2.2
Item {
id: createImport
anchors.fill: parent
state: "out"
Component.onCompleted: state = "in"
property bool isVideoPlaying: true
property url file
onFileChanged: {
}
RectangularGlow {
id: effect
anchors {
top: videoOutWrapper.top
left: videoOutWrapper.left
right: videoOutWrapper.right
topMargin: 3
}
height: videoOutWrapper.height
width: videoOutWrapper.width
cached: true
z: 9
glowRadius: 3
spread: 0.2
color: "black"
opacity: 0.4
cornerRadius: 15
}
Rectangle {
id: videoOutWrapper
width: 450
height: 263
z: 12
color: "black"
anchors {
top: parent.top
topMargin: 180
horizontalCenter: parent.horizontalCenter
}
}
RectangularGlow {
id: effect2
anchors {
top: contentWrapper.top
left: contentWrapper.left
right: contentWrapper.right
topMargin: 3
}
height: contentWrapper.height
width: contentWrapper.width
cached: true
z: 9
glowRadius: 3
spread: 0.2
color: "black"
opacity: 0.4
cornerRadius: 15
}
Rectangle {
id: contentWrapper
width: 800
height: 300
z: 10
radius: 4
anchors {
top: parent.top
topMargin: 300
horizontalCenter: parent.horizontalCenter
}
Item {
id: chooseImageWrapper
height: 60
anchors {
top: parent.top
topMargin: 50
right: parent.right
left: parent.left
}
FileDialog {
id: fileDialogOpenPreview
nameFilters: ["Image files (*.jpg *.png)"]
onAccepted: {
imgPreview.source = currentFile
imgPreview.opacity = 1
//currentFile
}
}
Button {
id: btnChooseImage
text: qsTr("Select Image Manually")
Material.background: Material.Orange
Material.foreground: "white"
icon.source: "qrc:/assets/icons/icon_folder_open.svg"
icon.color: "white"
icon.width: 16
icon.height: 16
anchors.centerIn: parent
onClicked: fileDialogOpenPreview.open()
}
}
Column {
spacing: 20
anchors {
top: chooseImageWrapper.top
topMargin: 50
right: parent.right
rightMargin: 78
bottom: parent.bottom
bottomMargin: 50
left: parent.left
leftMargin: 78
}
TextField {
id: txtTitle
height: 60
width: parent.width
selectByMouse: true
text: qsTr("Title")
placeholderText: "Title"
}
}
Button {
text: qsTr("Import Video")
Material.background: Material.Orange
Material.foreground: "white"
icon.source: "qrc:/assets/icons/icon_upload.svg"
icon.color: "white"
icon.width: 16
icon.height: 16
anchors {
bottom: parent.bottom
bottomMargin: 10
horizontalCenter: parent.horizontalCenter
}
onClicked: {
if (txtTitle.text === ""
|| txtTitle.placeholderText === "Text") {
txtTitle.select(0, 0)
txtTitle.focus = true
return
}
//Check if there are any other characters than space
if (!(/\S/.test(txtTitle.text))) {
txtTitle.select(0, 0)
txtTitle.focus = true
return
}
if (fileDialogOpenPreview.currentFile != "") {
screenPlayCreate.importVideo(
txtTitle.text.replace(/\s/g, ''), file,
fileDialogOpenPreview.currentFile,
player.duration)
} else {
screenPlayCreate.importVideo(
txtTitle.text.replace(/\s/g, ''), file,
player.position,
player.duration,
player.metaData.videoFrameRate)
}
player.stop()
createImport.state = "out"
}
}
}
states: [
State {
name: "out"
PropertyChanges {
target: createImport
opacity: 0
}
PropertyChanges {
target: videoOutWrapper
z: 0
opacity: 0
anchors.topMargin: 50
}
PropertyChanges {
target: effect
opacity: 0
color: "transparent"
}
PropertyChanges {
target: contentWrapper
anchors.topMargin: -500
opacity: 0
}
},
State {
name: "in"
PropertyChanges {
target: createImport
opacity: 1
}
PropertyChanges {
target: contentWrapper
opacity: 1
anchors.topMargin: 300
}
PropertyChanges {
target: videoOutWrapper
z: 12
opacity: 1
anchors.topMargin: 70
}
}
]
transitions: [
Transition {
from: "out"
to: "in"
reversible: true
SequentialAnimation {
PauseAnimation {
duration: 500
}
ParallelAnimation {
PropertyAnimation {
duration: 300
target: contentWrapper
property: "opacity"
}
PropertyAnimation {
duration: 300
target: contentWrapper
property: "anchors.topMargin"
easing.type: Easing.OutQuart
}
}
ParallelAnimation {
PropertyAnimation {
duration: 250
target: videoOutWrapper
property: "opacity"
}
PropertyAnimation {
duration: 250
target: effect
properties: "color, opacity"
}
}
}
}
]
}

View File

@ -1,186 +0,0 @@
import QtQuick 2.12
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.3
// Qt Creator does not support Namespaced enums yet
// https://bugreports.qt.io/browse/QTCREATORBUG-17850
import LocalWorkshopCreationStatus 1.0
Item {
id: createImportStatus
anchors.fill: parent
state: "out"
signal backToCreate
signal uploadToSteamWorkshop()
Timer {
repeat: false
running: true
interval: 300
onTriggered: {
createImportStatus.state = "in"
}
}
Connections {
target: screenPlayCreate
onLocalWorkshopCreationStatusChanged: {
switch (status) {
case LocalWorkshopCreationStatus.Started:
txtStatus.text = "Copy video started"
break
case LocalWorkshopCreationStatus.CopyVideoFinished:
txtStatus.text = "Copy Video Finished"
break
case LocalWorkshopCreationStatus.CopyImageFinished:
txtStatus.text = "Copy Image Finished"
break
case LocalWorkshopCreationStatus.CopyConfigFinished:
txtStatus.text = "Copy Config Finished"
break
case LocalWorkshopCreationStatus.ErrorCopyConfig:
txtStatus.text = "Error Copy Config!"
break
case LocalWorkshopCreationStatus.Finished:
txtStatus.text = "Success!"
busyIndicator.running = false
break
default:
break
}
}
}
RectangularGlow {
id: effect
anchors {
top: wrapper.top
left: wrapper.left
right: wrapper.right
topMargin: 3
}
height: wrapper.height
width: wrapper.width
cached: true
glowRadius: 3
spread: 0.2
color: "black"
opacity: 0.4
cornerRadius: 15
}
Rectangle {
id: wrapper
width: 800
height: 400
radius: 4
anchors {
top: parent.top
topMargin: 100
horizontalCenter: parent.horizontalCenter
}
Text {
id: txtStatus
height: 80
font.family: "Roboto"
font.pixelSize: 24
color: "gray"
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
anchors {
top: busyIndicator.bottom
topMargin: 10
horizontalCenter: parent.horizontalCenter
}
}
BusyIndicator {
id: busyIndicator
running: true
anchors {
top: parent.top
topMargin: 100
horizontalCenter: parent.horizontalCenter
}
}
Row {
id: item1
width: 450
height: 49
spacing: 10
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 20
Button {
id: button
text: qsTr("Create another Wallpaper")
onClicked: {
backToCreate()
createImportStatus.state = "out"
}
}
Button {
id: button2
text: qsTr("Upload Wallpaper to Steam")
onClicked: {
uploadToSteamWorkshop()
createImportStatus.state = "in"
}
}
}
}
states: [
State {
name: "out"
PropertyChanges {
target: wrapper
anchors.topMargin: 500
opacity: 0
}
PropertyChanges {
target: effect
color: "transparent"
opacity: 0
}
},
State {
name: "in"
PropertyChanges {
target: wrapper
anchors.topMargin: 100
opacity: 1
}
PropertyChanges {
target: effect
color: "black"
opacity: 0.4
}
}
]
transitions: [
Transition {
from: "out"
to: "in"
reversible: true
SequentialAnimation {
NumberAnimation {
target: wrapper
properties: "opacity, anchors.topMargin"
duration: 200
easing.type: Easing.OutQuart
}
NumberAnimation {
target: effect
properties: "opacity, color"
duration: 200
easing.type: Easing.OutQuart
}
}
}
]
}

View File

@ -305,7 +305,7 @@ Item {
Text {
id: txtUploadSize
color: "gray"
font.pixelSize: 16
font.pointSize: 14
height: 30
anchors {
horizontalCenter: parent.horizontalCenter
@ -319,7 +319,7 @@ Item {
id: txtUploadStatus
text: qsTr("Creating Workshop Item")
color: "gray"
font.pixelSize: 16
font.pointSize: 12
height: 30
anchors {
horizontalCenter: parent.horizontalCenter

View File

@ -28,7 +28,7 @@ Item {
}
color: "white"
font.pixelSize: 28
font.pointSize: 21
font.family: "Roboto"
font.weight: Font.Thin

View File

@ -19,7 +19,7 @@ Item {
}
color: "white"
font.pixelSize: 28
font.pointSize: 21
font.family: "Roboto"
font.weight: Font.Thin
@ -53,12 +53,14 @@ Item {
text: qsTr("Examples Widgets and Scenes")
font.family: "Roboto"
font.pixelSize: 18
font.pointSize: 16
color: "white"
anchors {
top: btnCreateEmptyWidget.bottom
topMargin: 30
left:parent.left
leftMargin: 30
}
}

View File

@ -68,8 +68,8 @@ Item {
id: name
text: btnEmpty.text
font.family: "Roboto"
font.pixelSize: 18
font.pointSize: 14
color: "gray"
anchors {
left: imgIcon.right
@ -81,8 +81,8 @@ Item {
text: ">"
font.family: "Roboto"
font.pixelSize: 24
font.pointSize: 18
color: "#b9b9b9"
anchors {
right: parent.right

View File

@ -9,7 +9,7 @@ import net.aimber.create 1.0
Item {
id: wrapperError
opacity: 0
Text {
id: txtErrorHeadline
text: qsTr("An error occurred!")
@ -22,10 +22,9 @@ Item {
font.family: "Segoe UI, Roboto"
font.weight: Font.Light
color: Material.color(Material.Red)
font.pixelSize: 32
font.pointSize: 32
}
Rectangle {
id: rectangle1
color: "#eeeeee"
@ -38,7 +37,7 @@ Item {
margins: 30
bottomMargin: 10
}
Flickable {
anchors.fill: parent
clip: true
@ -57,7 +56,7 @@ Item {
}
wrapMode: Text.WordWrap
color: "#626262"
height: txtFFMPEGDebug.paintedHeight
}
Connections {
@ -68,7 +67,7 @@ Item {
}
}
}
Button {
id: btnBack
text: qsTr("Back to create and send an error report!")

View File

@ -20,7 +20,7 @@ Item {
font.weight: Font.Light
color: "#757575"
font.pixelSize: 23
font.pointSize: 23
anchors {
top: parent.top
left: parent.left
@ -68,7 +68,7 @@ Item {
id: txtConvertNumber
color: "white"
text: qsTr("")
font.pixelSize: 21
font.pointSize: 21
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
@ -80,7 +80,7 @@ Item {
id: txtConvert
color: "white"
text: qsTr("Generating preview video...")
font.pixelSize: 14
font.pointSize: 14
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom

View File

@ -71,17 +71,15 @@ Item {
Rectangle {
id: wrapper
width: 910
radius: 4
height: 460
anchors {
horizontalCenter: parent.horizontalCenter
top: parent.top
topMargin: 0
}
width: 910
radius: 4
height: 460
Loader {
id: loader_wrapperContent
anchors.fill: parent

View File

@ -62,7 +62,7 @@ DropArea {
Text {
id: text1
text: qsTr("Bad File!!")
font.pixelSize: 24
font.pointSize: 24
opacity: 1
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter

View File

@ -102,7 +102,7 @@ Item {
text: qsTr("Pull to refresh!")
anchors.centerIn: parent
color: "gray"
font.pixelSize: 18
font.pointSize: 18
}
}
footer: Item {

View File

@ -70,7 +70,7 @@ Item {
id: txtHeadline2
text: qsTr("DISTINCT")
font.family: "Roboto Mono Thin"
font.pixelSize: 75
font.pointSize: 75
color: "white"
font.weight: Font.Normal

View File

@ -165,7 +165,7 @@ Item {
font.family: "Roboto"
font.weight: Font.Thin
verticalAlignment: Text.AlignVCenter
font.pixelSize: 21
font.pointSize: 16
color: "#2F2F2F"
wrapMode: Text.WrapAnywhere
anchors {
@ -185,7 +185,7 @@ Item {
horizontalAlignment: Qt.AlignHCenter
font.family: "Roboto"
font.pixelSize: 18
font.pointSize: 14
color: "#2F2F2F"
wrapMode: Text.WrapAnywhere
anchors {
@ -239,7 +239,7 @@ Item {
font.family: "Roboto"
verticalAlignment: Text.AlignVCenter
font.pixelSize: 14
font.pointSize: 10
color: "#626262"
wrapMode: Text.WrapAnywhere
anchors {
@ -294,7 +294,7 @@ Item {
font.family: "Roboto"
verticalAlignment: Text.AlignVCenter
font.pixelSize: 14
font.pointSize: 10
color: "#626262"
wrapMode: Text.WrapAnywhere
anchors {

View File

@ -14,7 +14,7 @@ Item {
imgPreview.opacity = 1
}
property int fontSize: 14
property int fontSize: 10
property int index
property bool isSelected: false
property bool isWallpaperActive: false
@ -42,7 +42,7 @@ Item {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
//color: "white"
font.pixelSize: monitorSelectionItem.fontSize
font.pointSize: monitorSelectionItem.fontSize
font.family: "Roboto"
wrapMode: Text.WrapAnywhere
}

View File

@ -59,7 +59,7 @@ Item {
Text {
id: txtHeadline
text: qsTr("Wallpaper Configuration")
font.pixelSize: 21
font.pointSize: 21
color: "#626262"
font.family: "Roboto"
font.weight: Font.Thin

View File

@ -21,7 +21,7 @@ Item {
id: txtDescription
text: name
width: 100
font.pixelSize: isHeadline ? 21 : 14
font.pointSize: isHeadline ? 21 : 14
anchors.verticalCenter: parent.verticalCenter
font.family: "Roboto"
font.weight: Font.Normal

View File

@ -1,6 +1,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.3
import QtQuick.Controls.Material 2.2
Item {
id: settingsBool
property string headline: "Headline"
@ -36,7 +37,7 @@ Item {
}
font.pixelSize: 16
font.pointSize: 12
font.family: "Roboto"
}
@ -48,7 +49,7 @@ Item {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pixelSize: 12
font.pointSize: 10
font.family: "Roboto"
anchors{
top:txtHeadline.bottom

View File

@ -147,7 +147,7 @@ Item {
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignLeft
font.pixelSize: 14
font.pointSize: 10
font.family: "Roboto"
anchors{
right:parent.right
@ -345,7 +345,7 @@ Item {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pixelSize: 16
font.pointSize: 16
anchors {
top: parent.top
topMargin: 6
@ -361,7 +361,7 @@ Item {
wrapMode: Text.WordWrap
verticalAlignment: Text.AlignTop
horizontalAlignment: Text.AlignLeft
font.pixelSize: 14
font.pointSize: 10
font.family: "Roboto"
width: parent.width * .6
anchors {

View File

@ -42,7 +42,7 @@ Item {
}
font.pixelSize: 16
font.pointSize: 12
}
Text {
@ -53,7 +53,7 @@ Item {
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignLeft
font.pixelSize: 12
font.pointSize: 10
font.family: "Roboto"
anchors{
top:txtHeadline.bottom

View File

@ -36,7 +36,7 @@ Item {
}
font.pixelSize: 16
font.pointSize: 12
font.family: "Roboto"
}
@ -48,7 +48,7 @@ Item {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
wrapMode: Text.WordWrap
font.pixelSize: 12
font.pointSize: 10
font.family: "Roboto"
anchors{
top:txtHeadline.bottom

View File

@ -62,7 +62,7 @@ Item {
Text {
id: txtHeadline
text: settingsHeader.text
font.pixelSize: 18
font.pointSize: 12
color: "white"
verticalAlignment: Text.AlignTop

View File

@ -25,7 +25,7 @@ Window {
id: text1
color: "#ffffff"
text: "empty"
font.pixelSize: 29
font.pointSize: 29
}