Skip to content

Commit

Permalink
Library features: wrap controls into QWidget 'LibraryFeatureControls'
Browse files Browse the repository at this point in the history
to allow styling the controls rows independently from WLibrary.
Originally this helped to have a 'frameless' yet embedded tracks table and
borders for AutoDJ controls for example in LateNight PaleMoon, but turned out
to have some benefits for all skins (smaller qss).
  • Loading branch information
ronso0 committed Feb 12, 2021
1 parent 2d237e6 commit fe7310c
Show file tree
Hide file tree
Showing 13 changed files with 628 additions and 773 deletions.
86 changes: 31 additions & 55 deletions res/skins/Deere/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,6 @@ WSearchLineEdit {
background-color: #1F1F1F;
border: 1px solid #1A1A1A;
}
/* transition time in Auto DJ tab is styled pretty much the same as WBeatSpinBox above */
#DlgAutoDJ QSpinBox {}

/* Extra declaration for QRadionButton otherwise it shows up with wrong colors in Linux with Gnome */
WLibrary QLabel, WLibrary QRadioButton {
Expand All @@ -528,40 +526,26 @@ WLibrary QRadioButton::indicator:unchecked {
}
/* buttons in library (in hierarchical order of appearance)
Style them just as the other regular buttons */
#DlgMissing > QPushButton,
#DlgHidden > QPushButton,
#DlgAutoDJ > QPushButton,
#DlgRecording > QPushButton,
#DlgAnalysis > QPushButton {
#LibraryFeatureControls QPushButton {
margin: 9px 3px 6px 3px;
padding: 3px 4px;
color: #D2D2D2;
background-color: #4B4B4B;
border: 1px solid #4B4B4B;
border-radius: 2px;
outline: none;
}
#DlgMissing > QPushButton,
#DlgHidden > QPushButton,
#DlgRecording > QPushButton,
#DlgAnalysis > QPushButton {
padding: 3px 4px;
}
#DlgAutoDJ > QPushButton {
#DlgAutoDJ > #LibraryFeatureControls QPushButton {
padding: 0px 1px;
}
#DlgAutoDJ > QPushButton {
width: 34px;
height: 20px;
}
QPushButton#pushButtonAutoDJ {
width: 42px;
}
}
QPushButton#pushButtonAutoDJ {
width: 42px;
}


#DlgMissing > QPushButton:!enabled,
#DlgHidden > QPushButton:!enabled,
#DlgAutoDJ > QPushButton:!enabled,
#DlgAnalysis > QPushButton:!enabled {
#LibraryFeatureControls QPushButton:!enabled {
/* buttons in "disabled" (not click-able) state. They are nearly invisible
by default QT palette, so style accordingly */
color: #808080; /* Default #A3A3A3 -90L HSL*/
Expand All @@ -572,40 +556,35 @@ WLibrary QRadioButton::indicator:unchecked {
outline: none;
}

#DlgMissing > QPushButton:hover,
#DlgHidden > QPushButton:hover,
#DlgAutoDJ > QPushButton:hover,
#DlgRecording > QPushButton:hover,
#DlgAnalysis > QPushButton:hover {
#LibraryFeatureControls QPushButton:hover {
color: #D2D2D2;
background-color: #5F5F5F;
border: 1px solid #5F5F5F;
outline: none;
}

#DlgMissing > QPushButton:focus,
#DlgHidden > QPushButton:focus,
#DlgAutoDJ > QPushButton:focus,
#DlgRecording > QPushButton:focus,
#DlgAnalysis > QPushButton:focus,
#LibraryFeatureControls QPushButton:focus,
#fadeModeCombobox:focus,
#DlgAutoDJ QSpinBox:focus {
#spinBoxTransition:focus {
outline: none;
}

#DlgAutoDJ > QPushButton:checked,
#DlgRecording > QPushButton:checked,
#DlgAnalysis > QPushButton:checked {

QPushButton#pushButtonAutoDJ:checked,
QPushButton#pushButtonRepeatPlaylist:checked,
QPushButton#pushButtonAnalyze:checked,
QPushButton#pushButtonRecording:checked {
/* checkbuttons in active state */
color: #FDFDFD;
background-color: #006596;
border: 1px solid #006596;
outline: none;
}

#DlgAutoDJ > QPushButton:checked:hover,
#DlgRecording > QPushButton:checked:hover,
#DlgAnalysis > QPushButton:checked:hover {
QPushButton#pushButtonAutoDJ:checked:hover,
QPushButton#pushButtonRepeatPlaylist:checked:hover,
QPushButton#pushButtonAnalyze:checked:hover,
QPushButton#pushButtonRecording:checked:hover {
/* checkbuttons hovered over in "active" state */
margin: 9px 3px 6px 3px;
color: #FDFDFD;
Expand All @@ -614,10 +593,7 @@ WLibrary QRadioButton::indicator:unchecked {
outline: none;
}

