Commit Graph

3006 Commits

Author SHA1 Message Date
ff0ceb9926 UI: split ui_button_execute_do into begin/end 2014-02-08 09:42:26 +11:00
2dafd1bfb8 UI: butstore API to generalize button storage for modal handlers 2014-02-08 09:42:26 +11:00
b3afbcab8f ListBase API: add utility api funcs for clearing and checking empty 2014-02-08 06:24:05 +11:00
83f66a0cd5 UI: avoid O(n2) for old button lookups since both lists are almost always aligned 2014-02-08 02:27:05 +11:00
86df4baef8 Code cleanup: move old->new button search into ui_but_find_old 2014-02-08 01:49:24 +11:00
6135797ec8 Fix for button comparisons ignoring rna-index 2014-02-08 01:34:22 +11:00
e2541f87bc Fix T38516: crash when using color picker from redo panel. 2014-02-06 18:02:31 +01:00
13780799ea Fix T38478: pin panel, then ctrl+click to collapse others incorrectly unpinned panels. 2014-02-05 13:40:53 +01:00
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
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
fed1b8b16d Code cleanup: suffix vars to make obvious they are squared 2014-02-03 02:46:45 +11:00
a1a0ebbf49 Code cleanup: use length squared where possible 2014-02-02 02:24:48 +11:00
9598990b9b UI API: don't use a text label when icon_only is set 2014-01-30 15:28:39 +11:00
95e153a319 Fix T37661: color ramps and curve mapping editing not disabled for linked data. 2014-01-29 19:02:32 +01:00
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
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
abf18033f3 Fix T38383: glitch drawing inactive slider 2014-01-29 04:10:39 +11:00
a5c35fb27f Code cleanup: use booleans where appropriate 2014-01-28 04:00:04 +11:00
029a7bbade UI: Fix for icon-only menus too small click-able area 2014-01-27 19:11:37 +11:00
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
c0a4089265 Fix T38356: Crash when UIList.filter_items returns too few items. 2014-01-24 22:13:20 +01:00
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
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
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
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
44855f9ef2 Code Cleanup: remove redundant NULL checks and add function attributes 2014-01-20 11:13:53 +11:00
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
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
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
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
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
6fdf78eaf6 Correct versioning check for manipulator 2014-01-17 04:24:59 +11:00
79bed4d9d3 Code Cleanup: loop over ThemeSpace's where possible 2014-01-17 03:52:25 +11:00
af93ebcb50 Code Cleanup: style and redundant casts 2014-01-16 19:15:53 +11:00
d7c46c5d16 User Prefs: Manipulator unit and tooltip fixes
removal of x5 hardcoded size multiplier
2014-01-16 16:47:12 +11:00
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
435a896fbe Fix for mistake in recent shadow addition in tabs 2014-01-15 15:46:32 +11:00
a19f077541 Fix T38207: Tab scale jitters when resizing region 2014-01-15 13:40:41 +11:00
b8b412230b Code Cleanup: use iroundf
also increase precision of rctf print functions
2014-01-15 13:40:40 +11:00
fab5438943 Code Cleanup: avoid duplicate calls to WM_window_pixels_x/y 2014-01-15 10:41:13 +11:00
cc978dc0c1 Fix for minor precision glitch while zooming on clamped view2d 2014-01-15 10:06:12 +11:00
1908c31b06 Fix for icon pin drawing too large when (U.pixelsize != 1) 2014-01-15 04:57:27 +11:00
20cea92db1 Code Cleanup: minor edits to recent commit 2014-01-14 13:39:55 +11:00
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
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
800e2283aa Fix T38171: Vertical tabs don't respond to clicks on the left most pixels 2014-01-14 04:15:54 +11:00
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
62aa004c25 Style Cleanup: whitespace 2014-01-12 22:05:24 +11:00
1914d804cf Fix T38083: submenu arrow is overlayed by menu hotkey 2014-01-10 02:25:49 +11:00