Skip to content

Commit

Permalink
Merge pull request #72 from ignitionrobotics/master_to_2
Browse files Browse the repository at this point in the history
master ➡️ 2

Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina authored Jun 12, 2020
2 parents cc97a8a + 9ecbe70 commit f2388ac
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/ignition/gui/qml/IgnCard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ Pane {
*/
property string closeIcon: "\u2715"

/**
* The plugin backgroung color. Default: transparent
*/
property string cardBackground: "#00000000"

/**
*
*/
Expand Down Expand Up @@ -446,7 +451,7 @@ Pane {
anchors.fill: parent
anchors.topMargin: card.showTitleBar ? 50 : 0
clip: true
color: "transparent"
color: cardBackground

onChildrenChanged: {
card.syncTheFamily()
Expand Down
41 changes: 41 additions & 0 deletions include/ignition/gui/qml/IgnCardSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
}
1 change: 1 addition & 0 deletions include/ignition/gui/qml/PluginMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Menu {
onClicked: {
MainWindow.OnAddPlugin(modelData);
drawer.close()
pluginMenu.close()
}
}

Expand Down
1 change: 1 addition & 0 deletions src/MainWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ QStringList MainWindow::PluginListModel() const
}
}

pluginNames.sort();
return pluginNames;
}

Expand Down

0 comments on commit f2388ac

Please sign in to comment.