Reorder negative font weight checks in qtWeightFromCFWeight.
This fixes a problem that caused the QFont::Thin and QFont::ExtraLight conditions to be unreachable. Change-Id: I62a701c53222edffbddbf868311111374ae5bea8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>bb10
parent
7c1326a1c3
commit
2e304751b3
|
|
@ -75,12 +75,12 @@ QFont::Weight QCoreTextFontEngine::qtWeightFromCFWeight(float value)
|
|||
return QFont::Medium;
|
||||
if (value == 0.0)
|
||||
return QFont::Normal;
|
||||
if (value <= -0.4)
|
||||
return QFont::Light;
|
||||
if (value <= -0.6)
|
||||
return QFont::ExtraLight;
|
||||
if (value <= -0.8)
|
||||
return QFont::Thin;
|
||||
if (value <= -0.6)
|
||||
return QFont::ExtraLight;
|
||||
if (value <= -0.4)
|
||||
return QFont::Light;
|
||||
return QFont::Normal;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue