summaryrefslogtreecommitdiffstats
path: root/kicker
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2016-09-22 23:19:30 +0900
committerMichele Calgaro <[email protected]>2016-09-22 23:19:30 +0900
commitd5feffdec9e2380f9dd590607a71669dd772e319 (patch)
tree34cee1a99eac49c6755b9c0ebfcf7adf6ea3439b /kicker
parentdb52a594cc6c84faea6fba1cad6049e3caf2c6e7 (diff)
downloadtdebase-d5feffdec9e2380f9dd590607a71669dd772e319.tar.gz
tdebase-d5feffdec9e2380f9dd590607a71669dd772e319.zip
Fixed display of clock in systray. This resolves bug 2679.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kicker')
-rw-r--r--kicker/applets/systemtray/systemtrayapplet.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/kicker/applets/systemtray/systemtrayapplet.cpp b/kicker/applets/systemtray/systemtrayapplet.cpp
index 41d5af10b..59e212611 100644
--- a/kicker/applets/systemtray/systemtrayapplet.cpp
+++ b/kicker/applets/systemtray/systemtrayapplet.cpp
@@ -100,6 +100,7 @@ SystemTrayApplet::SystemTrayApplet(const TQString& configFile, Type type, int ac
m_clockApplet = new ClockApplet(configFile, KPanelApplet::Normal, KPanelApplet::Preferences, this, "clockapplet");
updateClockGeometry();
connect(m_clockApplet, TQT_SIGNAL(clockReconfigured()), this, TQT_SLOT(updateClockGeometry()));
+ connect(m_clockApplet, TQT_SIGNAL(updateLayout()), this, TQT_SLOT(updateClockGeometry()));
setBackgroundOrigin(AncestorOrigin);
@@ -116,7 +117,17 @@ SystemTrayApplet::SystemTrayApplet(const TQString& configFile, Type type, int ac
void SystemTrayApplet::updateClockGeometry()
{
if (m_clockApplet)
- m_clockApplet->setFixedSize(m_clockApplet->widthForHeight(height()-2),height()-2);
+ {
+ m_clockApplet->setPosition(position());
+ if (orientation() == Qt::Horizontal)
+ {
+ m_clockApplet->setFixedSize(m_clockApplet->widthForHeight(height()),height());
+ }
+ else
+ {
+ m_clockApplet->setFixedSize(width(),m_clockApplet->heightForWidth(width()));
+ }
+ }
}
void SystemTrayApplet::initialize()