diff --git a/zUtil_GUI/GtBaseGuiElem.m b/zUtil_GUI/GtBaseGuiElem.m index cb19a1802211d55422e513ba38d58a409f6571b7..7e268311fbf351f738850109504bef88d27c0e6c 100644 --- a/zUtil_GUI/GtBaseGuiElem.m +++ b/zUtil_GUI/GtBaseGuiElem.m @@ -26,6 +26,7 @@ classdef GtBaseGuiElem < handle obj.conf.parent = []; obj.conf.f_title = ''; obj.conf.f_number = []; + obj.conf.f_size = 'small'; end function delete(obj) @@ -99,8 +100,21 @@ classdef GtBaseGuiElem < handle obj.conf.currentParent = obj.conf.h_figure; % Where are incapsulating in % Resize - screenPixels = GtBaseGuiElem.getPixels(0, 'ScreenSize'); - fig_pix = [(screenPixels(1:2) + round(screenPixels(3:4) / 4)), round(screenPixels(3:4) / 2)]; + screen_pixels = GtBaseGuiElem.getPixels(0, 'ScreenSize'); + 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); else obj.conf.h_figure = gtGetParentFigure(obj.conf.parent);