Commit Graph

305 Commits

Author SHA1 Message Date
a26c048fde Fix uiList labels themed colors.
r57760 broke usual labels, and r59511 broke again uiList labels! :P Hopefully every one works as expected now!
2013-08-26 12:32:46 +00:00
aa6eac3aad Bugfix #36324
Commit 57760, June this year, broke Theme colors for Label Buttons.
All labels, in every editor or region, now were using same color.

These colors have to be derived from the Editor settings. Code for
this was mistakingly removed.
2013-08-26 09:59:51 +00:00
7db1d6556d code cleanup: add break statements in switch ()'s, (even at the last case). 2013-07-21 08:16:37 +00:00
a926d9a0d4 code cleanup: remove redundant multiplying when jittering widget drawing. 2013-07-19 10:40:01 +00:00
a15ac6ee09 code cleanup: use bool for widget struct, also edit odd strncpy use. 2013-07-19 10:39:44 +00:00
af36eb86e2 Further fix for #35880: theme color of enabled option buttons in popups was still
controlled by the wrong color, now it's controlled by "Menu Back" text color. This
is somewhat confusing but we like some other widgets the standard colors do not
work well on the dark background of popups.
2013-06-26 20:28:12 +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
c88ea1c4f8 Made blender compilable with strict flags. 2013-06-18 10:09:45 +00:00
943388183d Added back left/right arrows for embossed number fields. (they where active but not drawn) 2013-06-18 09:02:13 +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
9e05f6571f Make sure bool will always have the same size in C and C++
There were an issues with data structures defined in headers
and being used by both C and C++ on systems with stdbool
unavailable.

This happened because bool in this case will be defined as
unsigned int, which is 4 bytes. But C++'s bool is only 1
byte and this lead to alignment issues.

Now bool is always 1 byte, also made sure there's no situation
like bool foo = BitField & BitFlag, which could give overflow
issues. Use (BitField & BitFlag) != 0 instead.

Fixes #35553: Compositor broken (Backdrop & Preview)
2013-05-29 11:49:39 +00:00
38391d9a7d Fix #35281: search menu buttons (with an X on the right side to clear) had text
overlapping the X icon if the text was long.
2013-05-10 20:34:35 +00:00
a63be29da3 Fix #35252: Crash with the node placed partially behind the screen
Issue was caused by negative maximal possible text width happening
in label clipping.

Solved by clamping width to 0 if it's negative.
2013-05-08 13:16:39 +00:00
fdc4eea188 use smaller size for uiWidgetTrias.vec 2013-05-08 12:56:11 +00:00
f9ed2bf9e9 use const vars for UI arrays. 2013-04-30 01:51:25 +00:00
a4a2949309 Bug fix:
Labels in UI were not drawing greyed out when disabled.
Bug in post 2.66a commit to make greying out buttons draw much nicer.

User reported Addon menu was not clearly showing disabled Addons anymore.
2013-04-29 08:45:39 +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
093f95afaa Bug fix #34868
Pulldown menus with long shortcut text labels got clipped badly occasionally.
Made the offset follow DPI better.
2013-04-18 08:51:07 +00:00
7404c1a553 Fix another part of #34877: cycles progress status text not showing correct with
per render layer samples in addition to the progress bar.

Also fixed job progress bar not working at all on high DPI / retina, was so small
the actual progress was not visible.
2013-04-05 17:57:26 +00:00
6ee5b2d40c fix [#34850] "x" to clear ID prop fields is too close to the right border 2013-04-03 05:02:33 +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
5a87e4d255 code cleanup: remove unused button type HSVSLI 2013-03-23 16:03:13 +00:00
Lukas Toenne
8066c09df2 Fix for extra string width padding in ui_text_icon_width, causing labels in right-aligned layouts show an annoying gap. If the layout is right-aligned, make the text button align right as well, so text is drawn at the right side of the alloted rect. 2013-03-21 12:58:31 +00:00
b38870ce25 quiet warning about writing to deprecated member with gcc. 2013-03-18 18:37:59 +00:00
25fa2eedc4 UI fix: drawing disabled buttons now draw OK in all cases.
The old 2.5 code was just drawing a blended rect over buttons, which looks bad
in cases the backdrop is undefined. 

Now widget drawing code just draws everything half transparent. Much nicer!
Time for textured backdrops? ;)
2013-03-18 18:29:22 +00:00
Lukas Toenne
4638e5f99a Merge of the PyNodes branch (aka "custom nodes") into trunk.
PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements.

=== Dynamic node type registration ===
Node types can now be added at runtime, using the RNA registration mechanism from python. This enables addons such as render engines to create a complete user interface with nodes.

Examples of how such nodes can be defined can be found in my personal wiki docs atm [1] and as a script template in release/scripts/templates_py/custom_nodes.py [2].

=== Node group improvements ===
Each node editor now has a tree history of edited node groups, which allows opening and editing nested node groups. The node editor also supports pinning now, so that different spaces can be used to edit different node groups simultaneously. For more ramblings and rationale see (really old) blog post on code.blender.org [3].

The interface of node groups has been overhauled. Sockets of a node group are no longer displayed in columns on either side, but instead special input/output nodes are used to mirror group sockets inside a node tree. This solves the problem of long node lines in groups and allows more adaptable node layout. Internal sockets can be exposed from a group by either connecting to the extension sockets in input/output nodes (shown as empty circle) or by adding sockets from the node property bar in the "Interface" panel. Further details such as the socket name can also be changed there.

