diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-03 21:10:30 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-04-04 16:44:16 +0200 |
commit | d93d359f35452a455385020712764f5472911331 (patch) | |
tree | b0e9ce8347119d4400228dc250a9800fe5e7e102 /kicker/applets | |
parent | 57a8101b06003c29d92e323cdcabaa2049cd542d (diff) | |
download | tdebase-d93d359f35452a455385020712764f5472911331.tar.gz tdebase-d93d359f35452a455385020712764f5472911331.zip |
Add option to enable the clock shadow in transparent mode
This closes Bug 387
(cherry picked from commit 48c5586497dc6a9d6caf84d48c164da49e060e06)
Diffstat (limited to 'kicker/applets')
-rw-r--r-- | kicker/applets/clock/clock.cpp | 14 | ||||
-rw-r--r-- | kicker/applets/clock/clockapplet.kcfg | 4 | ||||
-rw-r--r-- | kicker/applets/clock/settings.ui | 8 | ||||
-rw-r--r-- | kicker/applets/systemtray/systemtrayapplet.cpp | 1 |
4 files changed, 20 insertions, 7 deletions
diff --git a/kicker/applets/clock/clock.cpp b/kicker/applets/clock/clock.cpp index 8f941de5d..277db3239 100644 --- a/kicker/applets/clock/clock.cpp +++ b/kicker/applets/clock/clock.cpp @@ -276,8 +276,8 @@ void PlainClock::paintEvent(TQPaintEvent *) void PlainClock::drawContents(TQPainter *p) { TQRect tr(0, 0, width(), height()); - - if (!KickerSettings::transparent()) + + if (!KickerSettings::transparent() || !_prefs->transparentUseShadow()) p->drawText(tr, AlignCenter, _timeStr); else _applet->shadowEngine()->drawText(*p, tr, AlignCenter, _timeStr, size()); @@ -851,9 +851,9 @@ void FuzzyClock::drawContents(TQPainter *p) p->setFont(_prefs->fuzzyFont()); p->setPen(_prefs->fuzzyForegroundColor()); - + TQRect tr; - + if (_applet->getOrientation() == Qt::Vertical) { p->rotate(90); @@ -861,12 +861,12 @@ void FuzzyClock::drawContents(TQPainter *p) } else tr = TQRect(4, 2, width() - 8, height() - 4); - - if (!KickerSettings::transparent()) + + if (!KickerSettings::transparent() || !_prefs->transparentUseShadow()) p->drawText(tr, AlignCenter, _timeStr); else _applet->shadowEngine()->drawText(*p, tr, AlignCenter, _timeStr, size()); - + alreadyDrawing = false; } diff --git a/kicker/applets/clock/clockapplet.kcfg b/kicker/applets/clock/clockapplet.kcfg index 04beba322..0cc66a407 100644 --- a/kicker/applets/clock/clockapplet.kcfg +++ b/kicker/applets/clock/clockapplet.kcfg @@ -52,6 +52,10 @@ defFont.setPointSize(8); <label>Show frame.</label> <default>false</default> </entry> + <entry name="TransparentUseShadow" type="Bool" key="Use_Shadow"> + <label>Use shadow.</label> + <default>false</default> + </entry> <entry name="PlainFont" type="Font" key="Font"> <label>Font for the clock.</label> <code> diff --git a/kicker/applets/clock/settings.ui b/kicker/applets/clock/settings.ui index 560ddcc7f..0d9153dab 100644 --- a/kicker/applets/clock/settings.ui +++ b/kicker/applets/clock/settings.ui @@ -178,6 +178,14 @@ <string>&Frame</string> </property> </widget> + <widget class="TQCheckBox"> + <property name="name"> + <cstring>kcfg_TransparentUseShadow</cstring> + </property> + <property name="text"> + <string>&Shadow</string> + </property> + </widget> <spacer> <property name="name"> <cstring>spacer14</cstring> diff --git a/kicker/applets/systemtray/systemtrayapplet.cpp b/kicker/applets/systemtray/systemtrayapplet.cpp index 191657e75..02b558520 100644 --- a/kicker/applets/systemtray/systemtrayapplet.cpp +++ b/kicker/applets/systemtray/systemtrayapplet.cpp @@ -34,6 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqstyle.h> #include <tqgrid.h> #include <tqpainter.h> +#include <tqimage.h> #include <dcopclient.h> #include <kapplication.h> |