SwitchButton: Little enhancements in the drawing routine.
[GB.FORM] * NEW: SwitchButton: Little enhancements in the drawing routine.
This commit is contained in:
parent
c5ef568a03
commit
e550a4e76e
1 changed files with 2 additions and 2 deletions
|
@ -77,7 +77,7 @@ Public Sub DrawingArea_Draw()
|
||||||
|
|
||||||
iCol = Color.Merge(Color.Merge(Color.TextForeground, Color.SelectedBackground, $fValue), Color.Background)
|
iCol = Color.Merge(Color.Merge(Color.TextForeground, Color.SelectedBackground, $fValue), Color.Background)
|
||||||
iCol = Color.SetHSV(iCol, Color[Color.SelectedBackground].Hue)
|
iCol = Color.SetHSV(iCol, Color[Color.SelectedBackground].Hue)
|
||||||
If iFlag And Style.Disabled Then iCol = Color.Desaturate(iCol)
|
If iFlag And Style.Disabled Then iCol = Color.Merge(Color.Background, Color.Desaturate(iCol))
|
||||||
|
|
||||||
DS = Desktop.Scale
|
DS = Desktop.Scale
|
||||||
Paint.Rectangle(DS, (Paint.H - DS) / 2, Paint.W - DS * 2, DS, DS)
|
Paint.Rectangle(DS, (Paint.H - DS) / 2, Paint.W - DS * 2, DS, DS)
|
||||||
|
@ -92,7 +92,7 @@ Public Sub DrawingArea_Draw()
|
||||||
Paint.Fill()
|
Paint.Fill()
|
||||||
|
|
||||||
iCol = Color.Merge(Color.ButtonBackground, Color.SelectedBackground, $fValue)
|
iCol = Color.Merge(Color.ButtonBackground, Color.SelectedBackground, $fValue)
|
||||||
If iFlag And Style.Disabled Then iCol = Color.Desaturate(iCol)
|
If iFlag And Style.Disabled Then iCol = Color.Merge(Color.Background, Color.Desaturate(iCol))
|
||||||
|
|
||||||
F = Max(1, DS \ 4)
|
F = Max(1, DS \ 4)
|
||||||
Paint.Ellipse(X + F, Y + F, DS * 3 - F * 2, DS * 3 - F * 2)
|
Paint.Ellipse(X + F, Y + F, DS * 3 - F * 2, DS * 3 - F * 2)
|
||||||
|
|
Loading…
Reference in a new issue