Commit Graph

458 Commits

Author SHA1 Message Date
Brecht Van Lommel
ec27281812 Fix incorrect text clipping on node link button in material properties. 2018-02-25 19:57:40 +01:00
Campbell Barton
9d62e6e782 UI: don't draw outline when it's not calculated
Outline drawing was running even when there were no verts to draw.
Causes an assert in 2.8.
2018-01-11 13:23:55 +11:00
Campbell Barton
25f56d7a7b UI: correct flag re-use
Adding ability to show a button as pressed w/o UI_SELECT set caused
other flags to be cleared that shouldn't have been.
2017-11-04 14:13:04 +11:00
Campbell Barton
25f2abf314 Cleanup: minor comment correction 2017-11-03 01:10:03 +11:00
Campbell Barton
9ece0ee5fe UI: add UI_SELECT_DRAW flag
Allow to draw as pressed w/o interfering with behavior.

Resolves issue where buttons raised on mouse-over.
2017-11-03 00:47:51 +11:00
Campbell Barton
6355d98267 UI: free up bit in uiBut.flag 2017-11-03 00:27:29 +11:00
Campbell Barton
88356a2442 Cleanup: use term shape-preset in widget code 2017-11-02 05:48:59 +11:00
Campbell Barton
3ec4d0b51b UI: Add UILayout.operator_menu_hold
This is an operator button that opens a menu when the button is held.
2017-11-02 05:01:10 +11:00
Aleksandr Zinovev
ec22809025 Fix Label colors in popups 2017-07-27 10:27:29 +03:00
raa
59bb4ca1b0 Fix: Icon offset for pie buttons 2017-03-28 13:44:02 +03:00
raa
9d873fc3de Various icon adjustments 2017-03-17 16:57:53 +03:00
raa
76015f98ae Fix icon alignment for pie buttons 2017-03-11 22:34:09 +03:00
Brecht Van Lommel
f667593b6a Fix text and icon positioning issue on high DPI, after recent changes in 32c5f3d. 2017-03-11 04:47:22 +01:00
raa
32c5f3d772 Fix text and icon positioning issues 2017-03-01 16:11:21 +03:00
Joshua Leung
d2f4900d1a Use a smaller cross icon for clearing search box contents 2017-02-09 19:08:58 +13:00
Julian Eisel
e0307113a5 UI: Add 'x' icon to text buttons to clear content
This is useful e.g. for search buttons to quickly clear the filter string. We might want to make this optional for python scripts.
2016-11-28 19:03:31 +01:00
Julian Eisel
ec6b593072 Fix wrong separator line width after drawing vec icon
Was visible in Dynamic Context Menu add-on.
2016-10-06 22:45:12 +02:00
Campbell Barton
124bfa4d2d Cleanup: spelling, style 2016-07-08 00:48:45 +10:00
Alexander Romanov
6798809c7e Flat shading for basic shader
The purpose of the patch is to replace deprecated  glShadeModel.

To decrease glShadeModel calls I've set GL_SMOOTH by default

Reviewers: merwin, brecht

Reviewed By: brecht

Subscribers: blueprintrandom, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D1958
2016-06-10 05:38:17 +10:00
Campbell Barton
19955bd152 Fix T48447: Inactive menu items don't grey-out icons 2016-05-17 00:17:26 +10:00
Joshua Leung
c42a796e9f Fix: Make it easier to tell if Color Swatches are greyed out or not
This commit makes disabled/inactive color swatches look more obviously disabled
by halving their alpha values. It is necessary because the results of
ui_widget_color_disabled() (which is usually used when disabling widgets)
get overwritten by the color filling code here.

To avoid confusion, the checkerboard background (when the color genuinely has
alpha) will still only show in those cases. That is, when disabled, color swatches
won't show the checkerboard unless the color actually has an alpha component if it
wasn't disabled.
2016-04-19 00:42:59 +12:00
Campbell Barton
0f1d711681 Fix T47830: Multi-edit w/ ui-list wont highlight
Regression from 4d6b892.
2016-03-23 03:37:23 +11:00
Campbell Barton
8238f5b33b Fix T47868: Check Box shape doesn't scale 2016-03-21 15:16:43 +11:00
Campbell Barton
aefb68c84d Fix assert in UI code
Dont attempt to clip empty string
2016-03-02 12:53:55 +11:00
Campbell Barton
55dcdb9bd7 Fix T47324: Edit-text in list view theme glitch
Use existing text select colors when text matches select color.
2016-02-05 03:28:22 +11:00
Kévin Dietrich
c6bc2363e5 UI: redesign of the progress bar.
A picture is worth a thousand words: http://wiki.blender.org/index.php/
File:UI_progress_bar.png

Reviewers: #user_interface, brecht, dingto

Reviewed by: brecht, dingto

Differential Revision: https://developer.blender.org/D1727
2016-01-18 01:39:09 +01:00
Campbell Barton
4d6b8925e6 Fix T47158: Labels w/ icons use button text color
Icon buttons with text labels now use the same color as labels.

