Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2012-12-19 19:44:47 +0400
committerTon Roosendaal <ton@blender.org>2012-12-19 19:44:47 +0400
commit9aa6698bd055450b358b191e8ef0bbb823af53e4 (patch)
tree94524a02ee3668956620da8144a1fd8ba9feb061 /source/blender/editors/screen/screen_edit.c
parentcc23d4cd3eb6b98c87f53933510edc53c1513223 (diff)
UI DPI scaling:
Recoded the (2.65.1 version) region scale, which happened on loading files with different saved size windows. Also scaling window itself was affected. Old method: scaled region widths based on area/editor scaling factors. That was leading to too small or too large button regions easily. New method: region width/height now are in DPI control. Much nicer! - On changing dpi, buttons remain visually same widths. - On changing window sizes, the button views and zooms stick to exactly same. Caveat: people who were using Blender with 'extreme' dpi setting, might find the layouts slightly differ. Not sure if this is worth version patching... Todo: overlapping regions that overlap together draw badly. Fix underway.
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r--source/blender/editors/screen/screen_edit.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index f71d63e5fef..c827d8c686b 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -672,30 +672,7 @@ static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
CLAMP(sv->vec.y, 0, winsizey);
}
-
- /* scale prefsizes of regions */
- for (sa = sc->areabase.first; sa; sa = sa->next) {
- ARegion *ar;
-
- for (ar = sa->regionbase.first; ar; ar = ar->next) {
- ar->sizex = (int)((float)ar->sizex * facx);
- ar->sizey = (int)((float)ar->sizey * facy);
- ar->winx = (int)((float)ar->winx * facx);
- ar->winy = (int)((float)ar->winy * facy);
- }
- if (sa->spacedata.first) {
- SpaceLink *sl = sa->spacedata.first;
- for (sl = sl->next; sl; sl = sl->next) {
- for (ar = sl->regionbase.first; ar; ar = ar->next) {
- ar->sizex = (int)((float)ar->sizex * facx);
- ar->sizey = (int)((float)ar->sizey * facy);
- ar->winx = (int)((float)ar->winx * facx);
- ar->winy = (int)((float)ar->winy * facy);
- }
- }
- }
- }
- }
+}
/* test for collapsed areas. This could happen in some blender version... */
/* ton: removed option now, it needs Context... */