Add option to enable the clock shadow in transparent mode

This closes Bug 387
pull/2/head
Timothy Pearson 11 years ago
parent 86cc65ce51
commit 48c5586497

@ -277,7 +277,7 @@ void PlainClock::drawContents(TQPainter *p)
{ {
TQRect tr(0, 0, width(), height()); TQRect tr(0, 0, width(), height());
if (!KickerSettings::transparent()) if (!KickerSettings::transparent() || !_prefs->transparentUseShadow())
p->drawText(tr, AlignCenter, _timeStr); p->drawText(tr, AlignCenter, _timeStr);
else else
_applet->shadowEngine()->drawText(*p, tr, AlignCenter, _timeStr, size()); _applet->shadowEngine()->drawText(*p, tr, AlignCenter, _timeStr, size());
@ -862,7 +862,7 @@ void FuzzyClock::drawContents(TQPainter *p)
else else
tr = TQRect(4, 2, width() - 8, height() - 4); tr = TQRect(4, 2, width() - 8, height() - 4);
if (!KickerSettings::transparent()) if (!KickerSettings::transparent() || !_prefs->transparentUseShadow())
p->drawText(tr, AlignCenter, _timeStr); p->drawText(tr, AlignCenter, _timeStr);
else else
_applet->shadowEngine()->drawText(*p, tr, AlignCenter, _timeStr, size()); _applet->shadowEngine()->drawText(*p, tr, AlignCenter, _timeStr, size());

@ -52,6 +52,10 @@ defFont.setPointSize(8);
<label>Show frame.</label> <label>Show frame.</label>
<default>false</default> <default>false</default>
</entry> </entry>
<entry name="TransparentUseShadow" type="Bool" key="Use_Shadow">
<label>Use shadow.</label>
<default>false</default>
</entry>
<entry name="PlainFont" type="Font" key="Font"> <entry name="PlainFont" type="Font" key="Font">
<label>Font for the clock.</label> <label>Font for the clock.</label>
<code> <code>

@ -178,6 +178,14 @@
<string>&amp;Frame</string> <string>&amp;Frame</string>
</property> </property>
</widget> </widget>
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_TransparentUseShadow</cstring>
</property>
<property name="text">
<string>&amp;Shadow</string>
</property>
</widget>
<spacer> <spacer>
<property name="name"> <property name="name">
<cstring>spacer14</cstring> <cstring>spacer14</cstring>

@ -34,6 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <tqstyle.h> #include <tqstyle.h>
#include <tqgrid.h> #include <tqgrid.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <tqimage.h>
#include <dcopclient.h> #include <dcopclient.h>
#include <tdeapplication.h> #include <tdeapplication.h>

Loading…
Cancel
Save