fix #972,update Sliders version at dock settings

--use QtControls 2.2 for Sliders in dock settings
and update the Latte required version to 5.9 which
is LTS. Most distros should have already updated
to that one.
pull/2/head
Michail Vourlakos 7 years ago
parent 1601eaa155
commit 5231e95c96

@ -9,7 +9,7 @@ set(WEBSITE "https://github.com/psifidotos/Latte-Dock")
set(BUG_ADDRESS "https://github.com/psifidotos/Latte-Dock/issues") set(BUG_ADDRESS "https://github.com/psifidotos/Latte-Dock/issues")
set(FAQS "https://github.com/psifidotos/Latte-Dock/wiki/F.A.Q.") set(FAQS "https://github.com/psifidotos/Latte-Dock/wiki/F.A.Q.")
set(QT_MIN_VERSION "5.7.0") set(QT_MIN_VERSION "5.9.0")
set(KF5_MIN_VERSION "5.38.0") set(KF5_MIN_VERSION "5.38.0")
set(KF5_LOCALE_PREFIX "") set(KF5_LOCALE_PREFIX "")
@ -48,7 +48,6 @@ include(ECMQMLModules)
ecm_find_qmlmodule(QtQuick 2.7) ecm_find_qmlmodule(QtQuick 2.7)
ecm_find_qmlmodule(QtQuick.Layouts 1.3) ecm_find_qmlmodule(QtQuick.Layouts 1.3)
ecm_find_qmlmodule(QtQuick.Controls 1.4) ecm_find_qmlmodule(QtQuick.Controls 1.4)
ecm_find_qmlmodule(QtQuick.Controls 2.0)
ecm_find_qmlmodule(QtQuick.Controls.Styles.Plasma 2.0) ecm_find_qmlmodule(QtQuick.Controls.Styles.Plasma 2.0)
ecm_find_qmlmodule(QtGraphicalEffects 1.0) ecm_find_qmlmodule(QtGraphicalEffects 1.0)
ecm_find_qmlmodule(org.kde.kquickcontrolsaddons 2.0) ecm_find_qmlmodule(org.kde.kquickcontrolsaddons 2.0)

@ -20,9 +20,9 @@ We recommend that you use at least **Plasma 5.9.0**
**development packages for:** **development packages for:**
```bash ```bash
Qt5Core >= 5.7.0 Qt5Core >= 5.9.0
Qt5Gui >= 5.7.0 Qt5Gui >= 5.9.0
Qt5Dbus >= 5.7.0 Qt5Dbus >= 5.9.0
KF5Plasma >= 5.38.0 KF5Plasma >= 5.38.0
KF5PlasmaQuick >= 5.38.0 KF5PlasmaQuick >= 5.38.0

@ -163,6 +163,7 @@ PlasmaComponents.Page {
Layout.fillWidth: true Layout.fillWidth: true
value: plasmoid.configuration.iconSize value: plasmoid.configuration.iconSize
from: 16 from: 16
to: 128
stepSize: (!plasmoid.configuration.autoDecreaseIconSize stepSize: (!plasmoid.configuration.autoDecreaseIconSize
&& (plasmoid.configuration.advanced || (plasmoid.configuration.iconSize % 8 !== 0))) && (plasmoid.configuration.advanced || (plasmoid.configuration.iconSize % 8 !== 0)))
|| dialog.dockIsPanel ? 1 : 8 || dialog.dockIsPanel ? 1 : 8
@ -260,7 +261,7 @@ PlasmaComponents.Page {
PlasmaComponents.Label { PlasmaComponents.Label {
text: i18n("Screen Height Proportion:") text: i18n("Screen Height Proportion:")
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
enabled: proportionSizeSlider.value >= proportionSizeSlider.realMinimum enabled: proportionSizeSlider.value !== proportionSizeSlider.from
} }
LatteExtraControls.Slider { LatteExtraControls.Slider {
@ -271,11 +272,10 @@ PlasmaComponents.Page {
to: 10 to: 10
stepSize: 0.5 stepSize: 0.5
wheelEnabled: false wheelEnabled: false
property real realMinimum: minimumValue + 0.5
function updateProportionIconSize() { function updateProportionIconSize() {
if (!pressed) { if (!pressed) {
if(value<realMinimum) { if(value===1) {
plasmoid.configuration.proportionIconSize = -1; plasmoid.configuration.proportionIconSize = -1;
} else { } else {
plasmoid.configuration.proportionIconSize = value; plasmoid.configuration.proportionIconSize = value;
@ -297,11 +297,11 @@ PlasmaComponents.Page {
} }
PlasmaComponents.Label { PlasmaComponents.Label {
text: proportionSizeSlider.value>=proportionSizeSlider.realMinimum ? text: proportionSizeSlider.value !== proportionSizeSlider.from ?
proportionSizeSlider.value.toFixed(1) + "%" : "---%" proportionSizeSlider.value.toFixed(1) + "%" : "---%"
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
enabled: proportionSizeSlider.value >= proportionSizeSlider.realMinimum enabled: proportionSizeSlider.value !== proportionSizeSlider.from
} }
} }

@ -32,7 +32,7 @@ T.Slider {
Math.max(handle ? handle.implicitHeight : 0, Math.max(handle ? handle.implicitHeight : 0,
handle ? handle.implicitHeight : 0) + topPadding + bottomPadding) handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
padding: units.gridUnit padding: 3*units.smallSpacing //5//units.gridUnit
snapMode: T.Slider.SnapOnRelease snapMode: T.Slider.SnapOnRelease
PlasmaCore.Svg { PlasmaCore.Svg {
@ -80,8 +80,10 @@ T.Slider {
prefix: "groove-highlight" prefix: "groove-highlight"
x: parent.horizontal ? 0 : (parent.width - width) / 2 x: parent.horizontal ? 0 : (parent.width - width) / 2
y: parent.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height y: parent.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height
width: parent.horizontal ? control.position * parent.width : parent.width width: parent.horizontal ? control.position * parent.width + invisibleSpacer : parent.width
height: parent.horizontal ? parent.height : control.position * parent.height height: parent.horizontal ? parent.height : control.position * parent.height + invisibleSpacer
property int invisibleSpacer: control.position === 0 ? 4 : 0
} }
} }
} }

Loading…
Cancel
Save