Commit Graph

579 Commits

Author SHA1 Message Date
025bac4570 Small enhancement to grab-resize of uiLists, suggested by plasmasolutions: do not effectively apply auto-size until we stop grabbing, avoid size of uiLists to switch between rows and maxrows while dragging. 2013-08-27 18:56:04 +00:00
6b51c27414 uiLists enhacements: dragresize and better GRID layout.
Many thanks to Brecht for the review!

* You can now drag-resize uiLists (in default or grid layouts).
** Note about "default" size: when you drag below minimal size of the uiList, it will automatically reset to automatic sizing (i.e. size between rows and maxrows, depending on the number of items to show). This often means (e.g. in Materials list with many mat slots) that the list will grow again to maxrows!

* Grid uiLists now have a customizable number of columns (previously it was a fixed value of 9), and they will respect the rows/maxrows settings as well (i.e. show a scrollbar when needed), instead of growing indefinitly!
2013-08-27 15:27:41 +00:00
a62163ada3 remove unused auto-key struct-member from uiAfterFunc, add compiler defines to cppcheck utility script. 2013-08-10 23:27:42 +00:00
f5c66a3676 quiet shadow warnings and remove redundant NULL check 2013-08-07 04:31:05 +00:00
02608d257a add api call for initializing events from the windows eventstate. 2013-07-29 08:29:04 +00:00
d7ff7ad3e9 correct sloppy NULL checks, in interface code:
- uiPupMenuBegin was checking for NULL title but would still crash if it were NULL.
- now tag the function as 'nonnull' and remove NULL checks. make sure NULL isnt passed to it.
2013-07-27 14:17:20 +00:00
9c0e331f81 fix/workaround [#36269] Crash upon right click on menu and left click on item 2013-07-24 20:53:24 +00:00
b09de65c8d internal change for ui_mouse_motion_towards_*** use,
only run these checks for buttons using the UI_BLOCK_MOVEMOUSE_QUIT flag.
no functional change but makes debugging easier and was calculating mouse motion in relation to some popups for no reason.
2013-07-24 20:50:30 +00:00
b05d5ed657 let the enter key active text buttons and the unlink button 2013-07-23 14:55:47 +00:00
7db1d6556d code cleanup: add break statements in switch ()'s, (even at the last case). 2013-07-21 08:16:37 +00:00
8ffa38b402 fix for missing break statements in switch, some key shortcuts and notifiers were falling through when its obviously incorrect to do so. 2013-07-13 14:21:36 +00:00
b0312d5991 fix [#35948] Toggle-Draw AutoKeyframe Bug 2013-07-10 01:13:24 +00:00
a3643ee3d6 fix [#36073] Changing list items misses undo push 2013-07-09 23:40:53 +00:00
381df05641 Fix #36030: datablock drag and drop to buttons not working with a certain number
of objects in the scene.
2013-07-09 11:31:49 +00:00
50148a0f53 edit on r57996, no need to use for loop. 2013-07-04 20:07:00 +00:00
7eb5cf8699 Fix #36001: crashing copying long strings in text buttons. 2013-07-04 14:37:38 +00:00
42f6136da8 Fix #35991: show warning message to when trying to edit driven values in number buttons. 2013-07-03 20:37:07 +00:00
063be8fdc0 Fix [#35750] list items in properties editor (text colors not following list item theme).
Issue goes back since we stopped using LISTROW button to draw item's name (i.e. since we have custom buttons in list items!).

This commit:
* Adds a new flag to uiBlock, UI_BLOCK_LIST_ITEM, to mark blocks used for each list item.
* Adds a new button type, LISTLABEL, which basically behaves exactly as LABEL, but uses wcol_list_item color set.
* When uiItemL is called, it checks whether current block has UI_BLOCK_LIST_ITEM set, and if so, switch produced button to LISTLABEL type.
* Adds a new helper func, ui_layout_list_set_labels_active, called after the active list item has been "drawn", to set all LISTLABEL buttons as UI_SELECT.

Note custom widget_state_label() was removed, in interface_widgets.c, as it did nothing more than default widget_state().

Thanks to Brecht for the review and advices.
2013-06-26 07:28:55 +00:00
9d4cc7885d fix for filesel autocomplete, it had the annoying behavior if you entered in a non-existing name, of executing it and then asking to add the dir. 2013-06-19 11:53:48 +00:00
3c54d1b87a alternate fix for r57562. check if the mouse is over the parent menu. 2013-06-19 06:31:37 +00:00
93134c26f9 fix [#35792] Submenus not opening properly on mouse move
caused by own fix for [#35346], now only apply wiggle room for toplevel menus.
2013-06-19 06:01:38 +00:00
815a87a652 fix [#35346] Python: still UI issue with popup and dropdown list 2013-06-13 09:12:53 +00:00
8b4bca6cf0 fix [#35713] Set Origin not waiting for user input.
Only activate search-box items on mouse-release,
Otherwise this gives odd behavior when using the operator-search popup since some tools expect the mouse buttons not to be held when activating which includes operators that have their own popup menus.
2013-06-13 01:39:07 +00:00
860fce4eb9 Code cleanup: removed some unused UI button types
* CHARTAB: not needed anymore with improved copy/paste support and text input.
* IDPOIN: replaced by SEARCH_MENU.
* ICONROW/ICONTEXTROW: replaced by RNA enums.
* NUMABS: can use min/max limits instead.
* BUT_TOGDUAL, TOG3, TOGR, SLI: not used in 2.5 interface.
2013-06-09 18:05:50 +00:00
c24be7ec6e Usablity:
Textbuttons: double click now selects entire words (like on file path segements)
Triple click was requested too, but that's not a WM event type yet.
2013-06-07 15:42:26 +00:00
b537bc011b fix for missing undo push for drag-toggle. 2013-06-03 19:52:53 +00:00
0c004723fe fix [#35434] Segmentation fault switching screen layout from python
(take 2), only free popup handlers.
2013-06-02 20:59:00 +00:00
ebda20150d fix for crash with toggle-drag on a popup (when the popup is closed while dragging). 2013-05-17 13:54:44 +00:00
2e478ca76d change to drag-lock behavior, only use with outliner (this way layers can be changed all at once) 2013-05-13 06:51:13 +00:00
b0e2b63200 fix for toggle drag not working in popups (move layers for eg) 2013-05-13 06:23:50 +00:00
c656174578 fix for mistake in own recent commit, broke operator search (r56465). 2013-05-03 22:43:02 +00:00
fe208a895a fix for mistake in own commit r56399, it broke click-dragging to open and select a menu item. 2013-05-02 19:51:32 +00:00
d5b36bf027 fix [#35178] Autoselect-in-list for Vertex Group selection doesn't work.
disallow assigning values that don't exist into a text field with a search-box.
2013-05-02 04:59:52 +00:00
e2e1b0d20d interface: clear red-alert flag when editing a button, confuses and makes it seem the edited value is also wrong. 2013-05-02 04:30:05 +00:00
bb89b523e7 Fix compilation in release mode with strict flags 2013-04-30 12:18:09 +00:00
cba25a6d90 fix for an issue raised in [#35154],
the cross icon to clear a field wasn't working within popups.
2013-04-30 02:45:57 +00:00
844a59afc2 fix [#35154] Python: UI issues with invoke_props_dialog()
- highlighed buttons that were never pressed could be activated by accident when canceling search popup. 
- canceling a search popup on a popup would close both.
2013-04-30 01:08:55 +00:00
f46e3f0f92 convert macro PASS_EVENT_TO_PARENT_IF_NONACTIVE into a static function. (having flow control in a macro is bad practice), own doing. 2013-04-29 21:44:28 +00:00
8069d1ad1a "Bug" & usability fix, own collection.
Color Pickers in Blender support precision editing with holding Shift key.
Unfortunately, on first click the picker cursor moves to the mouse position,
making the precision dragging quite useless.

Now, if you hold Shift, the picker editing will only apply the delta motion
of your mouse drags, making it much nicer for fine tuning of color grades
in Sequencer or Compositor.
2013-04-27 12:54:45 +00:00
e5a968276e fix [#35055] Crash in Edit Source feature for multilevel menus
dont show the option when operating on a menu since its not supported.
2013-04-23 15:22:22 +00:00
03d6319862 Fix: when using a search menu with an operator's enum prop, the operator was previously always executed with default options (appart from the search-set enum, of course). Now we store the op's properties in search button, so that you can specify non-default options (as it was already possible with e.g. pop-up menu from an operator's enum prop).
To achieve this, some code (callbacks and search button creation) was moved from wm_operators.c to interface/interface.c, and a new UI function was added, uiDefSearchButO_ptr.

Note: This new code uses the fact that uiButHandleFunc callbacks get executed before operator when one of its arg is the button itself!

Many thanks to Campbell who helped me a lot with this patch!

Cleanup: also removed two unused pointers from uiBut struct.
2013-04-15 15:01:12 +00:00
a305452275 Paint refactoring commit, non-disruptive (in theory :p)
* Fix precision overflow issue with overlay previews,
* Expose alpha mask mapping to UI (still not functional but coming soon).
* More overlay refactoring:

Overlay now does minimal checking for texture refresh.
Instead, we now have invalidation flags to set an aspect of the brush
overlay as invalid. This is necessary because this way we will be able to
separate and preview different brush attributes on the overlays, using
different textures:

These attributes/aspects are:

Primary texture (main texture for sculpt, vertex, imapaint)
Secondary texture (mask/alpha texture for imapaint)
Cursor texture (cursor texture. It involves brush strength and curves)

Modified the relevant RNA property update functions and C update callback
functions to call the relevant cursor invalidation functions instead
of checking every frame for multiple properties.

Properties that affect this are:

Image changes, if image is used by current brush,
Texture slot changes, similarly
Curve changes,
Object mode change invalidates the cursor
Paint tool change invalidates the cursor.

These changes give slightly more invalidation cases than simply
comparing the relevant properties each frame, but these do not occur in
performance critical moments and it's a much more elegant system than
adding more variables to check per frame each time we add something on
the system.
2013-04-12 17:21:31 +00:00
acac5b8402 fix for crash in own recent commit. searchbox's need their own keynav state since they won't always be in a uiPopupBlockHandle. 2013-04-11 08:33:19 +00:00
075a655cc6 fix [#34936] Unable to select items using only the arrow keys
ignore small mouse motions for menu/search-box after using the keyboard to navigate.
2013-04-11 02:28:34 +00:00
129f401228 ctrl+a select all in button field 2013-04-06 08:22:39 +00:00
677172fd65 code cleanup: use bools in interface handlers, dont show translation menu when right clicking on splash, use less confusing args for copy/paste function. 2013-04-04 15:16:29 +00:00
7bbaf4853a code cleanup: use bools in UI and WM code, quiet some shadow warnings, remove unused function uiEmboss() 2013-04-04 02:05:11 +00:00
8f8613df90 fix for missing redraw in own commit r55554 (Ctrl+F text editor find).
since an event wasn't added to the queue no redraws we're done when the panel was already open, instead use a notifier.
2013-03-25 21:31:24 +00:00
8bf206ce4b edit to 55549, replace fake click event with call to uiButActiveOnly().
also make it more clear args are for rna buttons.
2013-03-24 19:08:24 +00:00
d74cf43575 UI small fixes:
- Theme color for the brush popup was not correctly coded. Now it follows menu item
  style correctly, which also allows all the themes we have to give readable text.

- RMB cancel also added for slider buttons and the color picker.
2013-03-24 18:59:15 +00:00