Use black as text color in TextField and TextInput
It seems that there's not a single theme out there which properly sets viewTextColor. The background of textedits is white, so the text has to be black. On Air(-mobile) this is not a problem, since the text is black anyway, on dark themes (which set the text color to white), text simply isn't visible. We'll have to look into how themes implement viewtextcolor, should probably fix the themes instead of the components, but this makes it work until we do.
This commit is contained in:
parent
d6a96e32ee
commit
7024329085
@ -167,7 +167,8 @@ Item {
|
|||||||
font.underline: theme.defaultFont.underline
|
font.underline: theme.defaultFont.underline
|
||||||
font.weight: theme.defaultFont.weight
|
font.weight: theme.defaultFont.weight
|
||||||
font.wordSpacing: theme.defaultFont.wordSpacing
|
font.wordSpacing: theme.defaultFont.wordSpacing
|
||||||
color: theme.viewTextColor
|
//color: theme.viewTextColor
|
||||||
|
color: Qt.color("black")
|
||||||
selectByMouse: verticalScroll.interactive
|
selectByMouse: verticalScroll.interactive
|
||||||
|
|
||||||
onCursorPositionChanged: {
|
onCursorPositionChanged: {
|
||||||
|
@ -128,7 +128,8 @@ Item {
|
|||||||
text: placeholderText
|
text: placeholderText
|
||||||
visible: textInput.text == "" && !textField.activeFocus
|
visible: textInput.text == "" && !textField.activeFocus
|
||||||
// XXX: using textColor and low opacity for theming placeholderText
|
// XXX: using textColor and low opacity for theming placeholderText
|
||||||
color: theme.viewTextColor
|
// color: theme.viewTextColor
|
||||||
|
color: Qt.color("black")
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
clip: true
|
clip: true
|
||||||
@ -159,7 +160,8 @@ Item {
|
|||||||
rightMargin: 2 * base.margins.right
|
rightMargin: 2 * base.margins.right
|
||||||
}
|
}
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
color: theme.textColor
|
color: Qt.color("black")
|
||||||
|
//color: theme.textColor
|
||||||
enabled: textField.enabled
|
enabled: textField.enabled
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
@ -298,7 +298,8 @@ Item {
|
|||||||
font.underline: theme.defaultFont.underline
|
font.underline: theme.defaultFont.underline
|
||||||
font.weight: theme.defaultFont.weight
|
font.weight: theme.defaultFont.weight
|
||||||
font.wordSpacing: theme.defaultFont.wordSpacing
|
font.wordSpacing: theme.defaultFont.wordSpacing
|
||||||
color: theme.viewTextColor
|
color: Qt.color("black")
|
||||||
|
//color: theme.viewTextColor
|
||||||
selectByMouse: verticalScroll.interactive
|
selectByMouse: verticalScroll.interactive
|
||||||
|
|
||||||
onCursorPositionChanged: {
|
onCursorPositionChanged: {
|
||||||
|
@ -272,7 +272,8 @@ FocusScope {
|
|||||||
text: placeholderText
|
text: placeholderText
|
||||||
visible: textInput.text == "" && !textField.activeFocus
|
visible: textInput.text == "" && !textField.activeFocus
|
||||||
// XXX: using textColor and low opacity for theming placeholderText
|
// XXX: using textColor and low opacity for theming placeholderText
|
||||||
color: theme.viewTextColor
|
//color: theme.viewTextColor
|
||||||
|
color: Qt.color("black")
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
clip: true
|
clip: true
|
||||||
@ -300,7 +301,8 @@ FocusScope {
|
|||||||
}
|
}
|
||||||
passwordCharacter: "•"
|
passwordCharacter: "•"
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
color: theme.textColor
|
color: Qt.color("black")
|
||||||
|
//color: theme.textColor
|
||||||
enabled: textField.enabled
|
enabled: textField.enabled
|
||||||
clip: true
|
clip: true
|
||||||
focus: true
|
focus: true
|
||||||
|
Loading…
Reference in New Issue
Block a user