Skip to content

Commit

Permalink
Merge pull request #12380 from ronso0/lib-checkmark-fix
Browse files Browse the repository at this point in the history
Fix track color background with Qt6
  • Loading branch information
JoergAtGithub authored Dec 1, 2023
2 parents 0f0deb1 + b56244b commit 6acfe63
Show file tree
Hide file tree
Showing 15 changed files with 143 additions and 71 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/library/parsercsv.cpp
src/library/parserm3u.cpp
src/library/parserpls.cpp
src/library/playcountdelegate.cpp
src/library/playlisttablemodel.cpp
src/library/previewbuttondelegate.cpp
src/library/proxytrackmodel.cpp
Expand Down
9 changes: 5 additions & 4 deletions res/skins/Deere/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,16 @@ WLibrarySidebar {
}

/* Prevent OS-style checkbox from being rendered underneath the custom style. */
WTrackTableView::item,
#LibraryPlayedCheckbox::item,
#LibraryBPMButton::item {
border: 0px;
}

/* Selected rows in Tree and Tracks table */
WTrackTableView::item:selected,
WLibrarySidebar::item:selected,
#LibraryBPMButton::item:selected {
#LibraryBPMButton::item:selected,
#LibraryPlayedCheckbox::item:selected {
color: #D6D6D6;
background-color: #006596;
}
Expand Down Expand Up @@ -279,10 +280,10 @@ WBeatSpinBox,
}

/* checkbox in library "Played" column */
WTrackTableView::indicator:unchecked {
#LibraryPlayedCheckbox::indicator:unchecked {
image: url(skin:/../Deere/icon/ic_library_checkbox.svg);
}
WTrackTableView::indicator:checked {
#LibraryPlayedCheckbox::indicator:checked {
image: url(skin:/../Deere/icon/ic_library_checkbox_checked.svg);
}

Expand Down
5 changes: 5 additions & 0 deletions res/skins/LateNight/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ WTrackTableViewHeader::item {
padding: 0 0.15em;
}

/* Prevent OS-style checkbox from being rendered underneath the custom style. */
#LibraryBPMButton::item,
#LibraryPlayedCheckbox::item {
border: 0px;
}

#HotcueButton {
/* ronso0
Expand Down
29 changes: 11 additions & 18 deletions res/skins/LateNight/style_classic.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1099,10 +1099,10 @@ WSearchLineEdit QAbstractScrollArea,
#SkinSettingsLabelButton,
#SkinSettingsNumToggleHeader[displayValue="1"],
WSearchLineEdit,
WTrackTableView,
#LibraryBPMSpinBox,
#LibraryBPMButton::item,
WTrackTableView,
WTrackTableView::indicator,
#LibraryPlayedCheckbox::item,
WLibraryTextBrowser,
WLibrarySidebar,
#LibraryFeatureControls QLabel,
Expand Down Expand Up @@ -2065,15 +2065,11 @@ WLibraryTextBrowser:focus {
border: 1px solid #d09300;
}

/* Prevent OS-style checkbox from being rendered underneath the custom style. */
WTrackTableView::item,
#LibraryBPMButton::item {
border: 0px;
}
/* Selected rows in Tree and Tracks table */
WLibrarySidebar::item:selected,
WTrackTableView::item:selected,
#LibraryBPMButton::item:selected {
#LibraryBPMButton::item:selected,
#LibraryPlayedCheckbox::item:selected {
color: #fff;
background-color: #5e4507;
}
Expand All @@ -2088,7 +2084,7 @@ WLibrarySidebar::item:!selected:focus {
/* Use the native focus decoration */
/* This is for all cells including Played and Location */
WTrackTableView,
/* This is for the BPM cell */
/* This is for the BPM and play count cells */
WTrackTableView QCheckBox:focus {
outline: 1px solid #fff;
}
Expand Down Expand Up @@ -2143,6 +2139,12 @@ WLibrary QPlainTextEdit,
#LibraryBPMSpinBox::down-button {
image: url(skin:../LateNight/classic/buttons/btn__lib_bpm_down.svg) no-repeat;
}
#LibraryPlayedCheckbox::indicator:checked {
image: url(skin:../LateNight/classic/buttons/btn__lib_checkbox_checked.svg);
}
#LibraryPlayedCheckbox::indicator:unchecked {
image: url(skin:../LateNight/classic/buttons/btn__lib_checkbox.svg);
}

