vczh
2022-06-19 22:22:05 -07:00
parent d761109bd5
commit 53f83491c6
3 changed files with 8 additions and 10 deletions
-2
View File
@@ -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;\
}\
+2 -2
View File
@@ -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
View File
@@ -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;