|
@@ -522,17 +522,20 @@ var
|
|
|
ThumbR: TFresnelRoundRect;
|
|
|
c: TFresnelCSSCorner;
|
|
|
begin
|
|
|
- if El=nil then ;
|
|
|
r:=aBar.Box;
|
|
|
|
|
|
// draw track
|
|
|
TrackColor:=colLtGray;
|
|
|
+ if not El.IsHovered then
|
|
|
+ TrackColor.Alpha:=$8000;
|
|
|
FillRect(TrackColor,r);
|
|
|
if aBar.Size<1 then
|
|
|
exit;
|
|
|
|
|
|
// draw thumb
|
|
|
ThumbColor:=colDkGray;
|
|
|
+ if not El.IsHovered then
|
|
|
+ ThumbColor.Alpha:=$8000;
|
|
|
FromPos:=aBar.Position/aBar.Size;
|
|
|
if FromPos<0 then FromPos:=0;
|
|
|
if FromPos>1 then FromPos:=1;
|
|
@@ -576,6 +579,8 @@ var
|
|
|
begin
|
|
|
if El=nil then ;
|
|
|
TrackColor:=colLtGray;
|
|
|
+ if not El.IsHovered then
|
|
|
+ TrackColor.Alpha:=$8000;
|
|
|
FillRect(TrackColor,r);
|
|
|
end;
|
|
|
|
|
@@ -588,9 +593,10 @@ var
|
|
|
IsLeft, HasVertBar, HasHorzBar: Boolean;
|
|
|
begin
|
|
|
LNode:=TUsedLayoutNode(El.LayoutNode);
|
|
|
- IsLeft:=false;
|
|
|
HasVertBar:=flfVerticalScrollbar in LNode.Flags;
|
|
|
HasHorzBar:=flfHorizontalScrollbar in LNode.Flags;
|
|
|
+ if (not HasVertBar) and (not HasHorzBar) then exit;
|
|
|
+
|
|
|
if HasVertBar then
|
|
|
begin
|
|
|
case LNode.ScrollbarWidth of
|
|
@@ -598,7 +604,8 @@ begin
|
|
|
else BarWidth:=El.Viewport.ScrollbarsWidth[false];
|
|
|
end;
|
|
|
IsLeft:=El.ComputedDirection=CSSRegistry.kwRTL;
|
|
|
- end;
|
|
|
+ end else
|
|
|
+ IsLeft:=false;
|
|
|
if HasHorzBar then
|
|
|
case LNode.ScrollbarWidth of
|
|
|
CSSRegistry.kwThin: BarHeight:=El.Viewport.ScrollbarsThinWidth[true];
|