Skip to content

Commit

Permalink
skins/QML: Add library placeholder and 4 deck toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed May 25, 2021
1 parent 6812266 commit a21861f
Show file tree
Hide file tree
Showing 5 changed files with 291 additions and 116 deletions.
158 changes: 158 additions & 0 deletions res/skins/QMLDemo/DeckRow.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.11
import Mixxx 0.1

Item {
id: root
required property string leftDeck;
required property string rightDeck;

RowLayout {
anchors.fill: parent
Layout.margins: 0

Rectangle {
color: "#121213"
implicitWidth: 68
implicitHeight: 26
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter

ToggleButton {
id: playButtonDeck1
anchors.fill: parent
group: root.leftDeck
key: "play"
icon.width: 50
icon.height: 24
background: Rectangle {
anchors.fill: parent
data: Image {
id: playButtonDeck1BgImage
anchors.fill: parent
}
}

State {
name: "0"
PropertyChanges {
target: playButtonDeck1
icon.source: "../LateNight/palemoon/buttons/btn__play_deck.svg"
icon.color: "#777777"
background.color: "transparent"
background.border.width: 2
}
PropertyChanges {
target: playButtonDeck1BgImage
source: "../LateNight/palemoon/buttons/btn_embedded_play.svg"
}
}

State {
name: "1"
PropertyChanges {
target: playButtonDeck1
icon.source: "../LateNight/palemoon/buttons/btn__play_deck_active.svg"
icon.color: "transparent"
background.color: "#b24c12"
background.border.width: 2
}
PropertyChanges {
target: playButtonDeck1BgImage
source: "../LateNight/palemoon/buttons/btn_embedded_play_active.svg"
}
}
}
}

Rectangle {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
implicitWidth: 300
implicitHeight: 180

color: "#1e1e20"
border.color: "#121213"
border.width: 2
radius: 1

RowLayout {
anchors.fill: parent
anchors.margins: 10

EqColumn {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
group: root.leftDeck
}

MixerColumn {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
group: root.leftDeck
}

MixerColumn {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
group: root.rightDeck
}

EqColumn {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
group: root.rightDeck
}
}
}

Rectangle {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
implicitWidth: 68
implicitHeight: 26

color: "#121213"

ToggleButton {
id: playButtonDeck2
anchors.fill: parent
group: root.rightDeck
key: "play"
icon.width: 50
icon.height: 24
background: Rectangle {
anchors.fill: parent
data: Image {
id: playButtonDeck2BgImage
anchors.fill: parent
}
}

State {
name: "0"
PropertyChanges {
target: playButtonDeck2
icon.source: "../LateNight/palemoon/buttons/btn__play_deck.svg"
icon.color: "#777777"
background.color: "transparent"
background.border.width: 2
}
PropertyChanges {
target: playButtonDeck2BgImage
source: "../LateNight/palemoon/buttons/btn_embedded_play.svg"
}
}

State {
name: "1"
PropertyChanges {
target: playButtonDeck2
icon.source: "../LateNight/palemoon/buttons/btn__play_deck_active.svg"
icon.color: "transparent"
background.color: "#b24c12"
background.border.width: 2
}
PropertyChanges {
target: playButtonDeck2BgImage
source: "../LateNight/palemoon/buttons/btn_embedded_play_active.svg"
}
}
}
}
}
}
6 changes: 2 additions & 4 deletions res/skins/QMLDemo/EqColumn.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ Item {
required property string group

id: root
width: 35
height: 150
implicitWidth: 35
implicitHeight: 150

ColumnLayout {
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter

EqKnob {
channelGroup: root.group
key: "parameter3"
Expand Down
16 changes: 16 additions & 0 deletions res/skins/QMLDemo/Library.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import QtQuick 2.15
import QtQuick.Controls 1.4
import Qt.labs.qmlmodels 1.0

Item {
Rectangle {
color: "#121213"
anchors.fill: parent

Text {
text: "Library Placeholder"
color: "white"
anchors.centerIn: parent
}
}
}
8 changes: 4 additions & 4 deletions res/skins/QMLDemo/MixerColumn.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Item {
required property string group

id: root
width: 47
height: 150
implicitWidth: 47
implicitHeight: 150

ColumnLayout {
Knob {
id: gainKnob
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
width: 35
height: width
group: root.group
Expand All @@ -35,7 +35,7 @@ Item {

Slider {
id: volumeSlider
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
width: root.width
height: 107
group: root.group
Expand Down
Loading

0 comments on commit a21861f

Please sign in to comment.