Commit Graph

3240 Commits

Author SHA1 Message Date
Campbell Barton abf18033f3 Fix T38383: glitch drawing inactive slider 2014-01-29 04:10:39 +11:00
Campbell Barton a5c35fb27f Code cleanup: use booleans where appropriate 2014-01-28 04:00:04 +11:00
Campbell Barton 029a7bbade UI: Fix for icon-only menus too small click-able area 2014-01-27 19:11:37 +11:00
Campbell Barton a71f072f9c UI: Replace +/- menus with collapsible ones
Patch D160, by Scott Petrovic with  own modifications.
2014-01-27 18:42:11 +11:00
Kevin Mackay fbc7ab30ff Curves: save active point to file
Changed curve active point from pointer to index. Allows curve active point to be saved to file and retained between modes for free. Also some small optimisations by removing pointer look up code.

- Made active point access functions into BKE API calls.
- Fixes operators where curve de-selection resulted in unsel-active point.
- Split curve delete into 2 functions
2014-01-27 15:21:04 +11:00
Bastien Montagne c0a4089265 Fix T38356: Crash when UIList.filter_items returns too few items. 2014-01-24 22:13:20 +01:00
Jonathan Williamson 037730b683 Make Tab Divider interopolate between the region background and tab outline.
Previously the divider was using the region background and the region text, leading to bad outlines with custom themes. This makes the outline behave more expectedly and allows better control.
2014-01-23 12:30:28 -06:00
Campbell Barton 80af3d6857 Tab theme colors
patch D234 from Jonathan Williamson with edits

- de-duplicate rna_def_userdef_theme_space_gradient and rna_def_userdef_theme_space_generic
- ui_theme_init_new_do now always sets theme settings (no need to test),
  used by bpy.ops.ui.reset_default_theme()
2014-01-23 11:48:36 +11:00
Campbell Barton 4ae7ae6f2e Code Cleanup: use bool for return values and correct comments
also remove CDDM_Check, theres no need for it.
2014-01-22 02:53:48 +11:00
Campbell Barton 7436a3f4ce Correction for recent commit clearing font cache
- move cache reset into view2d and comment about the rationale for resetting cache there.
- missed other places where view2d zoom level can change (smoothview, borderzoom, home and file reload)
- comment about DPI wasn't correct.
2014-01-20 12:45:38 +11:00
Campbell Barton 44855f9ef2 Code Cleanup: remove redundant NULL checks and add function attributes 2014-01-20 11:13:53 +11:00
Bastien Montagne d358f1f9e7 Fix last part of T38244: memory leak when scaling any panel
Issue is not noticeable with default font, but i18n one can use more than 500Mo of ram when cached in undreds of different sizes.

Campbell had already done most of the work in rBa780e7f3f09f and rB6b283f116829, just had to call BLF_cache_clear() in _exit funcs of VIEW2D_zoom & co operators.
2014-01-19 15:02:53 +01:00
Brecht Van Lommel 8b6b42b694 UI: tweak menu padding and make separator line more visible.
Adds some padding to the left of the icon, adds more space around the separator
line and make it more visible, and add some spacing at the top and bottom of
the menu. Ref T37794

Reviewed By: dingto, billrey

Differential Revision: https://developer.blender.org/D223
2014-01-17 17:06:11 +01:00
Joshua Leung 2df2ef5801 Bump up default size of vertices in Graph Editor to make them easier to see/select 2014-01-18 01:38:37 +13:00
Joshua Leung d8fa72bfb1 Assorted polish fixes for keyframe theme settings patch
* Version patching fixes for theme settings
* Added missing support for NLA (needed for the keyframes drawn in the action lines)
* Fix for a lack of contrast between selected and unselected extreme keyframe type
  (restoring it back to the pre-patch color scheme)
* Fix for keyframes on protected channels not being drawn with partial opacity
2014-01-17 14:53:02 +13:00
Jose Molina 5e5b0cee4f T37579: Theme settings for Keyframe Colours
This patch makes it possible to customise the colours used for the different
keyframe types (Keyframe, Breakdown, Extreme, Jitter) and the border colours
(normal and selected).

Reviewed by: Joshua Leung
2014-01-17 14:42:10 +13:00
Campbell Barton 6fdf78eaf6 Correct versioning check for manipulator 2014-01-17 04:24:59 +11:00
Campbell Barton 79bed4d9d3 Code Cleanup: loop over ThemeSpace's where possible 2014-01-17 03:52:25 +11:00
Campbell Barton af93ebcb50 Code Cleanup: style and redundant casts 2014-01-16 19:15:53 +11:00
Andrew Buttery d7c46c5d16 User Prefs: Manipulator unit and tooltip fixes
removal of x5 hardcoded size multiplier
2014-01-16 16:47:12 +11:00
Andrew Buttery 3b5fa7bba0 UI: add "double click to rename" tooltip to list items.
This is to try to avoid some confusion now that the separate text fields are gone.

Reviewed By: billrey, brecht

