summaryrefslogtreecommitdiff
authorpaule <paule>2007-01-13 07:42:23 (UTC)
committer paule <paule>2007-01-13 07:42:23 (UTC)
commita1360b0af73518d97ebe63ad3cd156cd8b57c8b5 (patch) (unidiff)
tree2630d54134a775f48254624273a8b381e77e39c0
parentb1075202780c1d807c9d9f5286a2ffa7714bae51 (diff)
downloadopie-a1360b0af73518d97ebe63ad3cd156cd8b57c8b5.zip
opie-a1360b0af73518d97ebe63ad3cd156cd8b57c8b5.tar.gz
opie-a1360b0af73518d97ebe63ad3cd156cd8b57c8b5.tar.bz2
* Increase font size (fixes bug #1597)
* Improve usability of snooze function (fixes bug #1598) * Fix stretched icon (fixes bug #1616)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/clock/alarmdlgbase.ui490
-rw-r--r--noncore/tools/clock/clock.cpp19
-rw-r--r--noncore/tools/clock/clock.h1
3 files changed, 494 insertions, 16 deletions
diff --git a/noncore/tools/clock/alarmdlgbase.ui b/noncore/tools/clock/alarmdlgbase.ui
index 63759f3..944f532 100644
--- a/noncore/tools/clock/alarmdlgbase.ui
+++ b/noncore/tools/clock/alarmdlgbase.ui
@@ -11,8 +11,8 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>124</width> 14 <width>199</width>
15 <height>92</height> 15 <height>243</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
@@ -25,7 +25,7 @@
25 <vbox> 25 <vbox>
26 <property stdset="1"> 26 <property stdset="1">
27 <name>margin</name> 27 <name>margin</name>
28 <number>6</number> 28 <number>11</number>
29 </property> 29 </property>
30 <property stdset="1"> 30 <property stdset="1">
31 <name>spacing</name> 31 <name>spacing</name>
@@ -54,7 +54,7 @@
54 </property> 54 </property>
55 <property stdset="1"> 55 <property stdset="1">
56 <name>scaledContents</name> 56 <name>scaledContents</name>
57 <bool>true</bool> 57 <bool>false</bool>
58 </property> 58 </property>
59 </widget> 59 </widget>
60 <spacer> 60 <spacer>
@@ -88,6 +88,10 @@
88 <name>text</name> 88 <name>text</name>
89 <string>TextLabel1</string> 89 <string>TextLabel1</string>
90 </property> 90 </property>
91 <property stdset="1">
92 <name>scaledContents</name>
93 <bool>false</bool>
94 </property>
91 </widget> 95 </widget>
92 </hbox> 96 </hbox>
93 </widget> 97 </widget>
@@ -124,6 +128,10 @@
124 <cstring>snoozeTime</cstring> 128 <cstring>snoozeTime</cstring>
125 </property> 129 </property>
126 <property stdset="1"> 130 <property stdset="1">
131 <name>caption</name>
132 <string></string>
133 </property>
134 <property stdset="1">
127 <name>suffix</name> 135 <name>suffix</name>
128 <string> mins</string> 136 <string> mins</string>
129 </property> 137 </property>
@@ -135,6 +143,13 @@
135 <name>lineStep</name> 143 <name>lineStep</name>
136 <number>5</number> 144 <number>5</number>
137 </property> 145 </property>
146 <property stdset="1">
147 <name>value</name>
148 <number>5</number>
149 </property>
150 <property>
151 <name>layoutMargin</name>
152 </property>
138 </widget> 153 </widget>
139 </hbox> 154 </hbox>
140 </widget> 155 </widget>
@@ -142,9 +157,476 @@
142 <class>QPushButton</class> 157 <class>QPushButton</class>
143 <property stdset="1"> 158 <property stdset="1">
144 <name>name</name> 159 <name>name</name>
160 <cstring>cmdSnooze</cstring>
161 </property>
162 <property stdset="1">
163 <name>minimumSize</name>
164 <size>
165 <width>0</width>
166 <height>100</height>
167 </size>
168 </property>
169 <property stdset="1">
170 <name>palette</name>
171 <palette>
172 <active>
173 <color>
174 <red>0</red>
175 <green>0</green>
176 <blue>0</blue>
177 </color>
178 <color>
179 <red>255</red>
180 <green>128</green>
181 <blue>128</blue>
182 </color>
183 <color>
184 <red>255</red>
185 <green>255</green>
186 <blue>255</blue>
187 </color>
188 <color>
189 <red>255</red>
190 <green>191</green>
191 <blue>191</blue>
192 </color>
193 <color>
194 <red>127</red>
195 <green>64</green>
196 <blue>64</blue>
197 </color>
198 <color>
199 <red>170</red>
200 <green>85</green>
201 <blue>85</blue>
202 </color>
203 <color>
204 <red>0</red>
205 <green>0</green>
206 <blue>0</blue>
207 </color>
208 <color>
209 <red>255</red>
210 <green>255</green>
211 <blue>255</blue>
212 </color>
213 <color>
214 <red>0</red>
215 <green>0</green>
216 <blue>0</blue>
217 </color>
218 <color>
219 <red>255</red>
220 <green>255</green>
221 <blue>255</blue>
222 </color>
223 <color>
224 <red>238</red>
225 <green>238</green>
226 <blue>230</blue>
227 </color>
228 <color>
229 <red>0</red>
230 <green>0</green>
231 <blue>0</blue>
232 </color>
233 <color>
234 <red>255</red>
235 <green>221</green>
236 <blue>118</blue>
237 </color>
238 <color>
239 <red>0</red>
240 <green>0</green>
241 <blue>0</blue>
242 </color>
243 </active>
244 <disabled>
245 <color>
246 <red>128</red>
247 <green>128</green>
248 <blue>128</blue>
249 </color>
250 <color>
251 <red>255</red>
252 <green>128</green>
253 <blue>128</blue>
254 </color>
255 <color>
256 <red>255</red>
257 <green>255</green>
258 <blue>255</blue>
259 </color>
260 <color>
261 <red>255</red>
262 <green>166</green>
263 <blue>166</blue>
264 </color>
265 <color>
266 <red>127</red>
267 <green>64</green>
268 <blue>64</blue>
269 </color>
270 <color>
271 <red>170</red>
272 <green>85</green>
273 <blue>85</blue>
274 </color>
275 <color>
276 <red>0</red>
277 <green>0</green>
278 <blue>0</blue>
279 </color>
280 <color>
281 <red>255</red>
282 <green>255</green>
283 <blue>255</blue>
284 </color>
285 <color>
286 <red>128</red>
287 <green>128</green>
288 <blue>128</blue>
289 </color>
290 <color>
291 <red>255</red>
292 <green>255</green>
293 <blue>255</blue>
294 </color>
295 <color>
296 <red>238</red>
297 <green>238</green>
298 <blue>230</blue>
299 </color>
300 <color>
301 <red>0</red>
302 <green>0</green>
303 <blue>0</blue>
304 </color>
305 <color>
306 <red>255</red>
307 <green>221</green>
308 <blue>118</blue>
309 </color>
310 <color>
311 <red>0</red>
312 <green>0</green>
313 <blue>0</blue>
314 </color>
315 </disabled>
316 <inactive>
317 <color>
318 <red>0</red>
319 <green>0</green>
320 <blue>0</blue>
321 </color>
322 <color>
323 <red>255</red>
324 <green>128</green>
325 <blue>128</blue>
326 </color>
327 <color>
328 <red>255</red>
329 <green>255</green>
330 <blue>255</blue>
331 </color>
332 <color>
333 <red>255</red>
334 <green>166</green>
335 <blue>166</blue>
336 </color>
337 <color>
338 <red>127</red>
339 <green>64</green>
340 <blue>64</blue>
341 </color>
342 <color>
343 <red>170</red>
344 <green>85</green>
345 <blue>85</blue>
346 </color>
347 <color>
348 <red>0</red>
349 <green>0</green>
350 <blue>0</blue>
351 </color>
352 <color>
353 <red>255</red>
354 <green>255</green>
355 <blue>255</blue>
356 </color>
357 <color>
358 <red>0</red>
359 <green>0</green>
360 <blue>0</blue>
361 </color>
362 <color>
363 <red>255</red>
364 <green>255</green>
365 <blue>255</blue>
366 </color>
367 <color>
368 <red>238</red>
369 <green>238</green>
370 <blue>230</blue>
371 </color>
372 <color>
373 <red>0</red>
374 <green>0</green>
375 <blue>0</blue>
376 </color>
377 <color>
378 <red>255</red>
379 <green>221</green>
380 <blue>118</blue>
381 </color>
382 <color>
383 <red>0</red>
384 <green>0</green>
385 <blue>0</blue>
386 </color>
387 </inactive>
388 </palette>
389 </property>
390 <property stdset="1">
391 <name>text</name>
392 <string>Snooze</string>
393 </property>
394 </widget>
395 <widget>
396 <class>QPushButton</class>
397 <property stdset="1">
398 <name>name</name>
145 <cstring>cmdOk</cstring> 399 <cstring>cmdOk</cstring>
146 </property> 400 </property>
147 <property stdset="1"> 401 <property stdset="1">
402 <name>minimumSize</name>
403 <size>
404 <width>0</width>
405 <height>32</height>
406 </size>
407 </property>
408 <property stdset="1">
409 <name>palette</name>
410 <palette>
411 <active>
412 <color>
413 <red>0</red>
414 <green>0</green>
415 <blue>0</blue>
416 </color>
417 <color>
418 <red>192</red>
419 <green>255</green>
420 <blue>192</blue>
421 </color>
422 <color>
423 <red>255</red>
424 <green>255</green>
425 <blue>255</blue>
426 </color>
427 <color>
428 <red>223</red>
429 <green>255</green>
430 <blue>223</blue>
431 </color>
432 <color>
433 <red>96</red>
434 <green>127</green>
435 <blue>96</blue>
436 </color>
437 <color>
438 <red>128</red>
439 <green>170</green>
440 <blue>128</blue>
441 </color>
442 <color>
443 <red>0</red>
444 <green>0</green>
445 <blue>0</blue>
446 </color>
447 <color>
448 <red>255</red>
449 <green>255</green>
450 <blue>255</blue>
451 </color>
452 <color>
453 <red>0</red>
454 <green>0</green>
455 <blue>0</blue>
456 </color>
457 <color>
458 <red>255</red>
459 <green>255</green>
460 <blue>255</blue>
461 </color>
462 <color>
463 <red>238</red>
464 <green>238</green>
465 <blue>230</blue>
466 </color>
467 <color>
468 <red>0</red>
469 <green>0</green>
470 <blue>0</blue>
471 </color>
472 <color>
473 <red>255</red>
474 <green>221</green>
475 <blue>118</blue>
476 </color>
477 <color>
478 <red>0</red>
479 <green>0</green>
480 <blue>0</blue>
481 </color>
482 </active>
483 <disabled>
484 <color>
485 <red>128</red>
486 <green>128</green>
487 <blue>128</blue>
488 </color>
489 <color>
490 <red>192</red>
491 <green>255</green>
492 <blue>192</blue>
493 </color>
494 <color>
495 <red>255</red>
496 <green>255</green>
497 <blue>255</blue>
498 </color>
499 <color>
500 <red>230</red>
501 <green>255</green>
502 <blue>230</blue>
503 </color>
504 <color>
505 <red>96</red>
506 <green>127</green>
507 <blue>96</blue>
508 </color>
509 <color>
510 <red>128</red>
511 <green>170</green>
512 <blue>128</blue>
513 </color>
514 <color>
515 <red>0</red>
516 <green>0</green>
517 <blue>0</blue>
518 </color>
519 <color>
520 <red>255</red>
521 <green>255</green>
522 <blue>255</blue>
523 </color>
524 <color>
525 <red>128</red>
526 <green>128</green>
527 <blue>128</blue>
528 </color>
529 <color>
530 <red>255</red>
531 <green>255</green>
532 <blue>255</blue>
533 </color>
534 <color>
535 <red>238</red>
536 <green>238</green>
537 <blue>230</blue>
538 </color>
539 <color>
540 <red>0</red>
541 <green>0</green>
542 <blue>0</blue>
543 </color>
544 <color>
545 <red>255</red>
546 <green>221</green>
547 <blue>118</blue>
548 </color>
549 <color>
550 <red>0</red>
551 <green>0</green>
552 <blue>0</blue>
553 </color>
554 </disabled>
555 <inactive>
556 <color>
557 <red>0</red>
558 <green>0</green>
559 <blue>0</blue>
560 </color>
561 <color>
562 <red>192</red>
563 <green>255</green>
564 <blue>192</blue>
565 </color>
566 <color>
567 <red>255</red>
568 <green>255</green>
569 <blue>255</blue>
570 </color>
571 <color>
572 <red>230</red>
573 <green>255</green>
574 <blue>230</blue>
575 </color>
576 <color>
577 <red>96</red>
578 <green>127</green>
579 <blue>96</blue>
580 </color>
581 <color>
582 <red>128</red>
583 <green>170</green>
584 <blue>128</blue>
585 </color>
586 <color>
587 <red>0</red>
588 <green>0</green>
589 <blue>0</blue>
590 </color>
591 <color>
592 <red>255</red>
593 <green>255</green>
594 <blue>255</blue>
595 </color>
596 <color>
597 <red>0</red>
598 <green>0</green>
599 <blue>0</blue>
600 </color>
601 <color>
602 <red>255</red>
603 <green>255</green>
604 <blue>255</blue>
605 </color>
606 <color>
607 <red>238</red>
608 <green>238</green>
609 <blue>230</blue>
610 </color>
611 <color>
612 <red>0</red>
613 <green>0</green>
614 <blue>0</blue>
615 </color>
616 <color>
617 <red>255</red>
618 <green>221</green>
619 <blue>118</blue>
620 </color>
621 <color>
622 <red>0</red>
623 <green>0</green>
624 <blue>0</blue>
625 </color>
626 </inactive>
627 </palette>
628 </property>
629 <property stdset="1">
148 <name>text</name> 630 <name>text</name>
149 <string>Close</string> 631 <string>Close</string>
150 </property> 632 </property>
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp
index 9b324e0..325a307 100644
--- a/noncore/tools/clock/clock.cpp
+++ b/noncore/tools/clock/clock.cpp
@@ -102,15 +102,20 @@ AlarmDlg::AlarmDlg(QWidget *parent, const char *name, bool modal,
102 const QString &txt) : 102 const QString &txt) :
103 AlarmDlgBase(parent, name, modal) 103 AlarmDlgBase(parent, name, modal)
104{ 104{
105 // Increase font size to make it a little more readable
106 QFont f(font());
107 f.setPointSize((int)(f.pointSize() * 1.7));
108 setFont(f);
109
105 setCaption( tr("Clock") ); 110 setCaption( tr("Clock") );
106 pixmap->setPixmap( Opie::Core::OResource::loadPixmap("clock/alarmbell") ); 111 pixmap->setPixmap( Opie::Core::OResource::loadPixmap("clock/alarmbell") );
107 alarmDlgLabel->setText(txt); 112 alarmDlgLabel->setText(txt);
108 113
109 connect(snoozeTime, SIGNAL(valueChanged(int)), this, 114 connect(cmdSnooze, SIGNAL(clicked()), this, SLOT(checkSnooze()));
110 SLOT(changePrompt(int))); 115 connect(cmdOk, SIGNAL(clicked()), this, SLOT(accept()));
111 connect(cmdOk, SIGNAL(clicked()), this, SLOT(checkSnooze()));
112} 116}
113 117
118
114// 119//
115// 120//
116// 121//
@@ -144,14 +149,6 @@ AlarmDlg::checkSnooze(void)
144 149
145 150
146 151
147void
148AlarmDlg::changePrompt(int mins)
149{
150 cmdOk->setText(mins > 0 ? tr("Snooze") : tr("Close") );
151}
152
153
154
155Clock::Clock( QWidget * parent, const char *, WFlags f ) 152Clock::Clock( QWidget * parent, const char *, WFlags f )
156 : ClockBase( parent, "clock", f ), swatch_splitms(99), init(FALSE) // No tr 153 : ClockBase( parent, "clock", f ), swatch_splitms(99), init(FALSE) // No tr
157{ 154{
diff --git a/noncore/tools/clock/clock.h b/noncore/tools/clock/clock.h
index c063a9b..10bbfef 100644
--- a/noncore/tools/clock/clock.h
+++ b/noncore/tools/clock/clock.h
@@ -44,7 +44,6 @@ public:
44 44
45private slots: 45private slots:
46 void checkSnooze(void); 46 void checkSnooze(void);
47 void changePrompt(int minutes);
48}; 47};
49 48
50class Clock : public ClockBase 49class Clock : public ClockBase