diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 93b303a40364bfa1e8b663e31f715c1fda3fd86b..0672abba54156a38976946fbc4926e49132dd669 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -2831,8 +2831,8 @@ void InkscapePreferences::initPageRendering() _page_rendering.add_line( false, _("X-ray radius:"), _rendering_xray_radius, "", _("Radius of the circular area around the mouse cursor in X-ray mode"), false); // rendering outline overlay opacity - _rendering_outline_overlay_opacity.init("/options/rendering/outline-overlay-opacity", 1.0, 100.0, 1.0, 5.0, 50.0, true, false); - _page_rendering.add_line( false, _("Outline overlay opacity:"), _rendering_outline_overlay_opacity, _("%"), _("Opacity of the color in outline overlay view mode"), false); + _rendering_outline_overlay_opacity.init("/options/rendering/outline-overlay-opacity", 0.0, 100.0, 1.0, 5.0, 50.0, true, false); + _page_rendering.add_line( false, _("Outline overlay opacity:"), _rendering_outline_overlay_opacity, _("%"), _("Opacity of the overlay in outline overlay view mode"), false); // update strategy { diff --git a/src/ui/widget/canvas/cairographics.cpp b/src/ui/widget/canvas/cairographics.cpp index dafa26d74fa49c862a766db5b62ebdbb5a875562..42b3353c10635005eb99cc5542ed27b2fec997be 100644 --- a/src/ui/widget/canvas/cairographics.cpp +++ b/src/ui/widget/canvas/cairographics.cpp @@ -337,7 +337,7 @@ void CairoGraphics::paint_widget(Fragment const &view, PaintArgs const &a, Cairo auto draw_overlay = [&, this] { // Get whitewash opacity. - double outline_overlay_opacity = 1.0 - prefs.outline_overlay_opacity / 100.0; + double outline_overlay_opacity = prefs.outline_overlay_opacity / 100.0; // Partially obscure drawing by painting semi-transparent white, then paint outline content. // Note: Unfortunately this also paints over the background, but this is unavoidable. diff --git a/src/ui/widget/canvas/glgraphics.cpp b/src/ui/widget/canvas/glgraphics.cpp index 0277aa71797a09a6455e22f12f4b503c27b6c283..b00503c00fb68a91cc7367882df345b9418e1f1e 100644 --- a/src/ui/widget/canvas/glgraphics.cpp +++ b/src/ui/widget/canvas/glgraphics.cpp @@ -764,7 +764,7 @@ void GLGraphics::paint_widget(Fragment const &view, PaintArgs const &a, Cairo::R glUniform1i(prog.loc("tex"), drawmode == DrawMode::Outline ? 2 : 0); if (drawmode == DrawMode::Combine) { glUniform1i(prog.loc("tex_outline"), 2); - glUniform1f(prog.loc("opacity"), 1.0 - prefs.outline_overlay_opacity / 100.0); + glUniform1f(prog.loc("opacity"), prefs.outline_overlay_opacity / 100.0); } if (stores.mode() == Stores::Mode::Normal) { diff --git a/src/ui/widget/canvas/prefs.h b/src/ui/widget/canvas/prefs.h index 8fabff193f61514be05ad0cc238922db98c243c1..363fb6d8973d907b72db6f2c338e69052590b7a6 100644 --- a/src/ui/widget/canvas/prefs.h +++ b/src/ui/widget/canvas/prefs.h @@ -17,7 +17,7 @@ public: // Main preferences Pref xray_radius = { "/options/rendering/xray-radius", 100, 1, 1500 }; - Pref outline_overlay_opacity = { "/options/rendering/outline-overlay-opacity", 50, 1, 100 }; + Pref outline_overlay_opacity = { "/options/rendering/outline-overlay-opacity", 50, 0, 100 }; Pref update_strategy = { "/options/rendering/update_strategy", 3, 1, 3 }; Pref request_opengl = { "/options/rendering/request_opengl" }; Pref grabsize = { "/options/grabsize/value", 3, 1, 15 };