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:
authorJulian Eisel <julian@blender.org>2021-11-16 16:33:11 +0300
committerJulian Eisel <julian@blender.org>2021-11-16 16:37:20 +0300
commitce0d817bb7d6ea92b4571fd7262b173217c319cb (patch)
treeb867532b40890d7a9acf29e9ae0696620585360c
parentc7a1e115b5071ae55db4aa66085d19c183ea325d (diff)
UI: Fix hard to read text for drag disabled hints
In 499dbb626acb, the background color of drag tooltips were changed so text becomes more readable. But multiple people were touching the same code, so the disabled hint tooltips didn't get the same tweak. They would benefit from them even more, since the red text is even harder to read on the transparent background than the regular, white text.
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index 85378ffd7c7..64aa55c058c 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -725,10 +725,12 @@ static void wm_drop_operator_draw(const char *name, int x, int y)
static void wm_drop_redalert_draw(const char *redalert_str, int x, int y)
{
const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
- const float col_bg[4] = {0.0f, 0.0f, 0.0f, 0.2f};
- float col_fg[4];
+ const bTheme *btheme = UI_GetTheme();
+ const uiWidgetColors *wcol = &btheme->tui.wcol_tooltip;
+ float col_fg[4], col_bg[4];
UI_GetThemeColor4fv(TH_REDALERT, col_fg);
+ rgba_uchar_to_float(col_bg, wcol->inner);
UI_fontstyle_draw_simple_backdrop(fstyle, x, y, redalert_str, col_fg, col_bg);
}