112 lines
3.1 KiB
QML
112 lines
3.1 KiB
QML
import QtQuick 2.0
|
|
import QtQuick.Controls 2.0
|
|
|
|
import "../components"
|
|
import "../components/layout"
|
|
|
|
import de.itsblue.ScStw.Styling 2.0
|
|
import de.itsblue.ScStw.Styling.Components 1.0
|
|
|
|
ToolBar {
|
|
id: control
|
|
|
|
/*
|
|
Grid {
|
|
id: loweMenuGrd
|
|
|
|
property int spacingMultiplier: 200 * (getActiveChildren() - 1)
|
|
property int activeChildren: getActiveChildren()
|
|
|
|
function getActiveChildren() {
|
|
var childrenCount = 0
|
|
for (var i = 0; i < children.length; i++)
|
|
{
|
|
if(children[i].enabled){
|
|
childrenCount ++
|
|
}
|
|
}
|
|
|
|
return childrenCount
|
|
}
|
|
|
|
anchors.centerIn: parent
|
|
|
|
height: childrenRect.height
|
|
width: childrenRect.width
|
|
|
|
rows: app.landscape() ? activeChildren:1
|
|
columns: app.landscape() ? 1:activeChildren
|
|
|
|
spacing: 0// app.landscape() ? parent.height * spacingMultiplier * 0.001:parent.width * spacingMultiplier * 0.001
|
|
|
|
Behavior on spacingMultiplier {
|
|
NumberAnimation {
|
|
duration: 200
|
|
}
|
|
}
|
|
|
|
FancyButton {
|
|
id: settingsButt
|
|
|
|
height: app.landscape() ? menu_container.width * 0.7:menu_container.height * 0.7
|
|
width: height
|
|
|
|
onClicked: {
|
|
settingsDialog.open()
|
|
}
|
|
|
|
image: appTheme.theme.images.settIcon
|
|
|
|
backgroundColor: parent.pressed ? appTheme.theme.colors.buttonPressed:appTheme.theme.colors.button
|
|
|
|
}
|
|
|
|
Item {
|
|
height: profilesButt.height
|
|
width: profilesButt.height
|
|
}
|
|
|
|
FancyButton {
|
|
id: profilesButt
|
|
|
|
enabled: height > 0
|
|
|
|
state: speedBackend.scStwClient.state === ScStwClient.CONNECTED ? "visible":"hidden"
|
|
width: height
|
|
|
|
onClicked: {
|
|
profilesDialog.open()
|
|
}
|
|
|
|
image: appTheme.theme.images.profilesIcon
|
|
|
|
backgroundColor: parent.pressed ? appTheme.theme.colors.buttonPressed:appTheme.theme.colors.button
|
|
|
|
states: [
|
|
State {
|
|
name: "hidden"
|
|
PropertyChanges {
|
|
target: profilesButt
|
|
height: 0
|
|
}
|
|
},
|
|
State {
|
|
name: "visible"
|
|
PropertyChanges {
|
|
target: profilesButt
|
|
height: app.landscape() ? menu_container.width * 0.7:menu_container.height * 0.7
|
|
}
|
|
}
|
|
]
|
|
|
|
transitions: [
|
|
Transition {
|
|
NumberAnimation {
|
|
properties: "height"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}*/
|
|
}
|
|
|