[Kst] branches/work/kst/portto4/kst
Barth Netterfield
netterfield at astro.utoronto.ca
Wed Jan 6 00:13:20 CET 2010
SVN commit 1070542 by netterfield:
Fix plot scaling when maximizing a plot ('z mode').
M +6 -0 devel-docs/Kst2Specs/FixedBugs
M +0 -6 devel-docs/Kst2Specs/Wishlist
M +7 -0 src/libkstapp/plotitem.cpp
M +3 -2 src/libkstapp/view.cpp
M +3 -0 src/libkstapp/view.h
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/FixedBugs #1070541:1070542
@@ -1157,3 +1157,9 @@
When you plot 48 plots on one screen, the default text size for the
plots is way too small to be readable.
+--------------------
+
+In zoom plot mode (hit 'z' when mouseover a plot) the text does not
+increase size as the plot expands. This doesn't look proportioned
+correctly.
+
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/Wishlist #1070541:1070542
@@ -74,12 +74,6 @@
--------------------
-In zoom plot mode (hit 'z' when mouseover a plot) the text does not
-increase size as the plot expands. This doesn't look proportioned
-correctly.
-
---------------------
-
When looking at dirfile data, if the symlink changes, kst doesn't notice
and one has to hit reload to get it to update. This is annoying at
best.
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #1070541:1070542
@@ -2694,6 +2694,7 @@
setPos(_plotMaximizedSourcePosition);
setViewRect(_plotMaximizedSourceRect);
setZValue(_plotMaximizedSourceZValue);
+ parentView()->setFontRescale(1.0);
} else {
_plotMaximized = true;
_plotMaximizedSourcePosition = pos();
@@ -2706,7 +2707,13 @@
setViewRect(parentView()->sceneRect());
setZValue(PLOT_MAXIMIZED_ZORDER);
PlotItemManager::self()->setFocusPlot(this);
+
+ double rescale = double(parentView()->sceneRect().width() +
+ parentView()->sceneRect().height())/
+ double(_plotMaximizedSourceRect.width() + _plotMaximizedSourceRect.height());
+ parentView()->setFontRescale(rescale);
}
+ setPlotBordersDirty();
}
--- branches/work/kst/portto4/kst/src/libkstapp/view.cpp #1070541:1070542
@@ -51,7 +51,8 @@
_snapToGridVertical(false),
_plotBordersDirty(false),
_printing(false),
- _dataMode(false) {
+ _dataMode(false),
+ _fontRescale(1.0) {
_undoStack = new QUndoStack(this);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
@@ -537,6 +538,7 @@
fontSize *= scale;
fontSize += font.pixelSize();
+ fontSize *= _fontRescale;
if (fontSize < ApplicationSettings::self()->minimumFontSize()) {
fontSize = ApplicationSettings::self()->minimumFontSize();
}
@@ -544,7 +546,6 @@
if (fontSize > 0) {
font.setPixelSize(fontSize);
}
-
return font;
}
--- branches/work/kst/portto4/kst/src/libkstapp/view.h #1070541:1070542
@@ -102,6 +102,8 @@
void configurePlotFontDefaults(PlotItem *plot);
+ void setFontRescale(double rescale) {_fontRescale = rescale;}
+ double fontRescale() const {return _fontRescale;}
Q_SIGNALS:
void viewModeChanged(View::ViewMode oldMode);
void mouseModeChanged(View::MouseMode oldMode);
@@ -152,6 +154,7 @@
bool _plotBordersDirty;
bool _printing;
bool _dataMode;
+ double _fontRescale;
};
}
More information about the Kst
mailing list