new configuration based on various fixes

pull/1/head
Michail Vourlakos 8 years ago
parent 976cd2bb62
commit c70a20cdd3

@ -36,9 +36,10 @@ PlasmaComponents.Page {
ColumnLayout {
id: content
width: dialog.maxWidth
width: dialog.maxWidth - units.smallSpacing * 5
spacing: units.largeSpacing
anchors.centerIn: parent
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
//! BEGIN: Applet Size
ColumnLayout {

@ -37,10 +37,11 @@ PlasmaComponents.Page {
ColumnLayout {
id: content
width: dialog.maxWidth
width: dialog.maxWidth - units.smallSpacing * 5
spacing: units.largeSpacing
anchors.centerIn: parent
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
//! BEGIN: Location
ColumnLayout {
Layout.fillWidth: true
@ -305,6 +306,7 @@ PlasmaComponents.Page {
}
RowLayout {
Layout.fillWidth: false
Layout.alignment: Qt.AlignHCenter
@ -315,7 +317,24 @@ PlasmaComponents.Page {
horizontalAlignment: Text.AlignRight
text: i18n("Show:")
}
ExtraControls.SpinBox {
LatteTextField{
Layout.preferredWidth: 9.5 * theme.defaultFont.pixelSize
enabled: dock.visibility.mode !== Latte.Dock.AlwaysVisible
property bool inStartup: true
Component.onCompleted: {
value = dock.visibility.timerShow
inStartup = false;
}
onValueChanged: {
if(!inStartup){
dock.visibility.timerShow = value;
}
}
}
/*ExtraControls.SpinBox {
Layout.fillWidth: false
Layout.maximumWidth: implicitWidth
enabled: dock.visibility.mode !== Latte.Dock.AlwaysVisible
@ -329,14 +348,31 @@ PlasmaComponents.Page {
}
suffix: i18n("ms.")
}
}*/
PlasmaComponents.Label {
Layout.fillWidth: false
Layout.leftMargin: units.largeSpacing
horizontalAlignment: Text.AlignRight
text: i18n("Hide:")
}
ExtraControls.SpinBox {
LatteTextField{
Layout.preferredWidth: 9.5 * theme.defaultFont.pixelSize
enabled: dock.visibility.mode !== Latte.Dock.AlwaysVisible
property bool inStartup: true
Component.onCompleted: {
value = dock.visibility.timerHide
inStartup = false;
}
onValueChanged: {
if(!inStartup){
dock.visibility.timerHide = value;
}
}
}
/*ExtraControls.SpinBox {
Layout.fillWidth: false
Layout.maximumWidth: implicitWidth
enabled: dock.visibility.mode !== Latte.Dock.AlwaysVisible
@ -350,7 +386,7 @@ PlasmaComponents.Page {
}
suffix: i18n("ms.")
}
}*/
}
}
//! END: Delay

@ -22,6 +22,7 @@ import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Window 2.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
@ -37,8 +38,8 @@ PlasmaCore.FrameSvgItem {
id: dialog
imagePath: "dialogs/background"
property int maxWidth: 33 * theme.defaultFont.pixelSize
width: content.width + units.smallSpacing * 2
property int maxWidth: 34 * theme.defaultFont.pixelSize
width: maxWidth + units.smallSpacing * 2
height: content.height + units.smallSpacing * 2
Layout.minimumWidth: width
Layout.minimumHeight: height
@ -51,6 +52,37 @@ PlasmaCore.FrameSvgItem {
source: "../fonts/tangerine.ttf"
}
PlasmaComponents.ToolButton {
id: pinButton
anchors.right: parent.right
anchors.top: parent.top
Layout.fillWidth: false
Layout.fillHeight: false
Layout.preferredWidth: width
Layout.preferredHeight: height
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
iconSource: "window-pin"
checkable: true
width: Math.round(units.gridUnit * 1.25)
height: width
property bool inStartup: true
onClicked: {
plasmoid.configuration.configurationSticker = checked
dockConfig.setSticker(checked)
}
Component.onCompleted: {
checked = plasmoid.configuration.configurationSticker
dockConfig.setSticker(plasmoid.configuration.configurationSticker)
}
}
ColumnLayout {
id: content
@ -59,8 +91,10 @@ PlasmaCore.FrameSvgItem {
Layout.preferredWidth: width
Layout.preferredHeight: height
height: header.height + tabBar.height + pagesBackground.height + actionButtons.height + spacing * 3
width: dialog.maxWidth
anchors.centerIn: parent
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
spacing: units.smallSpacing
RowLayout {
@ -98,40 +132,12 @@ PlasmaCore.FrameSvgItem {
opacity: 0.4
Layout.rightMargin: units.smallSpacing
Layout.alignment: Qt.AlignRight | Qt.AlignHCenter
Layout.alignment: Qt.AlignRight | Qt.AlignBottom
horizontalAlignment: Text.AlignRight
Layout.fillWidth: true
text: i18n("ver:") + "@VERSION@"
}
PlasmaComponents.ToolButton {
id: pinButton
Layout.fillWidth: false
Layout.fillHeight: false
Layout.preferredWidth: width
Layout.preferredHeight: height
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
iconSource: "window-pin"
checkable: true
width: Math.round(units.gridUnit * 1.25)
height: width
property bool inStartup: true
onClicked: {
plasmoid.configuration.configurationSticker = checked
dockConfig.setSticker(checked)
}
Component.onCompleted: {
checked = plasmoid.configuration.configurationSticker
dockConfig.setSticker(plasmoid.configuration.configurationSticker)
}
}
}
PlasmaComponents.TabBar {
@ -158,10 +164,12 @@ PlasmaCore.FrameSvgItem {
id: pagesBackground
Layout.fillWidth: true
Layout.fillHeight: false
Layout.minimumWidth: maxWidth
Layout.minimumWidth: maxWidth - 2*units.smallSpacing
Layout.minimumHeight: height
Layout.maximumHeight: height
width: maxWidth + units.smallSpacing * 4
height: behaviorPage.Layout.maximumHeight + units.smallSpacing * 2
width: maxWidth - units.smallSpacing
height: behaviorPage.Layout.maximumHeight + units.smallSpacing * 4
property color bC: theme.backgroundColor
property color transparentBack: Qt.rgba(bC.r, bC.g, bC.b, 0.7)
@ -203,7 +211,7 @@ PlasmaCore.FrameSvgItem {
id: actionButtons
Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
spacing: units.largeSpacing
property int docksCount: dock.docksCount

@ -0,0 +1,98 @@
/*
* Copyright 2016 Smith AR <audoban@openmailbox.org>
* Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.0
import QtQuick.Layouts 1.3
import QtQuick.Controls 1.4
import org.kde.plasma.components 2.0 as PlasmaComponents
PlasmaComponents.TextField{
id: textField
validator: IntValidator {bottom: minValue; top: maxValue;}
text: value === 0 ? "" : value
font.italic: true
placeholderText: i18n("<none>")
property int step: 100
property int value: 0
property int minValue: 0
property int maxValue: 3000
function confirmValue(val){
var fixedVal = Math.min(maxValue, val);
if (fixedVal < minValue) {
return minValue;
} else {
return fixedVal;
}
}
onTextChanged: text !== "" ? value = parseInt(text) : value = 0;
Row{
// width: 4 * theme.defaultFont.pixelSize
anchors.right: parent.right
anchors.rightMargin: 2
anchors.verticalCenter: parent.verticalCenter
PlasmaComponents.Label{
color: textField.textColor
text: i18n("ms.")
font.italic: true
opacity: (value === 0) ? 0 : 0.6
}
PlasmaComponents.Label{
text: " "
font.italic: true
}
PlasmaComponents.Button{
width: 2*theme.defaultFont.pixelSize - 4
height: width
text:"-"
onClicked: value = confirmValue(value - step);
}
PlasmaComponents.Button{
width: 2*theme.defaultFont.pixelSize - 4
height: width
text:"+"
onClicked: value = confirmValue(value + step);
}
}
MouseArea{
anchors.fill: parent
acceptedButtons: Qt.MiddleButton
onWheel: {
var angle = wheel.angleDelta.y / 8
if (angle>0) {
value = confirmValue(value + step);
} else if (angle<0){
value = confirmValue(value - step);
}
}
}
}

@ -35,9 +35,10 @@ PlasmaComponents.Page {
ColumnLayout {
id: content
width: dialog.maxWidth
width: dialog.maxWidth - units.smallSpacing * 5
spacing: units.largeSpacing
anchors.centerIn: parent
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
//! BEGIN: Tasks Appearance
ColumnLayout {
@ -49,7 +50,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: showGlow
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 4
text: i18n("Show glow around windows points")
checked: plasmoid.configuration.showGlow
@ -60,7 +61,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: threeColorsWindows
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 4
text: i18n("Different color for minimized windows")
checked: plasmoid.configuration.threeColorsWindows
@ -71,7 +72,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: dotsOnActive
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 4
text: i18n("Dots on active window")
checked: plasmoid.configuration.dotsOnActive
@ -82,7 +83,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: reverseLinesPosition
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 4
text: i18n("Reverse position for lines and dots")
checked: plasmoid.configuration.reverseLinesPosition
@ -103,7 +104,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: showPreviewsChk
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 4
text: i18n("Preview windows on hovering")
checked: plasmoid.configuration.showToolTips
@ -114,7 +115,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: highlightWindowsChk
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 4
text: i18n("Highlight windows on hovering")
checked: plasmoid.configuration.highlightWindows
@ -125,7 +126,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: windowActionsChk
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 4
text: i18n("Show window actions in the context menu")
checked: plasmoid.configuration.showWindowActions
@ -136,7 +137,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: smartLaunchersChk
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 4
text: i18n("Show progress information in task buttons")
checked: plasmoid.configuration.smartLaunchersEnabled
@ -157,7 +158,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: showOnlyCurrentScreen
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 4
text: i18n("Show only tasks from the current screen")
checked: plasmoid.configuration.showOnlyCurrentScreen
@ -168,7 +169,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: showOnlyCurrentDesktop
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 4
text: i18n("Show only tasks from the current desktop")
checked: plasmoid.configuration.showOnlyCurrentDesktop
@ -179,7 +180,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: showOnlyCurrentActivity
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 4
text: i18n("Show only tasks from the current activity")
checked: plasmoid.configuration.showOnlyCurrentActivity

Loading…
Cancel
Save