From 8662575f40f684ebe50f43337f63bd55de05708c Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 2 Aug 2023 20:50:31 +0200 Subject: [PATCH] UI: Avoid slight text color flashing while clicking preview tiles Text of preview-tile widgets would change color while pressing the mouse button on them, this wasn't useful and just made the UI feel glitchy. The widget background already indicates the state well. Preview-tile widgets are currently only used in the asset view template. More usages will be introduced in the asset-shelf patch (#104831). --- source/blender/editors/interface/interface_widgets.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/editors/interface/interface_widgets.cc b/source/blender/editors/interface/interface_widgets.cc index 2fecfae3dff..9fbdafe8678 100644 --- a/source/blender/editors/interface/interface_widgets.cc +++ b/source/blender/editors/interface/interface_widgets.cc @@ -4617,6 +4617,8 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type) wt.draw = nullptr; /* Drawn via the `custom` callback. */ wt.text = nullptr; + /* Drawing indicates state well enough. No need to change colors further. */ + wt.state = widget_state_nothing; wt.custom = widget_preview_tile; wt.wcol_theme = &btheme->tui.wcol_list_item; break;