[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kdgantt
From: Dag Andersen <danders () get2net ! dk>
Date: 2005-03-15 13:41:00
Message-ID: 20050315134100.F297E16F45 () office ! kde ! org
[Download RAW message or body]
CVS commit by danders:
Remember zoomToFit view. It's tidious when the zoom chages just because you
resize the view.
This highlights a peculiar begaviour with scale=day and each column
contains more than 1 day, regarding weekend colors. See FIXME in the code.
M +15 -3 KDGanttViewSubwidgets.cpp 1.21
--- kdepim/kdgantt/KDGanttViewSubwidgets.cpp #1.20:1.21
@@ -788,4 +788,7 @@ void KDTimeHeaderWidget::preparePopupMe
myPopupMenu->setItemVisible ( 5, flagShowGrid);
myPopupMenu->setItemVisible ( 30, flagShowPrint );
+ if (flagZoomToFit)
+ myPopupMenu->changeItem( 1, i18n("Zoom (Fit)"));
+ else
myPopupMenu->changeItem( 1, i18n("Zoom (%1)").arg( QString::number( zoomFactor(), 'f',3) ) );
int i = 0;
@@ -1138,4 +1141,5 @@ void KDTimeHeaderWidget::moveTimeLineTo(
void KDTimeHeaderWidget::zoom(double factor, bool absolute)
{
+ flagZoomToFit = false;
if ( factor < 0.000001 ) {
qDebug("KDGanttView::zoom() : Zoom factor to low. Nothing zoomed. ");
@@ -1585,4 +1589,12 @@ QDateTime KDTimeHeaderWidget::getDateTim
return (myRealStart.addDays ( (int) days )).addSecs( (int) secs);
}
+
+//FIXME: This doesn't work quite intuitively (imho) when scale is day
+// and each column containes more than 1 day:
+// 1) If a column includes a weekend day, the whole column gets weekend color,
+// 2) If a column includes 7 days, either *all* columns get weekend color, or
+// *none* get weekend color (haven't figured out why)
+// Proposal: Only use weekend color if the whole column is a weekend.
+// Alt: Color the area that actually is the weekend.
bool KDTimeHeaderWidget::getColumnColor(QColor& col,int coordLow, int coordHigh)
{
@@ -2170,5 +2182,5 @@ void KDTimeHeaderWidget::computeTicks(bo
break;
}
- flagZoomToFit = false;
+ //flagZoomToFit = false;
while((minorItems/tempMinorScaleCount+1)*Width < myMinimumWidth ) {
++minorItems;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic