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: Greg Chicares
Subject: Re: [lmi] using standard icon sizes and wxArtProvider
Date: Fri, 07 Nov 2014 03:51:07 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 2014-11-07 00:28Z, Vadim Zeitlin wrote:
> On Thu, 06 Nov 2014 15:06:26 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> On 2008-08-30 22:22Z, Vaclav Slavik wrote:
> GC> > On Fri, 2008-08-29 at 13:38 +0000, Greg Chicares wrote:
> GC> [...]
> GC> >> Then again, is it really bad or unusual to display no icon next to
> GC> >> any menuitem whatsoever?
> GC> > 
> GC> > It depends on the platform. OS X, for example, never uses any menu icons
> GC> > (which you could argue is circumstantial evidence that usability
> GC> > benefits of having the icons are relatively minor, given OS X's
> GC> > usability record). On the other hand, GTK+/GNOME apps do use them for
> GC> > "stock" actions and any app not using them looks a bit out of place. On
> GC> > Windows, consistency among apps is nonexistent, so it's hard to say.
> GC> 
> GC> In 'menus.xrc', some <bitmap> elements has 'platform="win"', while others
> GC> did not; and the ones that didn't weren't all GTK "stock" actions. So I
> GC> added 'platform="win"' to everything revision 6026 (20141106T1452Z). Now
> GC> the code is uniform, and does the expected thing for msw and osx. As for
> GC> GTK, it doesn't do the expected thing, but at least it's not random; I'd
> GC> welcome a patch that writes 'platform="unix|win"' where appropriate, but
> GC> I'm personally not exactly sure which actions are "stock" for GTK.
> 
>  Let me start by saying that all this probably doesn't matter anyhow as
> recent GTK+ versions use a policy preventing the display of icons in the
> menus. I think it's a pity, not so much because I liked them that much
> (although, on balance, I think I prefer having some icons to having none of
> them, even though having icons for all items was clearly a problem), but
> because I regret that GTK+ people think they have to copy OS X in
> everything.

Therefore, although I didn't know it, this patch has achieved harmony
with (recent) GTK.

>  Having said this, I admit that I don't really understand the changes of
> r6026. Previously the use of platform="win" made sense to me: it was there
> to avoid overriding the standard GTK+ icons for stock menu items. Now it
> just disables all icons under GTK which, assuming the icons are enabled in
> the first place, would result in the stock icons being used for stock items
> but LMI icons not being used.

Clearly, since I haven't run lmi on a non-msw platform myself, I may
be missing something obvious, but...

>  Why is this better than before?

Because the actual way in which 'platform="win"' had previously been
used seemed incorrect, or at least not consistently correct. Here are
some examples from the prior revision:
  
http://svn.savannah.nongnu.org/viewvc/lmi/trunk/menus.xrc?annotate=6022&root=lmi&pathrev=6026

I believe this is a stock operation, used in its natural sense
for inserting a row into the census manager, yet it doesn't have
'platform="win"':
  <label>_Add cell\tCtrl-+</label>
  <bitmap stock_id="insert-rows"/>

This does not resemble any stock operation:
  <label>_Copy calculation summary\tCtrl-C</label>
  <bitmap platform="win" stock_id="copy-cell"/>
and neither does this:
  <label>Copy full illustration _data\tCtrl-D</label>
  <bitmap platform="win" stock_id="wxART_COPY"/>
One happens to have a stock icon, while the other doesn't. But they're
really just two similar versions of the same icon, to inform the user
that these are two similar versions of the same operation. If we change
the theme on GTK, then AIUI this visual similarity would be lost: the
"wxART_COPY" one would be overridden, but the other wouldn't (because,
although it has 'platform="win"', no theme would supply an icon for
"copy calculation summary" icon). In order to preserve the visual
similarity, we'd need to specify 'platform="unix|win"', AIUI.

So I think it was neither correct nor uniform before, but now it's at
least uniform; but perhaps you're saying it has become less correct.
I would accept a patch that makes it perfectly correct. But wouldn't
that be a waste of time, because GTK ignores this now? Observe also
that we had 'platform=' only for menu icons, but not toolbar icons;
if that was deliberate, then why wasn't it wrong? and if it was not
deliberate, then should we not add it in 'toolbar.xrc' as well?

Anyway, I downloaded the previous version and did this, in case it's
handy for any further discussion:

<menus.xrc grep 'bitmap' | sed -e's/^ *//' | sort | uniq

<bitmap platform="win" stock_id="about"/>
<bitmap platform="win" stock_id="close"/>
<bitmap platform="win" stock_id="copy-cell"/>
<bitmap platform="win" stock_id="preferences"/>
<bitmap platform="win" stock_id="print-options"/>
<bitmap platform="win" stock_id="print-preview"/>
<bitmap platform="win" stock_id="window-cascade"/>
<bitmap platform="win" stock_id="window-next"/>
<bitmap platform="win" stock_id="window-previous"/>
<bitmap platform="win" stock_id="window-tile-horizontally"/>
<bitmap platform="win" stock_id="window-tile-vertically"/>
<bitmap platform="win" stock_id="wxART_COPY"/>
<bitmap platform="win" stock_id="wxART_FILE_OPEN"/>
<bitmap platform="win" stock_id="wxART_FILE_SAVE"/>
<bitmap platform="win" stock_id="wxART_FILE_SAVE_AS"/>
<bitmap platform="win" stock_id="wxART_HELP"/>
<bitmap platform="win" stock_id="wxART_NEW"/>
<bitmap platform="win" stock_id="wxART_PRINT"/>
<bitmap platform="win" stock_id="wxART_QUIT"/>
<bitmap stock_id="default-cell"/>
<bitmap stock_id="delete-row"/>
<bitmap stock_id="edit-case"/>
<bitmap stock_id="edit-cell"/>
<bitmap stock_id="edit-class"/>
<bitmap stock_id="fixed-width"/>
<bitmap stock_id="insert-rows"/>
<bitmap stock_id="paste-case"/>
<bitmap stock_id="print-case"/>
<bitmap stock_id="print-case-pdf"/>
<bitmap stock_id="run-case"/>
<bitmap stock_id="run-cell"/>
<bitmap stock_id="run-class"/>
<bitmap stock_id="varying-width"/>
<bitmap stock_id="write-spreadsheet"/>




reply via email to

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