source: aedes_gui_defaults.m

Last change on this file was 213, checked in by tjniskan, 3 years ago
  • Fixed Aedes for Handle Graphics version 2 (HG2).

M aedes.m
M aedes_createmosaic.m
M aedes_export_gui.m
M aedes_gui_defaults.m
M aedes_headerbrowser.m
M aedes_helpabout.m
M aedes_inputdlg.m
M aedes_juigetfiles.m
M aedes_readfidprefs.m
M aedes_resviewer.m
M aedes_revision.m

File size: 3.9 KB
Line 
1function Dat = aedes_gui_defaults;
2% AEDES_GUI_DEFAULTS - Default fonts and colors for GUIs
3%   
4%
5% Synopsis:
6%       Dat = aedes_gui_defaults;
7%
8% Description:
9%
10% Examples:
11%
12% See also:
13%
14
15% This function is a part of Aedes - A graphical tool for analyzing
16% medical images
17%
18% Copyright (C) 2006 Juha-Pekka Niskanen <Juha-Pekka.Niskanen@uku.fi>
19%
20% Department of Physics, Department of Neurobiology
21% University of Kuopio, FINLAND
22%
23% This program may be used under the terms of the GNU General Public
24% License version 2.0 as published by the Free Software Foundation
25% and appearing in the file LICENSE.TXT included in the packaging of
26% this program.
27%
28% This program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29% WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30
31
32% Default fonts
33set(0,'defaultuicontrolfontname','helvetica')
34
35% %% Load color for frame and figure
36% if isunix
37%   DefaultColor = [239 235 222]/255;
38% else
39%   DefaultColor=get(0,'DefaultUicontrolBackgroundcolor');
40% end
41
42if strcmpi(computer,'pcwin'),   % - Windows ------
43  Dat.title_fs = 10;            % FontSize
44  Dat.text_fs = 8;
45  Dat.map_fs = 8;
46  Dat.ax_fs = 7;
47  Dat.marker_fs = 5;
48  Dat.boldline_w = 2;
49else                            % - Others -------
50  Dat.title_fs = 14;            % FontSize
51  Dat.text_fs = 10;
52  Dat.map_fs = 10;
53  Dat.ax_fs = 8;
54  Dat.marker_fs = 6;
55  Dat.boldline_w = 3;
56end                             
57
58% Colors for Windows
59if ispc
60  DefaultColor=get(0,'DefaultUicontrolBackgroundcolor');
61  Dat.col.txt        = [0 0 0];
62  Dat.col.ax         = [1 1 1];
63  Dat.col.mainfig    = DefaultColor;
64  %Dat.col.mainfig    = [0.95 0.95 0.95];
65  %col.frame      = [0.9 0.9 0.9];
66  %Dat.col.frame      = [0.86 0.86 0.86];
67  Dat.col.frame      = DefaultColor;
68  %Dat.col.frame      = [191 204 230]./255;
69  Dat.col.frame_brd  = [0 0 0];
70  Dat.col.subframe   = [0.759 0.759 0.8];
71  Dat.col.shline         = [0.2 0.2 0.6];
72  Dat.col.shlinebg       = [0.1 0.1 0.1];
73  Dat.col.button     = [0.75 0.75 0.9];
74  Dat.col.button2    = [0.7 0.7 0.8];
75  Dat.col.radio_btn  = [0.72 0.72 0.82];
76  Dat.col.toggle_btn = [0.72 0.72 0.82];
77  Dat.col.edit       = [1 1 1];
78  Dat.col.checkbox   = Dat.col.subframe; %[0.72 0.72 0.82];
79  Dat.col.listbox    = [0.72 0.72 0.82];
80  Dat.col.popup      = [1 1 1];
81  %Dat.col.slider     = [0.398 0.398 0.578];
82  Dat.col.slider     = [166 179 201]./255;
83  Dat.col.normch     = Dat.col.mainfig;
84  Dat.col.selch      = [0.35 0.85 0.35];
85  Dat.col.rejch      = [0.85 0.35 0.35];
86 
87else
88  DefaultColor = [239 235 222]/255;
89  Dat.col.txt        = [0 0 0];
90  Dat.col.ax         = [1 1 1];
91  Dat.col.mainfig    = DefaultColor;
92  %Dat.col.mainfig    = [0.95 0.95 0.95];
93  %col.frame      = [0.9 0.9 0.9];
94  %Dat.col.frame      = [0.86 0.86 0.86];
95  Dat.col.frame      = DefaultColor;
96  %Dat.col.frame      = [191 204 230]./255;
97  Dat.col.frame_brd  = [0 0 0];
98  Dat.col.subframe   = [0.759 0.759 0.8];
99  Dat.col.shline         = [0.2 0.2 0.6];
100  Dat.col.shlinebg       = [0.1 0.1 0.1];
101  Dat.col.button     = [0.75 0.75 0.9];
102  Dat.col.button2    = [0.7 0.7 0.8];
103  Dat.col.radio_btn  = [0.72 0.72 0.82];
104  Dat.col.toggle_btn = [0.72 0.72 0.82];
105  %Dat.col.edit       = [0.92 0.92 1];
106  Dat.col.edit       = [1 1 1];
107  Dat.col.checkbox   = Dat.col.subframe; %[0.72 0.72 0.82];
108  %Dat.col.listbox    = [0.72 0.72 0.82];
109  Dat.col.listbox    = [0.95 0.95 0.95];
110  Dat.col.popup      = [0.72 0.72 0.82];
111  %Dat.col.slider     = [0.398 0.398 0.578];
112  Dat.col.slider     = [166 179 201]./255;
113  Dat.col.normch     = Dat.col.mainfig;
114  Dat.col.selch      = [0.35 0.85 0.35];
115  Dat.col.rejch      = [0.85 0.35 0.35];
116 
117end
118
119% - Number for tmp-figure -
120Dat.tmpfig = 99;
121fig_handles = get(0,'children');
122if ~isempty(fig_handles)
123        while ismember(Dat.tmpfig,double(fig_handles)),
124                Dat.tmpfig = Dat.tmpfig+1;
125        end
126end
127
128% Detect if HG2 graphics are used
129tmp = figure('units','pixels','position',[1 1 1 1],'visible','off');
130if isa(tmp,'matlab.ui.Figure')
131        Dat.HG2graphics = true;
132else
133        Dat.HG2graphics = false;
134end
135delete(tmp)
136
137return
138
139%% - EOF - %%
Note: See TracBrowser for help on using the repository browser.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008