Project

General

Profile

Actions

Bug #571

closed

fix height of toolbar on windows

Added by Matt Jones about 22 years ago. Updated about 22 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
morpho - general
Target version:
Start date:
08/22/2002
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
571

Description

The toolbar in MorphoFrame is sized by subtracting the height of the menu bar
from the hieight of the Progress Indicator. Unfortunately, JMenuBar.getHeight()
and similar methods always return zero. So I have not yet found a way to
accurately determine the actual menu bar height.

On linux, the menu bar is 24 pixels tall, so I have hardcoded a value for that
OS, although it might not apply to all Look and Feels. It results in a tollbar
that is 1 or 2 pixels too short on Windows, so it looks funny. This needs to be
fixed.

Ideally I would be able to find a reliable way to determine the menu height,
then I could accurately calculate the proper toolbar height.

If that's not possible, I could write a routine that provides fixed defaults for
the various operating system/l&f combinations, and a default. This is a kludge
but would probably work reasonably well.

One other possibility is to try to fix the menu bar at soe height that is
greater than its native height by adding a rigid component (its a box layout) of
a fixed size (e.g., 25 pixels). Again, a kludge, and this one might not work.

Ideas, or suggestions on how to get JMenuBar.getSize() to work?

Actions

Also available in: Atom PDF