Compare commits
4 Commits
fix-color-
...
fix-color-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6fc65bffd | ||
|
|
9364aa3536 | ||
|
|
e0708e519c | ||
|
|
ebbb1f82fe |
@@ -23,9 +23,7 @@ import QtQuick.Dialogs 1.1
|
||||
|
||||
Item {
|
||||
id: rootItem
|
||||
|
||||
signal colorSelected (color color)
|
||||
property color color
|
||||
property alias color: colorDialog.color
|
||||
property string name
|
||||
|
||||
ColorDialog {
|
||||
@@ -33,10 +31,6 @@ Item {
|
||||
title: qsTr("Choose a color")
|
||||
modality: Qt.ApplicationModal
|
||||
visible: false
|
||||
|
||||
//This is a workaround to a Qt 5.2 bug.
|
||||
onColorChanged: if (Qt.platform.os !== "osx") colorSelected(color)
|
||||
onAccepted: if (Qt.platform.os === "osx") colorSelected(color)
|
||||
}
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -121,18 +121,24 @@ Tab{
|
||||
RowLayout{
|
||||
Layout.fillWidth: true
|
||||
ColorButton{
|
||||
property color settingsColor: appSettings._fontColor
|
||||
onSettingsColorChanged: color = settingsColor
|
||||
|
||||
name: qsTr("Font")
|
||||
height: 50
|
||||
Layout.fillWidth: true
|
||||
onColorSelected: appSettings._fontColor = color;
|
||||
color: appSettings._fontColor
|
||||
onColorChanged: appSettings._fontColor = color
|
||||
Component.onCompleted: { color = settingsColor; }
|
||||
}
|
||||
ColorButton{
|
||||
property color settingsColor: appSettings._backgroundColor
|
||||
onSettingsColorChanged: color = settingsColor
|
||||
|
||||
name: qsTr("Background")
|
||||
height: 50
|
||||
Layout.fillWidth: true
|
||||
onColorSelected: appSettings._backgroundColor = color;
|
||||
color: appSettings._backgroundColor
|
||||
onColorChanged: appSettings._backgroundColor = color
|
||||
Component.onCompleted: { color = settingsColor;}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user