Commit Graph

549 Commits

Author SHA1 Message Date
e86e0aad55 Cleanup: use braces for interface code 2019-03-25 11:16:46 +11:00
ff8c32fa6b Fix uninitialized variable use for right aligned checkbox 2019-03-25 07:34:06 +11:00
Dalai Felinto
243a9254ea Fix warning for uninitialized icon_only
Warning/issue introduced on rBcaa357dae70322e.
2019-03-22 16:03:38 -03:00
8f3ecd08e1 Fix checkboxes being right aligned when property split is disabled 2019-03-23 00:03:48 +11:00
caa357dae7 Cleanup: typo in variable name 2019-03-23 00:01:00 +11:00
813694e07b UI: use checkbox text for property split layout
Use right aligned checkboxes when 'use_property_split' is enabled
instead of a separate label.
2019-03-22 15:43:23 +11:00
da1350acdc Fix T60815: drag & drop crash when search menu is opened immediately after.
Patch by matc, some further refactoring by me.

Differential Revision: https://developer.blender.org/D4250
2019-03-20 19:50:21 +01:00
a1addc5c63 UI: support for popups starting with buttons activated
While this could already be done from C,
this is now exposed to Python
2019-03-20 23:10:34 +11:00
e7fd6c8f30 Cleanup: comment blocks 2019-03-19 15:17:46 +11:00
Harley Acheson
1de1cedf4c UI: better widget drawing with thick line width.
When the line width was larger than the UI scale, there was not enough
space for thicker widget outlines to draw properly. Now widgets are made
a little larger to accommodate the thicker outlines.

Differential Revision: https://developer.blender.org/D4368
2019-02-21 18:03:34 +01:00
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
b8e8c0e325 Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
Severin
a77b63c569 UI: Preferences Redesign Part 2
(Part 1 was 00963afc14978b)

Does the following changes visible to users:
* Use panels and sub-panels for more structured & logical grouping
* Re-organized options more logically than before (see images in D4148)
* Use flow layout (single column by default).
* New layout uses horizontal margin if there's enough space.
* Change size of Preferences window to suit new layout.
* Move keymap related options from "Input" into own section.
* Own, left-bottom aligned region for Save Preferences button.
* Adjustments of names, tooltips & icons.
* Move buttons from header into the main region (except editor switch).
* Hide Preferences header when opened in temporary window.
* Use full area width for header.
* Don't use slider but regular number widget for UI scale.
* Gray out animation player path option if player isn't "Custom"

Internal changes:
* Rearrange RNA properties to match changed UI structure.
* Introduces new "EXECUTE" region type, see reasoning in D3982.
* Changes to panel layout and AZone code for dynamic panel region.
* Bumps subversion and does versioning for new regions.

RNA changes are documented in the release notes:
https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Preferences_API

Design & implementation mostly done by @billreynish and myself.
I recommend checking out the screenshots posted by William:
https://developer.blender.org/D4148#93787

Reviewed By: brecht

Maniphest Tasks: T54115

Differential Revision: https://developer.blender.org/D4148
2019-01-04 22:18:23 +01:00
Harley Acheson
4053ed022b UI: fix incorrect collapse menu button alignment.
Differential Revision: https://developer.blender.org/D4151
2019-01-04 15:27:51 +01:00
Harley Acheson
81f29678dc UI: fix display of menu buttons without text and icon, and only a down arrow.
Differential Revision: https://developer.blender.org/D4123
2019-01-04 15:20:02 +01:00
53d655a0b3 Cleanup: use typed unsigned ints 2019-01-04 11:06:44 +11:00
8063d72b08 Fix T60037: single column layout breaks file browse button. 2019-01-02 19:22:56 +01:00
3700192043 Fix T59910: material editor UI issue after recent changes.
This reverts part of commit 4f98266cf6, ref D4123.
2018-12-28 11:36:14 +01:00
Harley Acheson
4f98266cf6 UI: fix display of menu buttons without text and icon, and only a down arrow.
Differential Revision: https://developer.blender.org/D4123
2018-12-27 14:21:49 +01:00
Harley Acheson
e07b58537c UI: fix inconsistent icon button widths for popovers and enums.
Differential Revision: https://developer.blender.org/D4086
2018-12-27 12:49:35 +01:00
91240f15c5 UI: add UILayout.direction
Read only attribute, needed for introspection.
2018-12-20 11:59:31 +11:00
756be8f4d8 UI: add method to draw menu contents
This supports expanding menu contents into an existing layout.

Needed to fix T58937.
2018-12-20 11:33:08 +11:00
e62368e6c4 Fix enum icon button size for fractional UI scale.
Err on the side of too much padding.
2018-12-18 15:30:19 +01:00
9f25dad0a9 Fix T59535: Select linked delimit doesn't refresh 2018-12-18 17:22:11 +11:00
Harley Acheson
73b19bfb27 UI: fix enum icon buttons haveing different size.
The alignment makes it so the button edges overlap, now one pixel is removed
to account for this.

Differential Revision: https://developer.blender.org/D4063
2018-12-11 20:46:39 +01:00
Julian Eisel
b00963afc1 UI: Initial User-Preferences redesign
Implements the first changes for T54115:

* Rename "User Preferences" window to "Settings" in the UI.
  We'll likely put workspace settings in there, separate from the global
  user settings. System settings should become separate from user
  settings in future to allow settings for specific hardware.