WCueMenuPopup QPushButton:focus {
outline: none;
Expand Down Expand Up @@ -2607,15 +2609,6 @@ QPlainTextEdit QMenu::item:disabled {
image: url(skin:../LateNight/classic/style/menu_arrow_white.svg);
}

/* This is the only way to select the 'Played' checkbox.
Note that this also selects the BPM lock. */
WTrackTableView::indicator:checked {
image: url(skin:../LateNight/classic/buttons/btn__lib_checkbox_checked.svg);
}
WTrackTableView::indicator:unchecked {
image: url(skin:../LateNight/classic/buttons/btn__lib_checkbox.svg);
}

#MainMenu QMenu::separator,
WLibrarySidebar QMenu::separator,
WTrackTableViewHeader QMenu::separator,
Expand Down
26 changes: 10 additions & 16 deletions res/skins/LateNight/style_palemoon.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1189,10 +1189,9 @@ WEffectChainPresetSelector,
WSearchLineEdit,
WTime,
#PreviewDeckTextBox, #PreviewTitle, #PreviewBPM,
#LibraryBPMSpinBox,
#LibraryBPMButton::item,
WTrackTableView,
WTrackTableView::indicator,
#LibraryBPMButton::item,
#LibraryPlayedCheckbox::item,
WLibraryTextBrowser,
WLibrarySidebar,
#LibraryFeatureControls QLabel,
Expand Down Expand Up @@ -2550,15 +2549,11 @@ WLibrarySidebar {
WLibrarySidebar {
outline: none;
}
/* Prevent OS-style checkbox from being rendered underneath the custom style. */
WTrackTableView::item,
#LibraryBPMButton::item {
border: 0px;
}
/* Selected rows in Tree and Tracks table */
WLibrarySidebar::item:selected,
WTrackTableView::item:selected,
#LibraryBPMButton::item:selected {
#LibraryBPMButton::item:selected,
#LibraryPlayedCheckbox::item:selected {
color: #fff;
background-color: #2c454f;
}
Expand All @@ -2583,7 +2578,7 @@ WLibrarySidebar {
/* Use the native focus decoration */
/* This is for all cells including Played and Location */
WTrackTableView,
/* This is for the BPM cell */
/* This is for the BPM and play count cells */
WTrackTableView QCheckBox:focus {
outline: 1px solid #fff;
}
Expand Down Expand Up @@ -2631,6 +2626,10 @@ WLibrary QPlainTextEdit,
image: url(skin:../LateNight/palemoon/buttons/btn__lib_spinbox_down.svg) no-repeat center center;
}

#LibraryPlayedCheckbox::indicator:unchecked {
image: url(skin:../LateNight/palemoon/buttons/btn__lib_checkbox.svg);
}

/* Button in library "Preview" column */
#LibraryPreviewButton {
margin: 0px;
Expand Down Expand Up @@ -3080,14 +3079,9 @@ QPlainTextEdit QMenu::item:disabled {
image: url(skin:../LateNight/palemoon/buttons/btn__menu_checkbox.svg);
}

