Skip to content

Commit 8180fd4

Browse files
committed
fix: fix warnings.
as title. Log:
1 parent 6f1c6ef commit 8180fd4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

panels/dock/package/main.qml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Window {
3838
property real dockItemIconSize: dockItemMaxSize * 9 / 14
3939

4040
// NOTE: -1 means not set its size, follow the platform size
41-
width: Panel.position == Dock.Top || Panel.position == Dock.Bottom ? -1 : dockSize
42-
height: Panel.position == Dock.Left || Panel.position == Dock.Right ? -1 : dockSize
41+
width: Panel.position === Dock.Top || Panel.position === Dock.Bottom ? -1 : dockSize
42+
height: Panel.position === Dock.Left || Panel.position === Dock.Right ? -1 : dockSize
4343
color: "transparent"
4444
flags: Qt.WindowDoesNotAcceptFocus
4545

@@ -88,8 +88,8 @@ Window {
8888
return dock.useColumnLayout ? "width" : "height";
8989
}
9090
to: {
91-
if (useTransformBasedAnimation) return Panel.hideState != Dock.Hide ? 0 : ((Panel.position == Dock.Left || Panel.position == Dock.Top) ? -Panel.dockSize : Panel.dockSize);
92-
return Panel.hideState != Dock.Hide ? Panel.dockSize : 1;
91+
if (useTransformBasedAnimation) return Panel.hideState !== Dock.Hide ? 0 : ((Panel.position === Dock.Left || Panel.position === Dock.Top) ? -Panel.dockSize : Panel.dockSize);
92+
return Panel.hideState !== Dock.Hide ? Panel.dockSize : 1;
9393
}
9494
duration: 500
9595
easing.type: Easing.OutCubic
@@ -98,9 +98,9 @@ Window {
9898
}
9999
onStopped: {
100100
if (useTransformBasedAnimation) {
101-
dock.visible = ((dock.useColumnLayout ? dockTransform.x : dockTransform.y) == 0)
101+
dock.visible = ((dock.useColumnLayout ? dockTransform.x : dockTransform.y) === 0)
102102
} else {
103-
dock.visible = ((dock.useColumnLayout ? dock.width : dock.height) != 1)
103+
dock.visible = ((dock.useColumnLayout ? dock.width : dock.height) !== 1)
104104
}
105105
}
106106
}
@@ -165,7 +165,7 @@ Window {
165165
if (useTransformBasedAnimation) {
166166
dock.visible = true;
167167
} else {
168-
dock.visible = ((dock.useColumnLayout ? dock.width : dock.height) != 1);
168+
dock.visible = ((dock.useColumnLayout ? dock.width : dock.height) !== 1);
169169
}
170170
}
171171
}
@@ -490,7 +490,7 @@ Window {
490490
if (Panel.locked) {
491491
return Qt.ArrowCursor
492492
}
493-
if (Panel.position == Dock.Top || Panel.position == Dock.Bottom) {
493+
if (Panel.position === Dock.Top || Panel.position === Dock.Bottom) {
494494
return Qt.SizeVerCursor
495495
}
496496
return Qt.SizeHorCursor
@@ -528,11 +528,11 @@ Window {
528528
var changeAverage = recentDeltas.reduce(function(acc, val) { return acc + val; }, 0) / recentDeltas.length;
529529

530530
var newDockSize = 0
531-
if (Panel.position == Dock.Bottom) {
531+
if (Panel.position === Dock.Bottom) {
532532
newDockSize = Math.min(Math.max(oldDockSize - changeAverage, Dock.MIN_DOCK_SIZE), Dock.MAX_DOCK_SIZE)
533-
} else if (Panel.position == Dock.Top) {
533+
} else if (Panel.position === Dock.Top) {
534534
newDockSize = Math.min(Math.max(oldDockSize + changeAverage, Dock.MIN_DOCK_SIZE), Dock.MAX_DOCK_SIZE)
535-
} else if (Panel.position == Dock.Left) {
535+
} else if (Panel.position === Dock.Left) {
536536
newDockSize = Math.min(Math.max(oldDockSize + changeAverage, Dock.MIN_DOCK_SIZE), Dock.MAX_DOCK_SIZE)
537537
} else {
538538
newDockSize = Math.min(Math.max(oldDockSize - changeAverage, Dock.MIN_DOCK_SIZE), Dock.MAX_DOCK_SIZE)

0 commit comments

Comments
 (0)