lmi
[Top][All Lists]
Advanced

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

Re: [lmi] using standard icon sizes and wxArtProvider


From: Vadim Zeitlin
Subject: Re: [lmi] using standard icon sizes and wxArtProvider
Date: Fri, 7 Nov 2014 13:37:14 +0100

On Fri, 07 Nov 2014 03:51:07 +0000 Greg Chicares <address@hidden> wrote:

GC> >  Why is this better than before?
GC> 
GC> Because the actual way in which 'platform="win"' had previously been
GC> used seemed incorrect, or at least not consistently correct. Here are
GC> some examples from the prior revision:
GC>   
http://svn.savannah.nongnu.org/viewvc/lmi/trunk/menus.xrc?annotate=6022&root=lmi&pathrev=6026
GC> 
GC> I believe this is a stock operation, used in its natural sense
GC> for inserting a row into the census manager, yet it doesn't have
GC> 'platform="win"':
GC>   <label>_Add cell\tCtrl-+</label>
GC>   <bitmap stock_id="insert-rows"/>

 I agree that this one should probably use wxID_ADD and hence be a stock
menu item and use a custom icon only under MSW.

GC> This does not resemble any stock operation:
GC>   <label>_Copy calculation summary\tCtrl-C</label>
GC>   <bitmap platform="win" stock_id="copy-cell"/>
GC> and neither does this:
GC>   <label>Copy full illustration _data\tCtrl-D</label>
GC>   <bitmap platform="win" stock_id="wxART_COPY"/>

 I slightly disagree that those don't resemble any stock operations:
copying to clipboard is a stock operation, independently of what exactly
we're copying. The trouble is that we can't have two stock wxID_COPY items
in the same menu (not that it would have been desirable anyhow, of course),
so we can't really use stock icons for both of them neither. And as we,
presumably, want consistency for their icons, I think that both items
should use custom icons unconditionally (i.e. without platform=xxx part).

GC> One happens to have a stock icon, while the other doesn't. But they're
GC> really just two similar versions of the same icon, to inform the user
GC> that these are two similar versions of the same operation. If we change
GC> the theme on GTK, then AIUI this visual similarity would be lost: the
GC> "wxART_COPY" one would be overridden, but the other wouldn't (because,
GC> although it has 'platform="win"', no theme would supply an icon for
GC> "copy calculation summary" icon).

 Sorry, I think there may be a misunderstanding here. Specifying the
platform attribute doesn't mean to use the bitmap under that platform
always but only use it under the other ones if the theme doesn't define it.
Instead, the bitmap is just completely ignored under the other platforms.
So the second (Ctrl-D) item above would always use the theme-provided icon
under non-MSW, while the first one (Ctrl-C) would never have any icon.

GC> In order to preserve the visual
GC> similarity, we'd need to specify 'platform="unix|win"', AIUI.

 Which still doesn't seem to make much sense to me as, knowing that LMI
doesn't support OS X anyhow, this is exactly equivalent to not specifying
the platform attribute at all, so why bother with it?

GC> So I think it was neither correct nor uniform before, but now it's at
GC> least uniform; but perhaps you're saying it has become less correct.
GC> I would accept a patch that makes it perfectly correct. But wouldn't
GC> that be a waste of time, because GTK ignores this now?

 There are some Linux distributions which still enable icons in the menus
by default, I think. But GTK/Gnome people clearly want to get rid of them,
so yes, it would mostly be useless.

GC> Observe also that we had 'platform=' only for menu icons, but not
GC> toolbar icons; if that was deliberate, then why wasn't it wrong?

 This was definitely deliberate. Unlike for the menu items, toolbar ones
must have a bitmap, so you either need to specify it without any "platform"
attribute or use 3 different statements specifying the bitmaps for "win",
"unix" and "mac".

 Regards,
VZ

reply via email to

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