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