lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Fancy diagnostics for art-provider class


From: Greg Chicares
Subject: Re: [lmi] Fancy diagnostics for art-provider class
Date: Thu, 15 Jan 2009 22:07:37 +0000
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

On 2009-01-15 19:48Z, Greg Chicares wrote:
> 
>   Image '/opt/lmi/data/help-16.png' of size 16 by 16 has been
>   scale because no bitmap of requested size 16 by 15 was found.
>                                                   ^^

Oh, wait, sorry...already answered:

http://lists.nongnu.org/archive/html/lmi/2008-10/msg00022.html
| (3) wxArtProvider::GetSizeHint() returns 16x15 and not 16x16, as it
| should, for wxART_FRAME_ICON.

http://lists.nongnu.org/archive/html/lmi/2008-10/msg00026.html
| > We will add checks for (4) to wx trunk and will fix (2)+(3) -- I'm not
| > sure if the latter is safe for 2.8 yet.
|
| It's all fixed on the wx trunk now and (2)+(3) were backported to 2.8

However, I'd still welcome any comments about these concerns:

>  - I'm testing this carefully with msw only, so I could be missing an
>    entire dimension. Is my recent code going to give lots of nuisance
>    diagnostics with GNU/Linux? (I'd guess not, because of theming.)

in particular this one:

>  - I begin to wonder whether code that I had already made somewhat
>    baroque is becoming downright rococo. Is there a simpler way to do
>    all of this while still diagnosing the mistakes I'm likely to make?

where I wrote a statement that seems rather gruesome [1]. Can there even
exist a tidy way of achieving what I attempted? There are two categories:
 (A) bitmaps provided and used by lmi
 (B) bitmaps built into wx and used by wx html help
and I seek a run-time test that'll tell me if a bitmap in category A is
missing (falling back on a built-in wx bitmap causes a theme clash),
without giving false-positive diagnostics for Category B. However, both
categories are subject to change in the future. Instead of enumerating
category B (gruesomely [1]), I tried this test:
  if(wxART_HELP_BROWSER == client)
but the art-provider client really does seem to be wxART_TOOLBAR for
the help browser's own toolbar.

So is this a quixotic quest that I should abandon? After all, if icons
clash because I forgot to provide one that lmi needs and a wx default
is used instead, then we could detect that just by looking at the screen
while exercising every menu option.

---------

[1] "a statement that seems rather gruesome"

    bool is_used_only_by_wx_html_help =
           wxART_ADD_BOOKMARK    == id
        || wxART_DEL_BOOKMARK    == id
        || wxART_GO_BACK         == id
        || wxART_GO_DOWN         == id
        || wxART_GO_FORWARD      == id
        || wxART_GO_TO_PARENT    == id
        || wxART_GO_UP           == id
        || wxART_HELP_BOOK       == id
        || wxART_HELP_FOLDER     == id
        || wxART_HELP_PAGE       == id
        || wxART_HELP_SETTINGS   == id
        || wxART_HELP_SIDE_PANEL == id
        ;




reply via email to

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