mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-03-26 20:48:53 +00:00
26 lines
619 B
QML
26 lines
619 B
QML
import QtQuick 2.1
|
|
import QtQuick.Dialogs 1.1
|
|
|
|
ColorDialog {
|
|
id: colorDialog
|
|
title: qsTr("Choose a color")
|
|
modality: Qt.ApplicationModal
|
|
|
|
property string color_to_change
|
|
|
|
color: "green"
|
|
|
|
//This is a workaround to a Qt 5.2 bug.
|
|
onCurrentColorChanged: colorDialog.color = colorDialog.currentColor;
|
|
|
|
onAccepted: {
|
|
console.log("[MyColorDialog.qml] Color chosen: " + colorDialog.color);
|
|
shadersettings[color_to_change] = colorDialog.color;
|
|
}
|
|
onRejected: {
|
|
console.log("[MyColorDialog.qml] No color selected")
|
|
}
|
|
|
|
Component.onCompleted: visible = true
|
|
}
|