grab
Parameters
- self:*ScrollBarWidget
- *ScrollBarWidget
Source
Implementation
pub fn grab(self: *ScrollBarWidget) Grab {
var fill = self.data().options.color(.text).opacity(0.5);
if (dvui.captured(self.data().id) or self.highlight) {
fill = self.data().options.color(.text).opacity(0.3);
}
return .{
.rect = self.data().parent.screenRectScale(self.grabRect.insetAll(2)).r,
.color = fill,
};
}