From: ZoiDiCabra <ian...@gm...> - 2022-05-04 15:00:47
|
I've opened ticket #2523. Thank you. Ian Em qua., 4 de mai. de 2022 às 03:56, Tatsuro MATSUOKA < tma...@ya...> escreveu: > Bug report to the gnu...@li... is out of date. > Please use the Bug Ticket in https://sourceforge.net/p/gnuplot/bugs/ > > Tatsuro > > > ----- Original Message ----- > > > > From: "ZoiDiCabra" <ian...@gm...> > > To: "gnu...@li..." < > gnu...@li...> > > Date: 2022/05/03 火 23:19 > > Subject: [Gnuplot-bugs] [PATCH] Unreadable zoom-in using dark backgrounds > > > > > > I was doing some experiments with dark mode graphs and realized that the > > zoom selection box is not visible (black on black) in wxt if the > background > > is set to '#000000'. So here's a patch: > > > > diff --git a/src/wxterminal/wxt_gui.cpp b/src/wxterminal/wxt_gui.cpp > > index 20efa9ae3..caac6e2c1 100644 > > --- a/src/wxterminal/wxt_gui.cpp > > +++ b/src/wxterminal/wxt_gui.cpp > > @@ -1088,14 +1088,18 @@ void wxtPanel::DrawToDC(wxDC &dc, wxRegion > ®ion) > > > > #ifdef USE_MOUSE > > if (wxt_zoombox) { > > - tmp_pen = wxPen(wxT("black"), 1, wxPENSTYLE_SOLID); > > - tmp_pen.SetCap( wxCAP_ROUND ); > > - dc.SetPen( tmp_pen ); > > #ifndef __WXOSX_COCOA__ > > /* wx 2.9 Cocoa bug workaround, which has no logical > > functions support */ > > #if (GTK_MAJOR_VERSION < 3) > > + tmp_pen = wxPen(wxT("white"), 1, wxPENSTYLE_SOLID); > > + tmp_pen.SetCap( wxCAP_ROUND ); > > + dc.SetPen( tmp_pen ); > > dc.SetLogicalFunction( wxINVERT ); > > #endif > > +#else > > + tmp_pen = wxPen(wxT("black"), 1, wxPENSTYLE_SOLID); > > + tmp_pen.SetCap( wxCAP_ROUND ); > > + dc.SetPen( tmp_pen ); > > #endif > > dc.DrawLine( zoom_x1, zoom_y1, mouse_x, zoom_y1 ); > > dc.DrawLine( mouse_x, zoom_y1, mouse_x, mouse_y ); > > > > Details: > > system: gnuplot 5.4 patchlevel 3 (Arch Linux) > > patched branch: gnuplot branch-5-4-stable > > > > Testing process: > > > > $ gnuplot -e "set term wxt background '#000000'" -c demo/airfoil.dem > > > > Verified that the zoom selection box is not visible (black on black) > > > > $ gnuplot -e "set term wxt" -c demo/airfoil.dem > > > > Verified that the zoom selection box is visible (black on white). > > > > Patched the file src/wxterminal/wxt_gui.cpp > > > > $ ./src/gnuplot -e "set term wxt background '#000000'" -c > demo/airfoil.dem > > > > Verified that the zoom selection box is now visible (white on black). > > > > ./src/gnuplot -e "set term wxt" -c demo/airfoil.dem > > > > Verified that the zoom selection box is still visible (different blending > > mode though). > > I'm not able to test in a macOS environment. > > > > I can provide screenshots and other details if required > > > > _______________________________________________ > > gnuplot-bugs mailing list > > gnu...@li... > > Membership management via: > https://lists.sourceforge.net/lists/listinfo/gnuplot-bugs > > > > > > _______________________________________________ > gnuplot-bugs mailing list > gnu...@li... > Membership management via: > https://lists.sourceforge.net/lists/listinfo/gnuplot-bugs > |