Skip to content

Commit

Permalink
better variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Jun 25, 2024
1 parent 4794eb2 commit 6aaed57
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/widget/scroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (b *scrollBar) Cursor() desktop.Cursor {
}

func (b *scrollBar) DragEnd() {
b.area.isDragged = false
b.area.isDragging = false

if fyne.CurrentDevice().IsMobile() {
b.area.MouseOut()
Expand All @@ -91,8 +91,8 @@ func (b *scrollBar) DragEnd() {
}

func (b *scrollBar) Dragged(e *fyne.DragEvent) {
if !b.area.isDragged {
b.area.isDragged = true
if !b.area.isDragging {
b.area.isDragging = true
b.area.MouseIn(nil)

switch b.orientation {
Expand Down Expand Up @@ -131,7 +131,7 @@ func newScrollBar(area *scrollBarArea) *scrollBar {
}

func (a *scrollBarArea) isLarge() bool {
return a.isMouseIn || a.isDragged
return a.isMouseIn || a.isDragging
}

type scrollBarAreaRenderer struct {
Expand Down Expand Up @@ -196,7 +196,7 @@ var _ desktop.Hoverable = (*scrollBarArea)(nil)
type scrollBarArea struct {
Base

isDragged bool
isDragging bool
isMouseIn bool
scroll *Scroll
orientation scrollBarOrientation
Expand All @@ -217,7 +217,7 @@ func (a *scrollBarArea) MouseMoved(*desktop.MouseEvent) {

func (a *scrollBarArea) MouseOut() {
a.isMouseIn = false
if a.isDragged {
if a.isDragging {
return
}

Expand Down

0 comments on commit 6aaed57

Please sign in to comment.