Commit Graph

2870 Commits

Author SHA1 Message Date
Campbell Barton
c046cb80ed UI: allow clicking to close menus and popups (but not submenus). 2014-02-11 04:23:44 +11:00
Campbell Barton
d2b5f0f6c2 UI: fix own error, dont add slider pad when neither sides align 2014-02-11 03:38:48 +11:00
Campbell Barton
2f01be2b2f UI: panel tabs, use simple color interpolation that ignores alpha 2014-02-10 17:06:56 +11:00
Campbell Barton
3432f34d05 UI: report if WM_OT_call_menu uses an unknown menu 2014-02-10 14:17:33 +11:00
Campbell Barton
05dfd852ec UI: fix for issue in last commit, popups show above the buttons again 2014-02-10 13:44:59 +11:00
Campbell Barton
35f62bdced UI: refactor menus to remove menus encoded in strings
On every redraw a single unopened dropdown boxe would translate
and convert every EnumPropertyItem into a string,
then decode every item, and search those items to find the name of the button to draw.

Replace this with a custom menu callback for RNA enums,
tooltips for enums now show too.
2014-02-10 13:04:43 +11:00
Campbell Barton
21b60ea7e1 UI: use RNA for colorband interpolation menu 2014-02-10 13:04:43 +11:00
Brecht Van Lommel
04db32b698 Code cleanup: fix compiler warning with clang. 2014-02-09 13:56:49 +01:00
Campbell Barton
b105d2ac7f UI: replace uiPupMenuOkee & uiPupMenuSaveOver with WM_operator_confirm 2014-02-09 12:32:20 +11:00
Campbell Barton
873f901e5a UI: improve reports popup
- use labels rather then menu items (items selected but did nothing)
- each report gets its own icon (icons besides first were ignored)
- use uiPupMenu rather then string based menu.
2014-02-09 12:00:03 +11:00
Campbell Barton
52f080604b Code cleanup: remove unused menu functions 2014-02-09 11:25:32 +11:00
Campbell Barton
385c892418 UI: use proportional option while dragging buttons 2014-02-09 08:42:45 +11:00
Campbell Barton
3276b83fda UI: support for alpha tab background 2014-02-09 01:39:09 +11:00
Campbell Barton
127330d6ca UI: multi-drag number button editing
clicking and dragging down edits multiple number buttons at once. (patch D270)
2014-02-08 09:42:26 +11:00
Campbell Barton
ff0ceb9926 UI: split ui_button_execute_do into begin/end 2014-02-08 09:42:26 +11:00
Campbell Barton
2dafd1bfb8 UI: butstore API to generalize button storage for modal handlers 2014-02-08 09:42:26 +11:00
Campbell Barton
b3afbcab8f ListBase API: add utility api funcs for clearing and checking empty 2014-02-08 06:24:05 +11:00
Campbell Barton
83f66a0cd5 UI: avoid O(n2) for old button lookups since both lists are almost always aligned 2014-02-08 02:27:05 +11:00
Campbell Barton
86df4baef8 Code cleanup: move old->new button search into ui_but_find_old 2014-02-08 01:49:24 +11:00
Campbell Barton
6135797ec8 Fix for button comparisons ignoring rna-index 2014-02-08 01:34:22 +11:00
Brecht Van Lommel
e2541f87bc Fix T38516: crash when using color picker from redo panel. 2014-02-06 18:02:31 +01:00
Brecht Van Lommel
13780799ea Fix T38478: pin panel, then ctrl+click to collapse others incorrectly unpinned panels. 2014-02-05 13:40:53 +01:00
Antony Riakiotakis
fc9626b1df Change confusing check discovered while working on HCL color wheel:
COLOR widgets never get created with UI_GRAD_V_ALT values. This is
intended for HSVCUBE color sliders only so reverting this to old value
before it was substituted with a define, which was -1.

There's one case where COLOR buttons get defined with a1 value different
than -1 which is in ui_def_but_rna. There the step value of the RNA
property is used. However, that meant that if step equaled to 9, which
is UI_GRAD_V_ALT value (unlikely) or if UI_GRAD_V_ALT was changed to 10
in future, or we added check for e.g. UI_GRAD_L_ALT which is 10 in HCL
branch, color widget would not get a color selection menu spawned.
2014-02-05 10:45:14 +02:00
Campbell Barton
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
Campbell Barton
fed1b8b16d Code cleanup: suffix vars to make obvious they are squared 2014-02-03 02:46:45 +11:00
Campbell Barton
a1a0ebbf49 Code cleanup: use length squared where possible 2014-02-02 02:24:48 +11:00
Campbell Barton
9598990b9b UI API: don't use a text label when icon_only is set 2014-01-30 15:28:39 +11:00
Brecht Van Lommel
95e153a319 Fix T37661: color ramps and curve mapping editing not disabled for linked data. 2014-01-29 19:02:32 +01:00
Campbell Barton
9612433884 UI: minor optimization for button lookup, break early when button found
also reduce int/float conversion
2014-01-29 23:05:32 +11:00
Campbell Barton
39eb314cb9 UI: Refactor timecode functions into BLI_timecode
- deduplicate timecode_simple_string from image.c
- replace V2D_UNIT_SECONDSSEQ with V2D_UNIT_SECONDS
- avoid possible buffer overflow bugs (sprintf -> BLI_snprintf)
- remove option not to use timecode and split into 2 functions

Patch D227 by Andrew Buttery with own refactoring.
2014-01-29 20:44:01 +11:00
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 Garcia
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