[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/plasma-desktoplayout/kdeplasma-addons-applets
From: Ambroz Bizjak <ambro () b4ever ! net>
Date: 2008-12-21 2:02:32
Message-ID: 1229824952.025537.18921.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 899526 by abizjak:
make applets emit appletTransformedItself when they resize
M +1 -0 binary-clock/binaryclock.cpp
M +1 -0 charselect/charselect.cpp
M +1 -0 comic/comic.cpp
M +1 -0 frame/frame.cpp
M +5 -0 fuzzy-clock/fuzzyClock.cpp
M +1 -0 twitter/twitter.cpp
--- branches/work/plasma-desktoplayout/kdeplasma-addons-applets/binary-clock/binaryclock.cpp \
#899525:899526 @@ -97,6 +97,7 @@
} else {
resize(getWidthFromHeight((int) contentsRect().height()) + borderWidth, \
contentsRect().height() + borderHeight); + emit appletTransformedItself();
}
}
}
--- branches/work/plasma-desktoplayout/kdeplasma-addons-applets/charselect/charselect.cpp \
#899525:899526 @@ -46,6 +46,7 @@
if (size().width() < widget()->size().width() ||
size().height() < widget()->size().height()) {
resize(widget()->size());
+ emit appletTransformedItself();
}
}
}
--- branches/work/plasma-desktoplayout/kdeplasma-addons-applets/comic/comic.cpp \
#899525:899526 @@ -500,6 +500,7 @@
}
resize( mLastSize );
+ emit appletTransformedItself();
}
}
--- branches/work/plasma-desktoplayout/kdeplasma-addons-applets/frame/frame.cpp \
#899525:899526 @@ -85,6 +85,7 @@
QSizeF sizeHint = contentSizeHint();
if (geometry().size() != sizeHint) {
resize(sizeHint);
+ emit appletTransformedItself();
} else {
update();
}
--- branches/work/plasma-desktoplayout/kdeplasma-addons-applets/fuzzy-clock/fuzzyClock.cpp \
#899525:899526 @@ -524,6 +524,7 @@
} else {
//add margins
resize ( m_contentSize + QSizeF(size()-contentsRect().size()) );
+ emit appletTransformedItself();
}
} else { //in a panel or timestring wider than plasmoid -> change size to the \
minimal needed space, i.e. the timestring will not increase in point-size OR plasmoid \
in Panel. @@ -635,20 +636,24 @@
if( m_timeStringSize.width() + m_margin*2 < geometry().size().width() && \
formFactor() != Plasma::Vertical ) {
kDebug() << "The width we got was too big, we need less, so lets \
resize.";
resize ( m_minimumContentSize + (size() - contentsRect().size()) );
+ emit appletTransformedItself();
}
if ( formFactor() == Plasma::Horizontal ) { //if we are on the panel we are \
forced to accept the given height. kDebug() << "needed height: " << \
m_minimumContentSize.height() << "[horizontal panel] fixed height forced on us: " << \
geometry().size().height() << " adding margin-left/-right of: " << m_margin << "width \
is going to be set resize( " << m_minimumContentSize.width() << "," << \
geometry().size().height() << ")";
resize ( QSizeF ( m_minimumContentSize.width(),geometry().size().height() ) \
); + emit appletTransformedItself();
} else if ( formFactor() == Plasma::Vertical ) {
kDebug() << "needed width: " << m_minimumContentSize.width() << "[vertical \
panel] fixed width forced on us: " << geometry().size().width() << " adding margin \
left/right of: " << m_margin;
resize ( QSizeF ( geometry().size().width(),m_minimumContentSize.height() ) \
); + emit appletTransformedItself();
}else { //FIXME: In case this height does not fit the content -> disable \
timezone (and date)
//we use the minimal height here, since the user has given us too much \
height we cannot use for anything useful. minimal width because we are in a panel. \
kDebug() << "we set the minimum size needed as the size we want";
resize ( QSizeF ( m_minimumContentSize.width() + \
m_margin*2,m_minimumContentSize.height() ) + (size() - contentsRect().size()) ); + \
emit appletTransformedItself(); }
}
}
--- branches/work/plasma-desktoplayout/kdeplasma-addons-applets/twitter/twitter.cpp \
#899525:899526 @@ -541,6 +541,7 @@
setMinimumSize(m_layout->sizeHint(Qt::MinimumSize) + QSizeF(left+right, \
top+bottom));
setPreferredSize(m_layout->sizeHint(Qt::PreferredSize) + QSizeF(left+right, \
top+bottom)); resize(preferredSize());
+ emit appletTransformedItself();
} else {
paintIcon();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic