|
Lines 277-286
Link Here
|
| 277 |
{ |
277 |
{ |
| 278 |
TQRect tr(0, 0, width(), height()); |
278 |
TQRect tr(0, 0, width(), height()); |
| 279 |
|
279 |
|
| 280 |
if (!KickerSettings::transparent()) |
280 |
p->drawText(tr, AlignCenter, _timeStr); |
| 281 |
p->drawText(tr, AlignCenter, _timeStr); |
|
|
| 282 |
else |
| 283 |
_applet->shadowEngine()->drawText(*p, tr, AlignCenter, _timeStr, size()); |
| 284 |
} |
281 |
} |
| 285 |
|
282 |
|
| 286 |
//************************************************************ |
283 |
//************************************************************ |
|
Lines 862-871
Link Here
|
| 862 |
else |
859 |
else |
| 863 |
tr = TQRect(4, 2, width() - 8, height() - 4); |
860 |
tr = TQRect(4, 2, width() - 8, height() - 4); |
| 864 |
|
861 |
|
| 865 |
if (!KickerSettings::transparent()) |
862 |
p->drawText(tr, AlignCenter, _timeStr); |
| 866 |
p->drawText(tr, AlignCenter, _timeStr); |
|
|
| 867 |
else |
| 868 |
_applet->shadowEngine()->drawText(*p, tr, AlignCenter, _timeStr, size()); |
| 869 |
|
863 |
|
| 870 |
alreadyDrawing = false; |
864 |
alreadyDrawing = false; |
| 871 |
} |
865 |
} |
|
Lines 899-906
Link Here
|
| 899 |
_prefs(new Prefs(sharedConfig())), |
893 |
_prefs(new Prefs(sharedConfig())), |
| 900 |
zone(new Zone(config())), |
894 |
zone(new Zone(config())), |
| 901 |
menu(0), |
895 |
menu(0), |
| 902 |
m_tooltip(this), |
896 |
m_tooltip(this) |
| 903 |
m_shadowEngine(0) |
|
|
| 904 |
{ |
897 |
{ |
| 905 |
DCOPObject::setObjId("ClockApplet"); |
898 |
DCOPObject::setObjId("ClockApplet"); |
| 906 |
_prefs->readConfig(); |
899 |
_prefs->readConfig(); |
|
Lines 938-944
Link Here
|
| 938 |
|
931 |
|
| 939 |
ClockApplet::~ClockApplet() |
932 |
ClockApplet::~ClockApplet() |
| 940 |
{ |
933 |
{ |
| 941 |
delete m_shadowEngine; |
|
|
| 942 |
//reverse for the moment |
934 |
//reverse for the moment |
| 943 |
KGlobal::locale()->removeCatalogue("clockapplet"); |
935 |
KGlobal::locale()->removeCatalogue("clockapplet"); |
| 944 |
KGlobal::locale()->removeCatalogue("timezones"); // For time zone translations |
936 |
KGlobal::locale()->removeCatalogue("timezones"); // For time zone translations |
|
Lines 959-973
Link Here
|
| 959 |
} |
951 |
} |
| 960 |
|
952 |
|
| 961 |
|
953 |
|
| 962 |
KTextShadowEngine *ClockApplet::shadowEngine() |
|
|
| 963 |
{ |
| 964 |
if (!m_shadowEngine) |
| 965 |
m_shadowEngine = new KTextShadowEngine(); |
| 966 |
|
954 |
|
| 967 |
return m_shadowEngine; |
|
|
| 968 |
} |
| 969 |
|
| 970 |
|
| 971 |
int ClockApplet::widthForHeight(int h) const |
955 |
int ClockApplet::widthForHeight(int h) const |
| 972 |
{ |
956 |
{ |
| 973 |
if (orientation() == Qt::Vertical) |
957 |
if (orientation() == Qt::Vertical) |
| 974 |
|
958 |
|