[Kst] kdeextragear-2/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Wed Aug 25 01:46:21 CEST 2004
Hm, it seems that the offset sometimes overlaps the y axis label (if the
plot is short in height, which is common with 3 plots in a window), or x
axis label.
Barth Netterfield wrote:
>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();
> }
>
>
>_______________________________________________
>Kst mailing list
>Kst at kde.org
>https://mail.kde.org/mailman/listinfo/kst
>
>
>
More information about the Kst
mailing list