diff --git a/DSView/CMakeLists.txt b/DSView/CMakeLists.txt index 0d6074e9..2f5eb787 100644 --- a/DSView/CMakeLists.txt +++ b/DSView/CMakeLists.txt @@ -103,7 +103,7 @@ set(DS_DESCRIPTION "A GUI for instruments of DreamSourceLab") set(DS_VERSION_MAJOR 0) set(DS_VERSION_MINOR 9) -set(DS_VERSION_MICRO 2) +set(DS_VERSION_MICRO 3) set(DS_VERSION_STRING ${DS_VERSION_MAJOR}.${DS_VERSION_MINOR}.${DS_VERSION_MICRO} ) diff --git a/DSView/icons/wait.gif b/DSView/icons/wait.gif index 4d615018..58279b9f 100644 Binary files a/DSView/icons/wait.gif and b/DSView/icons/wait.gif differ diff --git a/DSView/main.cpp b/DSView/main.cpp index 9320ec81..0d3a763f 100644 --- a/DSView/main.cpp +++ b/DSView/main.cpp @@ -40,8 +40,6 @@ #include "config.h" -char decoders_path[256]; - void usage() { fprintf(stdout, @@ -122,11 +120,6 @@ int main(int argc, char *argv[]) do { #ifdef ENABLE_DECODE - QDir dir(QCoreApplication::applicationDirPath()); - assert(dir.cd("decoders")); - std::string str = dir.absolutePath().toStdString() + "/"; - strcpy(decoders_path, str.c_str()); - // Initialise libsigrokdecode if (srd_init(NULL) != SRD_OK) { qDebug() << "ERROR: libsigrokdecode init failed."; diff --git a/DSView/pv/dialogs/waitingdialog.cpp b/DSView/pv/dialogs/waitingdialog.cpp index a60669a9..eb3960c4 100644 --- a/DSView/pv/dialogs/waitingdialog.cpp +++ b/DSView/pv/dialogs/waitingdialog.cpp @@ -48,8 +48,7 @@ WaitingDialog::WaitingDialog(QWidget *parent, boost::shared_ptrsetFixedSize((GIF_SIZE+TIP_WIDTH)*2, (GIF_SIZE+TIP_HEIGHT)*2); int midx = this->width() / 2; int midy = this->height() / 2; - this->setWindowOpacity(0.6); - this->setStyleSheet("background-color: rgb(255, 255, 255);"); + this->setWindowOpacity(0.7); this->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint); label = new QLabel(this); @@ -60,7 +59,6 @@ WaitingDialog::WaitingDialog(QWidget *parent, boost::shared_ptrsetText(TIPS_INFO); - tips->setStyleSheet("color: rgb(17, 133, 209); background-color: transparent;"); QFont font; font.setPointSize(10); font.setBold(true); @@ -71,8 +69,6 @@ WaitingDialog::WaitingDialog(QWidget *parent, boost::shared_ptrdev_inst()->driver->name, "DSCope") == 0); if (isDSCope) { - _trig_vpos = delta; + _trig_vpos = min(max(delta, 0+TrigMargin), 1-TrigMargin); trig_value = delta * 255; } else { delta = delta - _zeroPos; delta = min(delta, 0.5); delta = max(delta, -0.5); - _trig_vpos = _zeroPos + delta; + _trig_vpos = min(max(_zeroPos + delta, 0+TrigMargin), 1-TrigMargin); trig_value = (delta * 255.0f + 0x80); } _dev_inst->set_config(_probe, NULL, SR_CONF_TRIGGER_VALUE, @@ -491,7 +492,7 @@ void DsoSignal::set_zeroPos(int pos) double delta = _trig_vpos - _zeroPos; set_trig_vpos(get_trig_vpos() + pos - get_zeroPos()); _zeroPos = min((double)max(pos - UpMargin, 0), get_view_rect().height()) * 1.0 / get_view_rect().height(); - _trig_vpos = min(max(_zeroPos + delta, 0.0), 1.0); + _trig_vpos = min(max(_zeroPos + delta, 0+TrigMargin), 1-TrigMargin); update_zeroPos(); } diff --git a/DSView/pv/view/dsosignal.h b/DSView/pv/view/dsosignal.h index 58a671ba..af474c91 100644 --- a/DSView/pv/view/dsosignal.h +++ b/DSView/pv/view/dsosignal.h @@ -43,6 +43,7 @@ class DsoSignal : public Signal private: static const QColor SignalColours[4]; static const float EnvelopeThreshold; + static const double TrigMargin; static const int HitCursorMargin = 3; static const uint64_t vDialValueCount = 8; diff --git a/DSView/pv/view/viewport.cpp b/DSView/pv/view/viewport.cpp index b6de471e..87737fc2 100644 --- a/DSView/pv/view/viewport.cpp +++ b/DSView/pv/view/viewport.cpp @@ -132,8 +132,9 @@ void Viewport::paintEvent(QPaintEvent *event) break; case SigSession::Running: - //p.setRenderHint(QPainter::Antialiasing); + p.setRenderHint(QPainter::Antialiasing); paintProgress(p); + p.setRenderHint(QPainter::Antialiasing, false); break; } } else { @@ -352,6 +353,7 @@ void Viewport::mousePressEvent(QMouseEvent *event) _mouse_down_point = event->pos(); _mouse_down_offset = _view.offset(); + _measure_shown = false; if (event->buttons() & Qt::LeftButton) { if (_view.cursors_shown()) { @@ -435,7 +437,7 @@ void Viewport::mouseReleaseEvent(QMouseEvent *event) if (_zoom_rect_visible) { _zoom_rect_visible = false; const double newOffset = _view.offset() + (min(event->pos().x(), _mouse_down_point.x()) + 0.5) * _view.scale(); - const double newScale = max(min(_view.scale() * (event->pos().x() - _mouse_down_point.x()) / _view.get_view_width(), + const double newScale = max(min(_view.scale() * abs(event->pos().x() - _mouse_down_point.x()) / _view.get_view_width(), _view.get_maxscale()), _view.get_minscale()); if (newScale != _view.scale()) _view.set_scale_offset(newScale, newOffset); @@ -475,7 +477,7 @@ void Viewport::wheelEvent(QWheelEvent *event) if (event->orientation() == Qt::Vertical) { // Vertical scrolling is interpreted as zooming in/out - const double offset = (_view.session().get_capture_state() == SigSession::Running) ? 0 : event->x(); + const double offset = event->x(); _view.zoom(event->delta() / 80, offset); } else if (event->orientation() == Qt::Horizontal) { // Horizontal scrolling is interpreted as moving left/right diff --git a/DSView/res/DSCope.bin b/DSView/res/DSCope.bin index a37ddece..94baf28d 100644 Binary files a/DSView/res/DSCope.bin and b/DSView/res/DSCope.bin differ diff --git a/DSView/res/DSLogic33.bin b/DSView/res/DSLogic33.bin index fa38bcdc..9a3304f6 100644 Binary files a/DSView/res/DSLogic33.bin and b/DSView/res/DSLogic33.bin differ diff --git a/DSView/res/DSLogic50.bin b/DSView/res/DSLogic50.bin index 8174bef5..627020fb 100644 Binary files a/DSView/res/DSLogic50.bin and b/DSView/res/DSLogic50.bin differ diff --git a/DSView/res/DSLogicPro.bin b/DSView/res/DSLogicPro.bin index 6b1184c6..9b6b0982 100644 Binary files a/DSView/res/DSLogicPro.bin and b/DSView/res/DSLogicPro.bin differ