Skip to content

Commit

Permalink
Merge pull request #2362 from Holzhaus/new-cue-menu
Browse files Browse the repository at this point in the history
src/widget: Replace CueMenu implementation with a custom popup
  • Loading branch information
daschuer authored Dec 4, 2019
2 parents 4b38536 + 9cefcfb commit 9b5f544
Show file tree
Hide file tree
Showing 21 changed files with 464 additions and 190 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -617,19 +617,19 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/waveform/widgets/rgbwaveformwidget.cpp
src/waveform/widgets/softwarewaveformwidget.cpp
src/waveform/widgets/waveformwidgetabstract.cpp
src/widget/colormenu.cpp
src/widget/controlwidgetconnection.cpp
src/widget/cuemenu.cpp
src/widget/hexspinbox.cpp
src/widget/paintable.cpp
src/widget/wanalysislibrarytableview.cpp
src/widget/wbasewidget.cpp
src/widget/wbattery.cpp
src/widget/wbeatspinbox.cpp
src/widget/wcolorpicker.cpp
src/widget/wcombobox.cpp
src/widget/wcoverart.cpp
src/widget/wcoverartlabel.cpp
src/widget/wcoverartmenu.cpp
src/widget/wcuemenupopup.cpp
src/widget/wdisplay.cpp
src/widget/weffect.cpp
src/widget/weffectbuttonparameter.cpp
Expand Down
4 changes: 2 additions & 2 deletions build/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,9 +930,7 @@ def sources(self, build):
"src/sources/soundsourceproviderregistry.cpp",
"src/sources/soundsourceproxy.cpp",

"src/widget/colormenu.cpp",
"src/widget/controlwidgetconnection.cpp",
"src/widget/cuemenu.cpp",
"src/widget/wbasewidget.cpp",
"src/widget/wwidget.cpp",
"src/widget/wwidgetgroup.cpp",
Expand Down Expand Up @@ -983,6 +981,8 @@ def sources(self, build):
"src/widget/wcoverart.cpp",
"src/widget/wcoverartlabel.cpp",
"src/widget/wcoverartmenu.cpp",
"src/widget/wcolorpicker.cpp",
"src/widget/wcuemenupopup.cpp",
"src/widget/wsingletoncontainer.cpp",
"src/widget/wmainmenubar.cpp",

Expand Down
3 changes: 3 additions & 0 deletions res/images/ic_checkmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions res/images/ic_delete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions res/mixxx.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
<file>images/mixxx_icon.svg</file> <!-- icon in 'About' dialog -->
<file>images/mixxx-icon-logo-symbolic.svg</file> <!-- default launch image -->
<file>images/skin_preview_placeholder.png</file>
<file>images/ic_checkmark.svg</file>
<file>images/ic_delete.svg</file>
<file>images/preferences/ic_preferences_autodj.svg</file>
<file>images/preferences/ic_preferences_bpmdetect.svg</file>
<file>images/preferences/ic_preferences_broadcast.svg</file>
Expand All @@ -55,6 +57,7 @@
<file>shaders/filteredsignal.frag</file>
<file>shaders/passthrough.vert</file>
<file>shaders/rgbsignal.frag</file>
<file>skins/default.qss</file>
<file>translations/mixxx_ar.qm</file>
<file>translations/mixxx_ast.qm</file>
<file>translations/mixxx_bg.qm</file>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Deere/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ QAbstractScrollArea::corner {
background-color: #222;
}

WWidget, QLabel {
WWidget, WLibrary QLabel {
font-family: "Open Sans";
font-size: 12px;
text-transform: uppercase;
Expand Down
19 changes: 6 additions & 13 deletions res/skins/LateNight/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
}

#Mixxx, WWidget,
WLabel, QLabel,
WPushButton, QPushButton,
WLabel, WLibrary QLabel,
WPushButton, WLibrary QPushButton,
WEffect, WEffectSelector,
WBeatSpinBox,
QSpinBox {
Expand All @@ -26,16 +26,11 @@ WBeatSpinBox,
QSpinBox,
/* Hotcue labels in the overview */
WOverview,
/* Edit label and pushbuttons in the hotcue label edit dialog */
WOverview QLabel,
WOverview QPushButton {
/* 'Edit' label in the hotcue label edit dialog */
WOverview QLabel {
font-family: "Open Sans";
text-transform: none;
}
WOverview QLabel,
WOverview QPushButton {
font-weight: normal;
}

QToolTip {
font-family: Ubuntu;
Expand All @@ -47,7 +42,7 @@ QToolTip {
border-radius: 2px;
}

WPushButton, QPushButton {
WPushButton, WLibary QPushButton {
font-size: 11px/12px;
}

Expand Down Expand Up @@ -477,7 +472,7 @@ WOverview {
color: #0bd9d1;
}

QLabel, QRadioButton,
WLibary QLabel, WLibary QRadioButton,
WSearchLineEdit,
#LibraryBPMSpinBox,
#LibraryBPMButton::item,
Expand Down Expand Up @@ -577,8 +572,6 @@ WTime {
font-size: 10px/10px;
}



/********************** Decks **********************/
#DeckRow_1_KeyVinylFx {
qproperty-layoutAlignment: 'AlignLeft | AlignTop';
Expand Down
4 changes: 2 additions & 2 deletions res/skins/Shade/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,10 @@ QSplitter::handle:pressed { image: url(skin:/style/style_handle_checked.png); ba
QSplitter::handle:horizontal { width: 6px; }
QSplitter::handle:vertical { height: 6px;}

QPushButton { font-size: 10pt;
WLibrary QPushButton { font-size: 10pt;
font-family: "Open Sans";}
/* Extra declaration for QRadionButton otherwise it shows up with wrong colors in Linux with Gnome */
QLabel, QRadioButton {
WLibrary QLabel, WLibrary QRadioButton {
font-size: 10pt;
background: transparent;
color: #C1C1C1;}
Expand Down
1 change: 0 additions & 1 deletion res/skins/Tango/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ WWidgetGroup {
image: url(skin:/graphics/splitterVert_handle_pressed.svg);
}


/* ################################################################
####### Colors ##################################################
###############################################################*/
Expand Down
11 changes: 11 additions & 0 deletions res/skins/default.qss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
WCueMenuPopup #CueDeleteButton {
qproperty-icon: url(:/images/ic_delete.svg);
}

WColorPicker QPushButton[checked="false"] {
qproperty-icon: none;
}

WColorPicker QPushButton[checked="true"] {
qproperty-icon: url(:/images/ic_checkmark.svg);
}
11 changes: 11 additions & 0 deletions src/mixxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,17 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) {

QWidget* oldWidget = m_pWidgetParent;

// Load default styles that can be overridden by skins
QFile file(":/skins/default.qss");
if (file.open(QIODevice::ReadOnly)) {
QByteArray fileBytes = file.readAll();
QString style = QString::fromLocal8Bit(fileBytes.constData(),
fileBytes.length());
setStyleSheet(style);
} else {
qWarning() << "Failed to load default skin styles!";
}

// Load skin to a QWidget that we set as the central widget. Assignment
// intentional in next line.
if (!(m_pWidgetParent = m_pSkinLoader->loadConfiguredSkin(this, m_pKeyboard,
Expand Down
39 changes: 0 additions & 39 deletions src/widget/colormenu.cpp

This file was deleted.

19 changes: 0 additions & 19 deletions src/widget/colormenu.h

This file was deleted.

58 changes: 0 additions & 58 deletions src/widget/cuemenu.cpp

This file was deleted.

Loading

0 comments on commit 9b5f544

Please sign in to comment.