edit cmake files

edit font dialog
This commit is contained in:
arcan1s
2015-08-01 00:10:18 +03:00
parent 4c9e39ec9b
commit 6173b60806
14 changed files with 223 additions and 175 deletions

View File

@ -68,7 +68,10 @@ Item {
id: selectFont
width: parent.width * 2 / 3
text: plasmoid.configuration.fontFamily
onClicked: fontDialog.visible = true
onClicked: {
fontDialog.setFont()
fontDialog.visible = true
}
}
}
@ -208,13 +211,22 @@ Item {
QtDialogs.FontDialog {
id: fontDialog
title: i18n("Select a font")
font: Qt.font({ family: selectFont.text, pointSize: fontSize.value, weight: Font.Normal })
signal setFont
onAccepted: {
selectFont.text = fontDialog.font.family
fontSize.value = fontDialog.font.pointSize
fontStyle.currentIndex = fontDialog.font.italic ? 1 : 0
fontWeight.currentIndex = weight[fontDialog.font.weight]
}
onSetFont: {
fontDialog.font = Qt.font({
family: selectFont.text,
pointSize: fontSize.value > 0 ? fontSize.value : 12,
italic: fontStyle.currentIndex == 1,
weight: Font.Normal,
})
}
}
Component.onCompleted: {