Fix button.
This commit is contained in:
parent
78b6497b0a
commit
77ba915623
|
@ -22,12 +22,13 @@ Control {
|
|||
fillMode: Image.PreserveAspectFit
|
||||
sourceSize.height: Math.floor(root.parent.height / (appearance.themeName == "Niconico" ? 1.8 : 1.25))
|
||||
sourceSize.width: Math.floor(root.parent.height / (appearance.themeName == "Niconico" ? 1.8 : 1.25))
|
||||
}
|
||||
ColorOverlay {
|
||||
id: colorOverlay
|
||||
anchors.fill: parent
|
||||
source: parent
|
||||
anchors.fill: buttonImage
|
||||
source: buttonImage
|
||||
color: getAppearanceValueForTheme(appearance.themeName, "buttonColor")
|
||||
cached: false
|
||||
cached: true
|
||||
Binding on color {
|
||||
when: root.hovered
|
||||
value: root.hovered ? getAppearanceValueForTheme(
|
||||
|
@ -36,7 +37,6 @@ Control {
|
|||
appearance.themeName, "buttonColor")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -391,7 +391,7 @@ Window {
|
|||
}
|
||||
}
|
||||
onReleased: {
|
||||
var isLongEnough = Math.hypot(xStart, mouse.x) > mainWindow.width * 0.3
|
||||
var isLongEnough = Math.sqrt(xStart*xStart, mouse.x*mouse.x) > mainWindow.width * 0.3
|
||||
if (velocity > 2 && isLongEnough) {
|
||||
appearance.scaleFactor += 0.2
|
||||
} else if (velocity < -2 && isLongEnough) {
|
||||
|
|
Loading…
Reference in a new issue