forked from M-Labs/artiq
1
0
Fork 0

gui: handle better changing MDI area background colors

This commit is contained in:
Sebastien Bourdeauducq 2016-03-15 18:36:34 +08:00
parent a172d8b837
commit a142d403ea
2 changed files with 33 additions and 32 deletions

View File

@ -66,6 +66,7 @@ class MdiArea(QtWidgets.QMdiArea):
painter = QtGui.QPainter(self.viewport()) painter = QtGui.QPainter(self.viewport())
x = (self.width() - self.pixmap.width())//2 x = (self.width() - self.pixmap.width())//2
y = (self.height() - self.pixmap.height())//2 y = (self.height() - self.pixmap.height())//2
painter.setOpacity(0.5)
painter.drawPixmap(x, y, self.pixmap) painter.drawPixmap(x, y, self.pixmap)

View File

@ -5,7 +5,7 @@
width="340.157px" height="393.725px" viewBox="0 0 340.157 393.725" enable-background="new 0 0 340.157 393.725" width="340.157px" height="393.725px" viewBox="0 0 340.157 393.725" enable-background="new 0 0 340.157 393.725"
xml:space="preserve"> xml:space="preserve">
<g> <g>
<path fill="#888888" stroke="#888888" stroke-miterlimit="10" d="M122.782,162.276c0,0-5.365-6.568-1.423-12.261c0,0,3.941-6.241,11.167-4.599 <path fill="#ffffff" stroke="#ffffff" stroke-miterlimit="10" d="M122.782,162.276c0,0-5.365-6.568-1.423-12.261c0,0,3.941-6.241,11.167-4.599
c0,0,7.445,1.532,8.54,13.028c0,0,1.424,6.786-1.97,7.772c0,0-5.365,1.86-8.65,0.767c0,0,22.991,7.337,46.312,36.022 c0,0,7.445,1.532,8.54,13.028c0,0,1.424,6.786-1.97,7.772c0,0-5.365,1.86-8.65,0.767c0,0,22.991,7.337,46.312,36.022
c0,0,0.438,0.657,1.313,1.313c0,0,6.314,3.433,8.649,9.126l0.657,1.897c0,0,0.146,2.409-2.481,1.898c0,0-7.226-1.022-10.22-6.06 c0,0,0.438,0.657,1.313,1.313c0,0,6.314,3.433,8.649,9.126l0.657,1.897c0,0,0.146,2.409-2.481,1.898c0,0-7.226-1.022-10.22-6.06
l-0.364-0.655l-1.319-2.18c0,0-12.695-15.342-34.153-25.124c0,0-10.217,7.736-15.327,22.048c0,0-2.773,6.277,0.875,15.912 l-0.364-0.655l-1.319-2.18c0,0-12.695-15.342-34.153-25.124c0,0-10.217,7.736-15.327,22.048c0,0-2.773,6.277,0.875,15.912
@ -17,7 +17,7 @@
c0,0,10.073-11.827,29.635-14.6c0,0,2.336-3.796,9.197-5.692c0,0,2.773-0.585,3.796-1.167c0,0,2.189-1.023,2.627-0.584 c0,0,10.073-11.827,29.635-14.6c0,0,2.336-3.796,9.197-5.692c0,0,2.773-0.585,3.796-1.167c0,0,2.189-1.023,2.627-0.584
c0,0,1.313,0.729-1.752,3.796c0,0-3.649,5.254-14.014,9.779l-2.919,1.022c0,0-14.306,3.649-19.271,13.722 c0,0,1.313,0.729-1.752,3.796c0,0-3.649,5.254-14.014,9.779l-2.919,1.022c0,0-14.306,3.649-19.271,13.722
C108.913,133.594,101.03,147.606,122.782,162.276z"/> C108.913,133.594,101.03,147.606,122.782,162.276z"/>
<path fill="#888888" stroke="#888888" stroke-miterlimit="10" d="M247.881,164.831c0,0-4.672-2.482-5.694-10.218c0,0-1.897-10.363,9.051-12.7 <path fill="#ffffff" stroke="#ffffff" stroke-miterlimit="10" d="M247.881,164.831c0,0-4.672-2.482-5.694-10.218c0,0-1.897-10.363,9.051-12.7
c0,0,9.489-2.48,11.97,9.198c0,0,1.752,5.984-2.188,10.8c0,0,22.369-3.466,49.848-25.252c0,0,1.534-3.834,5.805-5.365l2.628-0.876 c0,0,9.489-2.48,11.97,9.198c0,0,1.752,5.984-2.188,10.8c0,0,22.369-3.466,49.848-25.252c0,0,1.534-3.834,5.805-5.365l2.628-0.876
c0,0,3.174-0.986,4.927-2.738l1.642-1.752c0,0,1.314-1.532,1.972-1.203c0,0,1.203,0.438-0.11,2.628c0,0-1.204,4.051-7.993,9.415 c0,0,3.174-0.986,4.927-2.738l1.642-1.752c0,0,1.314-1.532,1.972-1.203c0,0,1.203,0.438-0.11,2.628c0,0-1.204,4.051-7.993,9.415
l-3.284,2.299c0,0-1.094,0.877-2.737,2.629c0,0-14.779,15.436-31.859,23.427l-2.737,1.314c0,0-6.022,2.299-7.226,9.196 l-3.284,2.299c0,0-1.094,0.877-2.737,2.629c0,0-14.779,15.436-31.859,23.427l-2.737,1.314c0,0-6.022,2.299-7.226,9.196
@ -29,75 +29,75 @@
c0,0,2.628-10.804,1.024-13.868c0,0-1.46-3.066-6.278-3.357c0,0-37.954-1.607-54.45-11.534c0,0-1.239-0.437-0.948-2.042 c0,0,2.628-10.804,1.024-13.868c0,0-1.46-3.066-6.278-3.357c0,0-37.954-1.607-54.45-11.534c0,0-1.239-0.437-0.948-2.042
c0,0,0.146-0.949,2.044-1.095c0,0,7.737-1.313,11.824,0.875l1.605,0.878c0,0,2.262,1.678,4.161,1.896 c0,0,0.146-0.949,2.044-1.095c0,0,7.737-1.313,11.824,0.875l1.605,0.878c0,0,2.262,1.678,4.161,1.896
c0,0,21.165,4.453,53.573-2.264L247.881,164.831z"/> c0,0,21.165,4.453,53.573-2.264L247.881,164.831z"/>
<path fill="#888888" stroke="#888888" stroke-width="3" stroke-miterlimit="10" d="M168.508,147.441c0,2.743-2.223,4.967-4.966,4.967 <path fill="#ffffff" stroke="#ffffff" stroke-width="3" stroke-miterlimit="10" d="M168.508,147.441c0,2.743-2.223,4.967-4.966,4.967
s-4.965-2.224-4.965-4.967c0-2.739,2.223-4.963,4.965-4.963S168.508,144.702,168.508,147.441z"/> s-4.965-2.224-4.965-4.967c0-2.739,2.223-4.963,4.965-4.963S168.508,144.702,168.508,147.441z"/>
<path fill="none" stroke="#888888" stroke-width="3" stroke-miterlimit="10" d="M334.029,105.591 <path fill="none" stroke="#ffffff" stroke-width="3" stroke-miterlimit="10" d="M334.029,105.591
c6.721,24.452-61.235,64.441-151.784,89.322C91.7,219.808,12.848,220.166,6.127,195.707c-6.72-24.451,61.235-64.446,151.78-89.323 c6.721,24.452-61.235,64.441-151.784,89.322C91.7,219.808,12.848,220.166,6.127,195.707c-6.72-24.451,61.235-64.446,151.78-89.323
C248.455,81.496,327.309,81.139,334.029,105.591z"/> C248.455,81.496,327.309,81.139,334.029,105.591z"/>
<path fill="none" stroke="#888888" stroke-width="3" stroke-miterlimit="10" d="M197.276,163.136 <path fill="none" stroke="#ffffff" stroke-width="3" stroke-miterlimit="10" d="M197.276,163.136
C159.992,240,114.062,294.699,94.691,285.295c-19.379-9.404-4.863-79.344,32.405-156.199C164.382,52.235,210.317-2.45,229.7,6.952 C159.992,240,114.062,294.699,94.691,285.295c-19.379-9.404-4.863-79.344,32.405-156.199C164.382,52.235,210.317-2.45,229.7,6.952
C249.081,16.354,234.562,86.283,197.276,163.136z"/> C249.081,16.354,234.562,86.283,197.276,163.136z"/>
<path fill="none" stroke="#888888" stroke-width="3" stroke-miterlimit="10" d="M299.444,247.995 <path fill="none" stroke="#ffffff" stroke-width="3" stroke-miterlimit="10" d="M299.444,247.995
c-13.873,18.415-83.152-10.393-154.742-64.337C73.111,129.728,26.322,71.08,40.194,52.672 c-13.873,18.415-83.152-10.393-154.742-64.337C73.111,129.728,26.322,71.08,40.194,52.672
c13.871-18.411,83.149,10.392,154.739,64.33C266.526,170.93,313.315,229.585,299.444,247.995z"/> c13.871-18.411,83.149,10.392,154.739,64.33C266.526,170.93,313.315,229.585,299.444,247.995z"/>
<g> <g>
<path fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d=" <path fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
M300.731,305.236c-4.896-0.075-9.85-1.232-14.515-3.588c-4.651-2.35-8.518-5.639-11.482-9.521"/> M300.731,305.236c-4.896-0.075-9.85-1.232-14.515-3.588c-4.651-2.35-8.518-5.639-11.482-9.521"/>
<line fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="278.504" y1="295.616" x2="283.89" y2="290.43"/> <line fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="278.504" y1="295.616" x2="283.89" y2="290.43"/>
<line fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="295.616" y1="304.256" x2="296.59" y2="296.843"/> <line fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="295.616" y1="304.256" x2="296.59" y2="296.843"/>
</g> </g>
<g> <g>
<path fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d=" <path fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
M153.685,248.87c1.599-4.627,4.244-8.974,7.938-12.671c3.682-3.687,8.014-6.335,12.626-7.938"/> M153.685,248.87c1.599-4.627,4.244-8.974,7.938-12.671c3.682-3.687,8.014-6.335,12.626-7.938"/>
<line fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="169.758" y1="230.753" x2="173.006" y2="237.486"/> <line fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="169.758" y1="230.753" x2="173.006" y2="237.486"/>
<line fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="156.212" y1="244.312" x2="162.951" y2="247.552"/> <line fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="156.212" y1="244.312" x2="162.951" y2="247.552"/>
</g> </g>
<g> <g>
<path fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d=" <path fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
M158.285,305.8c-4.895-0.076-9.851-1.233-14.514-3.588c-4.651-2.349-8.518-5.639-11.482-9.522"/> M158.285,305.8c-4.895-0.076-9.851-1.233-14.514-3.588c-4.651-2.349-8.518-5.639-11.482-9.522"/>
<line fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="136.057" y1="296.179" x2="141.443" y2="290.994"/> <line fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="136.057" y1="296.179" x2="141.443" y2="290.994"/>
<line fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="153.167" y1="304.818" x2="154.143" y2="297.405"/> <line fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="153.167" y1="304.818" x2="154.143" y2="297.405"/>
</g> </g>
<g> <g>
<path fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d=" <path fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
M15.252,267.214c0.331-4.888,1.746-9.776,4.342-14.311c2.588-4.521,6.076-8.21,10.107-10.97"/> M15.252,267.214c0.331-4.888,1.746-9.776,4.342-14.311c2.588-4.521,6.076-8.21,10.107-10.97"/>
<line fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="26.022" y1="245.519" x2="30.918" y2="251.165"/> <line fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="26.022" y1="245.519" x2="30.918" y2="251.165"/>
<line fill="none" stroke="#888888" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="16.5" y1="262.151" x2="23.85" y2="263.513"/> <line fill="none" stroke="#ffffff" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="16.5" y1="262.151" x2="23.85" y2="263.513"/>
</g> </g>
</g> </g>
<g> <g>
<rect fill="#888888" x="233.467" y="343.364" width="1.528" height="47.041"/> <rect fill="#ffffff" x="233.467" y="343.364" width="1.528" height="47.041"/>
</g> </g>
<g> <g>
<rect fill="#888888" x="180.259" y="343.364" width="1.526" height="47.041"/> <rect fill="#ffffff" x="180.259" y="343.364" width="1.526" height="47.041"/>
<rect fill="#888888" x="160.216" y="343.364" width="41.612" height="1.527"/> <rect fill="#ffffff" x="160.216" y="343.364" width="41.612" height="1.527"/>
</g> </g>
<g> <g>
<polygon fill="#888888" points="24.112,390.407 22.426,390.407 43.206,343.368 44.956,343.358 "/> <polygon fill="#ffffff" points="24.112,390.407 22.426,390.407 43.206,343.368 44.956,343.358 "/>
<polygon fill="#888888" points="63.928,390.407 65.72,390.407 45.009,343.361 43.192,343.361 "/> <polygon fill="#ffffff" points="63.928,390.407 65.72,390.407 45.009,343.361 43.192,343.361 "/>
<polygon fill="#888888" points="58.498,375.898 59.842,377.422 29.376,377.422 30.372,375.898 "/> <polygon fill="#ffffff" points="58.498,375.898 59.842,377.422 29.376,377.422 30.372,375.898 "/>
</g> </g>
<path fill="#888888" d="M137.099,356.405"/> <path fill="#ffffff" d="M137.099,356.405"/>
<g> <g>
<path fill="#888888" d="M291.489,343.364c-12.989,0-23.519,10.534-23.519,23.522s10.53,23.519,23.519,23.519c12.993,0,23.521-10.53,23.521-23.519 <path fill="#ffffff" d="M291.489,343.364c-12.989,0-23.519,10.534-23.519,23.522s10.53,23.519,23.519,23.519c12.993,0,23.521-10.53,23.521-23.519
S304.482,343.364,291.489,343.364z M291.489,388.882c-12.147,0-21.996-9.848-21.996-21.995c0-12.15,9.849-21.999,21.996-21.999 S304.482,343.364,291.489,343.364z M291.489,388.882c-12.147,0-21.996-9.848-21.996-21.995c0-12.15,9.849-21.999,21.996-21.999
c12.149,0,22,9.849,22,21.999C313.489,379.034,303.639,388.882,291.489,388.882z"/> c12.149,0,22,9.849,22,21.999C313.489,379.034,303.639,388.882,291.489,388.882z"/>
<polygon fill="#888888" points="318.414,389.097 317.631,390.405 297.335,378.334 298.11,377.022 "/> <polygon fill="#ffffff" points="318.414,389.097 317.631,390.405 297.335,378.334 298.11,377.022 "/>
</g> </g>
<g> <g>
<rect fill="#888888" x="94.9" y="343.286" width="1.526" height="47.041"/> <rect fill="#ffffff" x="94.9" y="343.286" width="1.526" height="47.041"/>
<polyline fill="#888888" points="118.165,370.763 95.97,370.763 95.97,372.289 118.165,372.289 "/> <polyline fill="#ffffff" points="118.165,370.763 95.97,370.763 95.97,372.289 118.165,372.289 "/>
<rect fill="#888888" x="95.864" y="343.286" width="22.215" height="1.527"/> <rect fill="#ffffff" x="95.864" y="343.286" width="22.215" height="1.527"/>
<polygon fill="#888888" points="130.357,390.407 132.317,390.407 118.994,372.273 117.04,372.273 "/> <polygon fill="#ffffff" points="130.357,390.407 132.317,390.407 118.994,372.273 117.04,372.273 "/>
<path fill="#888888" d="M118.042,343.286v1.544c8.302,0,12.964,7.229,12.964,12.935c0,7.491-5.97,12.996-12.964,12.996v1.528 <path fill="#ffffff" d="M118.042,343.286v1.544c8.302,0,12.964,7.229,12.964,12.935c0,7.491-5.97,12.996-12.964,12.996v1.528
c7.995,0,14.47-6.533,14.47-14.524C132.512,349.768,126.036,343.286,118.042,343.286z"/> c7.995,0,14.47-6.533,14.47-14.524C132.512,349.768,126.036,343.286,118.042,343.286z"/>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB