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-12 22:58:11 +0400
committerTon Roosendaal <ton@blender.org>2012-12-12 22:58:11 +0400
commit12b642062c6fcef70151bd2424c2ebbc6a1a6843 (patch)
treecefb983f370b982f5e8b606c21ac884eb32a35a2 /source/blender/editors/include
parent26ae649b01c1147ec2fbb147bb652a8bc49a0019 (diff)
Holiday coding log :)
Nice formatted version (pictures soon): http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability Short list of main changes: - Transparent region option (over main region), added code to blend in/out such panels. - Min size window now 640 x 480 - Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake. - Macbook retina support, use command line --no-native-pixels to disable it - Timeline Marker label was drawing wrong - Trackpad and magic mouse: supports zoom (hold ctrl) - Fix for splash position: removed ghost function and made window size update after creation immediate - Fast undo buffer save now adds UI as well. Could be checked for regular file save even... Quit.blend and temp file saving use this now. - Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)" - New Userpref option "Keep Session" - this always saves quit.blend, and loads on start. This allows keeping UI and data without actual saves, until you actually save. When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header) - Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v). Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards. - User preferences (themes, keymaps, user settings) now can be saved as a separate file. Old option is called "Save Startup File" the new one "Save User Settings". To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still. - OSX: fixed bug that stopped giving mouse events outside window. This also fixes "Continuous Grab" for OSX. (error since 2009)
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/BIF_gl.h8
-rw-r--r--source/blender/editors/include/ED_anim_api.h24
-rw-r--r--source/blender/editors/include/ED_screen.h2
-rw-r--r--source/blender/editors/include/UI_interface.h13
-rw-r--r--source/blender/editors/include/UI_view2d.h6
5 files changed, 32 insertions, 21 deletions
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h
index 479e0b65177..cdf9b71972d 100644
--- a/source/blender/editors/include/BIF_gl.h
+++ b/source/blender/editors/include/BIF_gl.h
@@ -35,6 +35,14 @@
#include "GL/glew.h"
+#ifdef __APPLE__
+
+/* hacking pointsize and linewidth */
+#define glPointSize(f) glPointSize(U.pixelsize*(f))
+#define glLineWidth(f) glLineWidth(U.pixelsize*(f))
+
+#endif
+
/*
* these should be phased out. cpack should be replaced in
* code with calls to glColor3ub. - zr
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 8d7ae3aad6a..551d3041398 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -300,34 +300,34 @@ typedef enum eAnimFilter_Flags {
/* -------------- Channel Defines -------------- */
/* channel heights */
-#define ACHANNEL_FIRST -16
-#define ACHANNEL_HEIGHT 16
-#define ACHANNEL_HEIGHT_HALF 8
-#define ACHANNEL_SKIP 2
+#define ACHANNEL_FIRST (-0.8f * U.widget_unit)
+#define ACHANNEL_HEIGHT (0.8f * U.widget_unit)
+#define ACHANNEL_HEIGHT_HALF (0.4f * U.widget_unit)
+#define ACHANNEL_SKIP (0.1f * U.widget_unit)
#define ACHANNEL_STEP (ACHANNEL_HEIGHT + ACHANNEL_SKIP)
/* channel widths */
-#define ACHANNEL_NAMEWIDTH 200
+#define ACHANNEL_NAMEWIDTH (10 * U.widget_unit)
/* channel toggle-buttons */
-#define ACHANNEL_BUTTON_WIDTH 16
+#define ACHANNEL_BUTTON_WIDTH (0.8f * U.widget_unit)
/* -------------- NLA Channel Defines -------------- */
/* NLA channel heights */
// XXX: NLACHANNEL_FIRST isn't used?
-#define NLACHANNEL_FIRST -16
-#define NLACHANNEL_HEIGHT(snla) ((snla && (snla->flag & SNLA_NOSTRIPCURVES)) ? 16 : 24)
-#define NLACHANNEL_HEIGHT_HALF(snla) ((snla && (snla->flag & SNLA_NOSTRIPCURVES)) ? 8 : 12)
-#define NLACHANNEL_SKIP 2
+#define NLACHANNEL_FIRST (-0.8f * U.widget_unit)
+#define NLACHANNEL_HEIGHT(snla) ((snla && (snla->flag & SNLA_NOSTRIPCURVES)) ? (0.8f * U.widget_unit) : (1.2f * U.widget_unit))
+#define NLACHANNEL_HEIGHT_HALF(snla) ((snla && (snla->flag & SNLA_NOSTRIPCURVES)) ? (0.4f * U.widget_unit) : (0.6f * U.widget_unit))
+#define NLACHANNEL_SKIP (0.1f * U.widget_unit)
#define NLACHANNEL_STEP(snla) (NLACHANNEL_HEIGHT(snla) + NLACHANNEL_SKIP)
/* channel widths */
-#define NLACHANNEL_NAMEWIDTH 200
+#define NLACHANNEL_NAMEWIDTH (10 * U.widget_unit)
/* channel toggle-buttons */
-#define NLACHANNEL_BUTTON_WIDTH 16
+#define NLACHANNEL_BUTTON_WIDTH (0.8f * U.widget_unit)
/* ---------------- API -------------------- */
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 860d176ffb3..f7a42d5b1ac 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -64,9 +64,9 @@ void ED_region_panels(const struct bContext *C, struct ARegion *ar, int verti
void ED_region_header_init(struct ARegion *ar);
void ED_region_header(const struct bContext *C, struct ARegion *ar);
void ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar);
-void region_scissor_winrct(struct ARegion *ar, struct rcti *winrct);
void ED_region_info_draw(struct ARegion *ar, const char *text, int block, float alpha);
void ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy);
+float ED_region_blend_factor(struct ARegion *ar);
/* spaces */
void ED_spacetypes_init(void);
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 2dc552d0fce..abd1782d0f2 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -175,10 +175,10 @@ typedef struct uiLayout uiLayout;
/* uiBut->drawflag */
#define UI_BUT_DRAW_ENUM_ARROWS (1 << 0) /* draw enum-like up/down arrows for button */
-/* scale fixed button widths by this to account for DPI
- * 8.4852 == sqrtf(72.0f)) */
-#define UI_DPI_FAC (sqrtf((float)U.dpi) / 8.48528137423857f)
-#define UI_DPI_ICON_FAC (((float)U.dpi) / 72.0f)
+/* scale fixed button widths by this to account for DPI (no difference for buttons or icons anymore */
+
+#define UI_DPI_FAC ((U.pixelsize * (float)U.dpi) / 72.0f)
+#define UI_DPI_ICON_FAC ((U.pixelsize * (float)U.dpi) / 72.0f)
/* 16 to copy ICON_DEFAULT_HEIGHT */
#define UI_DPI_ICON_SIZE ((float)16 * UI_DPI_ICON_FAC)
@@ -893,7 +893,10 @@ void uiStyleFontDrawRotated(struct uiFontStyle *fs, struct rcti *rect, const cha
int UI_GetStringWidth(const char *str); // XXX temp
void UI_DrawString(float x, float y, const char *str); // XXX temp
void UI_DrawTriIcon(float x, float y, char dir);
-uiStyle *UI_GetStyle(void);
+
+uiStyle *UI_GetStyle(void); /* use for fonts etc */
+uiStyle *UI_GetStyleDraw(void); /* DPI scaled settings for drawing */
+
/* linker workaround ack! */
void UI_template_fix_linking(void);
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index 24759fa778a..3b94291b43a 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -102,11 +102,11 @@ enum {
/* ------ Defines for Scrollers ----- */
/* scroller area */
-#define V2D_SCROLL_HEIGHT 17
-#define V2D_SCROLL_WIDTH 17
+#define V2D_SCROLL_HEIGHT (0.85f * U.widget_unit)
+#define V2D_SCROLL_WIDTH (0.85f * U.widget_unit)
/* scroller 'handles' hotspot radius for mouse */
-#define V2D_SCROLLER_HANDLE_SIZE 12
+#define V2D_SCROLLER_HANDLE_SIZE (0.6f * U.widget_unit)
/* ------ Define for UI_view2d_sync ----- */