kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #25945
Re: [PATCH] Simulator: Fix probe and tune cursors on OSX.
-
To:
Johannes Maibaum <jmaibaum@xxxxxxxxx>, <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Maciej Sumiński <maciej.suminski@xxxxxxx>
-
Date:
Tue, 30 Aug 2016 14:35:10 +0200
-
Authentication-results:
spf=pass (sender IP is 188.184.36.50) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
-
In-reply-to:
<20160829122523.24776-1-jmaibaum@gmail.com>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:99
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
Thank you Johannes, I have just applied your patch. This part of code is
a truly a demonstration of wxWidgets platform independence.
Good that at least they give you hints. Today I got an assert: "failed
in Add(): invalid bitmap size in wxImageList: this might work on this
platform but definitely won't under Windows."
Regards,
Orson
On 08/29/2016 02:25 PM, Johannes Maibaum wrote:
> Commit c9a1b45666b1db94d66dc5ab4703f8413614de5f changed the mask color
> of the tune and probe cursors to fix their appearance on Windows, but
> this broke them on OSX.
> ---
> eeschema/sim/simulate.cpp | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/eeschema/sim/simulate.cpp b/eeschema/sim/simulate.cpp
> index c704995..f093490 100644
> --- a/eeschema/sim/simulate.cpp
> +++ b/eeschema/sim/simulate.cpp
> @@ -107,7 +107,9 @@ public:
> wxBitmap probe_mask_bitmap( (const char*) cursor_probe_mask, 32, 32 );
> probe_bitmap.SetMask( new wxMask( probe_mask_bitmap ) );
> probe_image = new wxImage( probe_bitmap.ConvertToImage() );
> +#ifdef __WXMSW__
> probe_image->SetMaskColour( 255, 255, 255 );
> +#endif
> probe_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_X, 0 );
> probe_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_Y, 31 );
> }
> @@ -125,7 +127,9 @@ public:
> wxBitmap tune_mask_bitmap( (const char*) cursor_tune_mask, 32, 32 );
> tune_bitmap.SetMask( new wxMask( tune_mask_bitmap ) );
> tune_image = new wxImage( tune_bitmap.ConvertToImage() );
> +#ifdef __WXMSW__
> tune_image->SetMaskColour( 255, 255, 255 );
> +#endif
> tune_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_X, 0 );
> tune_image->SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_Y, 31 );
> }
>
Attachment:
signature.asc
Description: OpenPGP digital signature
References