Skip to content
Snippets Groups Projects
Commit d1c89105 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Viewers: added size specification

parent 58e159e2
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,7 @@ classdef GtBaseGuiElem < handle ...@@ -26,6 +26,7 @@ classdef GtBaseGuiElem < handle
obj.conf.parent = []; obj.conf.parent = [];
obj.conf.f_title = ''; obj.conf.f_title = '';
obj.conf.f_number = []; obj.conf.f_number = [];
obj.conf.f_size = 'small';
end end
function delete(obj) function delete(obj)
...@@ -99,8 +100,21 @@ classdef GtBaseGuiElem < handle ...@@ -99,8 +100,21 @@ classdef GtBaseGuiElem < handle
obj.conf.currentParent = obj.conf.h_figure; % Where are incapsulating in obj.conf.currentParent = obj.conf.h_figure; % Where are incapsulating in
% Resize % Resize
screenPixels = GtBaseGuiElem.getPixels(0, 'ScreenSize'); screen_pixels = GtBaseGuiElem.getPixels(0, 'ScreenSize');
fig_pix = [(screenPixels(1:2) + round(screenPixels(3:4) / 4)), round(screenPixels(3:4) / 2)]; switch (lower(obj.conf.f_size))
case 'wide'
f_positioning = [4 4];
f_scaling = [2 2];
case 'big'
f_positioning = [4 6];
f_scaling = [2 1.5];
case 'small'
f_positioning = [3 4];
f_scaling = [3 2];
end
fig_pix = [ ...
(screen_pixels(1:2) + round(screen_pixels(3:4) ./ f_positioning)), ...
round(screen_pixels(3:4) ./ f_scaling) ];
GtBaseGuiElem.setPixels(obj.conf.h_figure, 'Position', fig_pix); GtBaseGuiElem.setPixels(obj.conf.h_figure, 'Position', fig_pix);
else else
obj.conf.h_figure = gtGetParentFigure(obj.conf.parent); obj.conf.h_figure = gtGetParentFigure(obj.conf.parent);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment