Skip to content

Commit

Permalink
Merge pull request #2612 from hacksdump/context-menu
Browse files Browse the repository at this point in the history
Quick action context menu for WTrackProperty
  • Loading branch information
Be-ing authored Apr 17, 2020
2 parents f161e03 + 557f996 commit f2d701f
Show file tree
Hide file tree
Showing 27 changed files with 2,225 additions and 1,670 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/widget/wstarrating.cpp
src/widget/wstatuslight.cpp
src/widget/wtime.cpp
src/widget/wtrackmenu.cpp
src/widget/wtrackproperty.cpp
src/widget/wtracktableview.cpp
src/widget/wtracktableviewheader.cpp
Expand Down
1 change: 1 addition & 0 deletions build/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,7 @@ def sources(self, build):
"src/widget/wlibrarytableview.cpp",
"src/widget/wanalysislibrarytableview.cpp",
"src/widget/wlibrarytextbrowser.cpp",
"src/widget/wtrackmenu.cpp",

"src/database/mixxxdb.cpp",
"src/database/schemamanager.cpp",
Expand Down
108 changes: 87 additions & 21 deletions res/skins/Deere/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1850,7 +1850,8 @@ QToolTip,
WBeatSpinBox QMenu,
WCueMenuPopup,
WCueMenuPopup QMenu,
WCoverArtMenu {
WCoverArtMenu,
WTrackMenu QMenu {
padding: 2px;
}
WEffectSelector QAbstractScrollArea,
Expand All @@ -1875,30 +1876,46 @@ WCueMenuPopup QMenu,
WCueMenuPopup QLabel,
WCueMenuPopup QMenu::item,
WCoverArtMenu,
WCoverArtMenu::item {
color: #c1cabe;
background-color: #201f1f;
}
WCoverArtMenu::item,
WTrackMenu,
WTrackMenu::item,
WTrackMenu QCheckBox,
WTrackMenu QMenu,
WTrackMenu QMenu::item,
WTrackMenu QMenu QCheckBox {
color: #c1cabe;
background-color: #201f1f;
}
WEffectSelector QAbstractScrollArea,
#fadeModeCombobox QAbstractScrollArea,
QToolTip,
#LibraryContainer QMenu,
WBeatSpinBox QMenu,
WCueMenuPopup,
WCueMenuPopup QMenu,
WCoverArtMenu {
WCoverArtMenu,
WTrackMenu,
WTrackMenu QMenu {
border-width: 1px;
border-style: solid;
border-color: #aaa;
border-radius: 1px;
}
}
/* hovered items */
WEffectSelector::item:selected,
#fadeModeCombobox::item:selected,
#LibraryContainer QMenu::item:selected,
WBeatSpinBox QMenu::item:selected,
WCueMenuPopup QMenu::item:selected,
WCoverArtMenu::item:selected,
WTrackMenu::item:selected,
WTrackMenu QCheckBox:selected,
WTrackMenu QCheckBox:focus,
WTrackMenu QCheckBox:hover,
WTrackMenu QMenu::item:selected,
WTrackMenu QMenu QCheckBox:selected,
WTrackMenu QMenu QCheckBox:focus,
WTrackMenu QMenu QCheckBox:hover,
#LibraryContainer QMenu::item:selected,
#LibraryContainer QMenu QCheckBox:selected,
#LibraryContainer QMenu QCheckBox:focus, /* selected by keyboard */
#LibraryContainer QMenu QCheckBox:hover /* mouse hover */ {
Expand Down Expand Up @@ -1978,7 +1995,10 @@ WEffectSelector {
WBeatSpinBox QMenu::item,
WCueMenuPopup QMenu::item,
WCoverArtMenu::item,
#LibraryContainer QMenu QCheckBox {
WTrackMenu::item,
WTrackMenu QCheckBox,
WTrackMenu QMenu::item,
WTrackMenu QMenu QCheckBox {
padding: 0px;
margin: 0px;
image: none;
Expand All @@ -1988,36 +2008,52 @@ WEffectSelector {
#LibraryContainer QMenu::separator,
WBeatSpinBox QMenu::separator,
WCueMenuPopup QMenu::separator,
WCoverArtMenu::separator {
WCoverArtMenu::separator,
WTrackMenu::separator,
WTrackMenu QMenu::separator {
height: 0px;
border-top: 1px solid #0a0a0a;
margin: 4px;
}
#LibraryContainer QMenu::item,
WBeatSpinBox QMenu::item,
WCueMenuPopup QMenu::item,
WCoverArtMenu::item {
WCoverArtMenu::item,
WTrackMenu::item,
WTrackMenu QMenu::item {
/* right padding creates a margin to the menu expand arrow,
left padding should be bigger than menu icon width + menu icon
margin */
padding: 5px 13px 5px 26px;
}
/* icons in editline menu (searchbox, editable track properties) */
#LibraryContainer QMenu::icon,
#LibraryContainer QMenu QCheckBox::indicator,
#LibraryContainer QMenu::indicator,
WBeatSpinBox QMenu::icon,
WCueMenuPopup QMenu::icon,
WCoverArtMenu::icon,
#LibraryContainer QMenu QCheckBox::indicator,
#LibraryContainer QMenu::indicator,
WTrackMenu::icon,
WTrackMenu QCheckBox::indicator,
WTrackMenu::indicator,
WTrackMenu QMenu::icon,
WTrackMenu QMenu QCheckBox::indicator,
WTrackMenu QMenu::indicator,
WCoverArtMenu::indicator {
margin: 0px 4px 0px 2px;
padding: 1px;
}
#LibraryContainer QMenu QCheckBox {
#LibraryContainer QMenu QCheckBox,
WTrackMenu QCheckBox,
WTrackMenu QMenu QCheckBox {
padding: 2px 10px 2px 3px;
}
#LibraryContainer QMenu QCheckBox::indicator,
#LibraryContainer QMenu::indicator {
#LibraryContainer QMenu::indicator,
WTrackMenu QCheckBox::indicator,
WTrackMenu::indicator,
WTrackMenu QMenu QCheckBox::indicator,
WTrackMenu QMenu::indicator {
width: 13px;
height: 13px;
border: 1px solid #555;
Expand All @@ -2027,32 +2063,54 @@ WEffectSelector {
outline: none;
}
#LibraryContainer QMenu QCheckBox::indicator:selected,
#LibraryContainer QMenu::indicator:selected {
#LibraryContainer QMenu::indicator:selected,
WTrackMenu QCheckBox::indicator:selected,
WTrackMenu::indicator:selected,
WTrackMenu QMenu QCheckBox::indicator:selected,
WTrackMenu QMenu::indicator:selected {
border: 1px solid #999;
}
#LibraryContainer QMenu QCheckBox::indicator:checked,
#LibraryContainer QMenu::indicator:checked {
#LibraryContainer QMenu::indicator:checked,
WTrackMenu QCheckBox::indicator:checked,
WTrackMenu::indicator:checked,
WTrackMenu QMenu QCheckBox::indicator:checked,
WTrackMenu QMenu::indicator:checked {
image: url(skin:/icon/ic_library_checkmark.svg);
}
/* disabled menu item and checkbox */
#LibraryContainer QMenu::item:!enabled,
WBeatSpinBox QMenu::item:!enabled,
WCueMenuPopup QMenu::item:!enabled,
WCoverArtMenu::item:!enabled,
WTrackMenu::item:!enabled,
WTrackMenu QCheckBox:!enabled,
WTrackMenu QMenu::item:!enabled,
WTrackMenu QMenu QCheckBox:!enabled,
#LibraryContainer QMenu QCheckBox:!enabled {
color: #555;
}
#LibraryContainer QMenu QCheckBox::indicator:!enabled {
#LibraryContainer QMenu QCheckBox::indicator:!enabled,
WTrackMenu QCheckBox::indicator:!enabled,
WTrackMenu QMenu QCheckBox::indicator:!enabled {
border: 1px solid #222;
background-color: #333;
}
#LibraryContainer QMenu QCheckBox::indicator:!enabled:checked,
#LibraryContainer QMenu QCheckBox::indicator:indeterminate,
#LibraryContainer QCheckBox::indicator:indeterminate:!enabled {
#LibraryContainer QCheckBox::indicator:indeterminate:!enabled,
WTrackMenu QCheckBox::indicator:!enabled:checked,
WTrackMenu QCheckBox::indicator:indeterminate,
WTrackMenu QCheckBox::indicator:indeterminate:!enabled,
WTrackMenu QMenu QCheckBox::indicator:!enabled:checked,
WTrackMenu QMenu QCheckBox::indicator:indeterminate,
WTrackMenu QMenu QCheckBox::indicator:indeterminate:!enabled {
image: url(skin:/icon/ic_library_checkmark_grey.svg);
}

#LibraryContainer QMenu::right-arrow {
#LibraryContainer QMenu::right-arrow,
WTrackMenu::right-arrow,
WTrackMenu QMenu::right-arrow {
width: 16px;
height: 16px;
image: url(skin:/icon/ic_chevron_right_48px.svg);
Expand All @@ -2061,7 +2119,15 @@ WEffectSelector {
#LibraryContainer QHeaderView QMenu::indicator:checked,
#LibraryContainer QHeaderView QMenu::indicator:checked:hover,
#LibraryContainer QHeaderView QMenu::indicator:!checked,
#LibraryContainer QHeaderView QMenu::indicator:!checked:hover {
#LibraryContainer QHeaderView QMenu::indicator:!checked:hover,
WTrackMenu::indicator:checked,
WTrackMenu::indicator:checked:hover,
WTrackMenu::indicator:!checked,
WTrackMenu::indicator:!checked:hover,
WTrackMenu QMenu::indicator:checked,
WTrackMenu QMenu::indicator:checked:hover,
WTrackMenu QMenu::indicator:!checked,
WTrackMenu QMenu::indicator:!checked:hover {
width: 12px;
height: 10px;
margin-left: 2px;
Expand Down
Loading

0 comments on commit f2d701f

Please sign in to comment.