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>2011-06-04 21:03:46 +0400
committerTon Roosendaal <ton@blender.org>2011-06-04 21:03:46 +0400
commit88676349a473020937ba5f2637535bf5960059c9 (patch)
treecb02be5fea2f127b284430508fcab3de959c37d7 /source/blender/editors/screen/screen_edit.c
parent4a59928484b93a6c3876c0c8b065f6d313640804 (diff)
Code holiday commit:
- fix: user pref, window title was reset to 'Blender' on tab usage - Undo history menu back: - name "Undo History" - hotkey alt+ctrl+z (alt+apple+z for mac) - works like 2.4x, only for global undo, editmode and particle edit. - Menu scroll - for small windows or screens, popup menus now allow to display all items, using internal scrolling - works with a timer, scrolling 10 items per second when mouse is over the top or bottom arrow - if menu is too big to display, it now draws to top or bottom, based on largest available space. - also works for hotkey driven pop up menus. - User pref "DPI" follows widget/layout size - widgets & headers now become bigger and smaller, to match 'dpi' font sizes. Works well to match UI to monitor size. - note that icons can get fuzzy, we need better mipmaps for it
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r--source/blender/editors/screen/screen_edit.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 9bc2b1a402c..eb41dcd147b 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -671,9 +671,9 @@ static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
/* test for collapsed areas. This could happen in some blender version... */
/* ton: removed option now, it needs Context... */
- /* make each window at least HEADERY high */
+ /* make each window at least ED_area_headersize() high */
for(sa= sc->areabase.first; sa; sa= sa->next) {
- int headery= HEADERY+1;
+ int headery= ED_area_headersize()+1;
if(sa->v1->vec.y+headery > sa->v2->vec.y) {
/* lower edge */
@@ -1055,6 +1055,18 @@ void ED_screen_draw(wmWindow *win)
win->screen->do_draw= 0;
}
+/* helper call for below, dpi changes headers */
+static void screen_refresh_headersizes(void)
+{
+ const ListBase *lb= BKE_spacetypes_list();
+ SpaceType *st;
+
+ for(st= lb->first; st; st= st->next) {
+ ARegionType *art= BKE_regiontype_from_id(st, RGN_TYPE_HEADER);
+ if(art) art->prefsizey= ED_area_headersize();
+ }
+}
+
/* make this screen usable */
/* for file read and first use, for scaling window, area moves */
void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
@@ -1076,6 +1088,9 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
else
wm_subwindow_position(win, win->screen->mainwin, &winrct);
+ /* header size depends on DPI, let's verify */
+ screen_refresh_headersizes();
+
for(sa= win->screen->areabase.first; sa; sa= sa->next) {
/* set spacetype and region callbacks, calls init() */
/* sets subwindows for regions, adds handlers */