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

src/widget: Replace CueMenu implementation with a custom popup #2362

Merged
merged 48 commits into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
87da9a1
src/widget: Replace CueMenu implementation with a custom popup
Holzhaus Nov 16, 2019
18a1298
src/widget/colormenu: Use QPalette for button color instead of QIcon
Holzhaus Nov 17, 2019
57d5a03
src/widget/colormenu: Do not make the color buttons flat
Holzhaus Nov 17, 2019
911f069
widget/cuemenu: Use icon instead of label for remove cue button
Holzhaus Nov 18, 2019
9fbabdd
widget/colormenu: Use better variable name for QPalette object
Holzhaus Nov 19, 2019
e318fa0
widget/colormenu: Add missing spaces after comma in function parameters
Holzhaus Nov 19, 2019
98d0e3b
widget/cuemenu: Add object names for CueMenu items
Holzhaus Nov 19, 2019
16820ce
widget/colormenu: Fix ColorMenu::useColorSet() implementation
Holzhaus Nov 19, 2019
b20f56b
widget/colormenu: Use parented_ptr for QPushButtons
Holzhaus Nov 19, 2019
8e545fd
widget/cuemenu: Replace RemoveCueButton object name with CueRemoveButton
Holzhaus Nov 19, 2019
60f55f1
widget/cuemenu: Move button icon setting to skin qss
Holzhaus Nov 19, 2019
56133d4
widget/cuemenu: Fix code style with clang-format
Holzhaus Nov 19, 2019
f361f75
widget/colormenu: Highlight currently selected cue color
Holzhaus Nov 19, 2019
f724e03
widget/cuemenu: Improve cue menu box layout
Holzhaus Nov 19, 2019
6f44805
widget/cuemenu: Add space between label/colorpicker and remove button
Holzhaus Nov 19, 2019
e71074a
widget/cuemenu: Merge setCue() and setTrack() to setTrackAndCue()
Holzhaus Nov 19, 2019
92d0e35
widget/cuemenu: Add number and position as labels
Holzhaus Nov 20, 2019
238dbc0
widget/cuemenu: Move destructor to header file
Holzhaus Nov 20, 2019
3a12d7a
widget/colormenu: Use background-color styled buttons instead of QPal…
Holzhaus Nov 22, 2019
bfe8521
Merge branch 'new-cue-menu' of github.com:Holzhaus/mixxx into new-cue…
Holzhaus Nov 22, 2019
036de53
widget: Rename ColorMenu widget to WColorPicker
Holzhaus Nov 22, 2019
d26d6b4
widget: Rename CueMenu widget to WCueMenuPopup
Holzhaus Nov 22, 2019
c126494
res/skins: Apply CueMenu -> WCueMenuPopup rename in style.qss files
Holzhaus Nov 22, 2019
ff4fc64
widget/wcolorpicker: Restrict background-color to QPushButton
Holzhaus Nov 22, 2019
af8af8b
widget/wcuemenupopup: Add nicer format for hotcue number in info bar
Holzhaus Nov 22, 2019
1c92d8b
widget/wcolorpicker: Make sure that qss hex-color is 0-padded
Holzhaus Nov 22, 2019
7390560
CMake: Update sources with renamed files
Holzhaus Nov 22, 2019
28b15f0
widget/wcolorpicker: Force "Fusion" QStyle on QPushButtons
Holzhaus Nov 25, 2019
67fc1b9
unstyle cue popup labels
ronso0 Nov 30, 2019
b35863f
set checkmark icon in wcolorpicker.cpp
ronso0 Nov 30, 2019
3bb51d7
Merge branch 'master' of github.com:Holzhaus/mixxx into new-cue-menu
Holzhaus Dec 2, 2019
c914f13
Merge remote-tracking branch 'ronso0/wcuemenupopup_checkmark' into ne…
Holzhaus Dec 2, 2019
147a0cc
mixxx.qrc: Add checkmark icon
Holzhaus Dec 2, 2019
f32e6a8
widget/wcolorpicker: Use QPushButton "checked" property for selected …
Holzhaus Dec 2, 2019
b8b8f34
skins: Add checkmark icon for selected hotcue color
Holzhaus Dec 2, 2019
65459f9
widget/wcuemenupopup: Always give focus to label QLineEdit on show()
Holzhaus Dec 2, 2019
3e1e24a
widget/wcuemenupopup: Hide popup on return press with label edit focused
Holzhaus Dec 2, 2019
1635eba
widget/wcuemenupopup: Fix indentation in namespace { }
Holzhaus Dec 4, 2019
b0188ae
widget/wcolorpicker: Remove useless comment and qDebug() calls
Holzhaus Dec 4, 2019
cb98b98
widget/wcuemenupopup: Fix tooltip for cue number label
Holzhaus Dec 4, 2019
a7c4787
widget/wcuemenupopup: Fix tooltip for remove cue button
Holzhaus Dec 4, 2019
7265c85
widget/wcuemenupopup: Do not force lineedit height for remove cue button
Holzhaus Dec 4, 2019
007a775
widget/wcuemenupopup: Use CueDelete instead of CueRemove for button name
Holzhaus Dec 4, 2019
86a37c8
widget/wcolorpicker: Add some code comments
Holzhaus Dec 4, 2019
5649646
mixxx: Load default.qss stylesheet that can be overwritten by skins
Holzhaus Dec 4, 2019
a9c4fe3
skins: Remove WCueMenuPopup/WColorPicker styles from skins
Holzhaus Dec 4, 2019
8bb98fa
res: Add ic_delete icon and use it for WCueMenuPopup
Holzhaus Dec 4, 2019
9cefcfb
widget/wcuemenupopup: Use centiseconds precision for cue position
Holzhaus Dec 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -442,10 +442,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