Slider appearance on Macs in a cross platform GUI

1 次查看(过去 30 天)
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?

回答(1 个)

Michelle Hirsch
Michelle Hirsch 2011-1-25
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 个评论
Stephan
Stephan 2011-1-25
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 2011-1-25
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by