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: Vaclav Slavik
Subject: Re: [lmi] Fancy diagnostics for art-provider class
Date: Fri, 16 Jan 2009 19:34:51 +0100

Hi,

On Thu, 2009-01-15 at 22:07 +0000, Greg Chicares wrote:
> 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.)

Normally not, but it's possible. LMI's icon_monger will still be used
for LMI-specific icons and the user is free to configure toolbars to use
non-default icons size. In that case, the user would get lots of
resizing warnings. But I did never see this done in practice.

> 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. 

Let me suggest another classification:

(A') LMI-specific bitmaps provided and used by LMI app
(B') stock bitmaps that LMI provides customized version of
(C') other stock bitmaps that LMI doesn't know or care about

If an icon from category A' is missing, it's a serious problem --
there's no replacement for it. Category B' is never used on GNU/Linux
(where system theme's bitmaps stake precedence) and even though it is
used on MSW, the app can fall back to wx's built-in versions;
consequently, a missing piece in B' is much less serious. Finally, no
warnings or errors should be produced for C'.

Current icon_monger code assumes that B = C', but it's actually B ⊆ C'
and so the check in the beginning of CreateBitmap() (your [1]) is
incomplete. That's one reason not to treat wxHtmlHelpBrowser icons
specially; another is that ideally, we would like to use customized
icons for these too.


Here's another idea how to deal with the checks:

* Prefix all bitmap names from A' with "lmi-" (e.g. "lmi-run-case"
  instead of "run-case"), either by renaming their respective PNG files
  too or stripping the prefix in CreateBitmap(). This would allow you to
  detect members of A' and emit warnings about missing icons for them.

* For B' ∪ C', warn only about rescaling (and probably not under
  wxGTK), but not about missing icons.

Regards,
Vaclav





reply via email to

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