From c1d5e458e0cec8d683dafd99f37df631c719dfd8 Mon Sep 17 00:00:00 2001 From: Sarathkrishnan Ramesh Date: Tue, 12 May 2020 04:31:41 +0530 Subject: [PATCH 1/3] Close plugin menu after a plugin has been added (#60) Signed-off-by: Sarathkrishnan Ramesh --- include/ignition/gui/qml/PluginMenu.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/include/ignition/gui/qml/PluginMenu.qml b/include/ignition/gui/qml/PluginMenu.qml index f8a6fe2de..c1fb39e01 100644 --- a/include/ignition/gui/qml/PluginMenu.qml +++ b/include/ignition/gui/qml/PluginMenu.qml @@ -38,6 +38,7 @@ Menu { onClicked: { MainWindow.OnAddPlugin(modelData); drawer.close() + pluginMenu.close() } } From e3019309d85092ca4f145843be37ec8b92ba5258 Mon Sep 17 00:00:00 2001 From: Sarathkrishnan Ramesh Date: Wed, 13 May 2020 20:56:12 +0530 Subject: [PATCH 2/3] Add color palette to plugin settings to change background color (#62) * Add color palette to plugin settings to change background color * Save plugin background color information in config file Signed-off-by: Sarathkrishnan Ramesh --- include/ignition/gui/qml/IgnCard.qml | 7 +++- include/ignition/gui/qml/IgnCardSettings.qml | 41 ++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/include/ignition/gui/qml/IgnCard.qml b/include/ignition/gui/qml/IgnCard.qml index d74728fbb..c9af52dc8 100644 --- a/include/ignition/gui/qml/IgnCard.qml +++ b/include/ignition/gui/qml/IgnCard.qml @@ -74,6 +74,11 @@ Pane { */ property string closeIcon: "\u2715" + /** + * The plugin backgroung color. Default: transparent + */ + property string cardBackground: "#00000000" + /** * */ @@ -446,7 +451,7 @@ Pane { anchors.fill: parent anchors.topMargin: card.showTitleBar ? 50 : 0 clip: true - color: "transparent" + color: cardBackground onChildrenChanged: { card.syncTheFamily() diff --git a/include/ignition/gui/qml/IgnCardSettings.qml b/include/ignition/gui/qml/IgnCardSettings.qml index 2951b649e..e28ba7159 100644 --- a/include/ignition/gui/qml/IgnCardSettings.qml +++ b/include/ignition/gui/qml/IgnCardSettings.qml @@ -18,6 +18,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.3 import QtQuick.Window 2.2 +import QtQuick.Dialogs 1.0 import "qrc:/qml" Dialog { @@ -72,6 +73,31 @@ Dialog { } } + GridLayout { + width: parent.width + columns: 3 + visible: !card.standalone + + Label { + text: "Background Color " + } + + Button { + Layout.preferredWidth: parent.width * 0.4 + onClicked: colorDialog.open() + background: Rectangle { + y: 8 + width: 50 + height: 30 + id: "bgColor" + color: cardBackground + border.color: "#000000" + border.width: 2 + } + } + } + + GridLayout { width: parent.width columns: 2 @@ -167,4 +193,19 @@ Dialog { } } } + + ColorDialog { + id: colorDialog + title: "Please choose a color" + showAlphaChannel : true + onAccepted: { + content.color = colorDialog.color + bgColor.color = colorDialog.color + cardBackground = colorDialog.color + } + onRejected: { + console.log("Canceled") + } + Component.onCompleted: visible = false + } } From 9ecbe7071cd41c94518fb41df3967b7536e9702f Mon Sep 17 00:00:00 2001 From: Sarathkrishnan Ramesh Date: Fri, 5 Jun 2020 04:52:32 +0530 Subject: [PATCH 3/3] Sort GUI plugins alphabetically (#71) Signed-off-by: Sarathkrishnan Ramesh --- src/MainWindow.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MainWindow.cc b/src/MainWindow.cc index 3b32f1bd4..a0a40d0ca 100644 --- a/src/MainWindow.cc +++ b/src/MainWindow.cc @@ -129,6 +129,7 @@ QStringList MainWindow::PluginListModel() const } } + pluginNames.sort(); return pluginNames; }