Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2020-01-23 01:00:08 +0300
committerHarley Acheson <harley.acheson@gmail.com>2020-01-23 01:00:08 +0300
commitc5c46e5b74a0c52f042d7fb61d3e4b401110cc5e (patch)
treec6a330a87410ca083a9f1a28faf7cfac5ba664cc /source/blender/editors/interface/interface_widgets.c
parent452834f1e3a0253afd27339511f9b864818d3dde (diff)
UI: Fix Hover Flickering on Selected Items
Removes hover highlight from already-selected UI items to remove unintended flickering. Differential Revision: https://developer.blender.org/D6503 Reviewed by Campbell Barton
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r--source/blender/editors/interface/interface_widgets.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index d313310bfa1..fd2f652d40e 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2662,10 +2662,14 @@ static void widget_state(uiWidgetType *wt, int state, int drawflag)
if (color_blend != NULL) {
color_blend_v3_v3(wt->wcol.inner, color_blend, wcol_state->blend);
}
- }
- if (state & UI_ACTIVE) {
- widget_active_color(&wt->wcol);
+ /* Add "hover" highlight. Ideally this could apply in all cases,
+ * even if UI_SELECT. But currently this causes some flickering
+ * as buttons can be created and updated without respect to mouse
+ * position and so can draw without UI_ACTIVE set. See D6503. */
+ if (state & UI_ACTIVE) {
+ widget_active_color(&wt->wcol);
+ }
}
if (state & UI_BUT_REDALERT) {