Differential Revision: https://developer.blender.org/D217
2014-01-15 17:08:28 +01:00
Campbell Barton 435a896fbe Fix for mistake in recent shadow addition in tabs 2014-01-15 15:46:32 +11:00
Campbell Barton a19f077541 Fix T38207: Tab scale jitters when resizing region 2014-01-15 13:40:41 +11:00
Campbell Barton b8b412230b Code Cleanup: use iroundf
also increase precision of rctf print functions
2014-01-15 13:40:40 +11:00
Campbell Barton fab5438943 Code Cleanup: avoid duplicate calls to WM_window_pixels_x/y 2014-01-15 10:41:13 +11:00
Campbell Barton cc978dc0c1 Fix for minor precision glitch while zooming on clamped view2d 2014-01-15 10:06:12 +11:00
Campbell Barton 1908c31b06 Fix for icon pin drawing too large when (U.pixelsize != 1) 2014-01-15 04:57:27 +11:00
Campbell Barton 20cea92db1 Code Cleanup: minor edits to recent commit 2014-01-14 13:39:55 +11:00
Jonathan Williamson 0f30231686 Missed a comment on last commit.
This was missed in the previous commit. Adding back for future readability. Thanks @campbellbarton for spotting it.
2014-01-13 20:35:35 -06:00
Jonathan Williamson b3101aba6a Make Toolbar Tabs more readable
This makes the tabs slightly larger, increases the text size slightly, and adjusts the colors a bit to improve overall contrast. It also makes inactive tabs draw with a full tab shape, improving the readability at a glance, particularly when tabs are very small.

The users most affected will be those on smaller displays, where previously tabs were very difficult to read.

Reviewers: @billrey, @campbellbarton

Differential Revision: https://developer.blender.org/D170
2014-01-13 20:25:40 -06:00
Campbell Barton 800e2283aa Fix T38171: Vertical tabs don't respond to clicks on the left most pixels 2014-01-14 04:15:54 +11:00
Bastien Montagne 190809d8ab UIList tweak: make active item visible when it changes somehow (useful e.g. when weight-paintings a rigged mesh). 2014-01-12 15:59:04 +01:00
Campbell Barton 62aa004c25 Style Cleanup: whitespace 2014-01-12 22:05:24 +11:00
Campbell Barton 1914d804cf Fix T38083: submenu arrow is overlayed by menu hotkey 2014-01-10 02:25:49 +11:00
Brecht Van Lommel 7bcb34e59b Fix T38131: node link buttons (like for cycles in material properties) were not
giving correct colors with theme menu colors set to bright values.

Thanks to Denis Declara for finding the cause of this bug.
2014-01-08 20:41:38 +01:00
Bastien Montagne d5c9b509ec Fix issues with float precision in numinput, like 'R 123' who would show additional 'noise' digits.
Expose float precision helper in UI_interface.h API, so that numinput can use this helper as numbuttons already do.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D186
2014-01-08 17:05:05 +01:00
Campbell Barton 2dba2e72b7 Code Cleanup: de-duplicate text pasting which only used the first line 2014-01-08 17:39:12 +11:00
Bastien Montagne e87095fa5d Cleanup: silence warnings. 2014-01-07 14:53:32 +01:00
Bastien Montagne 256a069987 Middle-clip tweaks:
* Now only middle-clip when both left and right parts of remaining strings are at least two times icon-width (thus most short labels will never be middle-clipped).
* Add a trailing ellipsis to right-clipped strings (unless it would take more than 20% of whole available width, in this case just clip chars, to keep as much data visible as possible!).
2014-01-07 14:53:32 +01:00
Campbell Barton ede891808c UI: pin icon was ignoring DPI 2014-01-06 03:10:15 +11:00
Campbell Barton ca78e402eb UI: Use shift+lmb for toggling panel pinning (not to conflict with MMB emulation) 2014-01-06 03:00:54 +11:00
Bastien Montagne 0074eac1ed More tweaks to clip middle:
* Do not apply margins with MENU (i.e. dropdowns) either.
* When middle clipping would remove only a few chars, rather clip right part!
2014-01-04 16:50:42 +01:00
Bastien Montagne 76d9244843 Fix core issue with clipping labels (labels have no margins, so border should be 0 in this case!). 2014-01-04 16:18:08 +01:00
Campbell Barton 6734936c13 RNA API: use bool's for enum itemf callbacks. 2014-01-04 18:10:01 +11:00
Campbell Barton b9114cb609 UI: Use bool rather then int/short's where possible 2014-01-04 18:10:01 +11:00
Campbell Barton cde3ff75d9 UI: Fix issue where tab text was too small and closely spaced 2014-01-04 13:55:40 +11:00
Bastien Montagne 56a531eb29 Fix T38043: Text clipping when it shouldn't
Tweak some more 'middle clipping' (zoom issues).
2014-01-03 15:49:07 +01:00
Campbell Barton f489e0c14c Code Cleanup: remove strlen() and unneeded include in recent commit
also fix for incorrect sizeof() use.
2014-01-03 19:40:29 +11:00
Andrew Buttery 99ed221a6b UI: Tooltip fix for the Particle Template ID.
Reviewed By: brecht, dingto
Differential Revision: https://developer.blender.org/D165
2014-01-03 02:14:32 +01:00
Bastien Montagne 3c6b5b72a4 Add a new "shortening process" for UI string drawing, which keeps both right and left parts
of the drawstr and replaces the middle by '...'

Rationnal:
It's usually easier to figure out what a troncated string means if you have both its start and end parts.

Details:
It currently affects all UI items (text fields, buttons, labels...).
Only exceptions are buttons inside menus, text fields & co being edited, and numbuttons/sliders.
Note that some static texts (like panels' titles or items in outliner) do not use usual UI items,
and just draw the whole text, using OpenGL to clip it. Will make another patch to fix this.

Reviewers: campbellbarton, brecht, carter2422, #user_interface

Reviewed by: brecht, carter2422

CC: billrey

Differential Revision: https://developer.blender.org/D114
2014-01-01 11:58:45 +01:00