Commit Graph

187 Commits

Author SHA1 Message Date
Campbell Barton
9e9cd77b8d Compiler warning: double-promotion 2015-02-01 01:17:21 +11:00
julianeisel
b554bcf124 Cleanup: Remove ugly ELEM checks in modifier key handling
Campbell once told me such checks can cause warnings on some compilers, so
let's try to avoid them.

From the theoretical view, this check works quite different than the old
one, but in this case everything should work just like previousely.
2015-01-26 02:38:39 +01:00
julianeisel
f453df5b03 Fix T43128: Headerless panels are reorderable on Windows
Seems like a weird issue, but to sort panels "qsort" is used, which works slightly different on Windows. So all I had
to do was cleaning up the logic in find_highest_panel so that headerless panels are sorted, but that it absolutly not
allows headerless panels to be above normal panels.
I made sure it works fine on Linux as well.
2015-01-13 03:29:25 +01:00
Campbell Barton
46e2d5ee41 Cleanup: typo 2014-11-21 14:16:35 +01:00
Campbell Barton
5c6e333780 UI Refactor T41640
Make the UI API more consistent and reduce confusion with some naming.

mainly:
- API function calls
- enum values

some internal static functions have been left for now
2014-11-10 23:06:54 +01:00
Bastien Montagne
bf54ed0c7c Fix T41704: 2.71.6 no longer reading user ui panel arrangement from earlier saved blend files.
This reverts rB52c06440d8e51c8661a679bcb33742666ce8dbf9 and rBe40d8258bb46926a1aecf51236822532397993f3
(tabname is old 2.4x tabed panels system, *not* new 2.7x tool tabs!).

Also disabled (#idef'ed) everything regarding tabname/tabed panels for now, we may even remove it completely,
would make things clearer imho.

Note files saved with 2.71.6 up till now would have two versions of some panels in store (with two different
values for their tabname), can give some order oddities in those cases, which have to be fixed by hand...
2014-09-04 15:06:24 +02:00
Antony Riakiotakis
e40d8258bb Tabname should be fixed here as well. 2014-08-27 10:36:04 +02:00
Antony Riakiotakis
52c06440d8 Fix for uiPanelFindByType comparing wrong member 2014-08-27 12:05:46 +10:00
Campbell Barton
c0d9ef65e9 UI: Warn when using fallback category
Scripts should be updated.
2014-08-27 10:55:15 +10:00
Antony Riakiotakis
028fd29eeb Pie Menus C code backend.
This commit merges the code in the pie-menu branch.

As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.

Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/

Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments

Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.

Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
2014-08-11 11:02:26 +02:00
Campbell Barton
046d7590a6 UI: Change appearance for panel drag area (D637)
Patch by blakenator with own edits
2014-07-28 15:01:01 +10:00
Campbell Barton
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
Campbell Barton
0bb20259db Fix incorrect sizes used copying panel idname, tabname. 2014-05-03 04:17:55 +10:00
Campbell Barton
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
Campbell Barton
c67bd49e56 Code cleanup: use 'const' for arrays (editors) 2014-04-27 00:25:15 +10:00
Campbell Barton
7199e2288f Code cleanup: use sqrtf when input and output are float 2014-03-28 14:53:37 +11:00
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