Commit c9ae6c8b authored by Leander Schulten's avatar Leander Schulten

UI: ControlPane: Use Popups instead of Dialogs. See #57

parent 55a87d86
import QtQuick 2.7 import QtQuick 2.12
import QtQuick.Controls 2.2 import QtQuick.Controls 2.12
import QtQuick.Layouts 1.0 import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import QtQuick.Dialogs 1.2
import custom.licht 1.0 import custom.licht 1.0
import "../HelpSystem" import "../HelpSystem"
...@@ -157,10 +156,11 @@ ControlPanel{ ...@@ -157,10 +156,11 @@ ControlPanel{
} }
Dialog{ Dialog{
modality: Qt.WindowModal modal: true
x: (parent.width - width) / 2
y: (parent.height - height) / 2
id:selectProgramDialog id:selectProgramDialog
property int select: ControlView.Select.Program property int select: ControlView.Select.Program
title: select === ControlView.Select.Program?"Select Program":"Select ProgramBlock"
width:300 width:300
function createProgram(){ function createProgram(){
select = ControlView.Select.Program; select = ControlView.Select.Program;
...@@ -170,13 +170,15 @@ ControlPanel{ ...@@ -170,13 +170,15 @@ ControlPanel{
select = ControlView.Select.ProgramBlock; select = ControlView.Select.ProgramBlock;
visible = true; visible = true;
} }
contentItem: RowLayout { contentItem: ColumnLayout{
Pane{ spacing: 8
Layout.fillWidth: true
ColumnLayout{ Label{
anchors.left: parent.left text: selectProgramDialog.select === ControlView.Select.Program ? "Select Program" : "Select ProgramBlock"
anchors.right: parent.right font.bold: true
spacing: 10 font.pointSize: 14
}
ComboBox{ ComboBox{
Layout.fillWidth: true Layout.fillWidth: true
id:programmSelect id:programmSelect
...@@ -205,8 +207,6 @@ ControlPanel{ ...@@ -205,8 +207,6 @@ ControlPanel{
} }
} }
} }
}
}
Help{ Help{
id: help id: help
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment