This commit is contained in:
Tomas Groth 2016-12-15 19:28:02 +01:00
commit 1f5df86c5b
9 changed files with 141 additions and 156 deletions

View File

@ -1 +1 @@
2.4
2.5.0

View File

@ -41,6 +41,7 @@ class UiAboutDialog(object):
about_dialog.setObjectName('about_dialog')
about_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
self.about_dialog_layout = QtWidgets.QVBoxLayout(about_dialog)
self.about_dialog_layout.setContentsMargins(8, 8, 8, 8)
self.about_dialog_layout.setObjectName('about_dialog_layout')
self.logo_label = QtWidgets.QLabel(about_dialog)
self.logo_label.setPixmap(QtGui.QPixmap(':/graphics/openlp-about-logo.png'))

View File

@ -54,7 +54,7 @@ class MediaDockManager(object):
match = True
break
if not match:
self.media_dock.addItem(media_item, visible_title['title'])
self.media_dock.addItem(media_item, media_item.plugin.icon, visible_title['title'])
def remove_dock(self, media_item):
"""

View File

@ -52,19 +52,17 @@ from openlp.core.ui.lib.mediadockmanager import MediaDockManager
log = logging.getLogger(__name__)
MEDIA_MANAGER_STYLE = """
QToolBox {
padding-bottom: 2px;
}
QToolBox::tab {
::tab {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 palette(button), stop: 1.0 palette(mid));
border: 1px solid palette(mid);
border-radius: 3px;
border: 0;
border-radius: 2px;
margin-top: 0;
margin-bottom: 0;
text-align: left;
}
QToolBox::tab:selected {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 palette(light), stop: 1.0 palette(button));
border: 1px solid palette(mid);
::tab:selected {
border: 1px solid palette(highlight);
font-weight: bold;
}
"""

View File

@ -243,7 +243,7 @@ class SourceSelectTabs(QtWidgets.QDialog):
title = translate('OpenLP.SourceSelectForm', 'Select Projector Source')
self.setWindowTitle(title)
self.setObjectName('source_select_tabs')
self.setWindowIcon(build_icon(':/icon/openlp-log-32x32.png'))
self.setWindowIcon(build_icon(':/icon/openlp-log.svg'))
self.setModal(True)
self.layout = QtWidgets.QVBoxLayout()
self.layout.setObjectName('source_select_tabs_layout')
@ -395,7 +395,7 @@ class SourceSelectSingle(QtWidgets.QDialog):
else:
title = translate('OpenLP.SourceSelectForm', 'Select Projector Source')
self.setObjectName('source_select_single')
self.setWindowIcon(build_icon(':/icon/openlp-log-32x32.png'))
self.setWindowIcon(build_icon(':/icon/openlp-log.svg'))
self.setModal(True)
self.edit = edit

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,143 +1,115 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
style="display:inline"
version="1.0"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg5740"
height="467.39178"
width="467.39178">
<defs
id="defs5742">
<linearGradient
id="linearGradient3208">
<stop
id="stop3210"
offset="0"
style="stop-color:#ffffff;stop-opacity:0.25098041;" />
<stop
id="stop3212"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3195">
<stop
id="stop3197"
offset="0"
style="stop-color:#cdcdff;stop-opacity:1;" />
<stop
id="stop3199"
offset="1"
style="stop-color:#ebebff;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient6359">
<stop
id="stop6361"
offset="0"
style="stop-color:#000d26;stop-opacity:1;" />
<stop
id="stop6363"
offset="1"
style="stop-color:#507fda;stop-opacity:1;" />
</linearGradient>
<filter
color-interpolation-filters="sRGB"
id="filter6926">
<feGaussianBlur
id="feGaussianBlur6928"
stdDeviation="3.5771872" />
</filter>
<linearGradient
y2="436.03787"
x2="418.20981"
y1="384.05795"
x1="117.59262"
gradientUnits="userSpaceOnUse"
id="linearGradient4053"
xlink:href="#linearGradient3195" />
<linearGradient
y2="371.85938"
x2="201.10622"
y1="480.55844"
x1="815.75"
gradientTransform="matrix(0.6515729,0,0,0.6515729,-72.086668,-5.3154816)"
gradientUnits="userSpaceOnUse"
id="linearGradient4055"
xlink:href="#linearGradient6359" />
<linearGradient
y2="104.30029"
x2="469.44925"
y1="276.68851"
x1="470.25891"
gradientTransform="matrix(0.7247086,0,0,0.7843464,-109.42065,-2.1325924)"
gradientUnits="userSpaceOnUse"
id="linearGradient4057"
xlink:href="#linearGradient3208" />
</defs>
<metadata
id="metadata5745">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-11.872025,-13.171852)"
style="display:inline"
id="layer1" />
<g
transform="translate(-11.872025,-13.171852)"
style="display:inline"
id="layer5" />
<g
transform="translate(-11.872025,-13.171852)"
style="display:inline"
id="layer3" />
<g
transform="translate(-11.872025,-13.171852)"
style="display:inline"
id="layer2" />
<g
transform="translate(-11.872025,-13.171852)"
style="display:inline"
id="layer6">
<g
transform="translate(9.8817328,9.8817328)"
id="g4018">
<path
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline;filter:url(#filter6926)"
id="path6903"
d="M 833.03006,395.26932 A 357.71872,357.71872 0 0 1 475.31134,752.98804 357.71872,357.71872 0 0 1 117.59262,395.26932 357.71872,357.71872 0 0 1 475.31134,37.550598 357.71872,357.71872 0 0 1 833.03006,395.26932 Z"
transform="matrix(0.6379835,0,0,0.6379835,-67.554612,-15.189295)" />
<path
transform="matrix(0.6379835,0,0,0.6379835,-67.554612,-15.189295)"
d="M 833.03006,395.26932 A 357.71872,357.71872 0 0 1 475.31134,752.98804 357.71872,357.71872 0 0 1 117.59262,395.26932 357.71872,357.71872 0 0 1 475.31134,37.550598 357.71872,357.71872 0 0 1 833.03006,395.26932 Z"
id="path6900"
style="fill:#051e52;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
<path
style="fill:url(#linearGradient4053);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
id="path6317"
d="M 833.03006,395.26932 A 357.71872,357.71872 0 0 1 475.31134,752.98804 357.71872,357.71872 0 0 1 117.59262,395.26932 357.71872,357.71872 0 0 1 475.31134,37.550598 357.71872,357.71872 0 0 1 833.03006,395.26932 Z"
transform="matrix(0.6317287,0,0,0.6317287,-64.581662,-12.716988)" />
<path
style="fill:url(#linearGradient4055);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
d="m 235.67972,13.233984 c -35.92776,0 -69.88078,8.488655 -99.97572,23.558433 L 296.72396,165.96674 452.81639,291.19091 c 4.32451,-17.35817 6.61754,-35.51197 6.61754,-54.20272 0,-123.50655 -100.24766,-223.754205 -223.75421,-223.754206 z M 79.118968,77.210299 C 71.146114,85.023824 63.764822,93.431949 57.026574,102.35694 L 274.63156,209.66285 434.20584,288.36064 275.3035,193.86221 79.118968,77.210299 z M 24.488653,162.95322 c -3.62786,10.33827 -6.504275,21.02069 -8.592618,31.98816 L 260.17479,255.29332 422.98657,295.52794 260.21551,241.36595 24.488653,162.95322 z M 13.513722,263.49906 c 1.305042,11.03747 3.397359,21.8274 6.251027,32.31395 l 228.539191,6.51573 173.46093,4.96824 L 253.55725,289.23619 13.513722,263.49906 z M 428.50457,317.76287 249.79034,336.84174 47.782384,358.40473 c 5.959201,9.19899 12.564704,17.94104 19.771165,26.14436 L 244.45559,351.80755 428.50457,317.76287 z m 13.78484,5.21258 -188.36565,62.18449 -133.00232,43.89972 c 33.5632,20.10936 72.81152,31.66237 114.75828,31.66238 93.04288,0 172.8858,-56.87905 206.60969,-137.74659 z"
id="path6327" />
<path
style="fill:url(#linearGradient4057);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
d="m 235.67972,13.233984 c -35.92776,0 -69.88078,8.488655 -99.97572,23.558433 l 161.01996,129.174323 52.55342,42.16899 c 39.1477,-4.87501 74.57645,-12.22557 104.45528,-21.44082 C 430.89209,87.375898 341.89666,13.233985 235.67972,13.233984 z M 79.118968,77.210299 c -7.972854,7.813525 -15.354146,16.22165 -22.092394,25.146641 l 217.604986,107.30591 8.32792,4.11306 c 7.91353,-0.38016 15.72478,-0.85776 23.43626,-1.42532 L 275.3035,193.86221 79.118968,77.210299 z M 24.488653,162.95322 c -2.661786,7.58527 -4.921793,15.36128 -6.760069,23.29373 42.624133,13.3171 96.712956,22.78306 156.947626,26.67377 L 24.488653,162.95322 z"
id="path3203" />
</g>
</g>
</svg>
x="0px"
y="0px"
viewBox="0 0 453.02106 452.89808"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="openlp-logo.svg"
inkscape:export-filename="/home/raoul/Dropbox/OpenLPNewBrand/wiki.png"
inkscape:export-xdpi="23.68"
inkscape:export-ydpi="23.68"
width="453.02106"
height="452.89807"><metadata
id="metadata3420"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs3418" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="739"
id="namedview3416"
showgrid="false"
inkscape:zoom="1"
inkscape:cx="151.21623"
inkscape:cy="240.04907"
inkscape:window-x="1920"
inkscape:window-y="312"
inkscape:window-maximized="1"
inkscape:current-layer="svg5740"
fit-margin-left="0"
fit-margin-top="0"
fit-margin-right="0"
fit-margin-bottom="0"
showguides="true"
inkscape:guide-bbox="true"><inkscape:grid
type="xygrid"
id="grid4307"
originx="-7.1894622"
originy="-7.2509281" /><sodipodi:guide
position="368,452.89804"
orientation="0,1"
id="guide3418"
inkscape:label=""
inkscape:color="rgb(0,0,255)" /><sodipodi:guide
position="-1.6629762e-07,295.00004"
orientation="1,0"
id="guide3420"
inkscape:label=""
inkscape:color="rgb(0,0,255)" /><sodipodi:guide
position="453.021,273.00004"
orientation="1,0"
id="guide3422"
inkscape:label=""
inkscape:color="rgb(0,0,255)" /><sodipodi:guide
position="362,2.6917146e-05"
orientation="0,1"
id="guide3424"
inkscape:label=""
inkscape:color="rgb(0,0,255)" /></sodipodi:namedview><style
type="text/css"
id="style3407">
.st0{fill:url(#rect4108_1_);}
.st1{fill:#FFFFFF;}
</style><linearGradient
id="rect4108_1_"
gradientUnits="userSpaceOnUse"
x1="472.42209"
y1="595.45251"
x2="58.062099"
y2="524.92249"
gradientTransform="matrix(0.96923727,0,0,0.96897412,28.933406,-281.34151)"><stop
offset="0"
style="stop-color:#1E468C"
id="stop3410" /><stop
offset="1"
style="stop-color:#507FDA"
id="stop3412" /></linearGradient><g
id="g3567"
inkscape:export-filename="/home/raoul/Projects/OpenLP/OpenLP/new-branding/resources/images/openlp-splash-screen.png"
inkscape:export-xdpi="73.526482"
inkscape:export-ydpi="73.526482"
transform="translate(-30,-30)"><path
inkscape:export-filename="/home/raoul/Projects/OpenLP/WebSite/new-brand/themes/openlp2v2/assets/images/logo.png"
inkscape:export-ydpi="11.92"
inkscape:export-xdpi="11.92"
id="rect4108"
d="M 256.50947,30 A 226.51075,226.44925 0 0 0 30,256.44798 226.51075,226.44925 0 0 0 256.50947,482.89808 226.51075,226.44925 0 0 0 483.02107,256.44798 226.51075,226.44925 0 0 0 256.50947,30 Z"
style="fill:url(#rect4108_1_)"
inkscape:connector-curvature="0" /><path
inkscape:export-filename="/home/raoul/Projects/OpenLP/WebSite/new-brand/themes/openlp2v2/assets/images/logo.png"
inkscape:export-ydpi="11.92"
inkscape:export-xdpi="11.92"
style="fill:#ffffff"
inkscape:connector-curvature="0"
d="m 256.51033,46.633891 c -115.94546,0 -209.871922,94.007299 -209.871922,209.814939 0,115.80763 93.926462,209.81494 209.871922,209.81494 115.94546,0 209.87192,-94.00731 209.87192,-209.81494 0,-115.80764 -93.92646,-209.814939 -209.87192,-209.814939 z m -0.63823,17.546612 c 106.15923,0 192.32054,86.137907 192.32054,192.268327 0,15.73878 -1.9147,31.37121 -5.74409,46.57828 L 308.31348,195.51423 169.92354,84.492035 C 196.6229,71.092804 225.98157,64.180503 255.8721,64.180503 Z M 121.20517,119.26623 289.91113,219.54777 426.49275,300.7939 289.2729,233.15969 102.27095,140.85388 c 5.74409,-7.6567 12.12641,-14.88804 18.93422,-21.58765 z M 74.295122,192.962 276.93375,260.38352 416.8129,306.9618 276.93375,272.29395 66.955456,220.39852 c 1.701951,-9.3582 4.148507,-18.5037 7.339666,-27.43652 z m -9.467106,86.3506 206.361644,22.11936 144.6659,15.52609 -149.13352,-4.25372 -196.469053,-5.63619 c -2.446555,-9.03916 -4.254879,-18.39735 -5.424971,-27.75554 l 0,0 z M 421.59964,325.99722 263.42451,355.24157 111.31257,383.42249 C 105.143,376.40385 99.39891,368.85349 94.293055,360.9841 L 267.9985,342.4804 421.59964,325.99722 Z m 11.91366,4.46641 c -40.84684,98.04833 -153.49476,144.52027 -251.56973,103.57818 -8.50976,-3.50933 -16.80677,-7.76305 -24.6783,-12.44215 l 114.34988,-37.7518 161.89815,-53.38423 z"
class="st1"
id="path6317" /></g></svg>

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -32,16 +32,30 @@ from tests.helpers.testmixin import TestMixin
class TestFirstTimeForm(TestCase, TestMixin):
def test_on_volunteer_button_clicked(self):
@patch('openlp.core.ui.aboutform.webbrowser')
def test_on_volunteer_button_clicked(self, mocked_webbrowser):
"""
Test that clicking on the "Volunteer" button opens a web page.
"""
# GIVEN: A new About dialog and a mocked out webbrowser module
with patch('openlp.core.ui.aboutform.webbrowser') as mocked_webbrowser:
about_form = AboutForm(None)
about_form = AboutForm(None)
# WHEN: The "Volunteer" button is "clicked"
about_form.on_volunteer_button_clicked()
# WHEN: The "Volunteer" button is "clicked"
about_form.on_volunteer_button_clicked()
# THEN: A web browser is opened
mocked_webbrowser.open_new.assert_called_with('http://openlp.org/en/contribute')
# THEN: A web browser is opened
mocked_webbrowser.open_new.assert_called_with('http://openlp.org/en/contribute')
@patch('openlp.core.ui.aboutform.get_application_version')
def test_about_form_build_number(self, mocked_get_application_version):
"""
Test that the build number is added to the about form
"""
# GIVEN: A mocked out get_application_version function
mocked_get_application_version.return_value = {'version': '3.1.5', 'build': '3000'}
# WHEN: The about form is created
about_form = AboutForm(None)
# THEN: The build number should be in the text
assert 'OpenLP 3.1.5 build 3000' in about_form.about_text_edit.toPlainText()