Slider appearance on Macs in a cross platform GUI

2 views (last 30 days)
UICONTROLs appear very differently on PCs and Macs. In particular, sliders have a much larger vertical extend on Macs. Thus, GUIs that I create (in a space-efficient way) on a PC will look horrible on a Mac and closely spaced sliders will overlap and hide each other.
Is there a way to adjust the appearance of the sliders (and possibly other uicontrols) on a Mac?
Or any other ideas to (automatically) adjust the GUI appearance on the OS?

Answers (1)

Michelle Hirsch
Michelle Hirsch on 25 Jan 2011
This page gives a whole range of tips for making GUIs that look good on multiple operating systems:
It suggests using characters units for your uicontrols, as long as your GUI is non-resizable. If it is resizable, it recommends using normalized units.
  2 Comments
Stephan
Stephan on 25 Jan 2011
Hi Scott,
thanks for your reply!
However, unfortunately it does not address my problem. My problem is due to the fact that each slider as the same height on a Mac (independent of its units), whereas the height can be defined by the user on a PC, which can create problems in the layout in the GUI. To illustrate this, you can see here crops of screenshots of the same GUI on a Mac and a PC (unfortunately I can't embedd the images here directly):
http://www.colors-and-contrasts.com/gui_pc.jpg
http://www.colors-and-contrasts.com/gui_mac.jpg
As you can see also the edit text boxes do not look very nice on the Mac, in general each uicontrol appears to require more space which would require to increase the overall size of the GUI (which I wouldn't like to do). Any ideas how to solve this?
Best regards,
Stephan.
Walter Roberson
Walter Roberson on 25 Jan 2011
Stephan, are both the height and width of the Position properties being ignored on the Mac? If you get() the Position after you set it, is it the same as what you set? If you set() the size equal to the height and width from the Extent property (and add a slight margin) does it look reasonable for each individual slider, or is Extent disconnected from reality?
I think I would
get(0,'Default')
to see if I could see some default setting that differed on the Mac. I would also cross-check that the same font and font size was being used on both.

Sign in to comment.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!