/* This is the only way to select the 'Played' checkbox.
Note that this also selects the BPM lock, so style that afterwards. */
WTrackTableView::indicator:unchecked {
image: url(skin:../LateNight/palemoon/buttons/btn__lib_checkbox.svg);
}
WLibrarySidebar QMenu::indicator:checked,
WTrackTableViewHeader QMenu::indicator:checked,
WTrackTableView::indicator:checked,
#LibraryPlayedCheckbox::indicator:checked,
WTrackMenu QMenu QCheckBox::indicator:checked,
WEffectChainPresetButton QMenu QCheckBox::indicator:checked {
image: url(skin:../LateNight/palemoon/buttons/btn__lib_checkmark_blue.svg);
Expand Down
1 change: 1 addition & 0 deletions res/skins/Shade/btn/btn_lib_bpm_unlocked_black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions res/skins/Shade/btn/btn_lib_bpm_unlocked_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 19 additions & 15 deletions res/skins/Shade/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ WLibraryTextBrowser,
WLibrarySidebar {
border: 1px solid #585858;
font-weight: normal;
color: #9e9e9e;
background-color: #0f0f0f;
alternate-background-color: #1a1a1a;
/* In selected library rows this sets the color of
Expand All @@ -467,9 +466,18 @@ WLibraryTextBrowser {
padding-left: 10px;
}

WTrackTableView,
WLibraryTextBrowser,
WLibrarySidebar,
#LibraryBPMButton::item,
#LibraryPlayedCheckbox::item {
color: #9e9e9e;
}


/* Prevent OS-style checkbox from being rendered underneath the custom style. */
WTrackTableView::item,
#LibraryBPMButton::item {
#LibraryBPMButton::item,
#LibraryPlayedCheckbox::item {
border: 0px;
}

Expand All @@ -478,7 +486,8 @@ WSearchLineEdit::item:selected,
WSearchLineEdit::item:checked,
WLibrarySidebar::item:selected,
WLibrarySidebar::branch:selected,
#LibraryBPMButton::item:selected {
#LibraryBPMButton::item:selected,
#LibraryPlayedCheckbox::item:selected {
color: #fff;
background-color: #656d75;
}
Expand Down Expand Up @@ -507,7 +516,7 @@ WLibrarySidebar::item:!selected:focus {
/* Use the native focus decoration */
/* This is for all cells including Played and Location */
WTrackTableView,
/* This is for the BPM cell */
/* This is for the BPM and play count cells */
WTrackTableView QCheckBox:focus {
outline: 1px solid #c9c9c9;
}
Expand Down Expand Up @@ -536,9 +545,9 @@ WTrackTableView {
#LibraryBPMButton::indicator:unchecked {
image: url(skin:/btn/btn_lib_bpm_unlocked.svg);
}
#LibraryBPMButton::item {
color: #cfcfcf;
}
#LibraryBPMButton::indicator:unchecked:selected {
image: url(skin:/btn/btn_lib_bpm_unlocked_black.svg);
}
WLibrary > QCheckBox {
text-align: right;
alignment: right;
Expand Down Expand Up @@ -586,15 +595,10 @@ WTrackTableView {


/* checkbox in library "Played" column */
WTrackTableView::indicator {
margin: 0px;
padding: 0px;
border: 0px;
}
WTrackTableView::indicator:unchecked {
#LibraryPlayedCheckbox::indicator:unchecked {
image: url(skin:/btn/btn_lib_checkbox.svg);
}
WTrackTableView::indicator:checked {
#LibraryPlayedCheckbox::indicator:checked {
image: url(skin:/btn/btn_lib_checkbox_checked.svg);
}

Expand Down
14 changes: 5 additions & 9 deletions res/skins/Shade/style_dark.qss
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ WEffectSelector::indicator:unchecked:selected,

WTrackTableView,
WLibrarySidebar {
selection-color: #000;
/* background of Color delegate in selected row */
selection-background-color: #666;
/*outline: 1px solid yellow;*/
Expand All @@ -172,16 +173,11 @@ WSearchLineEdit QToolButton:focus {
image: url(skin:/btn/btn_lib_clear_search_focus_green.svg);
}

/* Prevent OS-style checkbox from being rendered underneath the custom style. */
WTrackTableView::item,
#LibraryBPMButton::item {
border: 0px;
}

WLibrarySidebar::item:selected,
WTrackTableView::item:selected,
WLibrarySidebar::branch:selected,
#LibraryBPMButton::item:selected {
#LibraryBPMButton::item:selected,
#LibraryPlayedCheckbox::item:selected {
color: #000;
selection-color: #000;
background-color: #666;
Expand All @@ -193,7 +189,7 @@ WLibrarySidebar::item:focus {
/* Use the native focus decoration */
/* This is for all cells including Played and Location */
WTrackTableView,
/* This is for the BPM cell */
/* This is for the BPM and play count cells */
WTrackTableView QCheckBox:focus {
outline: 1px solid #ccc;
}
Expand All @@ -220,7 +216,7 @@ WTrackTableView {
}

/* checkbox in library "Played" column */
WTrackTableView::indicator:unchecked:selected {
#LibraryPlayedCheckbox::indicator:unchecked:selected {
background: none;
color: #cfcfcf;
border: 1px solid #000;
Expand Down
4 changes: 4 additions & 0 deletions res/skins/Shade/style_summer_sunset.qss
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ WSearchLineEdit:focus {
border-color: #78C70B;
}

#LibraryBPMButton::indicator:unchecked:selected {
image: url(skin:/btn/btn_lib_bpm_unlocked_white.svg);
}

#LibraryFeatureControls QPushButton:enabled {
background-color: #998A3C;
border: 1px solid #998A3C;
Expand Down
21 changes: 12 additions & 9 deletions res/skins/Tango/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,6 @@ WLibraryTextBrowser,
WLibrarySidebar {
border: 2px solid #585858;
/* font-weight: normal; */
color: #9e9e9e;
background-color: #0f0f0f;
alternate-background-color: #1a1a1a;
/* In selected library rows this sets the color of
Expand All @@ -2567,16 +2566,24 @@ WLibrarySidebar {
/* background of Color delegate in selected row */
selection-background-color: #555;
}
WTrackTableView,
WLibraryTextBrowser,
WLibrarySidebar,
#LibraryBPMButton::item,
#LibraryPlayedCheckbox::item {
color: #9e9e9e;
}

/* Prevent OS-style checkbox from being rendered underneath the custom style. */
WTrackTableView::item,
#LibraryPlayedCheckbox::item,
#LibraryBPMButton::item {
border: 0px;
}

/* selected table row */
WTrackTableView::item:selected,
#LibraryBPMButton::item:selected {
#LibraryBPMButton::item:selected,
#LibraryPlayedCheckbox::item:selected {
color: #fff;
background-color: #555;
}
Expand Down Expand Up @@ -3023,10 +3030,6 @@ QPushButton#pushButtonRepeatPlaylist:!checked {
#LibraryBPMButton::indicator:unchecked {
image: url(skin:/../Tango/buttons/btn_lib_bpm_unlocked.svg);
}
/* BPM value */
#LibraryBPMButton::item {
color: #cfcfcf;
}

#LibraryBPMSpinBox {
padding: 0px;
Expand Down Expand Up @@ -3079,10 +3082,10 @@ QPushButton#pushButtonRepeatPlaylist:!checked {
}*/

/* checkbox in library "Played" column */
WTrackTableView::indicator:checked {
#LibraryPlayedCheckbox::indicator:checked {
image: url(skin:/../Tango/buttons/btn_lib_checkbox_checked.svg);
}
WTrackTableView::indicator:unchecked {
#LibraryPlayedCheckbox::indicator:unchecked {
image: url(skin:/../Tango/buttons/btn_lib_checkbox.svg);
}

Expand Down
Loading

0 comments on commit 6acfe63

Please sign in to comment.