Skip to content

Commit

Permalink
Skins: consolidate all common, platform-specific menu styles in one f…
Browse files Browse the repository at this point in the history
…ile per platform
  • Loading branch information
ronso0 committed Apr 26, 2021
1 parent a204974 commit 83056d9
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 233 deletions.
6 changes: 3 additions & 3 deletions res/skins/Deere/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@

<ObjectName>Mixxx</ObjectName>
<Style src="skin:../Deere/style.qss"
src-linux="skin:../Deere/style-linux.qss"
src-windows="skin:../Deere/style-windows.qss"
src-mac="skin:../Deere/style-mac.qss"/>
src-mac="skin:../Deere/style-mac.qss"
src-linux="skin:../default-menu-styles-linux.qss"
src-windows="skin:../default-menu-styles-windows.qss"/>

<Size>1008me,550me</Size>
<Layout>horizontal</Layout>
Expand Down
19 changes: 0 additions & 19 deletions res/skins/Deere/style-linux.qss

This file was deleted.

23 changes: 10 additions & 13 deletions res/skins/Deere/style-mac.qss
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
/* push skin settings Close button to the left so it's not in the same screen
position as the Open button.
fixes lp1795663 "settings panel disappears instantly after opening it in Tango & Deere skin"
*/
/* push skin settings Close button to the left so it's not in
the same screen position as the Open button. Fixes lp1795663
"settings panel disappears instantly after opening it in Tango & Deere skin" */
#SkinSettingsTop {
padding-right: 27px;
}


/* Previously necessayr 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;
/* Previously necessary hack to avoid cut-off effect names with scaled checkbox
on Macs with Retina screens */
/* WEffectSelector QAbstractItemView {
margin: 0px 0px 0px -27px;
} */

/* hide the checkmark just in case the above shows a
partial checkmark on some untested screen
WEffectSelector::indicator {
/* just in case there is a partial checkmark shown on some
untested screen, hide the checkmark */
/* WEffectSelector::indicator {
border: 0;
} */
34 changes: 0 additions & 34 deletions res/skins/Deere/style-windows.qss

This file was deleted.

4 changes: 2 additions & 2 deletions res/skins/LateNight/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@

<ObjectName>Mixxx</ObjectName>
<Style src="skin:style.qss"
src-linux="skin:style_linux.qss"
src-windows="skin:style_windows.qss"/>
src-linux="skin:../default-menu-styles-linux.qss"
src-windows="skin:../default-menu-styles-windows.qss"/>
<!-- MinimumSize should not be an exact monitor resolution. There needs
to be space for the title bar or other chrome at full screen.
https://www.mixxx.org/wiki/doku.php/skin_guidelines#the_optimal_size_for_skins -->
Expand Down
19 changes: 0 additions & 19 deletions res/skins/LateNight/style_linux.qss

This file was deleted.

34 changes: 0 additions & 34 deletions res/skins/LateNight/style_windows.qss

This file was deleted.

5 changes: 2 additions & 3 deletions res/skins/Shade/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@
-->
<ObjectName>Mixxx</ObjectName>
<Style src="skin:style.qss"
src-mac="skin:style_mac.qss"
src-linux="skin:style_linux.qss"
src-windows="skin:style_windows.qss"/>
src-linux="skin:../default-menu-styles-linux.qss"
src-windows="skin:../default-menu-styles-windows.qss"/>
<Size>1008e,500e</Size>
<Layout>vertical</Layout>
<LaunchImageStyle>
Expand Down
19 changes: 0 additions & 19 deletions res/skins/Shade/style_linux.qss

This file was deleted.

10 changes: 0 additions & 10 deletions res/skins/Shade/style_mac.qss

This file was deleted.

6 changes: 3 additions & 3 deletions res/skins/Tango/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@

<ObjectName>Mixxx</ObjectName>
<Style src="skin:../Tango/style.qss"
src-linux="skin:../Tango/style-linux.qss"
src-windows="skin:../Tango/style-windows.qss"
src-mac="skin:../Tango/style-mac.qss"/>
src-mac="skin:../Tango/style-mac.qss"
src-linux="skin:../default-menu-styles-linux.qss"
src-windows="skin:../default-menu-styles-windows.qss"/>
<MinimumSize>1008,500</MinimumSize>
<SizePolicy>me,me</SizePolicy>
<Layout>vertical</Layout>
Expand Down
19 changes: 0 additions & 19 deletions res/skins/Tango/style-linux.qss

