[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/pager
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2009-06-08 15:00:28
Message-ID: 1244473228.248516.14724.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 978926 by aseigo:
constrain m_rows only when calculating the geometry; this prevents the situation \
where the pager gets started before the window manager sets up virtual desktops and \
therefore we get 1 for the number of desktops causing the row count to be altered \
prematurely
M +3 -9 pager.cpp
--- trunk/KDE/kdebase/workspace/plasma/applets/pager/pager.cpp #978925:978926
@@ -99,8 +99,6 @@
if (m_rows < 1) {
m_rows = 1;
- } else if (m_rows > m_desktopCount) {
- m_rows = m_desktopCount;
}
m_timer = new QTimer(this);
@@ -254,13 +252,13 @@
int padding = 2; // Space between miniatures of desktops
int textMargin = 3; // Space between name of desktop and border
- int columns = m_desktopCount / m_rows + m_desktopCount % m_rows;
- int rows = m_rows;
+ int rows = qMax(qMin(m_rows, m_desktopCount), 1);
+ int columns = m_desktopCount / rows + m_desktopCount % rows;
//inverse rows and columns in vertical panel
if (formFactor() == Plasma::Vertical) {
rows = columns;
- columns = m_rows;
+ columns = rows;
}
qreal leftMargin = 0;
@@ -559,10 +557,6 @@
m_dirtyDesktop = -1;
m_desktopCount = num;
- if (m_rows > m_desktopCount) {
- m_rows = m_desktopCount;
- }
-
m_rects.clear();
recalculateGeometry();
recalculateWindowRects();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic