Commit a85b1a68 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

replace hardoced values with kirigami ones

parent 2d6fc872
......@@ -40,9 +40,7 @@ FocusScope {
id: elisaTheme
property int layoutHorizontalMargin: 8
property int layoutVerticalMargin: 6
property int ratingStarSize: 15
property int navigationBarHeight: 100
property int smallControlButtonSize: 22
property int ratingStarSize: 16
}
SystemPalette {
......
......@@ -50,9 +50,7 @@ Item {
id: elisaTheme
property int layoutHorizontalMargin: 8
property int ratingStarSize: 15
property int playListDelegateHeight: 28
property int smallControlButtonSize: 22
}
}
......
......@@ -53,11 +53,8 @@ Item {
property int delegateToolButtonSize: 34
property int ratingStarSize: 15
property int mediaPlayerControlHeight: 42
property real mediaPlayerControlOpacity: 0.6
property int smallControlButtonSize: 22
property int volumeSliderWidth: 100
property int dragDropPlaceholderHeight: 28
......
......@@ -21,6 +21,7 @@ import QtQuick 2.7
import QtQuick.Layouts 1.2
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.3
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
Button {
......@@ -34,8 +35,8 @@ Button {
flat: true
display: AbstractButton.IconOnly
icon.width: elisaTheme.smallControlButtonSize
icon.height: elisaTheme.smallControlButtonSize
icon.width: Kirigami.Units.iconSizes.smallMedium
icon.height: Kirigami.Units.iconSizes.smallMedium
implicitWidth: icon.width + 16
implicitHeight: icon.height + 16
......
......@@ -294,7 +294,6 @@ FocusScope {
RatingStar {
id: mainRating
visible: ratingVisible
starSize: elisaTheme.ratingStarSize
starRating: trackRating
Layout.alignment: Qt.AlignLeft
}
......
......@@ -296,8 +296,6 @@ FocusScope {
RatingStar {
id: ratingWidget
starSize: elisaTheme.ratingStarSize
starRating: rating
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
......
......@@ -118,7 +118,6 @@ RowLayout {
sourceComponent: RatingStar {
starRating: model.display
starSize: elisaTheme.ratingStarSize
readOnly: true
......
......@@ -198,7 +198,6 @@ ColumnLayout {
readOnly: false
starSize: elisaTheme.ratingStarSize
}
]
}
......
......@@ -20,6 +20,7 @@ import QtQuick.Layouts 1.2
import QtQuick.Controls 2.3
import QtQuick.Window 2.2
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.5 as Kirigami
import org.kde.elisa 1.0
FocusScope {
......@@ -132,10 +133,10 @@ FocusScope {
source: (isPlaying === MediaPlayList.IsPlaying ?
Qt.resolvedUrl(elisaTheme.playingIndicatorIcon) : Qt.resolvedUrl(elisaTheme.pausedIndicatorIcon))
width: elisaTheme.smallControlButtonSize
height: elisaTheme.smallControlButtonSize
sourceSize.width: elisaTheme.smallControlButtonSize
sourceSize.height: elisaTheme.smallControlButtonSize
width: Kirigami.Units.iconSizes.smallMedium
height: Kirigami.Units.iconSizes.smallMedium
sourceSize.width: Kirigami.Units.iconSizes.smallMedium
sourceSize.height: Kirigami.Units.iconSizes.smallMedium
fillMode: Image.PreserveAspectFit
mirror: LayoutMirroring.enabled
......@@ -287,8 +288,6 @@ FocusScope {
starRating: rating
starSize: elisaTheme.ratingStarSize
visible: rating > 0
}
......
......@@ -18,9 +18,9 @@
import QtQuick 2.7
import QtQuick.Layouts 1.2
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.5 as Kirigami
Row {
property int starSize
property int starRating
property bool readOnly: true
......@@ -39,15 +39,15 @@ Row {
Item {
property int ratingThreshold: 2 + index * 2
height: starSize
width: starSize
height: Kirigami.Units.iconSizes.small
width: Kirigami.Units.iconSizes.small
Image {
width: starSize
height: starSize
width: Kirigami.Units.iconSizes.small
height: Kirigami.Units.iconSizes.small
anchors.centerIn: parent
sourceSize.width: starSize
sourceSize.height: starSize
sourceSize.width: Kirigami.Units.iconSizes.small
sourceSize.height: Kirigami.Units.iconSizes.small
fillMode: Image.PreserveAspectFit
layer.enabled: hoveredRating >= ratingThreshold
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment