summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/Button.qml14
-rw-r--r--components/CheckBox.qml1
-rw-r--r--components/ComboBox.qml8
-rw-r--r--components/GroupBox.qml9
-rw-r--r--components/RadioButton.qml1
-rw-r--r--components/SpinBox.qml3
-rw-r--r--components/TabBar.qml6
-rw-r--r--components/TableView.qml4
-rw-r--r--components/TextArea.qml1
-rw-r--r--components/TextField.qml2
10 files changed, 42 insertions, 7 deletions
diff --git a/components/Button.qml b/components/Button.qml
index 4ae591d1..730f2d05 100644
--- a/components/Button.qml
+++ b/components/Button.qml
@@ -59,14 +59,26 @@ BasicButton {
sunken: pressed || checked
raised: !(pressed || checked)
hover: containsMouse
- text: iconSource === "" ? "" : button.text
+// text: iconSource === "" ? "" : button.text
hasFocus: button.focus
hint: button.styleHint
// If no icon, let the style do the drawing
activeControl: defaultbutton ? "default" : "f"
+
+ Text {
+ id:text
+ color: textColor
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ text: button.text
+ horizontalAlignment: Text.Center
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
+ }
}
+
// ## TODO: move to style implementation
// label: Item {
// // Used as a fallback since I can't pass the imageURL
diff --git a/components/CheckBox.qml b/components/CheckBox.qml
index 7a254dd9..27175517 100644
--- a/components/CheckBox.qml
+++ b/components/CheckBox.qml
@@ -81,6 +81,7 @@ FocusScope {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
elide: Text.ElideRight
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
}
}
diff --git a/components/ComboBox.qml b/components/ComboBox.qml
index 69aff685..4545a5ff 100644
--- a/components/ComboBox.qml
+++ b/components/ComboBox.qml
@@ -112,10 +112,16 @@ Private.BasicButton {
raised: !sunken
hover: comboBox.containsMouse
enabled: comboBox.enabled
- text: comboBox.selectedText
+ //text: comboBox.selectedText
hasFocus: comboBox.focus
contentHeight: 18
Component.onCompleted: popup.center = styleHint("comboboxpopup");
+ Text {
+ id: textItem
+ text: comboBox.selectedText
+ anchors.centerIn: parent
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
+ }
}
// ToDo: adjust margins so that selected popup label
diff --git a/components/GroupBox.qml b/components/GroupBox.qml
index c131a7f0..b0e4538e 100644
--- a/components/GroupBox.qml
+++ b/components/GroupBox.qml
@@ -66,13 +66,20 @@ Item {
id: styleitem
elementType: "groupbox"
anchors.fill: parent
- text: groupbox.title
+ //text: groupbox.title
hover: checkbox.containsMouse
on: checkbox.checked
hasFocus: checkbox.activeFocus
activeControl: checkable ? "checkbox" : ""
sunken: !flat
contentHeight: (title.length > 0 || checkable) ? 24 : 4
+ Text {
+ id: textItem
+ text: groupbox.title
+ anchors.top: parent.top
+ anchors.left: parent.left
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
+ }
}
Loader {
diff --git a/components/RadioButton.qml b/components/RadioButton.qml
index c6ff4a0f..c633ab01 100644
--- a/components/RadioButton.qml
+++ b/components/RadioButton.qml
@@ -67,6 +67,7 @@ CheckBox {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
elide: Text.ElideRight
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
}
}
}
diff --git a/components/SpinBox.qml b/components/SpinBox.qml
index 8c07f596..0007450c 100644
--- a/components/SpinBox.qml
+++ b/components/SpinBox.qml
@@ -201,6 +201,7 @@ FocusScope {
selectByMouse: true
selectionColor: syspal.highlight
selectedTextColor: syspal.highlightedText
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
// validator: DoubleValidator { bottom: minimumValue; top: maximumValue; }
onAccepted: {setValue(input.text)}
@@ -212,6 +213,8 @@ FocusScope {
anchors.rightMargin: 4
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
+
}
}
diff --git a/components/TabBar.qml b/components/TabBar.qml
index c5a923a4..c965d067 100644
--- a/components/TabBar.qml
+++ b/components/TabBar.qml
@@ -124,7 +124,7 @@ Item {
elementType: "tab"
selected: tab.selected
info: tabbar.position
- text: tabFrame.tabs[index].title
+// text: tabFrame.tabs[index].title
hover: mousearea.containsMouse
hasFocus: tabbar.focus && selected
property bool first: index === 0
@@ -137,11 +137,11 @@ Item {
contentHeight: Math.max(style.fontHeight + tabVSpace + 6, 0)
Text {
id: textitem
- // Used for size hint
- visible: false
+ anchors.centerIn: parent
onWidthChanged: updateRect()
onHeightChanged: updateRect()
text: tabFrame.tabs[index].title
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
}
}
MouseArea {
diff --git a/components/TableView.qml b/components/TableView.qml
index 8df6fe9b..14bf1517 100644
--- a/components/TableView.qml
+++ b/components/TableView.qml
@@ -168,12 +168,14 @@ FocusScope{
elide: itemElideMode
text: itemValue ? itemValue : ""
color: itemForeground
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
}
Text {
id: sizehint
font: label.font
text: itemValue ? itemValue : ""
visible: false
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
}
}
}
@@ -432,7 +434,7 @@ FocusScope{
}
- Text{ id:text }
+ Text{ id:text; renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering }
Item {
id: tableColumn
diff --git a/components/TextArea.qml b/components/TextArea.qml
index b5deaa9d..b663ce10 100644
--- a/components/TextArea.qml
+++ b/components/TextArea.qml
@@ -79,6 +79,7 @@ ScrollArea {
y: documentMargins
// height has to be big enough to handle mouse focus
height: Math.max(area.height, paintedHeight)
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
selectByMouse: true
readOnly: false
diff --git a/components/TextField.qml b/components/TextField.qml
index c0d7bf8f..0d2d123a 100644
--- a/components/TextField.qml
+++ b/components/TextField.qml
@@ -168,6 +168,7 @@ FocusScope {
selectByMouse:true
selectionColor: syspal.highlight
selectedTextColor: syspal.highlightedText
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
// Todo move these margins to StyleItem
anchors.leftMargin: 4
@@ -194,5 +195,6 @@ FocusScope {
clip: true
elide: Text.ElideRight
Behavior on opacity { NumberAnimation { duration: 90 } }
+ renderType: Desktop.nativeTextRendering ? Text.NativeRendering : Text.QtRendering
}
}