#DlgMissing > QPushButton:pressed,
#DlgHidden > QPushButton:pressed,
#DlgAutoDJ > QPushButton:pressed,
#DlgAnalysis > QPushButton:pressed {
#LibraryFeatureControls QPushButton:pressed {
/* pushbuttons in "down" state */
margin: 9px 3px 6px 3px;
color: #FDFDFD;
Expand Down Expand Up @@ -938,7 +914,7 @@ WOverview #PassthroughLabel {
}

WBeatSpinBox,
#DlgAutoDJ QSpinBox {
#spinBoxTransition {
color: #c1cabe;
background-color: #1f1e1e;
border: 1px solid #444342;
Expand All @@ -948,50 +924,50 @@ WBeatSpinBox,
WBeatSpinBox {
padding: 2px;
}
#DlgAutoDJ QSpinBox {
#spinBoxTransition {
padding: 1px 2px 2px 2px;
margin: 3px 0px 0px 2px;
}
WBeatSpinBox:hover,
#DlgAutoDJ QSpinBox:hover,
#spinBoxTransition:hover,
WBeatSpinBox:focus,
#DlgAutoDJ QSpinBox:focus {
#spinBoxTransition:focus {
border: 1px ridge #015d8d;
}
WBeatSpinBox::down-button,
#DlgAutoDJ QSpinBox::down-button {
#spinBoxTransition::down-button {
subcontrol-origin: border;
subcontrol-position: bottom right; /* position at the top right corner */
padding-right: 4px;
padding-top: -3px;
border: 0;
}
WBeatSpinBox::down-arrow,
#DlgAutoDJ QSpinBox::down-arrow {
#spinBoxTransition::down-arrow {
width: 9px;
height: 7px;
image: url(skin:/icon/ic_chevron_down_selector.svg);
}
WBeatSpinBox::down-arrow:hover,
#DlgAutoDJ QSpinBox::down-arrow:hover {
#spinBoxTransition::down-arrow:hover {
image: url(skin:/icon/ic_chevron_down_selector_hover.svg);
}
WBeatSpinBox::up-button,
#DlgAutoDJ QSpinBox::up-button {
#spinBoxTransition::up-button {
subcontrol-origin: border;
subcontrol-position: top right; /* position at the top right corner */
padding-right: 4px;
padding-bottom: -3px;
border: 0;
}
WBeatSpinBox::up-arrow,
#DlgAutoDJ QSpinBox::up-arrow {
#spinBoxTransition::up-arrow {
width: 9px;
height: 7px;
image: url(skin:/icon/ic_chevron_up_selector.svg);
}
WBeatSpinBox::up-arrow:hover,
#DlgAutoDJ QSpinBox::up-arrow:hover {
#spinBoxTransition::up-arrow:hover {
image: url(skin:/icon/ic_chevron_up_selector_hover.svg);
}

Expand Down
104 changes: 46 additions & 58 deletions res/skins/LateNight/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

/************** font settings *************************************************/

#Mixxx, WWidget,
#Mixxx,
WWidget,
QToolTip,
WLabel, QLabel,
WNumber, WNumberPos,
Expand All @@ -28,7 +29,7 @@ WEffect,
WEffectSelector,
WEffectSelector QAbstractScrollArea,
#fadeModeCombobox,
#fadeModeCombobox QAbstractScrollArea
#fadeModeCombobox QAbstractScrollArea,
#LibraryContainer QPushButton,
#LibraryContainer QLabel,
#LibraryContainer QRadioButton,
Expand Down Expand Up @@ -59,12 +60,8 @@ WOverview #PassthroughLabel,
/* SKin settings & Library */
#SkinSettingsToggle,
#SkinSettingsNumToggle[value="1"],
#DlgMissing > QPushButton,
#DlgHidden > QPushButton,
#DlgAutoDJ > QPushButton,
#DlgRecording > QPushButton,
#DlgAnalysis > QPushButton,
#labelRecFilename,
#LibraryFeatureControls QPushButton,
QLabel#labelRecFilename, /* needs QLabel to override previous QLabel font definition*/
WEffectSelector,
#fadeModeCombobox,
WOverview #PassthroughLabel {
Expand All @@ -82,7 +79,7 @@ WOverview #PassthroughLabel {
#RecFeedback, #RecDuration,
#BroadcastButton,
#SkinSettingsToggle,
WLibrary QPushButton {
#LibraryFeatureControls QPushButton {
text-transform: uppercase;
}
/* regular font weight */
Expand All @@ -98,8 +95,8 @@ WCoverArtMenu,
WTrackMenu,
WTrackMenu QMenu,
WBeatSpinBox QMenu,
#labelRecPrefix,
#labelRecStatistics {
QLabel#labelRecPrefix,
QLabel#labelRecStatistics {
font-weight: normal;
}