This was causing problems with theming since there was no way to set color
for all labels without also changing button text color.
2016-01-11 19:43:29 +11:00
Mike Erwin
0a9935cb28 OpenGL: various small optimizations
- set uniform colors outside of loop
- replace glBegin/End with DrawRangeElements
- use GL_LINES when drawing single lines
2016-01-05 01:35:19 -05:00
Alexander Romanov
700c40e2f9 OpenGL: stipple support added to basic GLSL shader
The is intended to replace the deprecated glPolygonStipple() calls with a shader
based alternative, once we switch over to GLSL shaders.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D1688
2015-12-26 22:15:23 +01:00
Campbell Barton
86154b11ee Cleanup: typos 2015-11-16 21:06:40 +11:00
Bastien Montagne
3d39b98f94 New uialign code, based on 2D positions of widgets.
This new code fixes a tons of issues with previous one, which basically was epic-failing
in many non-basic cases (especially mixed columns and rows with column-dominant layout).

It basically no more relies over order of buttons declaration in the uiBlock, instead it
finds and stores spatial neighbors and uses that data to compute needed stitching.
See code comments for details.

New code seems to be roughly ten times slower than old one (for complex grouped layouts),
that is, about a few microsecconds per alignment group - this remains reasonable.

Also, ui-align code becomming rather big in itself, it was separated in
own new `interface_align.c` file.

Reviewers: campbellbarton, severin

Reviewed By: campbellbarton, severin

Differential Revision: https://developer.blender.org/D1573
2015-11-06 18:54:33 +01:00
Julian Eisel
28da385ac2 Cleanup: Use new vector transform functions 2015-09-20 18:11:25 +02:00
Campbell Barton
0c2be4d8e8 Fix T46113: Color picker erratic outside 0-1 range 2015-09-15 21:28:21 +10:00
Campbell Barton
fdc8b12726 Cleanup: whitespace, unused var 2015-08-06 13:03:07 +10:00
Julian Eisel
91d424b82a Fix tooltip colors not initialized correctly
Already committed similar fix (rBbeaed66f292dd) but saw it appearing on
other peoples screens a few times since them. Never was able to recreate
though.
This should make sure everything is initialized fine, so if we see it
appearing again, then it's likely because of manual tweaks or the
version saved in the .blend.
2015-06-04 17:07:05 +02:00
Campbell Barton
2c7cb8ce59 Fix UI string clip (reverse search separator char)
The string may have many '|' characters, only the last is clipped.
2015-06-03 15:03:28 +10:00
Campbell Barton
b3d2b035c4 Cleanup: check button flag for shortcut delimiter 2015-06-03 14:35:41 +10:00
Ines Almeida
b53836d2c9 UI: tweaks to ID and non ID preview templates
- label is shown on a UI_UNIT_Y heigh instead of 0.2 * total button size
- vertically centering non-ID previews labels
- making some constants dependent on ui units
2015-06-01 21:37:56 +02:00
Ines Almeida
9e850addae template id previews: changes for consistency with icon views template
- elongate the buttons to acomodate the icon without the label overlapping.
- removing the blue background
- adding a consistent margin all around the popup
2015-06-01 21:37:56 +02:00
Campbell Barton
67bebc42f4 UI: comments (doxygen tweaks) 2015-05-31 14:20:03 +10:00
Julian Eisel
1a0c961746 Cleanup: Use true/false for bool, naming 2015-05-29 21:35:13 +02:00
Bastien Montagne
c5a8a4e9d8 Fix mismatch in strings length compute in filebrowser, leading to annoying '...' in longest filename.
We must take kerning into account everywhere! Note this will disappear in upcomming filebrowser
refactor anyway.

Reported through IRC by Pablo (venomgfx), thanks.
2015-05-27 17:25:55 +02:00
Sergey Sharybin
3c9da38e7e Style cleanup: space after keyword 2015-05-26 16:15:52 +05:00
Bastien Montagne
d20fd2da72 Revert "Cleanup: set var twice"
This reverts commit eb799dc350.

I recommend reading code before doing cleanup, next time...
2015-05-26 13:01:29 +02:00
Campbell Barton
eb799dc350 Cleanup: set var twice 2015-05-26 10:25:01 +10:00
Bastien Montagne
de21604cf4 Minor cleanup... 2015-05-25 22:24:46 +02:00
Bastien Montagne
1ac0fef345 Fix widget_draw_preview() not taking into account given alpha.
Needed to get correct 'inactive' effect on buttons with big previews.
2015-05-25 22:06:25 +02:00
Ines Almeida
6b5f3f5fef preview buttons: tiny optimization 2015-05-25 15:38:12 +01:00
Bastien Montagne
7456f06097 Fix unreported bug with recent enum icon preview changes, would show bad in case of mixing
items with and without label.
2015-05-24 15:49:04 +02:00
Ines Almeida
78250f1d1d IconView template: adding optional labels to popup buttons 2015-05-23 16:21:05 +01:00