Changes between Version 49 and Version 50 of PadrePluginCookbookRecipie05
- Timestamp:
- 08/25/12 10:39:10 (9 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PadrePluginCookbookRecipie05
v49 v50 314 314 315 315 === plugin_icon 316 1. from {{{Padre::Plugin}}}316 1. from Padra you could use the blue morpho 317 317 {{{#!perl 318 318 sub plugin_icon { 319 my $class = shift; 320 my $share = $class->plugin_directory_share or return; 321 my $file = File::Spec->catfile( $share, 'icons', '16x16', 'logo.png' ); 322 return unless -f $file; 323 return unless -r $file; 324 return Wx::Bitmap->new( $file, Wx::wxBITMAP_TYPE_PNG ); 325 } 326 }}} 327 328 1. To define your your own icon, you can overload the method. 319 require Padre::Wx::Icon; 320 Padre::Wx::Icon::find('logo'); 321 } 322 }}} 323 324 1. To define your your own icon. 329 325 {{{#!perl 330 326 ####### … … 340 336 } 341 337 }}} 342 338 {{{#!text 339 ├── lib 340 │ └── Padre 341 │ └── Plugin 342 ├── share 343 │ └── icons 344 │ └── 16x16 345 │ └── cookbook.png 346 └── t 347 }}} 343 348 344 349 ----
