[Kst] kdeextragear-2/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Tue Aug 24 23:22:13 CEST 2004


CVS commit by netterfield: 

Some changes to the way that offset axis number mode works:
	move the offset to the left in the same line as the label
	+[0] instead of [0]

comments welcome.


  M +13 -11    kst2dplot.cpp   1.248


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.247:1.248
@@ -385,10 +385,10 @@ void Kst2DPlot::commonConstructor(const 
 
   XFullTickLabel = new KstLabel;
-  XFullTickLabel->setJustification(CxBy);
+  XFullTickLabel->setJustification(LxBy);
   XFullTickLabel->setRotation(0);
   XFullTickLabel->setDoScalarReplacement(false);
 
   YFullTickLabel = new KstLabel;
-  YFullTickLabel->setJustification(CxTy);
+  YFullTickLabel->setJustification(LxTy);
   YFullTickLabel->setRotation(270);
   YFullTickLabel->setDoScalarReplacement(false);
@@ -1091,5 +1091,5 @@ void Kst2DPlot::genAxisTickLabelDifferen
   } else {
     // Verify the output and then hardcode this - it's a wasted operation.
-    label = QString("[%1]").arg(0.0, 0, 'g', 0);
+    label = QString("+[%1]").arg(0.0, 0, 'g', 0);
   }
 }
@@ -1267,7 +1267,7 @@ void Kst2DPlot::setBorders(double& xleft
   }
   ybot_bdr_px += 1.3 * dMaxHeight;
-  if (bDelta) {
-    ybot_bdr_px += 1.3 * XTickLabel->lineSpacing(p);
-  }
+  // if (bDelta) {
+//     ybot_bdr_px += 1.3 * XTickLabel->lineSpacing(p);
+//   }
 
   //
@@ -1278,7 +1278,7 @@ void Kst2DPlot::setBorders(double& xleft
   xleft_bdr_px = dMaxWidth;
   xleft_bdr_px += 1.5 * YLabel->lineSpacing(p) + 5;
-  if (bDelta) {
-    xleft_bdr_px += 1.3 * YTickLabel->lineSpacing(p);
-  }
+//   if (bDelta) {
+//     xleft_bdr_px += 1.3 * YTickLabel->lineSpacing(p);
+//   }
 
   //
@@ -4698,5 +4698,6 @@ void Kst2DPlot::plotAxes(QPainter& p, QR
   if (bDeltaLabels && labelList.count() > 0) {
     XFullTickLabel->setText(labelList[0]);
-    XFullTickLabel->draw(p, x_px/2, y_px-XLabel->lineSpacing(p)-(XFullTickLabel->lineSpacing(p) - XFullTickLabel->ascent(p))/2);
+    XFullTickLabel->draw(p, d2i(xleft_bdr_px), y_px-(XLabel->lineSpacing(p) - XLabel->ascent(p))/2);
+    //XFullTickLabel->draw(p, x_px/2, y_px-XLabel->lineSpacing(p)-(XFullTickLabel->lineSpacing(p) - XFullTickLabel->ascent(p))/2);
     labelList.pop_front();
   }
@@ -4720,5 +4721,6 @@ void Kst2DPlot::plotAxes(QPainter& p, QR
   if (bDeltaLabels && labelList.count() > 0) {
     YFullTickLabel->setText(labelList[0]);
-    YFullTickLabel->draw(p, (YFullTickLabel->lineSpacing(p) - YFullTickLabel->ascent(p))/2 + YLabel->lineSpacing(p), y_px/2);
+    YFullTickLabel->draw(p, (YLabel->lineSpacing(p) - YLabel->ascent(p))/2, d2i(y_px - ybot_bdr_px));
+//    YFullTickLabel->draw(p, (YFullTickLabel->lineSpacing(p) - YFullTickLabel->ascent(p))/2 + YLabel->lineSpacing(p), y_px/2);
     labelList.pop_front();
   }





More information about the Kst mailing list