Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion res/skins/Deere/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</manifest>

<ObjectName>Mixxx</ObjectName>
<Style src="skin:style.qss"/>
<Style src="skin:style.qss" src-mac="skin:style-mac.qss"/>

<Size>1024me,550me</Size>
<Layout>horizontal</Layout>
Expand Down
12 changes: 12 additions & 0 deletions res/skins/Deere/style-mac.qss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* hack to hide the checkmark, otherwise text gets cut off
on the right on Retina screens. This can only be done for macOS
because it cuts off text on the left on KDE */
WEffectSelector QAbstractItemView {
margin: 0 0 0 -24px;
}

/* hide the checkmark just in case the above shows a
partial checkmark on some untested screen */
WEffectSelector::indicator {
border: 0;
}
18 changes: 14 additions & 4 deletions res/skins/Deere/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -979,11 +979,21 @@ WEffectSelector {
}

WEffectSelector QAbstractItemView {
color: #c1cabe;
background-color: #201f1f;
selection-background-color: #184880;
/* hack around text getting cut off with scaled checkbox on macOS with Retina screens */
margin: 0px 0px 0px -30px;
}

WEffectSelector::item:!selected {
background-color: #201f1f;
}

WEffectSelector::item:selected {
background-color: #08080;
}

/* currently loaded effect */
WEffectSelector::checked {
color: #4495F4;
font-weight: bold;
}

#EffectKnob {
Expand Down
2 changes: 1 addition & 1 deletion res/skins/LateNight/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
</manifest>

<ObjectName>Mixxx</ObjectName>
<Style src="skin:style.qss"/>
<Style src="skin:style.qss" src-mac="skin:style-mac.qss"/>

<!-- MinimumSize should not be an exact monitor resolution. There needs
to be space for the title bar or other chrome at full screen -->
Expand Down
13 changes: 13 additions & 0 deletions res/skins/LateNight/style-mac.qss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* hack to hide the checkmark, otherwise text gets cut off
on the right on Retina screens. This can only be done for macOS
because it cuts off text on the left on KDE */
WEffectSelector QAbstractItemView {
margin: 0 0 0 -26px;
}

/* hide the checkmark just in case the above shows a
partial checkmark on some untested screen */
WEffectSelector::indicator {
border: 0;
}

2 changes: 0 additions & 2 deletions res/skins/LateNight/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1205,8 +1205,6 @@ WEffectSelector {
border: 1px solid #666;
border-radius: 2px;
padding: 0px;
/* hack around text getting cut off with scaled checkbox on macOS with Retina screens */
margin: 0px 0px 0px -24px;
}
/* selected item */
WEffectSelector::checked {
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Shade/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
-->

<ObjectName>Mixxx</ObjectName>
<Style src="skin:style.qss"/>
<Style src="skin:style.qss" src-mac="skin:style-mac.qss"/>
<Size>1008e,500e</Size>
<Layout>vertical</Layout>
<LaunchImageStyle>
Expand Down
10 changes: 10 additions & 0 deletions res/skins/Shade/style-mac.qss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* hack around text getting cut off with scaled checkbox on Macs with Retina screens */
WEffectSelector QAbstractItemView {
margin: 0px 0px 0px -26px;
}

/* just in case there is a partial checkmark shown on some untested screen, hide
the checkmark */
WEffectSelector::indicator {
border: 0;
}
19 changes: 6 additions & 13 deletions res/skins/Shade/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,20 @@ WEffectSelector::down-arrow {
}

WEffectSelector QAbstractItemView {
color: #060613;
background-color: #aab2b7;
border: 2px solid #060613;
selection-background-color: lightgray;
font: 13px;
/* hack around text getting cut off with scaled checkbox on macOS with Retina screens */
margin: 0px 0px 0px -4px; /* no matter if padding or margin, the left border is gone */
}

WEffectSelector:item
WEffectSelector::item:selected
{
border: 0px; /* puts tick mark behind item text */
padding-left: 14px; /* move text right to make room for tick mark */
font: 13px;
height: 17px;
background-color: lightgray;
}

WEffectSelector:item:selected
WEffectSelector::checked
{
border: 0px;
font: 13px;
background-color: #aab2b7;
height: 20px;
color: #EC4522;
}

#EffectSelectorGroup[highlight="1"]{
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Tango/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
</manifest>

<ObjectName>Mixxx</ObjectName>
<Style src="skin:style.qss"/>
<Style src="skin:style.qss" src-mac="skin:style-mac.qss"/>
<MinimumSize>1008,500</MinimumSize>
<SizePolicy>me,me</SizePolicy>
<Layout>vertical</Layout>
Expand Down
3 changes: 3 additions & 0 deletions res/skins/Tango/style-mac.qss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
WEffectSelector QAbstractItemView {
padding: 0px 0px 0px -20px;
}
2 changes: 0 additions & 2 deletions res/skins/Tango/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1525,8 +1525,6 @@ decks, samplers, mic, aux, fx */
border: 1px solid #333;
border-radius: 2px;
margin: 0px;
/* Move list to the left to hide tick mark and prevent cut-off text. */
padding: 0px 0px 0px -20px;
}
/* items */
WEffectSelector::item:!selected {
Expand Down
20 changes: 20 additions & 0 deletions src/skin/legacyskinparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,26 @@ QString LegacySkinParser::getStyleFromNode(const QDomNode& node) {
fileBytes.length());
}

QString platformSpecificAttribute;
#if defined(Q_OS_MAC)
platformSpecificAttribute = "src-mac";
#elif defined(__WINDOWS__)
platformSpecificAttribute = "src-windows";
#else
platformSpecificAttribute = "src-linux";
#endif

if (styleElement.hasAttribute(platformSpecificAttribute)) {
QString platformSpecificSrc = styleElement.attribute(platformSpecificAttribute);
QFile platformSpecificFile(platformSpecificSrc);
if (platformSpecificFile.open(QIODevice::ReadOnly)) {
QByteArray fileBytes = platformSpecificFile.readAll();

style += QString::fromLocal8Bit(fileBytes.constData(),
fileBytes.length());
}
}

// This section can be enabled on demand. It is useful to tweak
// pixel sized values for different scalings. But we should know if this is
// actually used when migrating to Qt5
Expand Down