aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-08-12 14:22:07 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-08-12 13:11:01 +0000
commit5f324ed2013e66562c35100eb05f77083529cf2b (patch)
treeaec14a257dc40260f1f8b53eb1d3c90eccd4bdd9 /examples
parent9f6005d967d6409e94f9e2f1811b3531ebb8b882 (diff)
texteditor: use "brush" icon for text color and "A" for font
"F" looks a bit silly. Even though most word processing applications seem to use the "A" icon with a bar underneath it for the text color, we want to use it to represent the button that opens the font dialog, since we don't use comboboxes for that. Change-Id: I3cc60ffbe388644cdcbd9e8ec0dcffbc041aa124 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/quickcontrols2/texteditor/fonts/fontello.ttfbin9188 -> 9496 bytes
-rw-r--r--examples/quickcontrols2/texteditor/qml/texteditor.qml30
2 files changed, 15 insertions, 15 deletions
diff --git a/examples/quickcontrols2/texteditor/fonts/fontello.ttf b/examples/quickcontrols2/texteditor/fonts/fontello.ttf
index 9871d4c5..d2914494 100644
--- a/examples/quickcontrols2/texteditor/fonts/fontello.ttf
+++ b/examples/quickcontrols2/texteditor/fonts/fontello.ttf
Binary files differ
diff --git a/examples/quickcontrols2/texteditor/qml/texteditor.qml b/examples/quickcontrols2/texteditor/qml/texteditor.qml
index ab56ae2b..72b5da1a 100644
--- a/examples/quickcontrols2/texteditor/qml/texteditor.qml
+++ b/examples/quickcontrols2/texteditor/qml/texteditor.qml
@@ -271,8 +271,21 @@ ApplicationWindow {
onClicked: document.underline = !document.underline
}
ToolButton {
+ id: fontFamilyToolButton
+ text: qsTr("\uE808")
+ font.family: "fontello"
+ font.bold: document.bold
+ font.italic: document.italic
+ font.underline: document.underline
+ onClicked: {
+ fontDialog.currentFont.family = document.fontFamily;
+ fontDialog.currentFont.pointSize = document.fontSize;
+ fontDialog.open();
+ }
+ }
+ ToolButton {
id: textColorButton
- text: "\uE808"
+ text: "\uF1FC"
font.family: "fontello"
focusPolicy: Qt.TabFocus
onClicked: colorDialog.open()
@@ -284,7 +297,7 @@ ApplicationWindow {
parent: textColorButton.contentItem
anchors.horizontalCenter: parent.horizontalCenter
anchors.baseline: parent.baseline
- anchors.baselineOffset: 4
+ anchors.baselineOffset: 6
TextMetrics {
id: aFontMetrics
@@ -293,19 +306,6 @@ ApplicationWindow {
}
}
}
- ToolButton {
- id: fontFamilyToolButton
- text: qsTr("F")
- font.family: document.fontFamily
- font.bold: document.bold
- font.italic: document.italic
- font.underline: document.underline
- onClicked: {
- fontDialog.currentFont.family = document.fontFamily;
- fontDialog.currentFont.pointSize = document.fontSize;
- fontDialog.open();
- }
- }
ToolSeparator {
contentItem.visible: formatRow.y === alignRow.y
}