lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Custom wxArtProvider affects html help toolbar buttons


From: Greg Chicares
Subject: [lmi] Custom wxArtProvider affects html help toolbar buttons
Date: Mon, 06 Oct 2008 12:52:37 +0000
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

I think lmi's wxArtProvider interferes with the last two toolbar buttons
in wx html help ("Print this page" and "Display options dialog"): they
appear to be 24x24 bitmaps truncated to 16x16.

The two one-line experimental patches below have these effects:

This early-exit patch [1]
  +return wxSize(16, 16);
makes both buttons render correctly, or almost correctly--the capital 'A'
for the font dialog looks like it's missing the first column of pixels,
but maybe I should have specified 16x15. However, of course, this patch
shrinks the bitmaps for lmi's own toolbar.

This special-case patch [2]
  +if(wxART_HELP_BROWSER == client) {return wxSize(16, 16);}
doesn't fix the problem with the two buttons.

Both patches have a nice effect: they cause html help to use 'help-16.png'
as its frame icon, whereas with the unpatched code in HEAD html help uses
'lmi.png' as its frame icon.

Should I be doing something like the following?

 void Skeleton::UponHelp(wxCommandEvent&)
 {
+    wxArtProvider::Push(new SpecialArtProviderForHtmlHelp);
     help_controller_->DisplayContents();
+    wxArtProvider::Pop();
 }

---------

[1] First experimental patch:

Index: icon_monger.cpp
===================================================================
RCS file: /sources/lmi/lmi/icon_monger.cpp,v
retrieving revision 1.7
diff -U 3 -r1.7 icon_monger.cpp
--- icon_monger.cpp     4 Oct 2008 15:16:26 -0000       1.7
+++ icon_monger.cpp     6 Oct 2008 11:54:19 -0000
@@ -74,6 +74,7 @@
 #if !defined LMI_MSW
     return z;
 #else  // defined LMI_MSW
+return wxSize(16, 16);
     // For the nonce, inhibit rescaling: it's not attractive enough.
     return wxSize(24, 24);
     if     (wxART_MENU    == client) {return wxSize(16, 16);}

[2] Second experimental patch:

Index: icon_monger.cpp
===================================================================
RCS file: /sources/lmi/lmi/icon_monger.cpp,v
retrieving revision 1.7
diff -U 3 -r1.7 icon_monger.cpp
--- icon_monger.cpp     4 Oct 2008 15:16:26 -0000       1.7
+++ icon_monger.cpp     6 Oct 2008 11:56:44 -0000
@@ -74,6 +74,7 @@
 #if !defined LMI_MSW
     return z;
 #else  // defined LMI_MSW
+if(wxART_HELP_BROWSER == client) {return wxSize(16, 16);}
     // For the nonce, inhibit rescaling: it's not attractive enough.
     return wxSize(24, 24);
     if     (wxART_MENU    == client) {return wxSize(16, 16);}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]