]> sigrok.org Git - pulseview.git/commitdiff
Fix variable naming
authorSoeren Apel <redacted>
Wed, 20 Mar 2019 08:43:01 +0000 (09:43 +0100)
committerUwe Hermann <redacted>
Thu, 28 Mar 2019 16:58:58 +0000 (17:58 +0100)
pv/views/trace/analogsignal.cpp
pv/views/trace/trace.cpp
pv/views/trace/viewport.cpp

index 599246418b1993bd74ffaf1d9c51a1e14a2b860d..60ba2ca9831b0cd94fc95ea85d93156d771ffe06 100644 (file)
@@ -319,7 +319,7 @@ void AnalogSignal::paint_fore(QPainter &p, ViewItemPaintParams &pp)
 
 void AnalogSignal::paint_grid(QPainter &p, int y, int left, int right)
 {
-       bool wasAntialiased = p.testRenderHint(QPainter::Antialiasing);
+       bool was_antialiased = p.testRenderHint(QPainter::Antialiasing);
        p.setRenderHint(QPainter::Antialiasing, false);
 
        if (pos_vdivs_ > 0) {
@@ -364,7 +364,7 @@ void AnalogSignal::paint_grid(QPainter &p, int y, int left, int right)
                }
        }
 
-       p.setRenderHint(QPainter::Antialiasing, wasAntialiased);
+       p.setRenderHint(QPainter::Antialiasing, was_antialiased);
 }
 
 void AnalogSignal::paint_trace(QPainter &p,
index 65abaf0cec2e095032b0ed6ec74a3e45ce2686a2..76adf1d15e03b6a2f4e69eb1a55f5c020578d8cb 100644 (file)
@@ -292,13 +292,13 @@ void Trace::paint_back(QPainter &p, ViewItemPaintParams &pp)
 
 void Trace::paint_axis(QPainter &p, ViewItemPaintParams &pp, int y)
 {
-       bool wasAntialiased = p.testRenderHint(QPainter::Antialiasing);
+       bool was_antialiased = p.testRenderHint(QPainter::Antialiasing);
        p.setRenderHint(QPainter::Antialiasing, false);
 
        p.setPen(axis_pen_);
        p.drawLine(QPointF(pp.left(), y), QPointF(pp.right(), y));
 
-       p.setRenderHint(QPainter::Antialiasing, wasAntialiased);
+       p.setRenderHint(QPainter::Antialiasing, was_antialiased);
 }
 
 void Trace::add_color_option(QWidget *parent, QFormLayout *form)
@@ -329,11 +329,11 @@ void Trace::paint_hover_marker(QPainter &p)
 
        const pair<int, int> extents = v_extents();
 
-       bool wasAntialiased = p.testRenderHint(QPainter::Antialiasing);
+       bool was_antialiased = p.testRenderHint(QPainter::Antialiasing);
        p.setRenderHint(QPainter::Antialiasing, false);
        p.drawLine(x, get_visual_y() + extents.first,
                x, get_visual_y() + extents.second);
-       p.setRenderHint(QPainter::Antialiasing, wasAntialiased);
+       p.setRenderHint(QPainter::Antialiasing, was_antialiased);
 }
 
 void Trace::create_popup_form()
index 44c912a1acf1ccc117718d09cbc45b816e64a284..2ca43a0b182da5fb6d9a3690faae7725055a55a7 100644 (file)
@@ -175,9 +175,10 @@ void Viewport::paintEvent(QPaintEvent*)
 
        QPainter p(this);
 
-       bool useAntialiasing =
+       // Disable antialiasing for high-DPI displays
+       bool use_antialiasing =
                window()->windowHandle()->screen()->devicePixelRatio() < 2.0;
-       p.setRenderHint(QPainter::Antialiasing, useAntialiasing);
+       p.setRenderHint(QPainter::Antialiasing, use_antialiasing);
 
        for (LayerPaintFunc *paint_func = layer_paint_funcs;
                        *paint_func; paint_func++) {