Skip to content

Commit

Permalink
Whitespace fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
abraxa committed Nov 5, 2015
1 parent e8205ea commit e14e5d5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
2 changes: 0 additions & 2 deletions pv/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@ void MainWindow::setup_ui()
SLOT(sticky_scrolling_changed(bool)));
connect(view_, SIGNAL(always_zoom_to_fit_changed(bool)), this,
SLOT(always_zoom_to_fit_changed(bool)));

}

void MainWindow::select_init_device() {
Expand Down Expand Up @@ -597,7 +596,6 @@ void MainWindow::load_init_file(const std::string &file_name,
load_file(QString::fromStdString(file_name), input_format);
}


void MainWindow::save_ui_settings()
{
QSettings settings;
Expand Down
13 changes: 12 additions & 1 deletion pv/view/analogsignal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,19 @@ void AnalogSignal::scale_handle_drag_release()

void AnalogSignal::paint_back(QPainter &p, const ViewItemPaintParams &pp)
{
if (channel_->enabled())
if (channel_->enabled()) {
p.setPen(QPen(Qt::NoPen));
p.setBrush(QColor(0x88, 0x8A, 0x85).lighter(150 + 10*bg_brightness_state);

const int x = 0;
const int y = get_visual_y() - NominalHeight / 2;
const int w = pp.right() - pp.left();
const int h = NominalHeight;

p.drawRect(x, y, w, h);

paint_axis(p, pp, get_visual_y());
}
}

void AnalogSignal::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
Expand Down
1 change: 0 additions & 1 deletion pv/view/flag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,5 @@ void Flag::drag_by(const QPoint &delta)
TimeMarker::drag_by(delta);
}


} // namespace view
} // namespace pv
13 changes: 12 additions & 1 deletion pv/view/logicsignal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,19 @@ void LogicSignal::scale_handle_dragged(int offset)

void LogicSignal::paint_back(QPainter &p, const ViewItemPaintParams &pp)
{
if (channel_->enabled())
if (channel_->enabled()) {
p.setPen(QPen(Qt::NoPen));
p.setBrush(QColor(0x88, 0x8A, 0x85).lighter(150 + 10*bg_brightness_state);

const int x = 0;
const int y = get_visual_y() - SignalHeight;
const int w = pp.right() - pp.left();
const int h = SignalHeight;

p.drawRect(x, y, w, h);

paint_axis(p, pp, get_visual_y());
}
}

void LogicSignal::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
Expand Down
5 changes: 5 additions & 0 deletions pv/view/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,11 @@ void View::restack_all_trace_tree_items()
for (auto &o : sorted_owners)
o->restack_items();

// Re-assign background colors
int next_brightness_state = 0;
for (auto &o : sorted_owners)
next_brightness_state = o->reassign_bg_brightness(next_brightness_state);

// Animate the items to their destination
for (const auto &i : items)
i->animate_to_layout_v_offset();
Expand Down

0 comments on commit e14e5d5

Please sign in to comment.