[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeplasmoids/applets/binary-clock
From: Alex Merry <huntedhacker () tiscali ! co ! uk>
Date: 2008-07-05 11:59:04
Message-ID: 1215259144.326253.5920.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 828322 by alexmerry:
Don't shrink every time the configuration is changed.
Stupid borders.
M +7 -3 binaryclock.cpp
--- trunk/KDE/kdeplasmoids/applets/binary-clock/binaryclock.cpp #828321:828322
@@ -77,12 +77,16 @@
void BinaryClock::constraintsEvent(Plasma::Constraints constraints)
{
if (constraints & Plasma::FormFactorConstraint) {
+ qreal top, bottom, left, right;
+ getContentsMargins(&left, &top, &right, &bottom);
+ qreal borderHeight = top + bottom;
+ qreal borderWidth = left + right;
if (formFactor() == Plasma::Vertical) {
- setMaximumHeight(getHeightFromWidth(contentsRect().width()));
+ setMaximumHeight(getHeightFromWidth(contentsRect().width()) + \
borderHeight); } else if (formFactor() == Plasma::Horizontal) {
- setMaximumWidth(getWidthFromHeight(contentsRect().height()));
+ setMaximumWidth(getWidthFromHeight(contentsRect().height()) + \
borderWidth); } else {
- resize(getWidthFromHeight(contentsRect().height()), \
contentsRect().height()); + \
resize(getWidthFromHeight(contentsRect().height()) + borderWidth, \
contentsRect().height() + borderHeight); }
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic