diff -r 40da62e57d85 -r 9903a5edeb56 FontsTab.qml --- a/FontsTab.qml Wed May 28 20:14:23 2014 +0200 +++ b/FontsTab.qml Wed May 28 21:31:03 2014 +0200 @@ -5,15 +5,15 @@ import Qt.labs.settings 1.0 Item { - width: 640 - height: 480 - //SystemPalette { id: palette } clip: true - - - + // Settings { property alias font: textFontDemoLowerCase.font; + property alias checkBoxScalableFonts: checkBoxScalableFonts.checked + property alias checkBoxNonScalableFonts: checkBoxNonScalableFonts.checked + property alias checkBoxMonospacedFonts: checkBoxMonospacedFonts.checked + property alias checkBoxProportionalFonts: checkBoxProportionalFonts.checked + } @@ -22,23 +22,23 @@ id: fontDialog visible: false modality: Qt.WindowModal - scalableFonts: fontDialogScalableFonts.checked - nonScalableFonts: fontDialogNonScalableFonts.checked - monospacedFonts: fontDialogMonospacedFonts.checked - proportionalFonts: fontDialogProportionalFonts.checked + scalableFonts: checkBoxScalableFonts.checked + nonScalableFonts: checkBoxNonScalableFonts.checked + monospacedFonts: checkBoxMonospacedFonts.checked + proportionalFonts: checkBoxProportionalFonts.checked title: qsTr("Choose a font") font: textFontDemoLowerCase.font currentFont: textFontDemoLowerCase.font - onCurrentFontChanged: { console.log("CurrentFontChanged: " + currentFont) } - onFontChanged: { console.log("FontChanged: " + font) } + //onCurrentFontChanged: { console.log("CurrentFontChanged: " + currentFont) } + //onFontChanged: { console.log("FontChanged: " + font) } onAccepted: { - console.log("Accepted: " + font); + //console.log("Accepted: " + font); textFontDemoLowerCase.font = currentFont; display.font = currentFont; //textFontDemoUpperCase.font = currentFont; //textFontDemoDigits.font = currentFont; } - onRejected: { console.log("Rejected") } + //onRejected: { console.log("Rejected") } } // ColumnLayout { @@ -88,24 +88,28 @@ columnSpacing: 8 CheckBox { - id: fontDialogScalableFonts + id: checkBoxScalableFonts text: "Scalable fonts" - Binding on checked { value: fontDialog.scalableFonts } + checked: true + //Binding on checked { value: fontDialog.scalableFonts } } CheckBox { - id: fontDialogNonScalableFonts + id: checkBoxNonScalableFonts text: "Non scalable fonts" - Binding on checked { value: fontDialog.nonScalableFonts } + checked: true + //Binding on checked { value: fontDialog.nonScalableFonts } } CheckBox { - id: fontDialogMonospacedFonts + id: checkBoxMonospacedFonts text: "Monospaced fonts" - Binding on checked { value: fontDialog.monospacedFonts } + checked: true + //Binding on checked { value: fontDialog.monospacedFonts } } CheckBox { - id: fontDialogProportionalFonts + id: checkBoxProportionalFonts text: "Proportional fonts" - Binding on checked { value: fontDialog.proportionalFonts } + checked: true + //Binding on checked { value: fontDialog.proportionalFonts } } } @@ -113,7 +117,12 @@ Button { text: qsTr("Change font") - onClicked: fontDialog.open() + onClicked: { + //We had to do this double magic cause otherwise our font list + //would not reflect our options. + fontDialog.setVisible(true); + fontDialog.open(); + } } } //ColumnLayout } //Item