Skip to content

Commit

Permalink
Revert "ticket:4428 Set very low ration for legend so that plot gets …
Browse files Browse the repository at this point in the history
…more space."

This reverts commit e2f605d.
  • Loading branch information
adeas31 committed Jun 3, 2017
1 parent e2f605d commit 3d09049
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion OMPlot/OMPlotGUI/Plot.cpp
Expand Up @@ -49,7 +49,7 @@ Plot::Plot(PlotWindow *pParent)
mpParentPlotWindow = pParent;
// create an instance of legend
mpLegend = new Legend(this);
insertLegend(mpLegend, QwtPlot::TopLegend, 0.1);
insertLegend(mpLegend, QwtPlot::TopLegend);
// create an instance of grid
mpPlotGrid = new PlotGrid(this);
// create an instance of zoomer
Expand Down
8 changes: 4 additions & 4 deletions OMPlot/OMPlotGUI/PlotWindow.cpp
Expand Up @@ -774,19 +774,19 @@ void PlotWindow::setLegendPosition(QString position)
{
mpPlot->insertLegend(0);
mpPlot->setLegend(new Legend(mpPlot));
mpPlot->insertLegend(mpPlot->getLegend(), QwtPlot::LeftLegend, 0.1);
mpPlot->insertLegend(mpPlot->getLegend(), QwtPlot::LeftLegend);
}
else if (position.toLower().compare("right") == 0)
{
mpPlot->insertLegend(0);
mpPlot->setLegend(new Legend(mpPlot));
mpPlot->insertLegend(mpPlot->getLegend(), QwtPlot::RightLegend, 0.1);
mpPlot->insertLegend(mpPlot->getLegend(), QwtPlot::RightLegend);
}
else if (position.toLower().compare("top") == 0)
{
mpPlot->insertLegend(0);
mpPlot->setLegend(new Legend(mpPlot));
mpPlot->insertLegend(mpPlot->getLegend(), QwtPlot::TopLegend, 0.1);
mpPlot->insertLegend(mpPlot->getLegend(), QwtPlot::TopLegend);
#if QWT_VERSION > 0x060000
/* we also want to align the legend to left. Stupid Qwt align it HCenter by default. */
QwtLegend *pQwtLegend = qobject_cast<QwtLegend*>(mpPlot->legend());
Expand All @@ -798,7 +798,7 @@ void PlotWindow::setLegendPosition(QString position)
{
mpPlot->insertLegend(0);
mpPlot->setLegend(new Legend(mpPlot));
mpPlot->insertLegend(mpPlot->getLegend(), QwtPlot::BottomLegend, 0.1);
mpPlot->insertLegend(mpPlot->getLegend(), QwtPlot::BottomLegend);
#if QWT_VERSION > 0x060000
/* we also want to align the legend to left. Stupid Qwt align it HCenter by default. */
QwtLegend *pQwtLegend = qobject_cast<QwtLegend*>(mpPlot->legend());
Expand Down

0 comments on commit 3d09049

Please sign in to comment.