Merge lp:~manndarryl/openlp/blank-logo into lp:openlp
- blank-logo
- Merge into trunk
Proposed by
Darryl Mann
Status: | Needs review |
---|---|
Proposed branch: | lp:~manndarryl/openlp/blank-logo |
Merge into: | lp:openlp |
Diff against target: |
771 lines (+308/-89) 10 files modified
openlp/core/common/settings.py (+1/-0) openlp/core/lib/htmlbuilder.py (+46/-0) openlp/core/resources.py (+118/-62) openlp/core/ui/__init__.py (+1/-0) openlp/core/ui/maindisplay.py (+58/-24) openlp/core/ui/slidecontroller.py (+49/-0) openlp/plugins/presentations/lib/messagelistener.py (+9/-1) resources/images/openlp-2.qrc (+1/-0) tests/functional/openlp_core_lib/test_htmlbuilder.py (+23/-0) tests/functional/openlp_core_ui/test_maindisplay.py (+2/-2) |
To merge this branch: | bzr merge lp:~manndarryl/openlp/blank-logo |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenLP Core | Pending | ||
Review via email: mp+239909@code.launchpad.net |
Commit message
Description of the change
Add a Blank to Logo feature. This uses the default image from the settings->advanced section.
To post a comment you must log in.
Revision history for this message
Azaziah (suutari-olli) wrote : | # |
Hey Darryl Mann, are you still around?
It's been some time since this was made, but it looks pretty good.
However, some things have changed so this needs to be reworked a bit.
Unmerged revisions
- 2432. By Darryl Mann
-
Simple formatting change.
- 2431. By Darryl Mann
-
These are all the changes.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'openlp/core/common/settings.py' |
2 | --- openlp/core/common/settings.py 2014-10-14 07:52:59 +0000 |
3 | +++ openlp/core/common/settings.py 2014-10-28 20:52:28 +0000 |
4 | @@ -267,6 +267,7 @@ |
5 | 'shortcuts/settingsExportItem': [], |
6 | 'shortcuts/songUsageReport': [], |
7 | 'shortcuts/songImportItem': [], |
8 | + 'shortcuts/logoScreen': [QtGui.QKeySequence('L')], |
9 | 'shortcuts/themeScreen': [QtGui.QKeySequence('T')], |
10 | 'shortcuts/toolsReindexItem': [], |
11 | 'shortcuts/toolsFindDuplicates': [], |
12 | |
13 | === modified file 'openlp/core/lib/htmlbuilder.py' |
14 | --- openlp/core/lib/htmlbuilder.py 2014-07-21 06:37:41 +0000 |
15 | +++ openlp/core/lib/htmlbuilder.py 2014-10-28 20:52:28 +0000 |
16 | @@ -57,6 +57,14 @@ |
17 | background-color: black; |
18 | display: none; |
19 | } |
20 | + #logo { |
21 | + z-index: 7; |
22 | + background-image: none; |
23 | + background-color: black; |
24 | + background-repeat: no-repeat; |
25 | + background-position: center center; |
26 | + display: none; |
27 | + } |
28 | #bgimage { |
29 | z-index: 1; |
30 | } |
31 | @@ -300,19 +308,33 @@ |
32 | img.style.display = 'block'; |
33 | } |
34 | |
35 | + function set_blank_logo(color, image){ |
36 | + if(typeof color === 'undefined') |
37 | + color = '#000000'; |
38 | + if(typeof image === 'undefined') |
39 | + image = ''; |
40 | + document.getElementById('logo').style.backgroundColor = color; |
41 | + document.getElementById('logo').style.backgroundImage = "url('"+image+"')"; |
42 | + } |
43 | + |
44 | function show_blank(state){ |
45 | + var logo = 'none'; |
46 | var black = 'none'; |
47 | var lyrics = ''; |
48 | switch(state){ |
49 | case 'theme': |
50 | lyrics = 'hidden'; |
51 | break; |
52 | + case 'logo': |
53 | + logo = 'block'; |
54 | + break; |
55 | case 'black': |
56 | black = 'block'; |
57 | break; |
58 | case 'desktop': |
59 | break; |
60 | } |
61 | + document.getElementById('logo').style.display = logo; |
62 | document.getElementById('black').style.display = black; |
63 | document.getElementById('lyricsmain').style.visibility = lyrics; |
64 | document.getElementById('image').style.visibility = lyrics; |
65 | @@ -391,6 +413,7 @@ |
66 | <div class="lyricstable"><div id="lyricsmain" style="opacity:1" class="lyricscell lyricsmain"></div></div> |
67 | <div id="footer" class="footer"></div> |
68 | <div id="black" class="size"></div> |
69 | + <div id="logo" class="size"></div> |
70 | </body> |
71 | </html> |
72 | """ |
73 | @@ -431,6 +454,14 @@ |
74 | background-color: black; |
75 | display: none; |
76 | } |
77 | +#logo { |
78 | + z-index: 7; |
79 | + background-image: none; |
80 | + background-color: black; |
81 | + background-repeat: no-repeat; |
82 | + background-position: center center; |
83 | + display: none; |
84 | +} |
85 | #bgimage { |
86 | z-index: 1; |
87 | } |
88 | @@ -466,19 +497,33 @@ |
89 | img.style.display = 'block'; |
90 | } |
91 | |
92 | + function set_blank_logo(color, image){ |
93 | + if(typeof color === 'undefined') |
94 | + color = '#000000'; |
95 | + if(typeof image === 'undefined') |
96 | + image = ''; |
97 | + document.getElementById('logo').style.backgroundColor = color; |
98 | + document.getElementById('logo').style.backgroundImage = "url('"+image+"')"; |
99 | + } |
100 | + |
101 | function show_blank(state){ |
102 | + var logo = 'none'; |
103 | var black = 'none'; |
104 | var lyrics = ''; |
105 | switch(state){ |
106 | case 'theme': |
107 | lyrics = 'hidden'; |
108 | break; |
109 | + case 'logo': |
110 | + logo = 'block'; |
111 | + break; |
112 | case 'black': |
113 | black = 'block'; |
114 | break; |
115 | case 'desktop': |
116 | break; |
117 | } |
118 | + document.getElementById('logo').style.display = logo; |
119 | document.getElementById('black').style.display = black; |
120 | document.getElementById('lyricsmain').style.visibility = lyrics; |
121 | document.getElementById('image').style.visibility = lyrics; |
122 | @@ -550,6 +595,7 @@ |
123 | <div class="lyricstable"><div id="lyricsmain" style="opacity:1" class="lyricscell lyricsmain"></div></div> |
124 | <div id="footer" class="footer"></div> |
125 | <div id="black" class="size"></div> |
126 | +<div id="logo" class="size"></div> |
127 | </body> |
128 | </html> |
129 | """ |
130 | |
131 | === modified file 'openlp/core/resources.py' |
132 | --- openlp/core/resources.py 2014-09-05 20:15:44 +0000 |
133 | +++ openlp/core/resources.py 2014-10-28 20:52:28 +0000 |
134 | @@ -76944,6 +76944,57 @@ |
135 | \x9b\xfc\x8b\x0a\x04\x36\x0b\x91\x40\xaa\x9b\x96\x7a\xa2\x23\xcc\ |
136 | \x94\x59\x40\x16\x25\x00\xf8\x0f\x80\xa0\xff\x98\xbb\x5a\x5b\x51\ |
137 | \x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ |
138 | +\x00\x00\x03\x0d\ |
139 | +\x89\ |
140 | +\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ |
141 | +\x00\x00\x10\x00\x00\x00\x10\x08\x06\x00\x00\x00\x1f\xf3\xff\x61\ |
142 | +\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\ |
143 | +\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0d\xd7\x00\x00\x0d\xd7\ |
144 | +\x01\x42\x28\x9b\x78\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\ |
145 | +\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\ |
146 | +\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x02\x8a\x49\x44\ |
147 | +\x41\x54\x38\x8d\x65\x92\x4f\x48\x54\x51\x14\xc6\x7f\xf7\xfd\x19\ |
148 | +\xe7\xcd\x64\x33\xd3\x38\x86\xcb\x42\x09\x09\xa4\x02\xdb\xd4\x32\ |
149 | +\xdd\xe4\x22\x12\x04\x57\x16\x61\x2b\x31\x71\x1f\x35\x81\xb4\x2d\ |
150 | +\xc8\x5d\x0b\xd1\x20\x30\xa5\x4d\x20\xb4\x12\x74\x21\x19\xb5\xd2\ |
151 | +\x10\x5c\xe8\x2a\x49\x9d\x79\xea\x38\xf7\xcd\x7b\xf7\xbd\xdb\x62\ |
152 | +\x9a\xd7\x88\x07\x2e\xf7\x72\xef\x39\xdf\xf9\xce\x77\x3f\xb1\xb4\ |
153 | +\xb4\x34\x92\xcf\xe7\xdf\x38\x8e\x93\x35\x0c\x03\x21\x44\xbc\x1a\ |
154 | +\xa1\xb5\x8e\xf7\x28\x8a\xd0\x5a\xe3\x79\x9e\xbb\xbf\xbf\x3f\x21\ |
155 | +\xd6\xd6\xd6\xca\x1f\xe6\xe6\xb2\xa5\x93\x2a\x89\x44\x02\xbb\xc5\ |
156 | +\xc6\xb6\x12\xd8\x96\x89\x61\x18\x00\x44\x51\x84\x52\x21\x4a\x29\ |
157 | +\xfc\x20\xc0\xf7\x7d\x72\x17\x52\x3c\x7e\xfc\xc8\xb5\x52\xa9\x54\ |
158 | +\x76\x6f\x6f\x8f\x4f\x0b\x0b\x00\x48\x29\x91\x52\xa2\xc3\x10\xcf\ |
159 | +\xf7\xe3\x3b\xcf\xf3\xe2\x33\xc0\xcb\xa9\xd7\xa4\x52\xa9\xac\xd5\ |
160 | +\xe8\xd0\xfc\xe8\x2d\x2f\x73\xba\xbe\xce\xd1\xd3\x41\x26\xb7\x26\ |
161 | +\x63\x16\x61\x18\x32\x9a\x1b\xa5\x33\xea\x24\x0a\x02\x00\x2c\xad\ |
162 | +\x35\x4a\xa9\xb8\x58\x9e\x9e\x52\x7e\xfe\x9c\x60\x67\x07\xb7\xbf\ |
163 | +\x87\x95\xe3\x15\x9a\x63\xa0\x65\x80\xce\x64\x27\xa1\xaa\x03\x18\ |
164 | +\x5a\x6b\x34\x3a\x66\x70\x32\x3b\x8b\xbf\xb9\x89\xae\x56\xf9\xf5\ |
165 | +\xf0\x23\x14\xe7\x60\xeb\xd6\x19\x10\x29\x65\x2c\xac\xa1\xb5\x26\ |
166 | +\x99\x4c\xd6\x69\x1e\x1d\xe1\x4e\x4d\xc5\x89\x77\xdc\x2f\xf4\x6c\ |
167 | +\x26\xe0\x7d\x91\x73\x21\xea\xbf\x62\x69\xad\x29\x95\x4a\x48\x29\ |
168 | +\x11\xe9\x34\xf9\xd5\x55\x5c\xd7\xe3\x5e\x3f\x1c\x57\x4c\x7c\x12\ |
169 | +\x74\x84\x9a\xe9\xc2\x67\x84\x00\xab\x66\xd5\x59\x54\xeb\x23\x1b\ |
170 | +\x00\x4a\x85\x75\xf1\x82\x00\x71\xf1\x22\xc9\x42\x2b\x4f\xc6\x5b\ |
171 | +\x68\xc9\x3a\xe4\xdb\x05\xe3\x63\x35\xf2\xe6\x25\x9c\x9a\x83\x8d\ |
172 | +\x8d\x94\x12\xa5\x14\x42\x08\x2c\x80\x20\xf0\xff\x8b\xf8\x6f\x1f\ |
173 | +\x1e\x8e\xb8\x7f\xdf\xc5\x34\x05\xb5\x5a\xf5\xcc\xfc\x00\xc1\x3f\ |
174 | +\x11\x2d\x29\xa5\x7b\xe5\xca\xd5\x6c\xff\xc0\x03\x2c\xcb\xc0\x36\ |
175 | +\x6d\x6c\xcb\xc4\xb2\x4c\x4c\xc3\x44\x20\x50\x91\x42\xa9\x90\x20\ |
176 | +\x6c\x98\x49\x71\xf3\xfa\x35\xa4\x94\xae\x98\x99\x99\x19\xe9\xed\ |
177 | +\xed\x7d\x93\xcb\xe5\xb2\x8d\x2e\xcd\x96\x05\x68\xb6\x78\x23\x2a\ |
178 | +\x95\x13\x77\x7d\xfd\xfb\x84\x68\x24\x9d\x11\x58\x08\x63\x7a\x7a\ |
179 | +\x7a\x2c\x93\xc9\xbc\xf5\x7d\x9f\xdd\xdd\xdd\x67\xc5\x62\xf1\x9d\ |
180 | +\xd6\x3a\x3a\x97\xdb\x0c\xb0\xb8\xb8\x78\xa3\xab\xab\xeb\x95\x61\ |
181 | +\x18\xb7\xa3\x28\x6a\x2f\x97\xcb\xc2\xf7\x7d\x5a\x5b\x5b\xb5\xe3\ |
182 | +\x38\x7f\x80\x6f\xdb\xdb\xdb\x2f\x06\x07\x07\x7f\x36\x6a\xac\x66\ |
183 | +\x34\x29\xe5\x5d\xdb\xb6\xfb\xd2\xe9\x74\x52\x29\x15\xfb\xc3\xb6\ |
184 | +\x6d\x61\x9a\xe6\xe5\x4a\xa5\xd2\x57\xad\x56\xbf\x02\x31\xc0\x19\ |
185 | +\x06\x42\x08\x51\x28\x14\x3a\x86\x86\x86\x6e\x75\x77\x77\x77\xb5\ |
186 | +\xb5\xb5\x65\x00\x0e\x0f\x0f\xdd\x8d\x8d\x8d\xed\xf9\xf9\xf9\x1f\ |
187 | +\x07\x07\x07\xbf\x75\x53\xd1\x5f\x37\x7f\x5c\x0f\x9c\xe1\xef\xfb\ |
188 | +\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ |
189 | \x00\x00\x03\x2f\ |
190 | \x89\ |
191 | \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ |
192 | @@ -85428,6 +85479,10 @@ |
193 | \x09\xc3\x0b\x87\ |
194 | \x00\x73\ |
195 | \x00\x6c\x00\x69\x00\x64\x00\x65\x00\x5f\x00\x63\x00\x6c\x00\x6f\x00\x73\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\ |
196 | +\x00\x0e\ |
197 | +\x00\x57\x2d\xa7\ |
198 | +\x00\x73\ |
199 | +\x00\x6c\x00\x69\x00\x64\x00\x65\x00\x5f\x00\x6c\x00\x6f\x00\x67\x00\x6f\x00\x2e\x00\x70\x00\x6e\x00\x67\ |
200 | \x00\x0f\ |
201 | \x07\x63\x6a\x27\ |
202 | \x00\x73\ |
203 | @@ -85669,17 +85724,17 @@ |
204 | |
205 | qt_resource_struct = b"\ |
206 | \x00\x00\x00\x00\x00\x02\x00\x00\x00\x14\x00\x00\x00\x01\ |
207 | -\x00\x00\x00\xf8\x00\x02\x00\x00\x00\x06\x00\x00\x00\x94\ |
208 | -\x00\x00\x00\x00\x00\x02\x00\x00\x00\x04\x00\x00\x00\x90\ |
209 | -\x00\x00\x00\xb4\x00\x02\x00\x00\x00\x09\x00\x00\x00\x87\ |
210 | -\x00\x00\x00\xd6\x00\x02\x00\x00\x00\x14\x00\x00\x00\x73\ |
211 | -\x00\x00\x00\x3e\x00\x02\x00\x00\x00\x02\x00\x00\x00\x71\ |
212 | -\x00\x00\x00\x14\x00\x02\x00\x00\x00\x02\x00\x00\x00\x6f\ |
213 | -\x00\x00\x01\x18\x00\x02\x00\x00\x00\x05\x00\x00\x00\x6a\ |
214 | -\x00\x00\x01\x06\x00\x02\x00\x00\x00\x02\x00\x00\x00\x68\ |
215 | -\x00\x00\x01\x52\x00\x02\x00\x00\x00\x09\x00\x00\x00\x5f\ |
216 | -\x00\x00\x00\xe6\x00\x02\x00\x00\x00\x03\x00\x00\x00\x5c\ |
217 | -\x00\x00\x00\x8c\x00\x02\x00\x00\x00\x0a\x00\x00\x00\x52\ |
218 | +\x00\x00\x00\xf8\x00\x02\x00\x00\x00\x06\x00\x00\x00\x95\ |
219 | +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x04\x00\x00\x00\x91\ |
220 | +\x00\x00\x00\xb4\x00\x02\x00\x00\x00\x09\x00\x00\x00\x88\ |
221 | +\x00\x00\x00\xd6\x00\x02\x00\x00\x00\x14\x00\x00\x00\x74\ |
222 | +\x00\x00\x00\x3e\x00\x02\x00\x00\x00\x02\x00\x00\x00\x72\ |
223 | +\x00\x00\x00\x14\x00\x02\x00\x00\x00\x02\x00\x00\x00\x70\ |
224 | +\x00\x00\x01\x18\x00\x02\x00\x00\x00\x05\x00\x00\x00\x6b\ |
225 | +\x00\x00\x01\x06\x00\x02\x00\x00\x00\x02\x00\x00\x00\x69\ |
226 | +\x00\x00\x01\x52\x00\x02\x00\x00\x00\x09\x00\x00\x00\x60\ |
227 | +\x00\x00\x00\xe6\x00\x02\x00\x00\x00\x03\x00\x00\x00\x5d\ |
228 | +\x00\x00\x00\x8c\x00\x02\x00\x00\x00\x0b\x00\x00\x00\x52\ |
229 | \x00\x00\x00\xc4\x00\x02\x00\x00\x00\x03\x00\x00\x00\x4f\ |
230 | \x00\x00\x00\x2c\x00\x02\x00\x00\x00\x10\x00\x00\x00\x3f\ |
231 | \x00\x00\x00\x62\x00\x02\x00\x00\x00\x03\x00\x00\x00\x3c\ |
232 | @@ -85696,25 +85751,25 @@ |
233 | \x00\x00\x04\x10\x00\x00\x00\x00\x00\x01\x00\x03\x5e\xe2\ |
234 | \x00\x00\x04\xd0\x00\x00\x00\x00\x00\x01\x00\x0d\xe2\x6a\ |
235 | \x00\x00\x03\xe0\x00\x00\x00\x00\x00\x01\x00\x02\xc4\x8b\ |
236 | -\x00\x00\x12\x0a\x00\x00\x00\x00\x00\x01\x00\x14\x34\x70\ |
237 | -\x00\x00\x12\x86\x00\x00\x00\x00\x00\x01\x00\x14\x3e\x37\ |
238 | -\x00\x00\x11\xe4\x00\x00\x00\x00\x00\x01\x00\x14\x31\x96\ |
239 | -\x00\x00\x11\x6a\x00\x00\x00\x00\x00\x01\x00\x14\x29\x7e\ |
240 | -\x00\x00\x13\xc6\x00\x00\x00\x00\x00\x01\x00\x14\x57\x05\ |
241 | -\x00\x00\x11\xba\x00\x00\x00\x00\x00\x01\x00\x14\x2e\xf8\ |
242 | -\x00\x00\x12\x5c\x00\x00\x00\x00\x00\x01\x00\x14\x3b\x52\ |
243 | -\x00\x00\x11\x08\x00\x00\x00\x00\x00\x01\x00\x14\x22\x64\ |
244 | -\x00\x00\x13\x02\x00\x00\x00\x00\x00\x01\x00\x14\x48\x5b\ |
245 | -\x00\x00\x13\x7a\x00\x00\x00\x00\x00\x01\x00\x14\x50\x7f\ |
246 | -\x00\x00\x12\xae\x00\x00\x00\x00\x00\x01\x00\x14\x41\xab\ |
247 | -\x00\x00\x13\xa0\x00\x00\x00\x00\x00\x01\x00\x14\x54\x31\ |
248 | -\x00\x00\x11\x40\x00\x00\x00\x00\x00\x01\x00\x14\x27\x06\ |
249 | -\x00\x00\x13\x50\x00\x00\x00\x00\x00\x01\x00\x14\x4d\xfd\ |
250 | -\x00\x00\x11\x96\x00\x00\x00\x00\x00\x01\x00\x14\x2c\xb1\ |
251 | -\x00\x00\x12\x30\x00\x00\x00\x00\x00\x01\x00\x14\x36\xa7\ |
252 | -\x00\x00\x10\xe4\x00\x00\x00\x00\x00\x01\x00\x14\x1f\x67\ |
253 | -\x00\x00\x13\x2a\x00\x00\x00\x00\x00\x01\x00\x14\x4a\x6e\ |
254 | -\x00\x00\x12\xdc\x00\x00\x00\x00\x00\x01\x00\x14\x46\x44\ |
255 | +\x00\x00\x12\x2c\x00\x00\x00\x00\x00\x01\x00\x14\x37\x81\ |
256 | +\x00\x00\x12\xa8\x00\x00\x00\x00\x00\x01\x00\x14\x41\x48\ |
257 | +\x00\x00\x12\x06\x00\x00\x00\x00\x00\x01\x00\x14\x34\xa7\ |
258 | +\x00\x00\x11\x8c\x00\x00\x00\x00\x00\x01\x00\x14\x2c\x8f\ |
259 | +\x00\x00\x13\xe8\x00\x00\x00\x00\x00\x01\x00\x14\x5a\x16\ |
260 | +\x00\x00\x11\xdc\x00\x00\x00\x00\x00\x01\x00\x14\x32\x09\ |
261 | +\x00\x00\x12\x7e\x00\x00\x00\x00\x00\x01\x00\x14\x3e\x63\ |
262 | +\x00\x00\x11\x2a\x00\x00\x00\x00\x00\x01\x00\x14\x25\x75\ |
263 | +\x00\x00\x13\x24\x00\x00\x00\x00\x00\x01\x00\x14\x4b\x6c\ |
264 | +\x00\x00\x13\x9c\x00\x00\x00\x00\x00\x01\x00\x14\x53\x90\ |
265 | +\x00\x00\x12\xd0\x00\x00\x00\x00\x00\x01\x00\x14\x44\xbc\ |
266 | +\x00\x00\x13\xc2\x00\x00\x00\x00\x00\x01\x00\x14\x57\x42\ |
267 | +\x00\x00\x11\x62\x00\x00\x00\x00\x00\x01\x00\x14\x2a\x17\ |
268 | +\x00\x00\x13\x72\x00\x00\x00\x00\x00\x01\x00\x14\x51\x0e\ |
269 | +\x00\x00\x11\xb8\x00\x00\x00\x00\x00\x01\x00\x14\x2f\xc2\ |
270 | +\x00\x00\x12\x52\x00\x00\x00\x00\x00\x01\x00\x14\x39\xb8\ |
271 | +\x00\x00\x11\x06\x00\x00\x00\x00\x00\x01\x00\x14\x22\x78\ |
272 | +\x00\x00\x13\x4c\x00\x00\x00\x00\x00\x01\x00\x14\x4d\x7f\ |
273 | +\x00\x00\x12\xfe\x00\x00\x00\x00\x00\x01\x00\x14\x49\x55\ |
274 | \x00\x00\x03\x8a\x00\x00\x00\x00\x00\x01\x00\x00\x21\x92\ |
275 | \x00\x00\x0d\xa4\x00\x00\x00\x00\x00\x01\x00\x12\xa0\xdf\ |
276 | \x00\x00\x0e\x24\x00\x00\x00\x00\x00\x01\x00\x12\xa7\xa5\ |
277 | @@ -85727,38 +85782,39 @@ |
278 | \x00\x00\x01\x80\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ |
279 | \x00\x00\x01\xe6\x00\x00\x00\x00\x00\x01\x00\x00\x05\xe6\ |
280 | \x00\x00\x01\xb2\x00\x00\x00\x00\x00\x01\x00\x00\x02\xfe\ |
281 | -\x00\x00\x10\x34\x00\x00\x00\x00\x00\x01\x00\x12\xc5\xbe\ |
282 | -\x00\x00\x10\x5e\x00\x00\x00\x00\x00\x01\x00\x12\xcb\x28\ |
283 | -\x00\x00\x10\x8e\x00\x00\x00\x00\x00\x01\x00\x13\x39\xb1\ |
284 | -\x00\x00\x10\xae\x00\x00\x00\x00\x00\x01\x00\x13\x40\x62\ |
285 | -\x00\x00\x14\x8c\x00\x00\x00\x00\x00\x01\x00\x14\x64\xcc\ |
286 | -\x00\x00\x14\x32\x00\x00\x00\x00\x00\x01\x00\x14\x5f\xcb\ |
287 | -\x00\x00\x16\xa8\x00\x00\x00\x00\x00\x01\x00\x14\x8e\xd1\ |
288 | -\x00\x00\x15\x32\x00\x00\x00\x00\x00\x01\x00\x14\x6c\xd6\ |
289 | -\x00\x00\x14\xce\x00\x00\x00\x00\x00\x01\x00\x14\x68\x1f\ |
290 | -\x00\x00\x14\x58\x00\x00\x00\x00\x00\x01\x00\x14\x62\xfc\ |
291 | -\x00\x00\x15\xfa\x00\x00\x00\x00\x00\x01\x00\x14\x7f\xac\ |
292 | -\x00\x00\x15\x98\x00\x00\x00\x00\x00\x01\x00\x14\x77\x7c\ |
293 | -\x00\x00\x16\xce\x00\x00\x00\x00\x00\x01\x00\x14\x91\xb3\ |
294 | -\x00\x00\x16\x74\x00\x00\x00\x00\x00\x01\x00\x14\x8a\xf4\ |
295 | -\x00\x00\x15\xc4\x00\x00\x00\x00\x00\x01\x00\x14\x7c\x88\ |
296 | -\x00\x00\x17\x00\x00\x00\x00\x00\x00\x01\x00\x14\x95\x70\ |
297 | -\x00\x00\x16\x1c\x00\x00\x00\x00\x00\x01\x00\x14\x84\x1b\ |
298 | -\x00\x00\x15\x60\x00\x00\x00\x00\x00\x01\x00\x14\x75\x06\ |
299 | -\x00\x00\x16\x4a\x00\x00\x00\x00\x00\x01\x00\x14\x88\x6c\ |
300 | -\x00\x00\x14\xfc\x00\x00\x00\x00\x00\x01\x00\x14\x6a\x26\ |
301 | +\x00\x00\x10\x56\x00\x00\x00\x00\x00\x01\x00\x12\xc8\xcf\ |
302 | +\x00\x00\x10\x80\x00\x00\x00\x00\x00\x01\x00\x12\xce\x39\ |
303 | +\x00\x00\x10\xb0\x00\x00\x00\x00\x00\x01\x00\x13\x3c\xc2\ |
304 | +\x00\x00\x10\xd0\x00\x00\x00\x00\x00\x01\x00\x13\x43\x73\ |
305 | +\x00\x00\x14\xae\x00\x00\x00\x00\x00\x01\x00\x14\x67\xdd\ |
306 | +\x00\x00\x14\x54\x00\x00\x00\x00\x00\x01\x00\x14\x62\xdc\ |
307 | +\x00\x00\x16\xca\x00\x00\x00\x00\x00\x01\x00\x14\x91\xe2\ |
308 | +\x00\x00\x15\x54\x00\x00\x00\x00\x00\x01\x00\x14\x6f\xe7\ |
309 | +\x00\x00\x14\xf0\x00\x00\x00\x00\x00\x01\x00\x14\x6b\x30\ |
310 | +\x00\x00\x14\x7a\x00\x00\x00\x00\x00\x01\x00\x14\x66\x0d\ |
311 | +\x00\x00\x16\x1c\x00\x00\x00\x00\x00\x01\x00\x14\x82\xbd\ |
312 | +\x00\x00\x15\xba\x00\x00\x00\x00\x00\x01\x00\x14\x7a\x8d\ |
313 | +\x00\x00\x16\xf0\x00\x00\x00\x00\x00\x01\x00\x14\x94\xc4\ |
314 | +\x00\x00\x16\x96\x00\x00\x00\x00\x00\x01\x00\x14\x8e\x05\ |
315 | +\x00\x00\x15\xe6\x00\x00\x00\x00\x00\x01\x00\x14\x7f\x99\ |
316 | +\x00\x00\x17\x22\x00\x00\x00\x00\x00\x01\x00\x14\x98\x81\ |
317 | +\x00\x00\x16\x3e\x00\x00\x00\x00\x00\x01\x00\x14\x87\x2c\ |
318 | +\x00\x00\x15\x82\x00\x00\x00\x00\x00\x01\x00\x14\x78\x17\ |
319 | +\x00\x00\x16\x6c\x00\x00\x00\x00\x00\x01\x00\x14\x8b\x7d\ |
320 | +\x00\x00\x15\x1e\x00\x00\x00\x00\x00\x01\x00\x14\x6d\x37\ |
321 | \x00\x00\x0b\x5c\x00\x00\x00\x00\x00\x01\x00\x12\x39\xc2\ |
322 | \x00\x00\x0b\x7c\x00\x00\x00\x00\x00\x01\x00\x12\x3d\x9f\ |
323 | \x00\x00\x0b\x36\x00\x00\x00\x00\x00\x01\x00\x12\x37\x24\ |
324 | +\x00\x00\x0f\x8c\x00\x00\x00\x00\x00\x01\x00\x12\xbb\xce\ |
325 | \x00\x00\x0f\x12\x00\x00\x00\x00\x00\x01\x00\x12\xb4\x8c\ |
326 | -\x00\x00\x0f\xb0\x00\x00\x00\x00\x00\x01\x00\x12\xbf\x01\ |
327 | -\x00\x00\x10\x0a\x00\x00\x00\x00\x00\x01\x00\x12\xc3\xba\ |
328 | +\x00\x00\x0f\xd2\x00\x00\x00\x00\x00\x01\x00\x12\xc2\x12\ |
329 | +\x00\x00\x10\x2c\x00\x00\x00\x00\x00\x01\x00\x12\xc6\xcb\ |
330 | \x00\x00\x0e\xa8\x00\x00\x00\x00\x00\x01\x00\x12\xb0\x9c\ |
331 | -\x00\x00\x0f\x8c\x00\x00\x00\x00\x00\x01\x00\x12\xbb\xce\ |
332 | +\x00\x00\x0f\xae\x00\x00\x00\x00\x00\x01\x00\x12\xbe\xdf\ |
333 | \x00\x00\x0e\xdc\x00\x00\x00\x00\x00\x01\x00\x12\xb2\x93\ |
334 | \x00\x00\x0f\x46\x00\x00\x00\x00\x00\x01\x00\x12\xb6\x8a\ |
335 | \x00\x00\x0f\x68\x00\x00\x00\x00\x00\x01\x00\x12\xb8\x9d\ |
336 | -\x00\x00\x0f\xe6\x00\x00\x00\x00\x00\x01\x00\x12\xc0\xe9\ |
337 | +\x00\x00\x10\x08\x00\x00\x00\x00\x00\x01\x00\x12\xc3\xfa\ |
338 | \x00\x00\x0e\x80\x00\x00\x00\x00\x00\x01\x00\x12\xad\xe0\ |
339 | \x00\x00\x07\xb4\x00\x00\x00\x00\x00\x01\x00\x11\xea\x6a\ |
340 | \x00\x00\x07\xda\x00\x00\x00\x00\x00\x01\x00\x11\xec\xce\ |
341 | @@ -85779,10 +85835,10 @@ |
342 | \x00\x00\x05\x48\x00\x00\x00\x00\x00\x01\x00\x10\x8b\x3f\ |
343 | \x00\x00\x05\xe2\x00\x00\x00\x00\x00\x01\x00\x10\x91\x58\ |
344 | \x00\x00\x05\xb0\x00\x00\x00\x00\x00\x01\x00\x10\x8f\x90\ |
345 | -\x00\x00\x17\x24\x00\x00\x00\x00\x00\x01\x00\x14\x99\x23\ |
346 | -\x00\x00\x17\x58\x00\x00\x00\x00\x00\x01\x00\x14\x9b\xf3\ |
347 | -\x00\x00\x13\xee\x00\x00\x00\x00\x00\x01\x00\x14\x5a\x4a\ |
348 | -\x00\x00\x14\x12\x00\x00\x00\x00\x00\x01\x00\x14\x5d\x48\ |
349 | +\x00\x00\x17\x46\x00\x00\x00\x00\x00\x01\x00\x14\x9c\x34\ |
350 | +\x00\x00\x17\x7a\x00\x00\x00\x00\x00\x01\x00\x14\x9f\x04\ |
351 | +\x00\x00\x14\x10\x00\x00\x00\x00\x00\x01\x00\x14\x5d\x5b\ |
352 | +\x00\x00\x14\x34\x00\x00\x00\x00\x00\x01\x00\x14\x60\x59\ |
353 | \x00\x00\x08\x32\x00\x00\x00\x00\x00\x01\x00\x11\xf7\xfd\ |
354 | \x00\x00\x09\x10\x00\x00\x00\x00\x00\x01\x00\x12\x08\x4d\ |
355 | \x00\x00\x0b\x16\x00\x00\x00\x00\x00\x01\x00\x12\x33\x31\ |
356 | @@ -85812,10 +85868,10 @@ |
357 | \x00\x00\x0d\x04\x00\x00\x00\x00\x00\x01\x00\x12\x92\xf4\ |
358 | \x00\x00\x0b\x9e\x00\x00\x00\x00\x00\x01\x00\x12\x40\xd9\ |
359 | \x00\x00\x0c\x66\x00\x00\x00\x00\x00\x01\x00\x12\x7d\xad\ |
360 | -\x00\x00\x17\x88\x00\x00\x00\x00\x00\x01\x00\x14\x9e\xec\ |
361 | -\x00\x00\x17\xea\x00\x00\x00\x00\x00\x01\x00\x14\xa5\x62\ |
362 | -\x00\x00\x17\xbc\x00\x00\x00\x00\x00\x01\x00\x14\xa2\x4e\ |
363 | -\x00\x00\x18\x12\x00\x00\x00\x00\x00\x01\x00\x14\xa8\x00\ |
364 | +\x00\x00\x17\xaa\x00\x00\x00\x00\x00\x01\x00\x14\xa1\xfd\ |
365 | +\x00\x00\x18\x0c\x00\x00\x00\x00\x00\x01\x00\x14\xa8\x73\ |
366 | +\x00\x00\x17\xde\x00\x00\x00\x00\x00\x01\x00\x14\xa5\x5f\ |
367 | +\x00\x00\x18\x34\x00\x00\x00\x00\x00\x01\x00\x14\xab\x11\ |
368 | \x00\x00\x06\xf8\x00\x00\x00\x00\x00\x01\x00\x10\xd6\x04\ |
369 | \x00\x00\x06\x98\x00\x00\x00\x00\x00\x01\x00\x10\xa6\xc4\ |
370 | \x00\x00\x06\x68\x00\x00\x00\x00\x00\x01\x00\x10\x9c\x30\ |
371 | |
372 | === modified file 'openlp/core/ui/__init__.py' |
373 | --- openlp/core/ui/__init__.py 2014-02-27 21:39:44 +0000 |
374 | +++ openlp/core/ui/__init__.py 2014-10-28 20:52:28 +0000 |
375 | @@ -49,6 +49,7 @@ |
376 | Blank = 1 |
377 | Theme = 2 |
378 | Screen = 3 |
379 | + Logo = 4 |
380 | |
381 | |
382 | class AlertLocation(object): |
383 | |
384 | === modified file 'openlp/core/ui/maindisplay.py' |
385 | --- openlp/core/ui/maindisplay.py 2014-08-27 23:18:06 +0000 |
386 | +++ openlp/core/ui/maindisplay.py 2014-10-28 20:52:28 +0000 |
387 | @@ -129,6 +129,9 @@ |
388 | self.override = {} |
389 | self.retranslateUi() |
390 | self.media_object = None |
391 | + self.default_color = None |
392 | + self.default_image = None |
393 | + self.default_image_bytes = None |
394 | if self.is_live: |
395 | self.audio_player = AudioPlayer(self) |
396 | else: |
397 | @@ -168,7 +171,7 @@ |
398 | self.setStyleSheet("QGraphicsView {background: transparent; border: 0px;}") |
399 | else: |
400 | self.setAttribute(QtCore.Qt.WA_NoSystemBackground, False) |
401 | - self.setStyleSheet("QGraphicsView {}") |
402 | + self.setStyleSheet("QGraphicsView {border: 0px;}") |
403 | self.setAttribute(QtCore.Qt.WA_TranslucentBackground, enabled) |
404 | self.repaint() |
405 | |
406 | @@ -194,30 +197,59 @@ |
407 | self.setVisible(False) |
408 | Display.setup(self) |
409 | if self.is_live: |
410 | - # Build the initial frame. |
411 | - background_color = QtGui.QColor() |
412 | - background_color.setNamedColor(Settings().value('advanced/default color')) |
413 | - if not background_color.isValid(): |
414 | - background_color = QtCore.Qt.white |
415 | - image_file = Settings().value('advanced/default image') |
416 | - splash_image = QtGui.QImage(image_file) |
417 | - self.initial_fame = QtGui.QImage( |
418 | - self.screen['size'].width(), |
419 | - self.screen['size'].height(), |
420 | - QtGui.QImage.Format_ARGB32_Premultiplied) |
421 | - painter_image = QtGui.QPainter() |
422 | - painter_image.begin(self.initial_fame) |
423 | - painter_image.fillRect(self.initial_fame.rect(), background_color) |
424 | - painter_image.drawImage( |
425 | - (self.screen['size'].width() - splash_image.width()) // 2, |
426 | - (self.screen['size'].height() - splash_image.height()) // 2, |
427 | - splash_image) |
428 | - service_item = ServiceItem() |
429 | - service_item.bg_image_bytes = image_to_byte(self.initial_fame) |
430 | - self.web_view.setHtml(build_html(service_item, self.screen, self.is_live, None, |
431 | - plugins=self.plugin_manager.plugins)) |
432 | + # Set initial frame. |
433 | + self.update_default_frame() |
434 | + self.update_blank_logo() |
435 | self._hide_mouse() |
436 | |
437 | + def update_default_frame(self, image_bytes=None): |
438 | + if image_bytes == None: |
439 | + image_bytes = self.get_default_image_bytes() |
440 | + service_item = ServiceItem() |
441 | + service_item.bg_image_bytes = image_bytes |
442 | + self.web_view.setHtml(build_html(service_item, self.screen, self.is_live, None, |
443 | + plugins=self.plugin_manager.plugins)) |
444 | + |
445 | + def get_default_image_bytes(self): |
446 | + # Build the initial frame. |
447 | + self.default_image = Settings().value('advanced/default image') |
448 | + self.default_color = Settings().value('advanced/default color') |
449 | + background_color = QtGui.QColor() |
450 | + background_color.setNamedColor(self.default_color) |
451 | + if not background_color.isValid(): |
452 | + background_color = QtCore.Qt.white |
453 | + splash_image = QtGui.QImage(self.default_image) |
454 | + self.initial_fame = QtGui.QImage( |
455 | + self.screen['size'].width(), |
456 | + self.screen['size'].height(), |
457 | + QtGui.QImage.Format_ARGB32_Premultiplied) |
458 | + painter_image = QtGui.QPainter() |
459 | + painter_image.begin(self.initial_fame) |
460 | + painter_image.fillRect(self.initial_fame.rect(), background_color) |
461 | + painter_image.drawImage( |
462 | + (self.screen['size'].width() - splash_image.width()) // 2, |
463 | + (self.screen['size'].height() - splash_image.height()) // 2, |
464 | + splash_image) |
465 | + self.default_image_bytes = image_to_byte(self.initial_fame) |
466 | + return self.default_image_bytes |
467 | + |
468 | + def update_blank_logo(self, image_bytes=None): |
469 | + image = '' |
470 | + color = Settings().value('advanced/default color') |
471 | + if image_bytes == None: |
472 | + if self.default_color == color and \ |
473 | + self.default_image == Settings().value('advanced/default image'): |
474 | + image_bytes = self.default_image_bytes |
475 | + if image_bytes == None: |
476 | + image_bytes = self.get_default_image_bytes() |
477 | + if image_bytes and self.initial_fame: |
478 | + self.update_default_frame(image_bytes) |
479 | + if image_bytes: |
480 | + image = 'data:image/png;base64,%s' % image_bytes |
481 | + else: |
482 | + self.default_image_bytes = None |
483 | + self.frame.evaluateJavaScript('set_blank_logo("%s", "%s");' % (color, image)) |
484 | + |
485 | def text(self, slide, animate=True): |
486 | """ |
487 | Add the slide text from slideController |
488 | @@ -427,8 +459,10 @@ |
489 | if mode == HideMode.Screen: |
490 | self.frame.evaluateJavaScript('show_blank("desktop");') |
491 | self.setVisible(False) |
492 | - elif mode == HideMode.Blank or self.initial_fame: |
493 | + elif mode == HideMode.Blank: |
494 | self.frame.evaluateJavaScript('show_blank("black");') |
495 | + elif mode == HideMode.Logo or self.initial_fame: |
496 | + self.frame.evaluateJavaScript('show_blank("logo");') |
497 | else: |
498 | self.frame.evaluateJavaScript('show_blank("theme");') |
499 | if mode != HideMode.Screen: |
500 | |
501 | === modified file 'openlp/core/ui/slidecontroller.py' |
502 | --- openlp/core/ui/slidecontroller.py 2014-10-28 18:36:54 +0000 |
503 | +++ openlp/core/ui/slidecontroller.py 2014-10-28 20:52:28 +0000 |
504 | @@ -69,12 +69,14 @@ |
505 | ] |
506 | WIDE_MENU = [ |
507 | 'blank_screen_button', |
508 | + 'logo_screen_button', |
509 | 'theme_screen_button', |
510 | 'desktop_screen_button' |
511 | ] |
512 | |
513 | NON_TEXT_MENU = [ |
514 | 'blank_screen_button', |
515 | + 'logo_screen_button', |
516 | 'desktop_screen_button' |
517 | ] |
518 | |
519 | @@ -209,6 +211,11 @@ |
520 | icon=':/slides/slide_blank.png', |
521 | checked=False, can_shortcuts=True, category=self.category, |
522 | triggers=self.on_blank_display) |
523 | + self.logo_screen = create_action(self, 'logoScreen', |
524 | + text=translate('OpenLP.SlideController', 'Blank to Logo'), |
525 | + icon=':/slides/slide_logo.png', |
526 | + checked=False, can_shortcuts=True, category=self.category, |
527 | + triggers=self.on_logo_display) |
528 | self.theme_screen = create_action(self, 'themeScreen', |
529 | text=translate('OpenLP.SlideController', 'Blank to Theme'), |
530 | icon=':/slides/slide_theme.png', |
531 | @@ -221,6 +228,7 @@ |
532 | triggers=self.on_hide_display) |
533 | self.hide_menu.setDefaultAction(self.blank_screen) |
534 | self.hide_menu.menu().addAction(self.blank_screen) |
535 | + self.hide_menu.menu().addAction(self.logo_screen) |
536 | self.hide_menu.menu().addAction(self.theme_screen) |
537 | self.hide_menu.menu().addAction(self.desktop_screen) |
538 | # Wide menu of display control buttons. |
539 | @@ -228,6 +236,10 @@ |
540 | self.blank_screen_button.setObjectName('blank_screen_button') |
541 | self.toolbar.add_toolbar_widget(self.blank_screen_button) |
542 | self.blank_screen_button.setDefaultAction(self.blank_screen) |
543 | + self.logo_screen_button = QtGui.QToolButton(self.toolbar) |
544 | + self.logo_screen_button.setObjectName('logo_screen_button') |
545 | + self.toolbar.add_toolbar_widget(self.logo_screen_button) |
546 | + self.logo_screen_button.setDefaultAction(self.logo_screen) |
547 | self.theme_screen_button = QtGui.QToolButton(self.toolbar) |
548 | self.theme_screen_button.setObjectName('theme_screen_button') |
549 | self.toolbar.add_toolbar_widget(self.theme_screen_button) |
550 | @@ -502,6 +514,8 @@ |
551 | """ |
552 | if action == 'blank' or action == 'hide': |
553 | self.on_blank_display(True) |
554 | + elif action == 'logo': |
555 | + self.on_logo_display(True) |
556 | elif action == 'theme': |
557 | self.on_theme_display(True) |
558 | elif action == 'desktop': |
559 | @@ -510,6 +524,7 @@ |
560 | self.on_blank_display(False) |
561 | self.on_theme_display(False) |
562 | self.on_hide_display(False) |
563 | + self.on_logo_display(False) |
564 | |
565 | def service_previous(self, field=None): |
566 | """ |
567 | @@ -888,6 +903,8 @@ |
568 | # Order done to handle initial conversion |
569 | if display_type == 'themed': |
570 | self.on_theme_display(True) |
571 | + elif display_type == 'logo' : |
572 | + self.on_logo_display(True) |
573 | elif display_type == 'hidden': |
574 | self.on_hide_display(True) |
575 | elif display_type == 'blanked': |
576 | @@ -920,6 +937,7 @@ |
577 | self.log_debug('on_blank_display %s' % checked) |
578 | self.hide_menu.setDefaultAction(self.blank_screen) |
579 | self.blank_screen.setChecked(checked) |
580 | + self.logo_screen.setChecked(False) |
581 | self.theme_screen.setChecked(False) |
582 | self.desktop_screen.setChecked(False) |
583 | if checked: |
584 | @@ -930,6 +948,31 @@ |
585 | self.update_preview() |
586 | self.on_toggle_loop() |
587 | |
588 | + def on_logo_display(self, checked=None): |
589 | + """ |
590 | + Handle the Theme screen button |
591 | + |
592 | + :param checked: the new state of the of the widget |
593 | + """ |
594 | + if self.display.initial_fame: |
595 | + checked = True |
596 | + elif checked is None: |
597 | + checked = self.logo_screen.isChecked() |
598 | + self.log_debug('on_logo_display %s' % checked) |
599 | + self.hide_menu.setDefaultAction(self.logo_screen) |
600 | + self.blank_screen.setChecked(False) |
601 | + self.theme_screen.setChecked(False) |
602 | + self.logo_screen.setChecked(checked) |
603 | + self.desktop_screen.setChecked(False) |
604 | + if checked: |
605 | + self.display.update_blank_logo() |
606 | + Settings().setValue(self.main_window.general_settings_section + '/screen blank', 'logo') |
607 | + else: |
608 | + Settings().remove(self.main_window.general_settings_section + '/screen blank') |
609 | + self.blank_plugin() |
610 | + self.update_preview() |
611 | + self.on_toggle_loop() |
612 | + |
613 | def on_theme_display(self, checked=None): |
614 | """ |
615 | Handle the Theme screen button |
616 | @@ -941,6 +984,7 @@ |
617 | self.log_debug('on_theme_display %s' % checked) |
618 | self.hide_menu.setDefaultAction(self.theme_screen) |
619 | self.blank_screen.setChecked(False) |
620 | + self.logo_screen.setChecked(False) |
621 | self.theme_screen.setChecked(checked) |
622 | self.desktop_screen.setChecked(False) |
623 | if checked: |
624 | @@ -962,6 +1006,7 @@ |
625 | self.log_debug('on_hide_display %s' % checked) |
626 | self.hide_menu.setDefaultAction(self.desktop_screen) |
627 | self.blank_screen.setChecked(False) |
628 | + self.logo_screen.setChecked(False) |
629 | self.theme_screen.setChecked(False) |
630 | self.desktop_screen.setChecked(checked) |
631 | if checked: |
632 | @@ -1312,6 +1357,8 @@ |
633 | hide_mode = self.hide_mode() |
634 | if hide_mode == HideMode.Blank: |
635 | self.on_blank_display(True) |
636 | + elif hide_mode == HideMode.Logo: |
637 | + self.on_logo_display(True) |
638 | elif hide_mode == HideMode.Theme: |
639 | self.on_theme_display(True) |
640 | elif hide_mode == HideMode.Screen: |
641 | @@ -1327,6 +1374,8 @@ |
642 | return None |
643 | elif self.blank_screen.isChecked(): |
644 | return HideMode.Blank |
645 | + elif self.logo_screen.isChecked(): |
646 | + return HideMode.Logo |
647 | elif self.theme_screen.isChecked(): |
648 | return HideMode.Theme |
649 | elif self.desktop_screen.isChecked(): |
650 | |
651 | === modified file 'openlp/plugins/presentations/lib/messagelistener.py' |
652 | --- openlp/plugins/presentations/lib/messagelistener.py 2014-10-21 21:06:02 +0000 |
653 | +++ openlp/plugins/presentations/lib/messagelistener.py 2014-10-28 20:52:28 +0000 |
654 | @@ -78,6 +78,8 @@ |
655 | if hide_mode == HideMode.Screen: |
656 | Registry().execute('live_display_hide', HideMode.Screen) |
657 | self.stop() |
658 | + elif hide_mode == HideMode.Logo: |
659 | + self.blank(hide_mode) |
660 | elif hide_mode == HideMode.Theme: |
661 | self.blank(hide_mode) |
662 | elif hide_mode == HideMode.Blank: |
663 | @@ -239,7 +241,13 @@ |
664 | return |
665 | if not self.doc.is_active(): |
666 | return |
667 | - Registry().execute('live_display_hide', HideMode.Theme) |
668 | + Registry().execute('live_display_hide', hide_mode) |
669 | + elif hide_mode == HideMode.Logo: |
670 | + if not self.doc.is_loaded(): |
671 | + return |
672 | + if not self.doc.is_active(): |
673 | + return |
674 | + Registry().execute('live_display_hide', hide_mode) |
675 | elif hide_mode == HideMode.Blank: |
676 | if not self.activate(): |
677 | return |
678 | |
679 | === modified file 'resources/images/openlp-2.qrc' |
680 | --- resources/images/openlp-2.qrc 2014-09-05 20:15:44 +0000 |
681 | +++ resources/images/openlp-2.qrc 2014-10-28 20:52:28 +0000 |
682 | @@ -69,6 +69,7 @@ |
683 | <file>slide_next.png</file> |
684 | <file>slide_blank.png</file> |
685 | <file>slide_desktop.png</file> |
686 | + <file>slide_logo.png</file> |
687 | <file>slide_theme.png</file> |
688 | <file>slide_previous.png</file> |
689 | <file>media_playback_start.png</file> |
690 | |
691 | === added file 'resources/images/slide_logo.png' |
692 | Binary files resources/images/slide_logo.png 1970-01-01 00:00:00 +0000 and resources/images/slide_logo.png 2014-10-28 20:52:28 +0000 differ |
693 | === modified file 'tests/functional/openlp_core_lib/test_htmlbuilder.py' |
694 | --- tests/functional/openlp_core_lib/test_htmlbuilder.py 2014-07-24 21:57:16 +0000 |
695 | +++ tests/functional/openlp_core_lib/test_htmlbuilder.py 2014-10-28 20:52:28 +0000 |
696 | @@ -41,6 +41,14 @@ |
697 | background-color: black; |
698 | display: none; |
699 | } |
700 | +#logo { |
701 | + z-index: 7; |
702 | + background-image: none; |
703 | + background-color: black; |
704 | + background-repeat: no-repeat; |
705 | + background-position: center center; |
706 | + display: none; |
707 | +} |
708 | #bgimage { |
709 | z-index: 1; |
710 | } |
711 | @@ -76,19 +84,33 @@ |
712 | img.style.display = 'block'; |
713 | } |
714 | |
715 | + function set_blank_logo(color, image){ |
716 | + if(typeof color === 'undefined') |
717 | + color = '#000000'; |
718 | + if(typeof image === 'undefined') |
719 | + image = ''; |
720 | + document.getElementById('logo').style.backgroundColor = color; |
721 | + document.getElementById('logo').style.backgroundImage = "url('"+image+"')"; |
722 | + } |
723 | + |
724 | function show_blank(state){ |
725 | + var logo = 'none'; |
726 | var black = 'none'; |
727 | var lyrics = ''; |
728 | switch(state){ |
729 | case 'theme': |
730 | lyrics = 'hidden'; |
731 | break; |
732 | + case 'logo': |
733 | + logo = 'block'; |
734 | + break; |
735 | case 'black': |
736 | black = 'block'; |
737 | break; |
738 | case 'desktop': |
739 | break; |
740 | } |
741 | + document.getElementById('logo').style.display = logo; |
742 | document.getElementById('black').style.display = black; |
743 | document.getElementById('lyricsmain').style.visibility = lyrics; |
744 | document.getElementById('image').style.visibility = lyrics; |
745 | @@ -160,6 +182,7 @@ |
746 | <div class="lyricstable"><div id="lyricsmain" style="opacity:1" class="lyricscell lyricsmain"></div></div> |
747 | <div id="footer" class="footer"></div> |
748 | <div id="black" class="size"></div> |
749 | +<div id="logo" class="size"></div> |
750 | </body> |
751 | </html> |
752 | """ |
753 | |
754 | === modified file 'tests/functional/openlp_core_ui/test_maindisplay.py' |
755 | --- tests/functional/openlp_core_ui/test_maindisplay.py 2014-05-07 23:52:51 +0000 |
756 | +++ tests/functional/openlp_core_ui/test_maindisplay.py 2014-10-28 20:52:28 +0000 |
757 | @@ -97,7 +97,7 @@ |
758 | self.assertFalse(main_display.autoFillBackground(), |
759 | 'MainDisplay instance should be without background auto fill') |
760 | self.assertTrue(main_display.testAttribute(QtCore.Qt.WA_TranslucentBackground), |
761 | - 'MainDisplay hasnt translucent background') |
762 | + 'MainDisplay should have translucent background') |
763 | |
764 | # WHEN: We disable transparency |
765 | main_display.set_transparency(False) |
766 | @@ -106,4 +106,4 @@ |
767 | self.assertEqual('QGraphicsView {}', main_display.styleSheet(), |
768 | 'MainDisplay instance should not be transparent') |
769 | self.assertFalse(main_display.testAttribute(QtCore.Qt.WA_TranslucentBackground), |
770 | - 'MainDisplay hasnt translucent background') |
771 | + 'MainDisplay should have translucent background') |
This is a good functionality!