From kde-commits Tue Feb 17 21:17:07 2009 From: Robin Pedersen Date: Tue, 17 Feb 2009 21:17:07 +0000 To: kde-commits Subject: KDE/kdebase/workspace/plasma/applets/pager Message-Id: <1234905427.039184.27416.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=123490546430415 SVN commit 927574 by rpedersen: Handle margins correctly both when pager is on desktop and in panel Using Plasma::Desktop did not work, now using Plasma::Floating instead which seems to work for me. CCBUG: 180440 CCBUG: 182487 M +2 -2 pager.cpp --- trunk/KDE/kdebase/workspace/plasma/applets/pager/pager.cpp #927573:927574 @@ -275,7 +275,7 @@ qreal itemWidth; if (formFactor() == Plasma::Vertical) { - if (location() == Plasma::Desktop) + if (location() == Plasma::Floating) itemWidth = (contentsRect().width() - padding * (columns - 1)) / columns; else itemWidth = (contentsRect().width() - leftMargin - rightMargin - padding * (columns - 1)) / columns; @@ -283,7 +283,7 @@ itemHeight = Kephal::ScreenUtils::desktopGeometry().height() * m_widthScaleFactor; m_heightScaleFactor = m_widthScaleFactor; } else { - if (location() == Plasma::Desktop) + if (location() == Plasma::Floating) itemHeight = (contentsRect().height() - padding * (rows - 1)) / rows; else itemHeight = (contentsRect().height() - topMargin - bottomMargin - padding * (rows - 1)) / rows;