This file was deleted.

20 changes: 10 additions & 10 deletions res/skins/Tango/style-mac.qss
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/* push skin settings Close button to the left so it's not in the same screen
position as the Open button.
fixes lp1795663 "settings panel disappears instantly after opening it in Tango & Deere skin"
*/
/* push skin settings Close button to the left so it's not in
the same screen position as the Open button. Fixes lp1795663
"settings panel disappears instantly after opening it in Tango & Deere skin" */
#SkinSettingsHeader {
padding-right: 27px;
}

/* Previously necessary hack around text getting cut off with scaled checkbox on Macs with Retina screens
WEffectSelector QAbstractItemView {
margin: 0px 0px 0px -27px;
/* Previously necessary hack to avoid cut-off effect names with scaled checkbox
on Macs with Retina screens */
/* WEffectSelector QAbstractItemView {
margin: 0px 0px 0px -27px;
} */

/* just in case there is a partial checkmark shown on some untested screen, hide
the checkmark
WEffectSelector::indicator {
/* just in case there is a partial checkmark shown on some
untested screen, hide the checkmark */
/* WEffectSelector::indicator {
border: 0;
} */
34 changes: 0 additions & 34 deletions res/skins/Tango/style-windows.qss

This file was deleted.

24 changes: 24 additions & 0 deletions res/skins/default-menu-styles-linux.qss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

#MainMenu::item {
/* No big deal, just try to make it look like native menus */
padding: 0.1em 0.3em 0.1em 0.3em;
margin: 0em;
}
#MainMenu QMenu::item {
padding: 0.1em 0.3em 0.2em 0.3em;
/* Text is lef-aligned with checkbox.
- margin-left creates a gap at the left
where we can move the checkbox to. */
margin: 0em 0em 0em 1.3em;
}
/* Checkbox preceeding menu items */
#MainMenu QMenu::indicator {
/*width: 1em;*/
/*height: 1em;*/
/* Checkbox is left-aligned with text.
- margin-left moves it left into the gap we created.
- small negative margin-right eliminates the tiny checkbox/text margin
which is visible when the row is highlighted. */
margin: 0em -0.1em 0em -1.3em;
padding: 0.2em 0em 0.2em 0em;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,31 @@
}
#MainMenu QMenu::item {
padding: 0.1em 0.3em 0.2em 0.3em;
/* Text is lef-aligned with checkbox.
- margin-left creates a gap at the left
where we can move the checkbox to. */
margin: 0em 0em 0em 1.2em;
}
/* Checkbox preceeding menu items */
#MainMenu QMenu::indicator {
/*width: 1em;*/
/*height: 1em;*/
/* Checkbox is left-aligned with text.
- negative margin-left moves it left into the gap we created. */
margin: 0em 0em 0em -1.3em;
padding: 0.3em 0em 0.3em 0.3em;
}
#MainMenu QMenu::indicator,
#MainMenu QMenu::indicator:selected,
#MainMenu QMenu::indicator:checked,
#MainMenu QMenu::indicator:checked:selected {
}

/* Icons (copy, paste, ...) in context menus of
- property cells in the tracks table
- WCueMenuPopup cue label editor
- WBeatSpinBox
- AutoDJ transition QSpinBox */
#LibraryContainer QMenu::icon,
QLineEdit QMenu::icon,
/* - checkbox in Crate name context menu
"[ ] Auto DJ Track Source"
- QHeaderView QMenu::indicator */
#LibraryContainer QMenu::indicator {
/* Linux: margin-right pushes the entire icon to the right !?? */
"[ ] Auto DJ Track Source" */
WLibrarySidebar QMenu::item,
/* Column checkboxes in the table header menu */
WLibrary QHeaderView QMenu::indicator {
margin: 0px -20px 0px 5px;
}
}

0 comments on commit 83056d9

Please sign in to comment.