* Add sidebar region for navigation (scrolls independently).
  Addresses space problems, so we can add more categories as needed now.
* Increase size of Settings window to compensate new navigation bar.
* Group sections into User Preferences and System.
  Icons for section groups by Andrzej Ambroz. Thanks!
* Bumps subversion for file compatibility.

Screenshot: https://developer.blender.org/F5715337

I also added categories for future work, but commented them out.
We may also want to redesign contents of each section now.

Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D3088
Design Task: https://developer.blender.org/T54115
2018-11-25 17:08:58 +01:00
5f2ac43b5f UI: allow inaccurate swipe motion to switch tabs
Removes the need to keep your cursor over tabs while dragging.
2018-11-23 12:11:18 +11:00
0a3cf08364 Keymaps: take into account DPI for tweak/drag/pie thresholds.
The intention is to fix a too low default threshold on high DPI screen.
Users with high DPI screens that have increased the threshold to fix this
or liked the lower threshold will need to lower it again.

This is still somewhat of a guess, ideally this would be based on the
physical distance travalled, and maybe different per type of input device.
However we do not have access to this information, and hope this gives a
better default.
2018-11-21 19:31:20 +01:00
3a13b89296 Cleanup: unused args, indentation 2018-11-21 06:29:19 +11:00
Dalai Felinto
d9abb0eaae Explicitly disable separator spacer in popover and pie menus
It is doable to get it to work, you just need to process it line
by line though, and get the right width of each one.

Disabling it for now since it is not implemented anyways.
2018-11-15 16:48:23 -02:00
ae6e84471a Merge branch 'master' into blender2.8 2018-11-14 09:54:55 +11:00
c1d29ea783 WM: enforce descriptions being NULL or defined
Without this bugs slip through that don't null check the descriptions
since many were set to empty strings.
2018-11-14 09:47:23 +11:00
81ed1d7093 UI: don't show shortcuts in toolbar buttons
Restrict these to displaying in tooltips.
2018-11-12 14:05:54 +11:00
f3ffb4e049 Add new factor parameter to layout.separator()
The new parameter allows to define the scale of the space.
2018-11-02 16:35:53 +01:00
1e8a2e1a10 UI: support red alert on labels, not just buttons. 2018-11-01 19:43:46 +01:00
817319a79e UI: add uiItemMenuFN which frees it's argument 2018-10-30 10:57:33 +11:00
4205cd269d UI: add uiItemMenuFN which frees it's argument 2018-10-30 10:53:47 +11:00
Julian Eisel
ab6c7ff2ab UI: Vertical Properties Editor Tabs
Moves the Properties editor context switching to a vertical tabs region.

Design Task: T54951
Differential Revison: D3840

The tabs are regular widgets, unlike the 'old' toolshelf tabs. This means they
give mouse hover feedback, have tooltips, support the right-click menu, etc.
Also, when vertical screen space gets tight, the tabs can be scrolled, they
don't shrink like the toolshelf ones.
The tab region is slightly larger than the header. The tabs are scaled up
accordingly. This makes them nicely readable.

The header is quite empty now. As shown in T54951, we wanted to have a search
button there. This should be added next.

Implementation Notes:

* Added a new region type, RGN_TYPE_NAVIGATION.
* Having the tabs in a separate region allows scrolling of the tab-bar, unlike
  the toolshelf tabs. We might want to remove the scrollbars though.
* Added a new region flag RGN_FLAG_PREFSIZE_OR_HIDDEN, to ensure the tab region
  is either hidden or has a fixed size.
* Added some additional flags to support fine-tuning the layout in panel and
  layout code.
* Bumps subversion.
2018-10-29 21:44:01 +01:00
Julian Eisel
ce148716c8 UI: Support Displaying Enums as Tabs
Adds `uiLayout.prop_tabs_enum(data, property, icon_only)` to BPY.
2018-10-29 21:20:58 +01:00
9bcdb19a3e Fix label misalignment when there are multiple buttons on the right side. 2018-10-28 17:46:52 +01:00
2ac65f6153 UI: new icon set by Andrzej Ambroz.
This is a monochrome icon set, with a more modern look and icons for
various features that did not have a proper icon before.
2018-10-08 19:46:00 +02:00
58adc58661 Merge branch 'master' into blender2.8 2018-09-27 15:49:59 +02:00
a247b53084 Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3732
2018-09-27 15:36:35 +02:00
cbe82f81e1 UI: allow fractical unit size for layouts. 2018-09-26 18:24:09 +02:00
f4f99d1d75 Add fixed width/height parameter for layouts
New parameters to define a fixed size for a layout. This allows to avoid UI changes when the text length changes.

This commit implements D3725
2018-09-25 20:59:04 +02:00
bb3ec3ebaf BLI_utildefines: rename pointer conversion macros
Terms get/set don't make much sense when casting values.

Name macros so the conversion is obvious,
use common prefix for easier completion.

- GET_INT_FROM_POINTER  -> POINTER_AS_INT
- SET_INT_IN_POINTER    -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER   -> POINTER_FROM_UINT
2018-09-19 12:12:21 +10:00
f35e9f047a Merge branch 'master' into blender2.8 2018-09-19 12:14:36 +10:00
a30f32891f Cleanup: remove dummy tooltips 2018-09-19 09:52:33 +10:00