Commit Graph

134 Commits

Author SHA1 Message Date
6a522ac058 removed extraneous glEnable(GL_BLEND)/glDisable(GL_BLEND) in ui_draw_aligned_panel 2013-01-20 09:41:46 +00:00
2f4cc3530d Bug fix #33826
Post 2.65a issue

Now scrollbars appear/disappear correctly, a bug in checking if mouse clicks
where on panel headers popped up. That disabled using scrollers next to a
panel header.
2013-01-11 15:19:47 +00:00
2d526c23dd remove uiPanelClearType(), instead redraw all windows when registering/unregistering. 2013-01-09 13:15:23 +00:00
9b5a2084bc avoid having dangling panel pointers in the interface, unregistering addons could leave the interface pointing to freed memory. 2013-01-09 06:00:33 +00:00
fa28e50ac2 Region scrollbar fix!
Now scrollbars correctly hide and show, making space for the actual contents
in a region. It solves several old hacks, and puts view2d code a bit more
back in control as well. 

Implementation notes:

- The view2d mask feature is working again
- The #define V2D_SCROLL_HORIZONTAL_HIDE means: "turn on hiding".
- Code for UI_view2d_region_reinit() is enforcing better standard view settings

But... two hack/patches needed to be added:

- Region panel drawing: if after generating the button panels it appears
  a scroller hides or reveils, it calls all the generating code again.
  (a simple scale doesn't work due to rounding differences in layout code)

- View2d code that maps 'tot' and 'cur' rects: if this code detects that
  the mask changes, it calcs the map code again.

Also a bugfix (issue in 2.65)

- The left/bottom area split widget was drawing 1 pixel too large sometimes, 
  leaving bad trails on moving area dividers.
2012-12-26 13:05:39 +00:00
e7731cbede UI fixes, from the todo:
- Button panel animation didn't work for 3D View properties and similar regions.
- Akey on View3d overlapping panel: was accidentally passed on as event to the main window.
2012-12-20 19:18:46 +00:00
291f59c339 Restored old hack to open/close panels on A-key.
Notes in code:

- This has to become a decent handler
- Actually "A" should open/close all?

Currently, Enter key does open/close too, but only on headers.
This because Enter on a button gets handled by buttons... that's
why the Akey was proposed :)
2012-12-20 18:04:06 +00:00
3bc3e178b3 style cleanup 2012-12-20 00:29:31 +00:00
c21c4b0774 Fixes for ctrl+click on panel header:
* It collapsed panels in other tabs too
* Ctrl + click next to the panel header still caused panels do be collapsed
* Ctrl + Return over panel header now works as well
2012-12-18 14:46:00 +00:00
695468a3b9 Finished themes for transparent Button regions in Blender.
Notes and image:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability

- now each editor has own settings for "show panel header" and
  "show panel background", and colors+alpha for this.

- this setting used to be global for all editors, but it can conflict
  with looks of specific editors. 

- Now you can set for editors to show panels with a 100% transparent
  tool/properties region. 

Note: read XML theme files now might get an error, Campbell will fix.
2012-12-15 16:22:18 +00:00
dfc3685b1f Only LMB clicks in Panel should return "handled" - it accidentally returned it for
mousewheel too. 

Previous commit made scrolling in button regions not work.
2012-12-13 10:58:00 +00:00
1fca21cc24 Bug fix:
- Code for detecting "click inside button panel" was convoluted and detected wrong
  panels even when they were closed.
- Any click inside panels now return "Event Handled", that will prevent events
  being passed on in case of overlapping or transparent button panels.

This is ancient code, will be in on my attention list for further cleaning.
2012-12-13 10:24:46 +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
81eafc49e6 use min_ii/max_ii over MIN2 MAX2 2012-10-24 05:06:40 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
56b28635e7 code cleanup: rename BLI_in_rctf() --> BLI_rctf_isect_pt(), to conform with our naming convention. 2012-08-23 18:25:45 +00:00
abd031bb4e code cleanup: use rect size macros for the interface 2012-08-21 19:35:06 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
d36da8a8a1 style cleanup 2012-08-19 10:41:27 +00:00
ab662a1e02 fix for own commit r49991, this exposed bad logic in rect copy function. 2012-08-18 20:54:43 +00:00
63f143a3cc use rctf struct for UI buttons and blocks, easier to read and means we can use BLI_rctf functions. 2012-08-18 16:53:46 +00:00
c41e1e434a code cleanup: replace MIN2/MAX2 with minf/maxf 2012-07-29 16:59:51 +00:00
a5127dba57 vector versions of BLI_in_rctf / BLI_in_rcti, (BLI_in_rctf_v, BLI_in_rcti_v)
use where possible.
2012-07-11 18:17:48 +00:00
6cff0b71a7 style cleanup 2012-06-05 21:54:21 +00:00
5189356d58 style cleanup 2012-06-04 20:11:09 +00:00
d02b6707f9 * Some code optimizations to panel collapse code, to avoid calculations for each panel. Suggested by "Bao 2". 2012-05-28 14:57:38 +00:00
492d7ace57 User Interface Panels:
* Add a solo mode for panels, CTRL+LMB on a panel header.
This closes all other panels.

