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/animation/anim_channels_defines.c
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/animation/anim_channels_defines.c')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c36
1 files changed, 15 insertions, 21 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 9ceecd60bef..f5c9bfb4cf5 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -82,7 +82,7 @@
#define EXTRA_SCROLL_PAD 100.0f
/* size of indent steps */
-#define INDENT_STEP_SIZE 7
+#define INDENT_STEP_SIZE (0.35f * U.widget_unit)
/* size of string buffers used for animation channel displayed names */
#define ANIM_CHAN_NAME_SIZE 256
@@ -305,15 +305,15 @@ static short acf_generic_group_offset(bAnimContext *ac, bAnimListElem *ale)
if (ale->id) {
/* texture animdata */
if (GS(ale->id->name) == ID_TE) {
- offset += 21;
+ offset += U.widget_unit;
}
/* materials and particles animdata */
else if (ELEM(GS(ale->id->name), ID_MA, ID_PA))
- offset += 14;
+ offset += (short)(0.7f * U.widget_unit);
/* if not in Action Editor mode, action-groups (and their children) must carry some offset too... */
else if (ac->datatype != ANIMCONT_ACTION)
- offset += 14;
+ offset += (short)(0.7f * U.widget_unit);
/* nodetree animdata */
if (GS(ale->id->name) == ID_NT) {
@@ -2911,12 +2911,12 @@ void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, int setting,
/* --------------------------- */
-// XXX hardcoded size of icons
-#define ICON_WIDTH 17
-// XXX hardcoded width of sliders
-#define SLIDER_WIDTH 80
-// XXX hardcoded width of rename textboxes
-#define RENAME_TEXT_WIDTH 100
+// size of icons
+#define ICON_WIDTH (0.85f * U.widget_unit)
+// width of sliders
+#define SLIDER_WIDTH (4 * U.widget_unit)
+// width of rename textboxes
+#define RENAME_TEXT_WIDTH (5 * U.widget_unit)
/* Draw the given channel */
void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
@@ -2937,12 +2937,11 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
offset = 0;
/* calculate appropriate y-coordinates for icon buttons
- * 7 is hardcoded factor for half-height of icons
*/
y = (ymaxc - yminc) / 2 + yminc;
- ymid = y - 7;
+ ymid = y - 0.5f * ICON_WIDTH;
/* y-coordinates for text is only 4 down from middle */
- ytext = y - 4;
+ ytext = y - 0.2f * U.widget_unit;
/* check if channel is selected */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_SELECT))
@@ -2989,10 +2988,8 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
glColor3fv(fcu->color);
/* just a solid color rect
- * hardcoded 17 pixels width is slightly wider than icon width, so that
- * there's a slight border around it
*/
- glRectf(offset, yminc, offset + 17, ymaxc);
+ glRectf(offset, yminc, offset + ICON_WIDTH, ymaxc);
}
/* icon is drawn as widget now... */
@@ -3086,7 +3083,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
}
- /* finally draw a backdrop rect behind these
+ /* finally draw a backdrop rect behind these
* - starts from the point where the first toggle/slider starts,
* - ends past the space that might be reserved for a scroller
*/
@@ -3365,12 +3362,9 @@ void ANIM_channel_draw_widgets(bContext *C, bAnimContext *ac, bAnimListElem *ale
offset = 0;
/* calculate appropriate y-coordinates for icon buttons
- * 7 is hardcoded factor for half-height of icons
*/
y = (ymaxc - yminc) / 2 + yminc;
- ymid = y - 7;
- /* y-coordinates for text is only 4 down from middle */
- /* ytext = y - 4; */
+ ymid = y - 0.5f * ICON_WIDTH;
/* no button backdrop behind icons */
uiBlockSetEmboss(block, UI_EMBOSSN);