Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QML cleanup Pt. 2 #4643

Merged
merged 7 commits into from
Jan 23, 2022
2 changes: 0 additions & 2 deletions res/qml/AuxiliaryUnit.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import "." as Skin
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import "Theme"

Row {
Expand Down
2 changes: 0 additions & 2 deletions res/qml/Button.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import "." as Skin
import QtGraphicalEffects 1.12
import QtQml 2.12
import QtQuick 2.12
import QtQuick.Controls 2.12
import "Theme"
Expand Down
2 changes: 0 additions & 2 deletions res/qml/CrossfaderRow.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import "." as Skin
import Mixxx 0.1 as Mixxx
import QtQuick 2.12
import QtQuick.Controls 2.12
import "Theme"

Item {
Expand Down
6 changes: 3 additions & 3 deletions res/qml/Deck.qml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import "." as Skin
import Mixxx 0.1 as Mixxx
import Mixxx.Controls 0.1 as MixxxControls
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.11
import "Theme"

Item {
Expand Down Expand Up @@ -48,6 +45,7 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
group: root.group
rightColumnWidth: rateSlider.width
}

Skin.ControlSlider {
Expand Down Expand Up @@ -356,6 +354,8 @@ Item {

hotcueNumber: index + 1
group: root.group
width: playButton.height
height: playButton.height
}

}
Expand Down
7 changes: 4 additions & 3 deletions res/qml/DeckInfoBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Rectangle {
id: root

property string group // required
property int rightColumnWidth // required
property var deckPlayer: Mixxx.PlayerManager.getPlayer(group)
property color lineColor: Theme.deckLineColor

Expand Down Expand Up @@ -150,7 +151,7 @@ Rectangle {
anchors.top: infoBarHSeparator1.top
anchors.bottom: infoBarVSeparator.top
anchors.right: infoBarHSeparator2.left
width: rateSlider.width
width: root.rightColumnWidth
}

Rectangle {
Expand All @@ -172,7 +173,7 @@ Rectangle {
anchors.bottom: infoBarVSeparator.top
anchors.right: root.right
anchors.rightMargin: 5
width: rateSlider.width
width: root.rightColumnWidth

Mixxx.ControlProxy {
id: bpmControl
Expand All @@ -190,7 +191,7 @@ Rectangle {

anchors.top: infoBarVSeparator.bottom
anchors.bottom: infoBarHSeparator1.bottom
width: rateSlider.width
width: root.rightColumnWidth
anchors.right: root.right
anchors.rightMargin: 5
text: (ratio > 0) ? "+" + ratio.toFixed(2) : ratio.toFixed(2)
Expand Down
9 changes: 3 additions & 6 deletions res/qml/EffectUnit.qml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import "." as Skin
import Mixxx 0.1 as Mixxx
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import "Theme"

Item {
Expand All @@ -21,7 +18,7 @@ Item {
anchors.right: effectUnitControlsFrame.left
height: 60

EffectSlot {
Skin.EffectSlot {
id: effect1

anchors.top: parent.top
Expand All @@ -32,7 +29,7 @@ Item {
expanded: false
}

EffectSlot {
Skin.EffectSlot {
id: effect2

anchors.top: parent.top
Expand All @@ -43,7 +40,7 @@ Item {
expanded: false
}

EffectSlot {
Skin.EffectSlot {
id: effect3

anchors.top: parent.top
Expand Down
9 changes: 4 additions & 5 deletions res/qml/EqColumn.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import "." as Skin
import Mixxx.Controls 0.1 as MixxxControls
import QtQuick 2.12
import QtQuick.Shapes 1.12
import "Theme"
Expand All @@ -11,28 +10,28 @@ Column {

spacing: 4

EqKnob {
Skin.EqKnob {
statusKey: "button_parameter3"
knob.group: "[EqualizerRack1_" + root.group + "_Effect1]"
knob.key: "parameter3"
knob.color: Theme.eqHighColor
}

EqKnob {
Skin.EqKnob {
statusKey: "button_parameter2"
knob.group: "[EqualizerRack1_" + root.group + "_Effect1]"
knob.key: "parameter2"
knob.color: Theme.eqMidColor
}

EqKnob {
Skin.EqKnob {
knob.group: "[EqualizerRack1_" + root.group + "_Effect1]"
knob.key: "parameter1"
statusKey: "button_parameter1"
knob.color: Theme.eqLowColor
}

EqKnob {
Skin.EqKnob {
knob.group: "[QuickEffectRack1_" + root.group + "]"
knob.key: "super1"
statusGroup: "[QuickEffectRack1_" + root.group + "_Effect1]"
Expand Down
1 change: 0 additions & 1 deletion res/qml/EqKnob.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import "." as Skin
import Mixxx 0.1 as Mixxx
import Mixxx.Controls 0.1 as MixxxControls
import QtQuick 2.12
import "Theme"

Expand Down
8 changes: 2 additions & 6 deletions res/qml/HotcueButton.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import "." as Skin
import QtQuick 2.12
import QtQuick.Controls 2.12
import "Theme"

Skin.Button {
id: root
Expand All @@ -10,12 +8,10 @@ Skin.Button {
property string group // required

text: hotcueNumber
width: playButton.height
height: playButton.height
activeColor: hotcue.color
highlight: hotcue.isSet

Hotcue {
Skin.Hotcue {
id: hotcue

group: root.group
Expand All @@ -28,7 +24,7 @@ Skin.Button {
}
}

HotcuePopup {
Skin.HotcuePopup {
id: popup

hotcue: hotcue
Expand Down
5 changes: 2 additions & 3 deletions res/qml/HotcuePopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ Popup {
anchors.topMargin: 5
text: "Clear"
activeColor: Theme.deckActiveColor
onDownChanged: (down) => {
root.hotcue.clear = down;
}
onPressed: root.hotcue.clear = 1
onReleased: root.hotcue.clear = 0
}

enter: Transition {
Expand Down
1 change: 0 additions & 1 deletion res/qml/Library.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Mixxx 0.1 as Mixxx
import QtQml.Models 2.12
import QtQuick 2.12
import "Theme"

Expand Down
2 changes: 1 addition & 1 deletion res/qml/Mixer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import "." as Skin
import QtQuick 2.12

Item {
id: mixer
id: root

property string leftDeckGroup // required
property string rightDeckGroup // required
Expand Down
1 change: 0 additions & 1 deletion res/qml/Mixxx/Controls/WaveformOverview.qml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Mixxx 0.1 as Mixxx
import Mixxx.Controls 0.1 as MixxxControls
import QtQuick 2.12
import QtQuick.Shapes 1.12

Mixxx.WaveformOverview {
id: root
Expand Down
15 changes: 7 additions & 8 deletions res/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import "." as Skin
import Mixxx 0.1 as Mixxx
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.11
import "Theme"

ApplicationWindow {
Expand Down Expand Up @@ -118,7 +117,7 @@ ApplicationWindow {
width: parent.width
visible: !root.maximizeLibrary

FadeBehavior on visible {
Skin.FadeBehavior on visible {
fadeTarget: crossfader
}

Expand All @@ -133,37 +132,37 @@ ApplicationWindow {
minimized: root.maximizeLibrary
visible: root.show4decks

FadeBehavior on visible {
Skin.FadeBehavior on visible {
fadeTarget: decks34
}

}

SamplerRow {
Skin.SamplerRow {
id: samplers

width: parent.width
visible: root.showSamplers

FadeBehavior on visible {
Skin.FadeBehavior on visible {
fadeTarget: samplers
}

}

EffectRow {
Skin.EffectRow {
id: effects

width: parent.width
visible: root.showEffects

FadeBehavior on visible {
Skin.FadeBehavior on visible {
fadeTarget: effects
}

}

Library {
Skin.Library {
width: parent.width
height: parent.height - y
}
Expand Down