Patch [#22233] by sneg negr (sneg) with modifications by myself to exclude panels with hidden header (like context)
2012-05-28 00:02:24 +00:00
b33f0ef0e3 style cleanup 2012-05-27 19:40:36 +00:00
af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
599d213115 style cleanup: line length and ensure some macros error when not ending with ';' 2012-05-17 07:59:25 +00:00
a6ebffe182 style cleanup: interface 2012-03-30 01:51:25 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
2f348d8b5d style cleanup: mainly for mesh code, also some WM function use. 2012-03-24 02:51:46 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00
a2c182e923 style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide). 2012-03-03 16:31:46 +00:00
b95beea539 style chang, made mainly because I wanted to be able to add breakpoints to MEM_freeN calls which were on the same line as the if's. 2012-01-21 22:00:40 +00:00
Lukas Toenne
a885d8aee6 Fix for toggle buttons in node headers.
The buttons for "hiding" (collapsing) a node, hiding unlinked sockets, additional options, the preview and for opening a node group were all using a custom mouse test function, which was broken. They now use actual buttons instead of just displaying icons. Before executing the respective operators the button's node has to be selected and activated, so the buttons use an intermediate handle function, which selects the node and then calls the operator.
2011-12-18 12:51:50 +00:00
aff705c430 UI: another tweak to panel header drawing, to get the checkboxes positioned right. 2011-11-29 23:00:10 +00:00
7025f13894 UI: tweak to panel header padding, made region expander a bit smaller and
fix bug #29422, left expander drawing over adjacent editor.
2011-11-27 14:06:47 +00:00
d4c400b940 UI: fix issue with part of panels going offscreen after recent commit.
The code here was tricky, with ED_region_panels trying to match the complex
logic in uiAlignPanelStep, now refactored the code so it's avoided.
2011-11-20 14:31:01 +00:00
7217518179 UI:
* Add theme option to show panel header background.
* Draw panel collapse widget a bit smaller.
* Add theme option to draw icons muted.
* Code tweak: replace U.themes.first by UI_GetTheme() calls.
2011-11-19 20:57:53 +00:00
e4269043b4 Moving i18n code to BLF_translation.h
This way, we will be able to use it in non-UI parts of the code too.
2011-11-09 14:13:17 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
c1de5cc838 - use defines for wmKeyMapItem & wmEvent alt/shift/ctrl/oskey
- clear utf8_buf on key up & complain if its set (should never happen)
2011-10-22 11:34:01 +00:00
874c96a2b9 Cleaning i18n code.
Previous state:
Right now, there are "memories" of the "old" (less than a month!) translation way:
* A few remaining calls to BLF_gettext() (only UI_translate_do_iface and UI_translate_do_tooltip should be used).
* The _() macro still also calls BLF_gettext()!

New state:
Here are the changes made by the patch:
* Removing the no more needed _() macro.
* Removing most N_() and _() calls, only keeping the few needed ones (i.e. strings that are in no other way findable by xgettext and/or update_msg script).
* Defining in UI_interface.h IFACE_() and TIP_() macros (resp. for UI_translate_do_iface and UI_translate_do_tooltip).
* Replacing all calls to BLF_gettext by relevant IFACE_ or TIP_ one.
* Replacing all calls to UI_translate_do_iface by IFACE_.
* Replacing all calls to UI_translate_do_tooltip by TIP_.

All this somewhat clarifies and simplifies the code.
On the bf-translations scripts side, this only implies adding IFACE_ and TIP_ as detection markers for xgettext.
It also allows to reduce POTFILES.in quite notably (only 20 files remaining in it).

Please also have a look at those pages:
* Coder POV: http://wiki.blender.org/index.php/Dev:2.5/Source/Interface/Internationalization
* Translator POV: http://wiki.blender.org/index.php/Dev:2.5/Doc/How_to/Translate_Blender
2011-10-20 20:38:26 +00:00
573ed73be8 change define INTERNATIONAL --> WITH_INTERNATIONAL
also rename backface_culling --> use_backface_culling (which is used elsewhere in rna)
2011-09-26 10:35:47 +00:00
6d125e159d i18n: code clean-up
- Move all translation-related declarations to BLF_translation.h
- Reverted some changes to match trunk svn rev40365
2011-09-20 07:39:25 +00:00