Consistent colors in GUI across systems

1 次查看(过去 30 天)
I'm working on a cross platform GUIDE based application.
My development system is MacOS Lion. When I run the application on that system the GUI looks good (at least to me). However, when I run it on a different version of Matlab or different OS background colors seem to be chosen at random.
If I explicitly set the background color, even to the exact value it shows on my development system it is consistent. But, I have a googol or two widget in this thing.
On MacOS-Snow Leopard, backgrounds are darker (170,170,170 instead of 237,237,237).
On Windows XP, Win 7, Ubuntu 11.04 the button colors are using the "Angry Fruit Salad" color map, some are gray, some are red, yellow, orange, purple and the backgrounds to msgbox are as dark as on Snow Leopard.
Is there any alternative to setting every single background in GUIDE and explicitly modifying each msgbox and other pop-ups?
Thanks, Joe
  1 个评论
Joseph Areeda
Joseph Areeda 2012-2-14
I've been following Sean's advice and editing a lot of buttons. We will see if getting it to look right on Ubuntu affects how it looks on the other systems.
I learned that the rainbow of button colors has something to do with which panel they are in. We highlight the different panels with different colors. It seems some, not all of the buttons are using the parent panel's highlight color as their background color on Ubuntu and Windows but not Macs.
I have no idea who that makes sense to.
Joe

请先登录,再进行评论。

采纳的回答

Sean de Wolski
Sean de Wolski 2012-2-14
You could manually set the default colors for the root. This could be dangerous to other applications though:
set(0,'defaultfigurecolor',[0 0 0.6])
etc. Same for uicontrols and others. I would recommend manually doing it in GUIDE though. If you do this and want your original figure color back:
get(0,'defaultfigurecolor');
  3 个评论
Joseph Areeda
Joseph Areeda 2012-2-14
Oh yeah.
I just took over this project which has been an on going development for years. I'm not sure one person has done the cross platform check and commented on this before.
That's part of my reluctance to go in and modify everything that interacts with the user. It seems very invasive and error prone.
Joe
Sean de Wolski
Sean de Wolski 2012-2-14
I would guess it does, that and themes. Perhaps a good way to dig for it would be to get the default figure (and uicontrol uipanel etc.) color on all three systems - it may have been set by someone else and the OS themes might affect it.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by