X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fview.cpp;h=f6048f0401c3c8a16826307528f2861b2fbb31db;hb=24c29d4f917ffac5a280d572cc04d1edb66a81b9;hp=5959ff7b3f94f1288e2c02187a47b802da091704;hpb=6644424f1ea61ee7e1f048bfac09acd4a094feab;p=pulseview.git diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 5959ff7..f6048f0 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -57,6 +57,7 @@ #include "viewport.hpp" #include "pv/session.hpp" +#include "pv/globalsettings.hpp" #include "pv/devices/device.hpp" #include "pv/data/logic.hpp" #include "pv/data/logicsegment.hpp" @@ -159,6 +160,9 @@ View::View(Session &session, QWidget *parent) : saved_v_offset_(0), size_finalized_(false) { + GlobalSettings settings; + coloured_bg_ = settings.value(GlobalSettings::Key_View_ColouredBG).toBool(); + connect(scrollarea_.horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(h_scroll_value_changed(int))); connect(scrollarea_.verticalScrollBar(), SIGNAL(valueChanged(int)), @@ -563,6 +567,11 @@ void View::enable_sticky_scrolling(bool state) sticky_scrolling_ = state; } +void View::toggle_sticky_scrolling(void) +{ + sticky_scrolling_ = !sticky_scrolling_; +} + void View::enable_coloured_bg(bool state) { const vector> items(