Fix track operations button alignment, size, and style (#7779)
Make the track ops button consistently sized and style it and the solo & mute buttons using CSS instead of SVG assets
@@ -376,32 +376,61 @@ lmms--gui--TrackContentWidget {
|
||||
|
||||
/* gear button in tracks */
|
||||
|
||||
|
||||
/* 20px = 1px border + 2px padding + 14px icon + 2px padding + 1px border */
|
||||
QPushButton#btn-mute,
|
||||
QPushButton#btn-mute-inv:checked,
|
||||
QPushButton#btn-solo,
|
||||
lmms--gui--TrackOperationsWidget QPushButton {
|
||||
max-height: 26px;
|
||||
max-width: 26px;
|
||||
min-height: 26px;
|
||||
min-width: 26px;
|
||||
background: none;
|
||||
border: none;
|
||||
min-height: 14;
|
||||
max-height: 14;
|
||||
min-width: 14;
|
||||
max-width: 14;
|
||||
padding: 2;
|
||||
border: 1 solid #0f1621;
|
||||
border-top: 1 solid #18202b;
|
||||
border-bottom: 1 solid #02060f;
|
||||
border-radius: 4;
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 255, 255, 20%), stop:0.1 rgba(255, 255, 255, 2%), stop:0.9 rgba(0, 0, 0, 2%), stop:1 rgba(0, 0, 0, 40%));
|
||||
}
|
||||
|
||||
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator {
|
||||
image: url("resources:trackop.png");
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: center;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
image: none;
|
||||
}
|
||||
|
||||
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:hover {
|
||||
image: url("resources:trackop_h.png");
|
||||
lmms--gui--TrackOperationsWidget QPushButton {
|
||||
image: url("resources:gear.svg");
|
||||
}
|
||||
|
||||
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:pressed,
|
||||
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:checked {
|
||||
image: url("resources:trackop_c.png");
|
||||
position: relative;
|
||||
top: 2px;
|
||||
QPushButton#btn-mute,
|
||||
QPushButton#btn-mute-inv:checked {
|
||||
image: url("resources:speaker.svg");
|
||||
}
|
||||
|
||||
QPushButton#btn-solo {
|
||||
image: url("resources:headphones.svg");
|
||||
}
|
||||
|
||||
QPushButton#btn-mute:hover,
|
||||
QPushButton#btn-solo:hover,
|
||||
lmms--gui--TrackOperationsWidget QPushButton:hover {
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 255, 255, 25%), stop:0.1 rgba(255, 255, 255, 7%), stop:0.9 transparent, stop:1 rgba(0, 0, 0, 35%));
|
||||
}
|
||||
|
||||
lmms--gui--TrackOperationsWidget QPushButton:pressed {
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 25%), stop:0.1 transparent, stop:0.8 rgba(0, 0, 0, 15%), stop:1 rgba(0, 0, 0, 35%));
|
||||
}
|
||||
|
||||
QPushButton#btn-mute-inv,
|
||||
QPushButton#btn-mute:checked {
|
||||
image: url("resources:speaker_slash.svg");
|
||||
border: 1 solid #890120;
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #e2515b, stop:0.1 #d40237, stop:0.9 #d40237, stop:1 #900122);
|
||||
}
|
||||
|
||||
QPushButton#btn-solo:checked {
|
||||
border: 1 solid #055f89;
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #5aa8d9, stop:0.1 #2696d1, stop:0.9 #2696d1, stop:1 #16638c);
|
||||
}
|
||||
|
||||
/* actually has no effect yet so disabled */
|
||||
|
||||
26
data/themes/default/gear.svg
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xml:space="preserve" width="18" height="18" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Fawn Sannar</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<path fill="#fff" d="M 8.0270042,0 C 7.4980619,0 7.0727071,0.42536378 7.0727071,0.95430605 V 1.2056263 h -0.00879 A 2.5096571,2.5096571 0 0 1 6.7317557,2.4604548 2.5096571,2.5096571 0 0 1 3.3046852,3.3795958 L 3.088521,3.2548175 C 2.6304487,2.9903509 2.0489568,3.146479 1.7844812,3.6045513 L 0.74934417,5.3954217 C 0.48487753,5.853494 0.64100562,6.4367405 1.0990779,6.7012162 l 0.2179369,0.1265329 -0.00352,0.00527 a 2.5096571,2.5096571 0 0 1 0.9226683,0.9121314 2.5096571,2.5096571 0 0 1 -0.884012,3.4077155 l -0.2530749,0.14587 c -0.45807228,0.264475 -0.61420037,0.845967 -0.34973373,1.30404 l 1.03515503,1.792616 c 0.2644576,0.458072 0.8459585,0.614209 1.3040308,0.349733 l 0.2214462,-0.128296 a 2.5096571,2.5096571 0 0 1 0.00175,-0.0017 2.5096571,2.5096571 0 0 1 1.2530739,-0.333924 2.5096571,2.5096571 0 0 1 2.5078934,2.493857 v 0.268884 c 0,0.528943 0.4253638,0.956061 0.9543061,0.956061 h 2.0685381 c 0.528942,0 0.95606,-0.427118 0.95606,-0.956061 V 16.78911 h 0.02987 a 2.5096571,2.5096571 0 0 1 0.30756,-1.256592 2.5096571,2.5096571 0 0 1 2.052718,-1.253074 2.5096571,2.5096571 0 0 1 1.323368,0.311068 l 0.268894,0.154661 c 0.458081,0.264476 1.039564,0.108339 1.30404,-0.349733 l 1.035155,-1.792616 c 0.264457,-0.458073 0.108338,-1.039565 -0.349743,-1.30404 l -0.221446,-0.128288 0.01582,-0.02812 A 2.5096571,2.5096571 0 0 1 15.884635,10.247783 2.5096571,2.5096571 0 0 1 16.749301,6.8593868 L 17.023468,6.7012162 C 17.48154,6.4367405 17.637677,5.853494 17.373202,5.3954217 L 16.338065,3.6045513 C 16.073598,3.146479 15.492106,2.9903509 15.034025,3.2548175 l -0.216164,0.1247783 -0.0053,-0.00878 A 2.5096571,2.5096571 0 0 1 13.555995,3.7117561 2.5096571,2.5096571 0 0 1 11.051611,1.2442826 V 0.95430605 C 11.051611,0.42536378 10.624493,0 10.095551,0 Z M 9.2115297,5.8541149 A 3.1493764,3.1493764 0 0 1 11.787981,7.4252938 3.1493764,3.1493764 0 0 1 10.636838,11.727567 3.1493764,3.1493764 0 0 1 6.3345653,10.574661 3.1493764,3.1493764 0 0 1 7.487462,6.2723881 3.1493764,3.1493764 0 0 1 9.2115387,5.8541059 Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
44
data/themes/default/headphones.svg
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xml:space="preserve"
|
||||
width="14"
|
||||
height="14"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"><defs
|
||||
id="defs1" />
|
||||
<title
|
||||
id="title1">LMMS solo button (inactive)</title>
|
||||
<metadata
|
||||
id="metadata1">
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:title>LMMS solo button (inactive)</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Rebecca Noel Ati, Stakeout Punch</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/publicdomain/zero/1.0/"><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /></cc:License></rdf:RDF>
|
||||
</metadata>
|
||||
|
||||
|
||||
|
||||
<path
|
||||
id="headphones"
|
||||
fill="#fff"
|
||||
d="m 7,1.0000248 c -1.472525,0.00403 -2.993968,0.4818935 -4.136604,1.5 C 1.72076,3.5181313 1,5.0872298 1,7.000025 c 0,1.60032 0,3.357065 0,5 0,0.5 0.5,1 1,1 h 2 c 0.5,0 1,-0.5 1,-1 v -3 c 0,-0.5 -0.5,-1 -1,-1 H 3 c 0,-0.5 0,-0.5 0,-1 C 3,5.5885998 3.513729,4.6525728 4.246094,4.0000248 4.978458,3.3474773 5.972523,3.0028343 7,3.0000248 8.027475,2.9972148 9.03517,3.3544188 9.765625,4.0039313 10.490632,4.6486008 10.992038,5.5905738 11,7.000025 v 1 h -1 c -0.5,0 -1,0.5 -1,1 v 3 c 0,0.5 0.5,1 1,1 h 2 c 0.5,0 1,-0.5 1,-1 v -5 C 12.992284,5.0891328 12.265582,3.5121893 11.127288,2.5000248 9.982744,1.4823023 8.472523,0.9959983 7,1.0000248 Z"
|
||||
style="fill:#ffffff;fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xml:space="preserve" width="20" height="20" version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>LMMS mute button (active)</title>
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:title>LMMS mute button (active)</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Rebecca Noel Ati, Stakeout Punch</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<rect width="19" height="19" x=".5" y=".5" fill="#d40237"
|
||||
stroke="#890120" stroke-linecap="round" stroke-linejoin="bevel"
|
||||
ry="2.065" id="button" />
|
||||
<path id="highlight" fill="#fff" opacity=".1"
|
||||
d="M2.56445 1C1.6888 1 1 1.6888 1 2.56445V3c0-.554.446-1 1-1h16c.554 0 1 .446 1 1v-.43555C19 1.6888 18.3112 1 17.43555 1Z" />
|
||||
<path id="shadow" fill="#000" opacity=".1"
|
||||
d="M2.56445 19C1.6888 19 1 18.3112 1 17.43555V17c0 .554.446 1 1 1h16c.554 0 1-.446 1-1v.43555C19 18.3112 18.3112 19 17.43555 19Z" />
|
||||
<path id="speaker-cut" fill="#fff"
|
||||
d="m 5,4.0000001 -0.5,0.5 -0.5,0.5 1.95508,1.95508 L 10,11 l 1,1 1,1 1,1 1,1 1,1 0.5,-0.5 L 16,15 14.9336,13.9336 C 15.89052,12.66885 16.36719,11.34907 16.36719,10 16.36719,8.2666701 15.58249,6.5825001 14,5.0000001 l -1,1 c 1.4175,1.4175 2,2.73334 2,3.9999999 0,0.94192 -0.32225,1.9118 -1.07031,2.9297 L 12.94336,11.94336 C 13.42336,11.30872 13.70312,10.6884 13.70312,10 13.70312,8.9389001 13.04125,8.0412501 12,7.0000001 l -1,1 c 0.95875,0.95876 1.375,1.56111 1.375,1.9999999 0,0.2501 -0.13605,0.5534 -0.4297,0.94531 L 10,9.0000101 v -5 H 9.5 c -0.5,0 -0.5,0 -1,0.5 l -1.5,1.5 z m -1,3 c -0.5,0 -1,0.44021 -1,1 V 12 c 0,0.5 0.5,1 1,1 h 1.5 c 0.5,0 0.5,0 1,0.5 l 2,2 C 9,16 9,16 9.5,16 H 10 v -3 z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xml:space="preserve" width="20" height="20" version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>LMMS mute button (inactive)</title>
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:title>LMMS mute button (inactive)</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Rebecca Noel Ati, Stakeout Punch</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<rect width="19" height="19" x=".5" y=".5" fill="transparent"
|
||||
stroke="#000" stroke-linecap="round" stroke-linejoin="bevel"
|
||||
stroke-opacity="0.5" ry="2.065" id="button" />
|
||||
<path id="highlight" fill="#fff" opacity=".1"
|
||||
d="M2.56445 1C1.6888 1 1 1.6888 1 2.56445V3c0-.554.446-1 1-1h16c.554 0 1 .446 1 1v-.43555C19 1.6888 18.3112 1 17.43555 1Z" />
|
||||
<path id="shadow" fill="#000" opacity=".1"
|
||||
d="M2.56445 19C1.6888 19 1 18.3112 1 17.43555V17c0 .554.446 1 1 1h16c.554 0 1-.446 1-1v.43555C19 18.3112 18.3112 19 17.43555 19Z" />
|
||||
<path id="speaker" fill="#fff"
|
||||
d="m 9.3339845,4.0000002 c -0.341797,0.00684 -0.3964845,0.0625 -0.8339845,0.5 l -2,2 c -0.5,0.5 -0.5,0.5 -1,0.5 H 4 c -0.5,0 -1,0.440207 -1,1 V 12 c 0,0.5 0.5,1 1,1 h 1.5 c 0.5,0 0.5,0 1,0.5 l 2,2 C 9,16 9,16 9.5,16 H 10 V 4.0000002 H 9.5 c -0.0625,0 -0.1172,-9.765e-4 -0.1660155,0 z m 4.6660155,1 -1,1 C 14.417505,7.4175047 15,8.7333337 15,10 c 0,1.266665 -0.582495,2.582495 -2,4 l 1,1 c 1.582495,-1.582495 2.367188,-3.266665 2.367188,-5 0,-1.7333348 -0.784693,-3.4175038 -2.367188,-4.9999998 z m -2,2 -1,1 c 0.95875,0.958755 1.375,1.56111 1.375,1.9999998 0,0.4389 -0.41625,1.04125 -1.375,2 l 1,1 c 1.04125,-1.04125 1.703125,-1.938885 1.703125,-3 C 13.703125,8.9388902 13.04125,8.0412492 12,7.0000002 Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xml:space="preserve" width="20" height="20" version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>LMMS solo button (active)</title>
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:title>LMMS solo button (active)</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Rebecca Noel Ati, Stakeout Punch</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<rect width="19" height="19" x=".5" y=".5" fill="#2696d1"
|
||||
stroke="#055f89" stroke-linecap="round" stroke-linejoin="bevel"
|
||||
ry="2.065" id="button" />
|
||||
<path id="highlight" fill="#fff" opacity=".1"
|
||||
d="M2.56445 1C1.6888 1 1 1.6888 1 2.56445V3c0-.554.446-1 1-1h16c.554 0 1 .446 1 1v-.43555C19 1.6888 18.3112 1 17.43555 1Z" />
|
||||
<path id="shadow" fill="#000" opacity=".1"
|
||||
d="M2.56445 19C1.6888 19 1 18.3112 1 17.43555V17c0 .554.446 1 1 1h16c.554 0 1-.446 1-1v.43555C19 18.3112 18.3112 19 17.43555 19Z" />
|
||||
<path id="headphones" fill="#fff"
|
||||
d="m 10,4.0000248 c -1.472525,0.00403 -2.993968,0.4818935 -4.136604,1.5 C 4.72076,6.5181313 4,8.0872298 4,10.000025 c 0,1.60032 0,3.357065 0,5 0,0.5 0.5,1 1,1 h 2 c 0.5,0 1,-0.5 1,-1 v -3 c 0,-0.5 -0.5,-1 -1,-1 H 6 c 0,-0.5 0,-0.5 0,-1 0,-1.4114252 0.513729,-2.3474522 1.246094,-3.0000002 0.732364,-0.6525475 1.726429,-0.9971905 2.753906,-1 1.027475,-0.00281 2.03517,0.354394 2.765625,1.0039065 C 13.490632,7.6486008 13.992038,8.5905738 14,10.000025 v 1 h -1 c -0.5,0 -1,0.5 -1,1 v 3 c 0,0.5 0.5,1 1,1 h 2 c 0.5,0 1,-0.5 1,-1 v -5 C 15.992284,8.0891328 15.265582,6.5121893 14.127288,5.5000248 12.982744,4.4823023 11.472523,3.9959983 10,4.0000248 Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xml:space="preserve" width="20" height="20" version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title>LMMS solo button (inactive)</title>
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:title>LMMS solo button (inactive)</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Rebecca Noel Ati, Stakeout Punch</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<rect width="19" height="19" x=".5" y=".5" fill="transparent"
|
||||
stroke="#000" stroke-linecap="round" stroke-linejoin="bevel"
|
||||
stroke-opacity="0.5" ry="2.065" id="button" />
|
||||
<path id="highlight" fill="#fff" opacity=".1"
|
||||
d="M2.56445 1C1.6888 1 1 1.6888 1 2.56445V3c0-.554.446-1 1-1h16c.554 0 1 .446 1 1v-.43555C19 1.6888 18.3112 1 17.43555 1Z" />
|
||||
<path id="shadow" fill="#000" opacity=".1"
|
||||
d="M2.56445 19C1.6888 19 1 18.3112 1 17.43555V17c0 .554.446 1 1 1h16c.554 0 1-.446 1-1v.43555C19 18.3112 18.3112 19 17.43555 19Z" />
|
||||
<path id="headphones" fill="#fff"
|
||||
d="m 10,4.0000248 c -1.472525,0.00403 -2.993968,0.4818935 -4.136604,1.5 C 4.72076,6.5181313 4,8.0872298 4,10.000025 c 0,1.60032 0,3.357065 0,5 0,0.5 0.5,1 1,1 h 2 c 0.5,0 1,-0.5 1,-1 v -3 c 0,-0.5 -0.5,-1 -1,-1 H 6 c 0,-0.5 0,-0.5 0,-1 0,-1.4114252 0.513729,-2.3474522 1.246094,-3.0000002 0.732364,-0.6525475 1.726429,-0.9971905 2.753906,-1 1.027475,-0.00281 2.03517,0.354394 2.765625,1.0039065 C 13.490632,7.6486008 13.992038,8.5905738 14,10.000025 v 1 h -1 c -0.5,0 -1,0.5 -1,1 v 3 c 0,0.5 0.5,1 1,1 h 2 c 0.5,0 1,-0.5 1,-1 v -5 C 15.992284,8.0891328 15.265582,6.5121893 14.127288,5.5000248 12.982744,4.4823023 11.472523,3.9959983 10,4.0000248 Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
42
data/themes/default/speaker.svg
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xml:space="preserve"
|
||||
width="14"
|
||||
height="14"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title
|
||||
>LMMS mute button (inactive)</title>
|
||||
<metadata
|
||||
id="metadata1">
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:title>LMMS mute button (inactive)</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Rebecca Noel Ati, Stakeout Punch</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/publicdomain/zero/1.0/"><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /></cc:License></rdf:RDF>
|
||||
</metadata>
|
||||
|
||||
|
||||
|
||||
<path
|
||||
id="speaker"
|
||||
fill="#fff"
|
||||
d="M 6.3339845,1.000434 C 5.9921875,1.007274 5.9375,1.062934 5.5,1.500434 l -2,2 c -0.5,0.5 -0.5,0.5 -1,0.5 H 1 c -0.5,0 -1,0.440207 -1,1 v 3.9999998 c 0,0.5 0.5,1.0000002 1,1.0000002 h 1.5 c 0.5,0 0.5,0 1,0.5 l 2,2 c 0.5,0.5 0.5,0.5 1,0.5 H 7 v -12 H 6.5 c -0.0625,0 -0.1172,-9.765e-4 -0.1660155,0 z m 4.6660155,1 -1,1 c 1.417505,1.4175045 2,2.7333335 2,3.9999998 0,1.266665 -0.582495,2.582495 -2,4.0000002 l 1,1 C 12.582495,10.417939 13.367188,8.7337688 13.367188,7.0004338 13.367188,5.267099 12.582495,3.58293 11,2.000434 Z m -2,2 -1,1 c 0.95875,0.958755 1.375,1.56111 1.375,1.9999998 0,0.4389 -0.41625,1.04125 -1.375,2 L 9,10.000434 C 10.04125,8.9591838 10.703125,8.0615488 10.703125,7.0004338 10.703125,5.939324 10.04125,5.041683 9,4.000434 Z"
|
||||
style="fill:#ffffff;fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
44
data/themes/default/speaker_slash.svg
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xml:space="preserve"
|
||||
width="14"
|
||||
height="14"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"><defs
|
||||
id="defs1" />
|
||||
<title
|
||||
id="title1">LMMS mute button (active)</title>
|
||||
<metadata
|
||||
id="metadata1">
|
||||
<rdf:RDF>
|
||||
<cc:Work>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
|
||||
<dc:title>LMMS mute button (active)</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Rebecca Noel Ati, Stakeout Punch</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/publicdomain/zero/1.0/"><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /></cc:License></rdf:RDF>
|
||||
</metadata>
|
||||
|
||||
|
||||
|
||||
<path
|
||||
id="speaker-cut"
|
||||
fill="#fff"
|
||||
d="M 2,1 1.5,1.5 1,2 2.95508,3.95508 7,7.9999999 l 1,1 1,1 L 10,11 l 1,1 1,1 0.5,-0.5 L 13,12 11.9336,10.9336 C 12.89052,9.6688499 13.36719,8.3490699 13.36719,6.9999999 13.36719,5.26667 12.58249,3.5825 11,2 l -1,1 c 1.4175,1.4175 2,2.73334 2,3.9999999 0,0.94192 -0.32225,1.9118 -1.07031,2.9297 l -0.98633,-0.98634 c 0.48,-0.63464 0.75976,-1.25496 0.75976,-1.94336 C 10.70312,5.9389 10.04125,5.04125 9,4 L 8,5 c 0.95875,0.95876 1.375,1.56111 1.375,1.9999999 0,0.2501 -0.13605,0.5534 -0.4297,0.94531 L 7,6.00001 v -5 H 6.5 c -0.5,0 -0.5,0 -1,0.5 l -1.5,1.5 z M 1,4 C 0.5,4 0,4.44021 0,5 v 3.9999999 c 0,0.5 0.5,1 1,1 h 1.5 c 0.5,0 0.5,0 1,0.5000001 l 2,2 C 6,13 6,13 6.5,13 H 7 V 9.9999999 Z"
|
||||
style="fill:#ffffff;fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -412,30 +412,64 @@ lmms--gui--TrackContentWidget {
|
||||
|
||||
/* gear button in tracks */
|
||||
|
||||
|
||||
/* 20px = 1px border + 2px padding + 14px icon + 2px padding + 1px border */
|
||||
QPushButton#btn-mute,
|
||||
QPushButton#btn-mute-inv:checked,
|
||||
QPushButton#btn-solo,
|
||||
lmms--gui--TrackOperationsWidget QPushButton {
|
||||
max-height: 26px;
|
||||
max-width: 26px;
|
||||
min-height: 26px;
|
||||
min-width: 26px;
|
||||
background: none;
|
||||
border: none;
|
||||
min-height: 14;
|
||||
max-height: 14;
|
||||
min-width: 14;
|
||||
max-width: 14;
|
||||
padding: 2;
|
||||
border: 1 solid #0f1621;
|
||||
border-top: 1 solid #18202b;
|
||||
border-bottom: 1 solid #02060f;
|
||||
border-radius: 2;
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 255, 255, 20%), stop:0.1 rgba(255, 255, 255, 2%), stop:0.9 rgba(0, 0, 0, 2%), stop:1 rgba(0, 0, 0, 40%));
|
||||
}
|
||||
|
||||
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator {
|
||||
image: url("resources:trackop.png");
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: center;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
image: none;
|
||||
}
|
||||
|
||||
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:pressed,
|
||||
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:checked {
|
||||
image: url("resources:trackop.png");
|
||||
position: relative;
|
||||
top: 2px;
|
||||
lmms--gui--TrackOperationsWidget QPushButton {
|
||||
image: url("resources:gear.svg");
|
||||
}
|
||||
|
||||
QPushButton#btn-mute,
|
||||
QPushButton#btn-mute-inv:checked {
|
||||
image: url("resources:speaker.svg");
|
||||
}
|
||||
|
||||
QPushButton#btn-solo {
|
||||
image: url("resources:headphones.svg");
|
||||
}
|
||||
|
||||
QPushButton#btn-mute:hover,
|
||||
QPushButton#btn-solo:hover,
|
||||
lmms--gui--TrackOperationsWidget QPushButton:hover {
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 255, 255, 25%), stop:0.1 rgba(255, 255, 255, 7%), stop:0.9 transparent, stop:1 rgba(0, 0, 0, 35%));
|
||||
}
|
||||
|
||||
lmms--gui--TrackOperationsWidget QPushButton:pressed {
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 25%), stop:0.1 transparent, stop:0.8 rgba(0, 0, 0, 15%), stop:1 rgba(0, 0, 0, 35%));
|
||||
}
|
||||
|
||||
QPushButton#btn-mute-inv,
|
||||
QPushButton#btn-mute:checked {
|
||||
image: url("resources:speaker_slash.svg");
|
||||
border: 1 solid #890120;
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #e2515b, stop:0.1 #d40237, stop:0.9 #d40237, stop:1 #900122);
|
||||
}
|
||||
|
||||
QPushButton#btn-solo:checked {
|
||||
border: 1 solid #055f89;
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #5aa8d9, stop:0.1 #2696d1, stop:0.9 #2696d1, stop:1 #16638c);
|
||||
}
|
||||
|
||||
|
||||
/* font sizes */
|
||||
|
||||
lmms--gui--Sf2InstrumentView > QLabel {
|
||||
|
||||
|
Before Width: | Height: | Size: 229 B |
@@ -27,8 +27,8 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "AutomatableButton.h"
|
||||
#include "ModelView.h"
|
||||
#include "PixmapButton.h"
|
||||
#include "SerializingObject.h"
|
||||
#include "PluginView.h"
|
||||
|
||||
@@ -148,8 +148,8 @@ private:
|
||||
Knob * m_volumeKnob;
|
||||
Knob * m_panningKnob;
|
||||
Knob * m_pitchKnob;
|
||||
PixmapButton *m_muteBtn;
|
||||
PixmapButton *m_soloBtn;
|
||||
AutomatableButton* m_muteBtn;
|
||||
AutomatableButton* m_soloBtn;
|
||||
QLabel * m_pitchLabel;
|
||||
LcdSpinBox* m_pitchRangeSpinBox;
|
||||
QLabel * m_pitchRangeLabel;
|
||||
|
||||
@@ -115,8 +115,8 @@ private:
|
||||
QLineEdit* m_renameLineEdit;
|
||||
QGraphicsView* m_renameLineEditView;
|
||||
QLabel* m_sendArrow;
|
||||
PixmapButton* m_muteButton;
|
||||
PixmapButton* m_soloButton;
|
||||
AutomatableButton* m_muteButton;
|
||||
AutomatableButton* m_soloButton;
|
||||
PeakIndicator* m_peakIndicator = nullptr;
|
||||
Fader* m_fader;
|
||||
EffectRackView* m_effectRackView;
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
#include <QWidget>
|
||||
|
||||
#include "ModelView.h"
|
||||
#include "PixmapButton.h"
|
||||
#include "SampleTrack.h"
|
||||
#include "SerializingObject.h"
|
||||
#include "AutomatableButton.h"
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
@@ -91,8 +91,8 @@ private:
|
||||
QLineEdit * m_nameLineEdit;
|
||||
Knob * m_volumeKnob;
|
||||
Knob * m_panningKnob;
|
||||
PixmapButton *m_muteBtn;
|
||||
PixmapButton *m_soloBtn;
|
||||
AutomatableButton* m_muteBtn;
|
||||
AutomatableButton* m_soloBtn;
|
||||
MixerChannelLcdSpinBox * m_mixerChannelNumber;
|
||||
|
||||
EffectRackView * m_effectRack;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#define LMMS_GUI_TRACK_OPERATIONS_WIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "AutomatableButton.h"
|
||||
|
||||
class QPushButton;
|
||||
|
||||
@@ -69,8 +70,8 @@ private:
|
||||
|
||||
TrackGrip* m_trackGrip;
|
||||
QPushButton * m_trackOps;
|
||||
PixmapButton * m_muteBtn;
|
||||
PixmapButton * m_soloBtn;
|
||||
AutomatableButton* m_muteBtn;
|
||||
AutomatableButton* m_soloBtn;
|
||||
|
||||
|
||||
friend class TrackView;
|
||||
|
||||
@@ -56,9 +56,9 @@ CrossoverEQControlDialog::CrossoverEQControlDialog(CrossoverEQControls *controls
|
||||
layout->addLayout(knobsLayout);
|
||||
|
||||
const auto makeKnob = [this, knobsLayout](
|
||||
FloatModel *model,
|
||||
const QString &label,
|
||||
const QString &txt_before
|
||||
FloatModel* model,
|
||||
const QString& label,
|
||||
const QString& txt_before
|
||||
) {
|
||||
auto k = new Knob(KnobType::Bright26, this);
|
||||
k->setModel(model);
|
||||
@@ -76,8 +76,8 @@ CrossoverEQControlDialog::CrossoverEQControlDialog(CrossoverEQControls *controls
|
||||
layout->addLayout(bandsLayout);
|
||||
|
||||
const auto makeFader = [this, bandsLayout](
|
||||
FloatModel *model,
|
||||
const QString &label,
|
||||
FloatModel* model,
|
||||
const QString& label,
|
||||
int column
|
||||
) {
|
||||
auto f = new Fader(model, label, this, false);
|
||||
@@ -92,20 +92,16 @@ CrossoverEQControlDialog::CrossoverEQControlDialog(CrossoverEQControls *controls
|
||||
makeFader(&controls->m_gain3, tr("Band 3 gain"), 2);
|
||||
makeFader(&controls->m_gain4, tr("Band 4 gain"), 3);
|
||||
|
||||
const auto muteOn = embed::getIconPixmap("mute_active");
|
||||
const auto muteOff = embed::getIconPixmap("mute_inactive");
|
||||
|
||||
const auto makeMuteBtn = [this, bandsLayout, muteOn, muteOff](
|
||||
BoolModel *model,
|
||||
const QString &label,
|
||||
const auto makeMuteBtn = [this, bandsLayout](
|
||||
BoolModel* model,
|
||||
const QString& label,
|
||||
int column
|
||||
) {
|
||||
auto b = new PixmapButton(this, label);
|
||||
b->setActiveGraphic(muteOff);
|
||||
b->setInactiveGraphic(muteOn);
|
||||
auto b = new AutomatableButton(this, label);
|
||||
b->setCheckable(true);
|
||||
b->setModel(model);
|
||||
b->setToolTip(label);
|
||||
b->setObjectName("btn-mute-inv");
|
||||
bandsLayout->addWidget(b, 1, column, Qt::AlignCenter);
|
||||
};
|
||||
|
||||
|
||||
@@ -107,18 +107,16 @@ MixerChannelView::MixerChannelView(QWidget* parent, MixerView* mixerView, int ch
|
||||
renameLineEditProxy->setRotation(-90);
|
||||
m_renameLineEditView->setFixedSize(m_renameLineEdit->height() + 5, m_renameLineEdit->width() + 5);
|
||||
|
||||
m_muteButton = new PixmapButton(this, tr("Mute"));
|
||||
m_muteButton = new AutomatableButton(this, tr("Mute"));
|
||||
m_muteButton->setModel(&mixerChannel->m_muteModel);
|
||||
m_muteButton->setActiveGraphic(embed::getIconPixmap("mute_active"));
|
||||
m_muteButton->setInactiveGraphic(embed::getIconPixmap("mute_inactive"));
|
||||
m_muteButton->setCheckable(true);
|
||||
m_muteButton->setObjectName("btn-mute");
|
||||
m_muteButton->setToolTip(tr("Mute this channel"));
|
||||
|
||||
m_soloButton = new PixmapButton(this, tr("Solo"));
|
||||
m_soloButton = new AutomatableButton(this, tr("Solo"));
|
||||
m_soloButton->setModel(&mixerChannel->m_soloModel);
|
||||
m_soloButton->setActiveGraphic(embed::getIconPixmap("solo_active"));
|
||||
m_soloButton->setInactiveGraphic(embed::getIconPixmap("solo_inactive"));
|
||||
m_soloButton->setCheckable(true);
|
||||
m_soloButton->setObjectName("btn-solo");
|
||||
m_soloButton->setToolTip(tr("Solo this channel"));
|
||||
|
||||
auto soloMuteLayout = new QVBoxLayout();
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "EffectRackView.h"
|
||||
#include "PixmapButton.h"
|
||||
#include "embed.h"
|
||||
#include "GuiApplication.h"
|
||||
#include "Knob.h"
|
||||
@@ -101,18 +100,16 @@ SampleTrackWindow::SampleTrackWindow(SampleTrackView * tv) :
|
||||
soloMuteLayout->setContentsMargins(0, 0, 2, 0);
|
||||
soloMuteLayout->setSpacing(2);
|
||||
|
||||
m_muteBtn = new PixmapButton(this, tr("Mute"));
|
||||
m_muteBtn = new AutomatableButton(this, tr("Mute"));
|
||||
m_muteBtn->setModel(&m_track->m_mutedModel);
|
||||
m_muteBtn->setActiveGraphic(embed::getIconPixmap("mute_active"));
|
||||
m_muteBtn->setInactiveGraphic(embed::getIconPixmap("mute_inactive"));
|
||||
m_muteBtn->setObjectName("btn-mute");
|
||||
m_muteBtn->setCheckable(true);
|
||||
m_muteBtn->setToolTip(tr("Mute this sample track"));
|
||||
soloMuteLayout->addWidget(m_muteBtn, 0, widgetAlignment);
|
||||
|
||||
m_soloBtn = new PixmapButton(this, tr("Solo"));
|
||||
m_soloBtn = new AutomatableButton(this, tr("Solo"));
|
||||
m_soloBtn->setModel(&m_track->m_soloModel);
|
||||
m_soloBtn->setActiveGraphic(embed::getIconPixmap("solo_active"));
|
||||
m_soloBtn->setInactiveGraphic(embed::getIconPixmap("solo_inactive"));
|
||||
m_soloBtn->setObjectName("btn-solo");
|
||||
m_soloBtn->setCheckable(true);
|
||||
m_soloBtn->setToolTip(tr("Solo this sample track"));
|
||||
soloMuteLayout->addWidget(m_soloBtn, 0, widgetAlignment);
|
||||
|
||||
@@ -144,19 +144,17 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
|
||||
soloMuteLayout->setContentsMargins(0, 0, 2, 0);
|
||||
soloMuteLayout->setSpacing(2);
|
||||
|
||||
m_muteBtn = new PixmapButton(this, tr("Mute"));
|
||||
m_muteBtn = new AutomatableButton(this, tr("Mute"));
|
||||
m_muteBtn->setModel(&m_track->m_mutedModel);
|
||||
m_muteBtn->setActiveGraphic(embed::getIconPixmap("mute_active"));
|
||||
m_muteBtn->setInactiveGraphic(embed::getIconPixmap("mute_inactive"));
|
||||
m_muteBtn->setCheckable(true);
|
||||
m_muteBtn->setObjectName("btn-mute");
|
||||
m_muteBtn->setToolTip(tr("Mute this instrument"));
|
||||
soloMuteLayout->addWidget(m_muteBtn, 0, widgetAlignment);
|
||||
|
||||
m_soloBtn = new PixmapButton(this, tr("Solo"));
|
||||
m_soloBtn = new AutomatableButton(this, tr("Solo"));
|
||||
m_soloBtn->setModel(&m_track->m_soloModel);
|
||||
m_soloBtn->setActiveGraphic(embed::getIconPixmap("solo_active"));
|
||||
m_soloBtn->setInactiveGraphic(embed::getIconPixmap("solo_inactive"));
|
||||
m_soloBtn->setCheckable(true);
|
||||
m_soloBtn->setObjectName("btn-solo");
|
||||
m_soloBtn->setToolTip(tr("Solo this instrument"));
|
||||
soloMuteLayout->addWidget(m_soloBtn, 0, widgetAlignment);
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) :
|
||||
// buttons in a layout.
|
||||
auto operationsWidget = new QWidget(this);
|
||||
auto operationsLayout = new QHBoxLayout(operationsWidget);
|
||||
operationsLayout->setContentsMargins(0, 3, 0, 0);
|
||||
operationsLayout->setContentsMargins(2, 6, 0, 6);
|
||||
operationsLayout->setSpacing(2);
|
||||
|
||||
m_trackOps = new QPushButton(operationsWidget);
|
||||
@@ -91,44 +91,18 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) :
|
||||
m_trackOps->setMenu( toMenu );
|
||||
m_trackOps->setToolTip(tr("Actions"));
|
||||
|
||||
// This helper lambda wraps a PixmapButton in a QWidget. This is necessary due to some strange effect where the
|
||||
// PixmapButtons are resized to a size that's larger than their minimum/fixed size when the method "show" is called
|
||||
// in "TrackContainerView::realignTracks". Specifically, with the default theme the buttons are resized from
|
||||
// (16, 14) to (26, 26). This then makes them behave not as expected in layouts.
|
||||
// The resizing is not done for QWidgets. Therefore we wrap the PixmapButton in a QWidget which is set to a
|
||||
// fixed size that will be able to show the active and inactive pixmap. We can then use the QWidget in layouts
|
||||
// without any disturbances.
|
||||
//
|
||||
// The resizing only seems to affect the track view hierarchy and is triggered by Qt's internal mechanisms.
|
||||
// For example the buttons in the mixer view do not seem to be affected.
|
||||
// If you want to debug this simply override "PixmapButton::resizeEvent" and trigger a break point in there.
|
||||
auto buildPixmapButtonWrappedInWidget = [](QWidget* parent, const QString& toolTip,
|
||||
std::string_view activeGraphic, std::string_view inactiveGraphic, PixmapButton*& pixmapButton)
|
||||
{
|
||||
const auto activePixmap = embed::getIconPixmap(activeGraphic);
|
||||
const auto inactivePixmap = embed::getIconPixmap(inactiveGraphic);
|
||||
|
||||
auto wrapperWidget = new QWidget(parent);
|
||||
|
||||
auto button = new PixmapButton(wrapperWidget, toolTip);
|
||||
button->setCheckable(true);
|
||||
button->setActiveGraphic(activePixmap);
|
||||
button->setInactiveGraphic(inactivePixmap);
|
||||
button->setToolTip(toolTip);
|
||||
|
||||
wrapperWidget->setFixedSize(button->minimumSizeHint());
|
||||
|
||||
pixmapButton = button;
|
||||
|
||||
return wrapperWidget;
|
||||
};
|
||||
|
||||
auto muteWidget = buildPixmapButtonWrappedInWidget(operationsWidget, tr("Mute"), "mute_active", "mute_inactive", m_muteBtn);
|
||||
auto soloWidget = buildPixmapButtonWrappedInWidget(operationsWidget, tr("Solo"), "solo_active", "solo_inactive", m_soloBtn);
|
||||
m_muteBtn = new AutomatableButton(operationsWidget, tr("Mute"));
|
||||
m_muteBtn->setCheckable(true);
|
||||
m_muteBtn->setToolTip(tr("Mute"));
|
||||
m_muteBtn->setObjectName("btn-mute");
|
||||
m_soloBtn = new AutomatableButton(operationsWidget, tr("Solo"));
|
||||
m_soloBtn->setCheckable(true);
|
||||
m_soloBtn->setToolTip(tr("Solo"));
|
||||
m_soloBtn->setObjectName("btn-solo");
|
||||
|
||||
operationsLayout->addWidget(m_trackOps);
|
||||
operationsLayout->addWidget(muteWidget);
|
||||
operationsLayout->addWidget(soloWidget);
|
||||
operationsLayout->addWidget(m_muteBtn);
|
||||
operationsLayout->addWidget(m_soloBtn);
|
||||
|
||||
layout->addWidget(operationsWidget, 0, Qt::AlignTop | Qt::AlignLeading);
|
||||
|
||||
|
||||