Menu buttons - graphics and borders

See attached picture.

I measured the default button size and found it to be 25 pixels tall, so I made an image 25 pixels tall.

But now a 3 or 4 pixel border has magically appeared around the image.

Can I turn this off somehow? I want it to be neatly vertically inline with the rest of the default buttons.

The other buttons also have this border around them also. No, you can’t turn it off. You need to make your graphic smaller.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thanks for the snappy reply as always, Brent.

Thus spake “Shad”:

I have some code written (since about 9 months now) to normalize the
heights of buttons in each row so they don’t look stupid like they do
now. I’m planning to put this into 3.2.

So, that will also solve your problem.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Does your code also allow one to set the font size, and use multiple lines of text, for the buttons?

Cause that’d be super spiffy!

I did a similiar thing based on using Icon Families for toolbar buttons. We need to discuss this further when you are ready.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Shad”:

No.

Setting the font size is not something I think we should allow, as I
suspect that would conflict with the Human Interface Guidelines for every
platform we support.

You might already be able to have multiple lines of text, if you give
the text as HTML and use
elements.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

We can talk about it now, if you want.

I should note that there’s at least one big problem with the toolbar
which needs fixing, namely that a few components wrap the buttons they
contribute to the toolbar in another toolbar before putting them into
the outer toolbar. In order to get the sizing right, those buttons have
to be unpacked first—which might cause any number of weird problems
I haven’t anticipated, if anything was relying on those buttons being
children of a superfluous toolbar. Anyway, this needs fixing. Unpacking
is only a bandaid.

BTW, At some point I’m going to need to know how to use Icon Families for
the icons in the new preferences dialog. (Soonish I’ll be able to show you
the new preferences setup I’ve been working on, for comments.)


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

First thing is, what are we trying to achieve?

Is it to just get all the buttons the same height?

If so, what height? The height of the highest button, or preset Tango sizes?

Do we want players to be able to change all button sizes at once via a preference?

What about designers who want to have a couple of large buttons sticking out?

The code I wrote refactored LaunchButton to use Icon Families instead of any old image which naturally forces the images to be one of the Tango Sizes. I’ve written an Icon browser so you can select from the Icon Families included with Vassal. Unlike now, where you cannot view the standard images supplied in the Vassal Engine. I had a preference setting which controlled all of the button sizes at once.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

A uniform look for all of the buttons. Even better would be the ability
for the user to control button size and whether text, icons, or text &
icons are displayed.

That’s what the code I wrote is for. I think that’s the bare minimum
we can do with the buttons.

The code I wrote wraps the rows of buttons, and in so doing makes each
row have height of the tallest button in the row.

I think what we should show the user as choices are the Tango sizes, but
there should be one more size, namely the natural height of buttons which
contain only text, which is not shown to the user, but gets used if no
buttons have icons.

Many apps these days have a setting which lets you choose between Icons,
Text, and Icons & Text for your tool buttons. I think we should have that,
too.

Yes, there should be a setting for this in the prefs.

This is case where I think what the designer wants is wrong.

Ok. Have you written the docs for the icon classes yet?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I see this as somewhat problematic since the majority of modules do not currently specify any text for most buttons at all. What are you going to see if you turn on ‘text’ display?

What if the designer wants a mixture of icon only and text only? I try and specify an Icon only for all buttons, but often have a button with text ‘Other’ (for example) that drops down a menu of ‘bits and pieces’ that don’t fit anywhere else.

Absolute bare bones committed so far:

VASSAL.tools.icon.IconFamily:

// Tango Icon sizes
public static final int XSMALL = 0;
public static final int SMALL = 1;
public static final int MEDIUM = 2;
public static final int LARGE = 3;

VASSAL.tools.icon.IconFactory:

OpIcon icon = IconFactory.getIcon(“iconFamilyName”, IconFamily.SMALL);


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

I had exactly the opposite in my head, that most modules don’t specify
any icons for most buttons. I would assume that we would display whatever
there is to display in the event that the requested thing isn’t available,
since we shouldn’t show the user a blank button.

I think that a mixture is a bad idea, design-wise, since it presents an
inconsistent GUI. There’s probably some appropriate icon for a button
which presents a menu of stuff, e.g., a gear, since those kinds of things
will usually be settings or seldom-used toggles.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

*********** REPLY SEPARATOR ***********

On 23/06/2009 at 12:36 AM Joel Uckelman wrote:

Depends on the keenness of the designer.

Makes sense.

Which comes back to providing a rich set of Icons within the base VASSAL for people to choose from, instead of every single designer running around trying to find their own icons for basic functions that exist in every module.

BTW, I had to put the Icon work aside because of the ImageOp limitations (not supporting pathnames).

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

This in turn, is related to our license. If we were GPL instead of LGPL,
we could provide a lot more icons, since all of the GNOME Tango icons
are GPL. (Another reason to switch to GPL is that I found a really good
docking library which is GPL, and that would save me the work of having
to perfect and complete the docking demo I started.)

It’s unlikely that I’ll get back to that before I turn in my dissertation
in August, as fixing that problem propertly will require some serious
thought on my part.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)