Campbell Barton
56254a42e0
UI: replace BLI_strncpy w/ memcpy
...
Size is already checked.
2018-05-27 12:50:03 +02:00
Campbell Barton
d886e32270
Cleanup: strip trailing space from interface files
2018-05-23 10:48:50 +02:00
Julian Eisel
357b72e0a7
Theming: Use list-item colors for all un-embossed buttons in list-items
...
E.g. number buttons in the shape key list would use theme colors of text
widgets.
Addresses T50862.
2018-03-23 20:46:51 +01:00
Bastien Montagne
17f1ce4d4f
Fix T53630: Effect strips not displaying Input data.
...
Fix T52977: Parent bone name disappeared in the UI in pose mode.
Regression caused by own rBc57636f060018. So instead of changing widget
type, just flag it as disabled.
Note that core of the issue is elsewhere though - there is absolutely no
reasons to have a search widget for pointers we cannot change nor
search! But fixing this is not really top priority, one of the many
glitches of our UI code, so think we can live with current code.
To be backported to 2.79a.
2017-12-28 17:57:18 +01:00
Campbell Barton
18d7fbe4f5
Cleanup: order buffer length after the buffer
2017-11-06 00:04:46 +11:00
Campbell Barton
9ece0ee5fe
UI: add UI_SELECT_DRAW flag
...
Allow to draw as pressed w/o interfering with behavior.
Resolves issue where buttons raised on mouse-over.
2017-11-03 00:47:51 +11:00
Campbell Barton
e32c1bd5d0
UI: use button_operator in operator_menu_hold
...
Move draw calls into UI_menutype_draw
2017-11-02 18:21:59 +11:00
Campbell Barton
a6e1f7560f
UI: Option to draw button pressed
...
Needed to show the active tool
2017-11-02 05:02:56 +11:00
Campbell Barton
3ec4d0b51b
UI: Add UILayout.operator_menu_hold
...
This is an operator button that opens a menu when the button is held.
2017-11-02 05:01:10 +11:00
Campbell Barton
2ae6a93f05
Cleanup: style
2017-11-01 11:56:56 +11:00
Campbell Barton
98052162e1
UI: replace UI_ITEM_O_RETURN_PROPS /w return arg
...
Means we can have a version of this function that returns the button
and avoids returning a struct that often isn't used.
2017-10-31 17:04:55 +11:00
Campbell Barton
fe3571b362
UI: avoid double operator type lookup
2017-10-31 12:44:41 +11:00
Julian Eisel
efd70ab78f
Move & rename uiLayoutOperatorButs to interface_templates.c
2017-10-21 16:48:42 +02:00
Campbell Barton
ab7ebf2b10
Cleanup: Use const for RNA EnumPropertyItem args
...
Practically all access to enum data is read-only.
2017-10-18 16:04:07 +11:00
Bastien Montagne
c57636f060
Fix failure in our UI code that could allow search button without search callbacks, leading to crash.
...
Related to (exposed by) T52735, fixes the reported crash but not the
underlying issue.
To be backported to 2.79a should we do one.
2017-09-14 10:58:47 +02:00
Aleksandr Zinovev
b5cd89bab9
Fix width estimation for buttons with short labels in pie menus
...
Differential Revision: https://developer.blender.org/D2781
To be backported to 2.79 branch
2017-08-12 11:00:19 +03:00
Aleksandr Zinovev
59a52fef6c
Pie menu's sub-rows ignore 'EXPAND' flag
...
Regression, to be backported in 2.79.
2017-08-11 13:18:30 +03:00
Aleksandr Zinovev
4fe1bf85af
Fix fixed width box layouts
...
Regression, to be backported in 2.79.
2017-08-08 17:37:51 +03:00
Aleksandr Zinovev
ed4707be47
Fix width estimation for empty layouts in pie menus
2017-08-08 15:52:14 +03:00
Bastien Montagne
38eabcb858
Fix potential 'divide-by-zero' in our UI fitting code.
...
Reported by coverity, better fix even if highly unlikely to happen...
2017-07-28 10:56:41 +02:00
Bastien Montagne
304e5541cb
Fix T52208: Using UI_BUT_REDALERT flag for UI_BTYPE_KEY_EVENT buttons crashes Blender.
...
but pointer was not assigned in that case...
2017-07-28 10:38:47 +02:00
Julian Eisel
129c3ac7b3
Minor code style corrections
2017-07-27 11:44:51 +02:00
Aleksandr Zinovev
ec22809025
Fix Label colors in popups
2017-07-27 10:27:29 +03:00
raa
9e08019b74
Fix: Icon alignment for scaled pie buttons with no text
2017-06-20 20:15:04 +03:00
raa
31bdb31ecf
Fix: width of UILayout.prop_enum() buttons
2017-04-11 13:25:46 +03:00
Campbell Barton
e1fb080743
Cleanup: style
2017-04-01 12:09:17 +11:00
raa
5ce120b865
Fix columns with fixed width
2017-03-28 00:07:31 +03:00
raa
505b3b7328
Fix padding and align calculation for box layouts
2017-03-26 18:02:11 +03:00
raa
4bdb2d4885
Fix: Ignore min flag for rows that require all available width
2017-03-26 12:19:01 +03:00
Bastien Montagne
2ba1868c3f
Cleanup/optimization: Simplify some usages of uiItemFullO/_ptr, avoid multiple search of same op.
2017-03-22 19:42:19 +01:00
raa
9d873fc3de
Various icon adjustments
2017-03-17 16:57:53 +03:00
Campbell Barton
bcc8c04db4
Cleanup: code style & cmake
2017-03-12 02:47:53 +11:00
raa
f1c764fd8f
Fix width calculation for split layouts
2017-03-06 16:35:56 +03:00
raa
ecee40e919
All drop-down buttons should use the same width
2017-03-01 19:30:18 +03:00
raa
94ca09e01c
Fix rows with fixed last item (D2524)
2017-02-25 13:18:41 +03:00
raa
43299f9465
Columns should be expandable by default
2017-02-23 00:06:54 +03:00
raa
3622074bf7
Fix Drawing nested box layouts (D2508)
2017-02-21 21:02:56 +03:00
raa
feb588060a
Fix T50497: prop_search not correctly drew in UI (D2473)
2017-02-02 17:30:50 +03:00
Julian Eisel
8a6c689f30
Fix T50386: Crash when spawning pie menus
...
D2455 by @raa, thanks!
2017-01-24 21:35:38 +01:00
Bastien Montagne
da026249ab
UI Layout: fix some cases mixing fixed and expandable sizes
...
When layout has only small buttons (buttons with icon and without label)
its size should be fixed. Code was modified to be able to add a new UI_ITEM_MIN
flag which indicates that the layout has only small fixed-width buttons.
Patch by @raa, with minor style edits by @mont29.
Reviewers: Severin, mont29
Reviewed By: mont29
Tags: #bf_blender, #user_interface
Differential Revision: https://developer.blender.org/D2423
2017-01-10 16:24:22 +01:00
Bastien Montagne
2412e67ef8
UI: Make icon-only buttons for enum items with empty label.
...
Patch D2420 by @raa, thanks.
2016-12-28 15:07:18 +01:00
Julian Eisel
524ab96245
Fix drawing enum property with icon only flag
...
Enum properties with icon only flag should use minimum/fixed width in expanded layouts (alignment=UI_LAYOUT_ALIGN_EXPAND).
Differential Revision: https://developer.blender.org/D2415 by @raa (only made some really minor corrections)
2016-12-15 23:43:17 +01:00
Julian Eisel
d5708fdad6
Fix expanding enum property in sub-layout of pie menus
...
//ui_item_enum_expand// function replaces all pie menu's sub-layouts with radial layout. It should replace only root layout.
To reproduce the issue paste the code in Blender's text editor and press Run Script button.
```
import bpy
class VIEW3D_PIE_template(bpy.types.Menu):
bl_label = "Select Mode"
def draw(self, context):
layout = self.layout.menu_pie()
layout.column().prop(
context.scene.render.image_settings, "color_mode", expand=True)
def register():
bpy.utils.register_class(VIEW3D_PIE_template)
def unregister():
bpy.utils.unregister_class(VIEW3D_PIE_template)
if __name__ == "__main__":
register()
bpy.ops.wm.call_menu_pie(name="VIEW3D_PIE_template")
```
Differential Revision: https://developer.blender.org/D2394 by @raa
2016-12-08 12:21:57 +01:00
Julian Eisel
e0307113a5
UI: Add 'x' icon to text buttons to clear content
...
This is useful e.g. for search buttons to quickly clear the filter string. We might want to make this optional for python scripts.
2016-11-28 19:03:31 +01:00
Bastien Montagne
918e6cf4c9
Fix T49635: column_flow Layout - last column is too small.
...
Column flow layout was abuse ui_item_fit in a weird way, which was
broken for last column items.
Now rather use own code, which basically spread available width as
equally as possible between all columns.
2016-10-13 10:23:24 +02:00
Bastien Montagne
786c0966ec
Cleanup: UI layout: remove unsed and confusing parameter.
...
Things are complicated enough like that, no need to add useless noise on
top of it!
2016-10-13 10:23:24 +02:00
Julian Eisel
c2d7d4764e
Various cleanups related to button locking
...
* Rename uiBut.lockstr to disabled_info
* Remove unreachable code
* Replace duplicated check with assert
* Replace overly ambitious check with assert
* Add comments
2016-09-19 02:41:10 +02:00
Julian Eisel
976e591e93
Cleanup: Completely replace/remove uiBut.lock
...
Old leftover from pre 2.5 days. Now handled through UI_BUT_DISABLED button flag.
2016-09-19 01:49:17 +02:00
Campbell Barton
acebfbb666
Cleanup: unnecessary comma use
2016-03-05 09:12:07 +11:00
Campbell Barton
69b66d549b
UI: Add search-create callback
...
Needed to support alternate search UI's, no functional changes.
2016-03-02 13:57:16 +11:00