Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/screen_edit.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| static int screen_global_header_size(void) | static int screen_global_header_size(void) | ||||
| { | { | ||||
| return (int)ceilf(ED_area_headersize() / UI_DPI_FAC); | return (int)ceilf(ED_area_headersize() / UI_DPI_FAC); | ||||
| } | } | ||||
| static void screen_global_topbar_area_refresh(wmWindow *win, bScreen *screen) | static void screen_global_topbar_area_refresh(wmWindow *win, bScreen *screen) | ||||
| { | { | ||||
| const short size = screen_global_header_size(); | const short size_min = screen_global_header_size(); | ||||
| const short size_max = size_min * 2; | |||||
| const short size = (screen->flag & SCREEN_SHOW_TOPTOOLBAR) ? size_min : size_max; | |||||
| rcti rect; | rcti rect; | ||||
| BLI_rcti_init(&rect, 0, WM_window_pixels_x(win) - 1, 0, WM_window_pixels_y(win) - 1); | BLI_rcti_init(&rect, 0, WM_window_pixels_x(win) - 1, 0, WM_window_pixels_y(win) - 1); | ||||
| rect.ymin = rect.ymax - size; | rect.ymin = rect.ymax - size_max; | ||||
| screen_global_area_refresh( | screen_global_area_refresh( | ||||
| win, screen, SPACE_TOPBAR, GLOBAL_AREA_ALIGN_TOP, &rect, size, size, size); | win, screen, SPACE_TOPBAR, GLOBAL_AREA_ALIGN_TOP, &rect, size, size_min, size_max); | ||||
| } | } | ||||
| static void screen_global_statusbar_area_refresh(wmWindow *win, bScreen *screen) | static void screen_global_statusbar_area_refresh(wmWindow *win, bScreen *screen) | ||||
| { | { | ||||
| const short size_min = 1; | const short size_min = 1; | ||||
| const short size_max = 0.8f * screen_global_header_size(); | const short size_max = 0.8f * screen_global_header_size(); | ||||
| const short size = (screen->flag & SCREEN_COLLAPSE_STATUSBAR) ? size_min : size_max; | const short size = (screen->flag & SCREEN_COLLAPSE_STATUSBAR) ? size_min : size_max; | ||||
| rcti rect; | rcti rect; | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||