Expand All @@ -115,7 +112,8 @@ WBeatSpinBox QMenu,
text-align: center;
}

WPushButton, WLibrary QPushButton,
WPushButton,
#LibraryFeatureControls QPushButton,
#RecDuration[highlight="0"],
#RecDuration[highlight="1"] {
font-size: 11px;
Expand All @@ -127,7 +125,7 @@ WPushButton, WLibrary QPushButton,
#RateText,
#SamplerBpmMini,
#PreviewBPM,
WLibrary QRadioButton {
#LibraryFeatureControls QRadioButton {
font-size: 12px;
}

Expand All @@ -137,9 +135,7 @@ WEffectSelector,
WEffectSelector QAbstractScrollArea,
#fadeModeCombobox,
#fadeModeCombobox QAbstractScrollArea,
#labelRecPrefix,
#labelRecFilename,
#labelRecStatistics,
#LibraryFeatureControls QLabel,
#SkinSettingsButton,
#SkinSettingsNumToggle,
#SkinSettingsMixerToggle,
Expand Down Expand Up @@ -698,66 +694,58 @@ WEffectSelector {

/************ Library feature controls / tree view / table view *************/
/* Extra declaration for QRadioButton otherwise it shows up with wrong colors in Linux with Gnome */
WLibrary QLabel, WLibrary QRadioButton {
background: transparent;
}

/* Additional space for QRadionButtons */
WLibrary QRadioButton {
/* bottom margin! */
margin: 2px 3px 2px 3px;
}

/* Additional space for QLabels */
#DlgAnalysis QLabel,
#DlgAutoDJ QLabel {
margin: 2px 5px 5px 1px;
}

/* Library feature pushbuttons
Don't use 'WLibrary QPushButton' here, as this would apply padding
to the Preview & BPM lock buttons as well.
Define the buttons fore every Library feature instead. */
#DlgMissing > QPushButton,
#DlgHidden > QPushButton,
#DlgAutoDJ > QPushButton,
#DlgRecording > QPushButton,
#DlgAnalysis > QPushButton {
#LibraryFeatureControls QPushButton {
margin: 0px 2px 3px 0px;
padding: 0px;
padding: 0px 5px;
/* Note: border-width is added, so the effective minimal size
is 24 x 36 px */
height: 20px;
min-width: 32px;
}
#DlgMissing > QPushButton,
#DlgHidden > QPushButton,
#DlgRecording > QPushButton,
#DlgAnalysis > QPushButton {
padding: 0px 5px;
}
QPushButton#pushButtonAutoDJ {
min-width: 40px;
}
/* Space in between 'Enable AutoDJ' and transition time spinbox */
#DlgAutoDJ > #horizontalSpacer {
width: 100px;
#DlgAutoDJ #LibraryFeatureControls QPushButton {
padding: 0px;
}
QPushButton#pushButtonAutoDJ {
min-width: 40px;
}

#LibraryFeatureControls QLabel,
#LibraryFeatureControls QRadioButton {
background: transparent;
}

/* Additional space for QRadionButtons */
#LibraryFeatureControls QRadioButton {
margin: 2px 3px 2px 3px;
}
/* Push 'New' radio button away from corner */
#radioButtonRecentlyAdded {
margin-left: 10px;
QRadioButton#radioButtonRecentlyAdded {
margin-left: 5px;
}
/* Space in between 'All' radio button and 'Select All' button */
QPushButton#pushButtonSelectAll {
margin-left: 12px;
QRadioButton#radioButtonAllSongs {
margin-right: 10px;
}

#labelRecPrefix,
#labelRecFilename,
#labelRecStatistics {
/* Additional space for QLabels */
QLabel#labelTransitionAppendix {
margin-left: 3px;
}
QLabel#labelProgress, /* Analysis progress */
QLabel#labelSelectionInfo /* AutoDJ track selection info */ {
margin: 2px 5px 5px 1px;
}
QLabel#labelRecPrefix,
QLabel#labelRecFilename,
QLabel#labelRecStatistics {
text-transform: none;
padding: 0px 0px 3px 0px;
}
margin: 3px 0px 3px 0px;
}

#LibraryContainer QTreeView {
show-decoration-selected: 0;
Expand Down
Loading

0 comments on commit fe7310c

Please sign in to comment.