[1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes
[2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender
[3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/
2013-03-18 16:34:57 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
a816b0b3d2 avoid calling glGetFloatv() twice when UI_RB_ALPHA is enabled with uiRoundBox() 2013-03-07 06:46:50 +00:00
032923a9f5 Bug fix #34334
For 2.66a 

Soft shadow was drawing a complete rect, but it should skip the top edge.
That allows transparent menus to still have a shadow too.
2013-03-01 11:42:07 +00:00
47c29c1c2e Themes: disabled items on menus were using a color mix of text and text_selected, this didn't work nice with dark themes and text shadows and overall didn't make much sense.
Now, disabled items use a mix of text and menu item background (inner) color. Same results, but allows dark themes with bright selected text to use shadows.

Example case: http://pasteall.org/pic/show.php?id=45697
2013-02-18 21:19:43 +00:00
14a0ff90bc Fix a few DPI / retina draw issues:
* Color picker cursor was too small, and color cirle was not smooth enough.
* Border select gesture cross before first click did not reach to the border
  of the window.
* Buttons were not drawing emboss properly (also for non-retina actually).
  Note it doesn't draw entirely right for aligned buttons, but this was also
  the case before it got broken.
2013-02-10 18:03:01 +00:00
d760a86927 code cleanup: minor changes, replace len_v3 with len_squared_v3 for comparison. 2013-01-21 18:45:31 +00:00
2b80a7d5da use define for text offset & seletion.
and no need to calloc memory for string selection.
2013-01-17 18:59:19 +00:00
60e5583933 add NULL check for XInput device, since its possible only one is valid. 2013-01-17 02:06:54 +00:00
86d4786305 draw active+disabled menu-items, helps for keyboard navigation. 2013-01-17 01:48:42 +00:00
9a4a5fa2b4 Usability fix:
Blender's data link button (typically with menu and searching options)
now has a X icon to clear its contents. 

Before you had to click, delete text, enter.

For example:
- Object Parent
- Modifier objects or vertexgroups

This fix saves each user 100 clicks per day, with 100k users
that's 3 billion clicks per year!
2013-01-09 15:58:34 +00:00
c03d1270c8 fix bad left aligned text when zoomed out.
also minor change to cylinder_project_exec() - delay getting the MTFace.
2013-01-03 15:52:31 +00:00
1cffa7f339 style cleanup 2012-12-29 15:55:37 +00:00
7d6ea8cddf Finally fixing the issue where the bezier curve drawn while creating a link between two logic bricks doesn't match the mouse cursor location. The issue was the last line segment for the bezier curve was not getting drawn. This is why the error increased as the curve got longer. 2012-12-29 09:44:19 +00:00
60ffe9f8ec Bug fix (own collection)
Icons in search menus were not drawing on the right location when UI panels were zoomed in large.
Not very common, but annoying. (DPI setting worked fine)
2012-12-23 13:02:38 +00:00
566d350369 UI todo:
- Recoded soft shadow drawing for menus, giving better predictable results
  (and round off nicer on top side, was looking bad still)
- Brought it under DPI control
- Added Theme setting to control size and strength for it.

Max size 24 pix:
http://wiki.blender.org/index.php/File:MenuShadow.png
2012-12-20 16:50:39 +00:00
a970991da6 Icon scaling fix: for zoom levels near 1, icon positions are moved to exact pixel
locations. Makes default headers and menus always crisp.
2012-12-19 11:55:41 +00:00
6b2af22d37 DPI: fix wrong scaling of editor type choosing buttons, and for menu arrows
overlapping or being too close to icons in small buttons.
2012-12-18 20:00:52 +00:00
8168fba972 Icons now draw good again!
- Exported via Inkscape a 16 and 32 pixel bitmap version
- Use these as mipmap levels for OpenGL texture drawing.
- Changed code to get right sizes for drawing icons - better than last week's method.

Todo:

- Custom icons don't work yet (old one)
- Missing icons in the svg
- The .sh script for inkscape needs changed to support this
  (now do manual saving)
2012-12-18 19:35:54 +00:00
63731453e2 make sure color picker and color swatch buttons have rnaindex of -1.
Some were 0 some -1, but this messed up reporting - making it think that only red was being changed for each button.
2012-12-18 17:00:49 +00:00
ce08127caf Bugfix, IRC submitted:
Color Pickers, square versions, didn't draw the 'cursor' correctly.
Was missing colorprofile check.
2012-12-15 18:12:38 +00:00
1ab6306177 minor edits
- add BLENDER_QUIT_FILE define.
- use const for passing rcti's in widget drawing.
2012-12-13 02:40:49 +00:00
12b642062c Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability

Short list of main changes:

- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
  Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
  This allows keeping UI and data without actual saves, until you actually save.
  When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v). 
  Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards. 
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
  Old option is called "Save Startup File" the new one "Save User Settings".
  To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
  This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
55e55e21b0 Bugfix: softshadow in menus was broken.
Already since like 2.61 - when Array draw was added - drawing only shadow 
in bottom of menus with bad looking corners.
2012-12-09 11:57:06 +00:00
469324b049 Fix compositing normal node not properly showing vector XYZ values when opening
socket menu, and make the normal animatable.
2012-11-17 16:11:02 +00:00