Commit Graph

171 Commits

Author SHA1 Message Date
Campbell Barton
e60fb0fd29 Fix for collapse ignoring pinned panels 2014-03-02 12:49:30 +11:00
Brecht Van Lommel
0f96d0552d Fix T38810: ctrl + click panel collapse not taking tabs into account. 2014-02-24 19:53:15 +01:00
Campbell Barton
543b57fbeb Fix T38348: Panel remains scrolled when switching tabs 2014-02-22 13:07:02 +11:00
Campbell Barton
c50b23fa67 Fix own error - tab scrolling mixed up region/window coords 2014-02-21 16:12:53 +11:00
Campbell Barton
c971aac3b1 UI: wheel switches tabs over the tab area, or ctrl+wheel anywhere 2014-02-17 13:46:07 +11:00
Campbell Barton
2f01be2b2f UI: panel tabs, use simple color interpolation that ignores alpha 2014-02-10 17:06:56 +11:00
Campbell Barton
3276b83fda UI: support for alpha tab background 2014-02-09 01:39:09 +11:00
Brecht Van Lommel
13780799ea Fix T38478: pin panel, then ctrl+click to collapse others incorrectly unpinned panels. 2014-02-05 13:40:53 +01:00
Jonathan Williamson
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
Campbell Barton
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
Campbell Barton
435a896fbe Fix for mistake in recent shadow addition in tabs 2014-01-15 15:46:32 +11:00
Campbell Barton
a19f077541 Fix T38207: Tab scale jitters when resizing region 2014-01-15 13:40:41 +11:00
Campbell Barton
b8b412230b Code Cleanup: use iroundf
also increase precision of rctf print functions
2014-01-15 13:40:40 +11:00
Campbell Barton
1908c31b06 Fix for icon pin drawing too large when (U.pixelsize != 1) 2014-01-15 04:57:27 +11:00
Campbell Barton
20cea92db1 Code Cleanup: minor edits to recent commit 2014-01-14 13:39:55 +11:00
Jonathan Williamson
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
Jonathan Williamson
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
Campbell Barton
800e2283aa Fix T38171: Vertical tabs don't respond to clicks on the left most pixels 2014-01-14 04:15:54 +11:00
Campbell Barton
ede891808c UI: pin icon was ignoring DPI 2014-01-06 03:10:15 +11:00
Campbell Barton
ca78e402eb UI: Use shift+lmb for toggling panel pinning (not to conflict with MMB emulation) 2014-01-06 03:00:54 +11:00
Campbell Barton
b9114cb609 UI: Use bool rather then int/short's where possible 2014-01-04 18:10:01 +11:00
Campbell Barton
cde3ff75d9 UI: Fix issue where tab text was too small and closely spaced 2014-01-04 13:55:40 +11:00
Brecht Van Lommel
8106444756 Revert fix for T37705: it's messing up the panel order in another place. 2013-12-18 15:10:40 +01:00
Brecht Van Lommel
d591f314f9 Fix T37705: texture panel order wrong when switching from cycles to blender render. 2013-12-18 13:15:13 +01:00
Campbell Barton
a621d1e488 UI: Tabs categories for panels (D75)
- works by defining panel categories, currently restricted to the toolbar.
- no panels define bl_categories yet, so no user visible changes since tabs only show when there are multiple.
- panel pinning is available in rmb menu or alt+lmb.
2013-12-17 03:55:45 +11:00
Campbell Barton
1ed822202f Code Cleanup: pass rectangles as const in insterface files 2013-12-07 15:47:57 +11:00
Campbell Barton
6976866d5a User Interface: Ctrl+C over a menu copies the py command
also use bools rather then ints
2013-12-05 17:26:03 +11:00
Campbell Barton
f91187d3c3 Code cleanup: replace rectf_scale with BLI_rctf_scale
and add area arg to ui_handler_panel_region
2013-12-03 23:53:21 +11:00
Campbell Barton
bf77d35f69 fix for bad lengths being passed to string functions. 2013-07-15 05:11:14 +00:00
Bastien Montagne
d42204f962 Fix [#35790] Panel Section Arrows Wrong Theme Colors
Use TITLE color for the triangle and X (close) "icons" when used.
2013-06-24 12:18:28 +00:00
Thomas Dinges
259880de6f Code cleanuo:
* Remove already commented "use_radiosity" flag from RNA. 
* Remove some commented exceptions for old 2.4x 3D View preview region. 
* Remove empty and commented function declarations from 2.4x UI times
2013-03-23 08:38:53 +00:00
Bastien Montagne
284e59d608 Add the possibility to define the translation context for py rna classes (operators, panels and menus).
Thanks to Campell and Brecht for the reviews!
2013-03-15 14:32:29 +00:00
Sergej Reich
e3944f5bfa Divide by 3 instead of multiplying by variations of 0.333
Fixes small precision problems.
2013-02-14 17:35:43 +00:00
Campbell Barton
69993c5d40 style cleanup: spaces -> tabs 2013-02-04 00:18:09 +00:00
Campbell Barton
6341919354 code cleanup: make wmEvent's 'const' in interface code (reduces manual checking that they are not modified). 2013-02-01 01:01:20 +00:00
Bastien Montagne
9b2c0f03dd Fix for a nasty glicth found by Irie Shinsuke in Freestyle branch.
Headerless panels are not supposed to be closed ever. But if user saves a blend with a stardard panel closed, then dev decides to make this panel headerless, when user open again its blend, the panel is closed and has no more header, so it becomes invisible!

This commit simply checks, at draw time, that a headerless panel is never closed (and repoen it if necessary)!
2013-01-28 08:58:20 +00:00
Campbell Barton
38cee985bb code cleanup: style & warnings. 2013-01-21 02:30:40 +00:00
Jason Wilkins
6a522ac058 removed extraneous glEnable(GL_BLEND)/glDisable(GL_BLEND) in ui_draw_aligned_panel 2013-01-20 09:41:46 +00:00
Ton Roosendaal
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
Campbell Barton
2d526c23dd remove uiPanelClearType(), instead redraw all windows when registering/unregistering. 2013-01-09 13:15:23 +00:00
Campbell Barton
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
Ton Roosendaal
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
Ton Roosendaal
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
Ton Roosendaal
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
Campbell Barton
3bc3e178b3 style cleanup 2012-12-20 00:29:31 +00:00
Brecht Van Lommel
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
Ton Roosendaal
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
Ton Roosendaal
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
Ton Roosendaal
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
Ton Roosendaal
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