-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpspm_ui_app.m
50 lines (48 loc) · 2.21 KB
/
pspm_ui_app.m
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
function app = pspm_ui_app (app)
% ● Descrition
% pspm_ui_app handles the ui controlling elements for app designer based
% GUI files. Details of font styles can be found in the developer's
% guide.
% ● History
% Written in 2022 by Teddy Chao
%% General Settings
OS = ispc*1 + ismac*2 + (isunix-ismac)*3;
pspm_font_list = {'Segoe UI', '.AppleSystemUIFont', 'DejaVu Sans'};
pspm_font_size_list = {14, 14, 14};
pspm_font = pspm_font_list{OS};
pspm_font_size = pspm_font_size_list{OS};
pspm_layout_component_list_full = {'logo', 'attribution', 'button_open_issue',...
'button_help', 'button_report_second_level', 'text_more', ...
'button_data_preparation', 'button_data_preprocessing', ...
'text_data_preprocessing', 'button_first_level_models', ...
'button_batch', 'button_tools', 'text_tools', ...
'button_models_for_sf', 'button_non_linear_scr_model', ...
'text_second_level_model', 'text_first_level_models', ...
'text_data_preparation', 'button_export_statistics', ...
'button_contrast_manager' , 'button_review_model', ...
'button_second_level_model', 'button_quit'};
pspm_layout_component_list_buttons = {'button_open_issue',...
'button_help', 'button_report_second_level', ...
'button_data_preparation', 'button_data_preprocessing', ...
'button_first_level_models', ...
'button_batch', 'button_tools', ...
'button_models_for_sf', 'button_non_linear_scr_model', ...
'button_export_statistics', ...
'button_contrast_manager' , 'button_review_model', ...
'button_second_level_model', 'button_quit'};
update_app_struct(app, pspm_layout_component_list_full, 'FontName', pspm_font);
update_app_struct(app, pspm_layout_component_list_buttons, 'FontSize', pspm_font_size);
update_app_struct(app, pspm_layout_component_list_buttons, 'FontWeight', 'normal');
%% Window specific settings
switch app.layout.Name
case 'pspm'
attribution_disp_text = ['Build 22-08-2023 with MATLAB 2023a, ',...
'The PsPM Team, University College London'];
app.attribution.Text{1,1} = 'Version 6.1.0';
app.attribution.Text{2,1} = attribution_disp_text;
end
return
function update_app_struct(app, components, field_name, value)
for i_comp = 1:length(components)
app = setfield(app, components{i_comp}, field_name, value);
end