mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-20 11:31:28 +08:00
This commit is contained in:
@@ -1347,14 +1347,12 @@ IMPLEMENT_BRUSH_ELEMENT_RENDERER
|
||||
{\
|
||||
oldColor=Pair<Color, Color>(element->GetColor1(), element->GetColor2());\
|
||||
brush=_renderTarget->CreateDirect2DLinearBrush(oldColor.key, oldColor.value);\
|
||||
brush->AddRef();\
|
||||
}\
|
||||
}\
|
||||
void TRENDERER::DestroyBrush(IWindowsDirect2DRenderTarget* _renderTarget)\
|
||||
{\
|
||||
if(_renderTarget && brush)\
|
||||
{\
|
||||
brush->Release();\
|
||||
_renderTarget->DestroyDirect2DLinearBrush(oldColor.key, oldColor.value);\
|
||||
brush=0;\
|
||||
}\
|
||||
|
||||
@@ -1449,9 +1449,9 @@ UniscribeColor
|
||||
UniscribeColor(){}
|
||||
UniscribeColor(Color _fontColor, Color _backgroundColor):fontColor(_fontColor),backgroundColor(_backgroundColor){}
|
||||
|
||||
inline vint Compare(const UniscribeColor& value)const
|
||||
inline vint64_t Compare(const UniscribeColor& value)const
|
||||
{
|
||||
vint result;
|
||||
vint64_t result;
|
||||
if ((result = fontColor.Compare(value.fontColor)) != 0) return result;
|
||||
if ((result = backgroundColor.Compare(value.backgroundColor)) != 0) return result;
|
||||
return 0;
|
||||
|
||||
+6
-6
@@ -536,9 +536,9 @@ Color
|
||||
{
|
||||
}
|
||||
|
||||
vint Compare(Color color)const
|
||||
vint64_t Compare(Color color)const
|
||||
{
|
||||
return value - color.value;
|
||||
return (vint64_t)value - (vint64_t)color.value;
|
||||
}
|
||||
GUI_DEFINE_COMPARE_OPERATORS(Color)
|
||||
|
||||
@@ -9205,9 +9205,9 @@ Colorized Plain Text (model)
|
||||
/// </summary>
|
||||
Color background;
|
||||
|
||||
inline vint Compare(const ColorItem& value)const
|
||||
inline vint64_t Compare(const ColorItem& value)const
|
||||
{
|
||||
vint result;
|
||||
vint64_t result;
|
||||
if ((result = text.Compare(value.text)) != 0) return result;
|
||||
if ((result = background.Compare(value.background)) != 0) return result;
|
||||
return 0;
|
||||
@@ -9233,9 +9233,9 @@ Colorized Plain Text (model)
|
||||
/// </summary>
|
||||
ColorItem selectedUnfocused;
|
||||
|
||||
inline vint Compare(const ColorEntry& value)const
|
||||
inline vint64_t Compare(const ColorEntry& value)const
|
||||
{
|
||||
vint result;
|
||||
vint64_t result;
|
||||
if ((result = normal.Compare(value.normal)) != 0) return result;
|
||||
if ((result = selectedFocused.Compare(value.selectedFocused)) != 0) return result;
|
||||
if ((result = selectedUnfocused.Compare(value.selectedUnfocused)) != 0) return result;
|
||||
|
||||
Reference in New Issue
Block a user