Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datalogger: change color of plot text for print #1676

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion gui/src/plotwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ void PlotWidget::printPlot(QPainter *painter, bool useSymbols)
renderer.setDiscardFlag(QwtPlotRenderer::DiscardBackground, true);
renderer.setDiscardFlag(QwtPlotRenderer::DiscardCanvasBackground, true);

// Change axis and legend color
auto currentStyle = m_plot->styleSheet();
m_plot->setStyleSheet("color: #9E9E9F");

// Apply printable plot changes
// list of current curve colors
QList<QPen> plotChColors;
Expand Down Expand Up @@ -328,8 +332,8 @@ void PlotWidget::printPlot(QPainter *painter, bool useSymbols)
renderer.render(m_plot, painter, QRectF(0, 0, 400, 300));

// revert changes made for printable plot

m_plot->insertLegend(nullptr);
m_plot->setStyleSheet(currentStyle);

// revert curves to original settings
for(int i = 0; i < getChannels().length(); i++) {
Expand Down
Loading