From 4c94b0803f7168188043b700083db42280428185 Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Tue, 18 Feb 2014 07:37:07 +0000
Subject: [PATCH] Fix small visual glitch in DataTranslations' Info window
* When translations did not match, FindFirst returned negative index
resulting in bold font style "leaking" into translator's name.
---
src/preferences/datatranslations/DataTranslationsWindow.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/preferences/datatranslations/DataTranslationsWindow.cpp b/src/preferences/datatranslations/DataTranslationsWindow.cpp
index 7cf78d8..3e54c98 100644
a
|
b
|
|
1 | 1 | /* |
2 | | * Copyright 2002-2010, Haiku, Inc. |
| 2 | * Copyright 2002-2014, Haiku, Inc. |
3 | 3 | * Distributed under the terms of the MIT license. |
4 | 4 | * |
5 | 5 | * Authors: |
… |
… |
DataTranslationsWindow::_ShowInfoAlert(int32 id)
|
279 | 279 | B_TRANSLATE("Info:"), B_TRANSLATE("Path:"), NULL }; |
280 | 280 | for (int32 i = 0; labels[i]; i++) { |
281 | 281 | int32 index = message.FindFirst(labels[i]); |
282 | | view->SetFontAndColor(index, index + strlen(labels[i]), &font); |
| 282 | if (index >= 0) |
| 283 | view->SetFontAndColor(index, index + strlen(labels[i]), &font); |
283 | 284 | } |
284 | 285 | |
285 | 286 | alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE); |