1
0
Fork 0

[UI] Improved scaling on some UI items.

This commit is contained in:
NamedKitten 2018-12-10 08:25:52 +00:00
parent 03f8d8f100
commit fc31931cd4
4 changed files with 24 additions and 23 deletions

1
.gitignore vendored
View file

@ -19,3 +19,4 @@ src_qml*
qmlcache*
qrc_src*
discord-rpc
*.kate-swp

View file

@ -16,8 +16,8 @@ Item {
id: playPauseButton
anchors.top: parent.top
anchors.bottom: parent.bottom
icon.height: parent.height / 2
icon.width: parent.height / 2
icon.height: parent.height / 1.25
icon.width: parent.height / 1.25
}
MouseArea {
@ -46,8 +46,8 @@ Item {
anchors.left: playPauseButton.right
anchors.top: parent.top
anchors.bottom: parent.bottom
icon.height: parent.height / 2
icon.width: parent.height / 2
icon.height: parent.height / 1.25
icon.width: parent.height / 1.25
icon.color: hovered
|| mouseAreaVolumeArea.containsMouse ? getAppearanceValueForTheme(
appearance.themeName,
@ -95,15 +95,15 @@ Item {
anchors.right: settingsButton.left
anchors.top: parent.top
anchors.bottom: parent.bottom
icon.height: parent.height / 2
icon.width: parent.height / 2
icon.height: parent.height / 1.25
icon.width: parent.height / 1.25
}
SettingsButton {
id: settingsButton
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
icon.height: parent.height / 2
icon.width: parent.height / 2
icon.height: parent.height / 1.25
icon.width: parent.height / 1.25
}
}

View file

@ -32,7 +32,7 @@ Slider {
}
function getProgressBarHeight(nyan, isMouse) {
var x = fun.nyanCat ? mainWindow.virtualHeight / 64 : Screen.height / 380
var x = fun.nyanCat ? mainWindow.virtualHeight / 64 : mainWindow.virtualHeight / 380
if (appearance.themeName == "Niconico" && !fun.nyanCat) {
return x * 2
} else if (isMouse & !fun.nyanCat) {
@ -80,7 +80,7 @@ Slider {
Rectangle {
x: (mouseAreaProgressBar.mouseX - hoverProgressLabel.width / 2)
y: progressBackground.y - 20 - hoverProgressLabel.height
y: progressBackground.y - (hoverProgressLabel.height * 2)
visible: mouseAreaProgressBar.containsMouse
color: getAppearanceValueForTheme(appearance.themeName,
"mainBackground")
@ -163,7 +163,7 @@ Slider {
y: progressBar.topPadding + progressBar.availableHeight / 2 - height / 2
implicitHeight: radius
implicitWidth: radius
radius: 12 + (progressBackground.height / 2)
radius: mainWindow.virtualHeight / 59
color: appearance.themeName
== "RoosterTeeth" ? "white" : fun.nyanCat ? "transparent" : getAppearanceValueForTheme(
appearance.themeName,

View file

@ -19,24 +19,24 @@ Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
width: visible ? playlistNextButton.width : 0
icon.height: parent.height / 2
icon.width: parent.height / 2
icon.height: parent.height / 1.25
icon.width: parent.height / 1.25
}
PlayPauseButton {
id: playPauseButton
anchors.left: playlistPrevButton.right
anchors.top: parent.top
anchors.bottom: parent.bottom
icon.height: parent.height / 2
icon.width: parent.height / 2
icon.height: parent.height / 1.25
icon.width: parent.height / 1.25
}
PlaylistNextButton {
id: playlistNextButton
anchors.left: playPauseButton.right
anchors.top: parent.top
anchors.bottom: parent.bottom
icon.height: parent.height / 2
icon.width: parent.height / 2
icon.height: parent.height / 1.25
icon.width: parent.height / 1.25
}
MouseArea {
@ -56,8 +56,8 @@ Item {
anchors.left: playlistNextButton.right
anchors.top: parent.top
anchors.bottom: parent.bottom
icon.height: parent.height / 2
icon.width: parent.height / 2
icon.height: parent.height / 1.25
icon.width: parent.height / 1.25
}
VolumeSlider {
id: volumeSlider
@ -79,15 +79,15 @@ Item {
anchors.right: fullscreenButton.left
anchors.top: parent.top
anchors.bottom: parent.bottom
icon.height: parent.height / 2
icon.width: parent.height / 2
icon.height: parent.height / 1.25
icon.width: parent.height / 1.25
}
FullscreenButton {
id: fullscreenButton
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
icon.height: parent.height / 2
icon.width: parent.height / 2
icon.height: parent.height / 1.25
icon.width: parent.height / 1.25
}
}