reorganize settings in view settings window

pull/4/head
Michail Vourlakos
parent b8dca987f6
commit 5c8a2bb380

@ -504,13 +504,6 @@ void PrimaryConfigView::setComplexity(int complexity)
emit complexityChanged();
}
void PrimaryConfigView::addPanelSpacer()
{
if (m_latteView && m_latteView->containment()) {
m_latteView->containment()->createApplet(QStringLiteral("org.kde.latte.spacer"));
}
}
void PrimaryConfigView::hideConfigWindow()
{
if (m_shellSurface) {

@ -100,7 +100,6 @@ public:
QWindow *secondaryWindow();
public slots:
Q_INVOKABLE void addPanelSpacer();
Q_INVOKABLE void hideConfigWindow();
Q_INVOKABLE void setSticker(bool blockFocusLost);
Q_INVOKABLE void syncGeometry();

@ -176,64 +176,6 @@ FocusScope {
Keys.onPressed: {
if (event.key === Qt.Key_Escape) {
viewConfig.hideConfigWindow();
} else if (event.key === Qt.Key_Left) {
//
if (tabGroup.currentTab === behaviorPage) {
if (dialog.highLevel) {
tabGroup.currentTab = tweaksPage;
tabBar.currentTab = tweaksTabBtn;
} else if (tasksTabBtn.visible) {
tabGroup.currentTab = tasksPage;
tabBar.currentTab = tasksTabBtn;
} else {
tabGroup.currentTab = appearancePage;
tabBar.currentTab = appearanceTabBtn;
}
} else if (tabGroup.currentTab === tweaksPage) {
if (tasksTabBtn.visible) {
tabGroup.currentTab = tasksPage;
tabBar.currentTab = tasksTabBtn;
} else {
tabGroup.currentTab = appearancePage;
tabBar.currentTab = appearanceTabBtn;
}
} else if (tabGroup.currentTab === tasksPage) {
tabGroup.currentTab = appearancePage;
tabBar.currentTab = appearanceTabBtn;
} else if (tabGroup.currentTab === appearancePage) {
tabGroup.currentTab = behaviorPage;
tabBar.currentTab = behaviorTabBtn;
}
//
} else if (event.key === Qt.Key_Right) {
//
if (tabGroup.currentTab === behaviorPage) {
tabGroup.currentTab = appearancePage;
tabBar.currentTab = appearanceTabBtn;
} else if (tabGroup.currentTab === appearancePage) {
if (tasksTabBtn.visible) {
tabGroup.currentTab = tasksPage;
tabBar.currentTab = tasksTabBtn;
} else if (dialog.highLevel) {
tabGroup.currentTab = tweaksPage;
tabBar.currentTab = tweaksTabBtn;
} else {
tabGroup.currentTab = behaviorPage;
tabBar.currentTab = behaviorTabBtn;
}
} else if (tabGroup.currentTab === tasksPage) {
if (dialog.highLevel) {
tabGroup.currentTab = tweaksPage;
tabBar.currentTab = tweaksTabBtn;
} else {
tabGroup.currentTab = behaviorPage;
tabBar.currentTab = behaviorTabBtn;
}
} else if (tabGroup.currentTab === tweaksPage) {
tabGroup.currentTab = behaviorPage;
tabBar.currentTab = behaviorTabBtn;
}
//
}
}
@ -427,6 +369,12 @@ FocusScope {
text: i18n("Appearance")
tab: appearancePage
}
PlasmaComponents.TabButton {
id: effectsTabBtn
text: i18n("Effects")
tab: effectsPage
visible: dialog.highLevel
}
PlasmaComponents.TabButton {
id: tasksTabBtn
text: i18n("Tasks")
@ -434,13 +382,6 @@ FocusScope {
visible: latteView.latteTasksPresent()
}
PlasmaComponents.TabButton {
id: tweaksTabBtn
text: i18n("Tweaks")
tab: tweaksPage
visible: dialog.highLevel
}
}
Rectangle {
@ -484,12 +425,12 @@ FocusScope {
id: appearancePage
}
Pages.TasksConfig {
id: tasksPage
Pages.EffectsConfig {
id: effectsPage
}
Pages.TweaksConfig {
id: tweaksPage
Pages.TasksConfig {
id: tasksPage
}
}
}

@ -208,103 +208,104 @@ PlasmaComponents.Page {
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: units.smallSpacing
enabled: plasmoid.configuration.durationTime > 0
visible: dialog.expertLevel || plasmoid.configuration.proportionIconSize>0
PlasmaComponents.Label {
text: i18n("Zoom On Hover")
text: i18n("Screen Height Proportion")
horizontalAlignment: Text.AlignLeft
enabled: proportionSizeSlider.value !== proportionSizeSlider.from
}
LatteExtraControls.Slider {
id: proportionSizeSlider
Layout.fillWidth: true
id: zoomSlider
value: Number(1 + plasmoid.configuration.zoomLevel / 20).toFixed(2)
from: 1
to: 2
stepSize: 0.05
value: plasmoid.configuration.proportionIconSize
from: 1.0
to: 10
stepSize: 0.5
wheelEnabled: false
function updateZoomLevel() {
function updateProportionIconSize() {
if (!pressed) {
var result = Math.round((value - 1) * 20)
plasmoid.configuration.zoomLevel = result
if(value===1) {
plasmoid.configuration.proportionIconSize = -1;
} else {
plasmoid.configuration.proportionIconSize = value;
}
}
}
onPressedChanged: {
updateZoomLevel()
updateProportionIconSize();
}
Component.onCompleted: {
valueChanged.connect(updateZoomLevel)
valueChanged.connect(updateProportionIconSize)
}
Component.onDestruction: {
valueChanged.disconnect(updateZoomLevel)
valueChanged.disconnect(updateProportionIconSize)
}
}
PlasmaComponents.Label {
text: Number((zoomSlider.value * 100) - 100).toFixed(0) + "%"
text: proportionSizeSlider.value !== proportionSizeSlider.from ?
proportionSizeSlider.value.toFixed(1) + "%" : "---%"
horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4
enabled: proportionSizeSlider.value !== proportionSizeSlider.from
}
}
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: units.smallSpacing
visible: dialog.highLevel || plasmoid.configuration.proportionIconSize>0
enabled: plasmoid.configuration.durationTime > 0
PlasmaComponents.Label {
text: i18n("Screen Height Proportion")
text: i18n("Zoom On Hover")
horizontalAlignment: Text.AlignLeft
enabled: proportionSizeSlider.value !== proportionSizeSlider.from
}
LatteExtraControls.Slider {
id: proportionSizeSlider
Layout.fillWidth: true
value: plasmoid.configuration.proportionIconSize
from: 1.0
to: 10
stepSize: 0.5
id: zoomSlider
value: Number(1 + plasmoid.configuration.zoomLevel / 20).toFixed(2)
from: 1
to: 2
stepSize: 0.05
wheelEnabled: false
function updateProportionIconSize() {
function updateZoomLevel() {
if (!pressed) {
if(value===1) {
plasmoid.configuration.proportionIconSize = -1;
} else {
plasmoid.configuration.proportionIconSize = value;
}
var result = Math.round((value - 1) * 20)
plasmoid.configuration.zoomLevel = result
}
}
onPressedChanged: {
updateProportionIconSize();
updateZoomLevel()
}
Component.onCompleted: {
valueChanged.connect(updateProportionIconSize)
valueChanged.connect(updateZoomLevel)
}
Component.onDestruction: {
valueChanged.disconnect(updateProportionIconSize)
valueChanged.disconnect(updateZoomLevel)
}
}
PlasmaComponents.Label {
text: proportionSizeSlider.value !== proportionSizeSlider.from ?
proportionSizeSlider.value.toFixed(1) + "%" : "---%"
text: Number((zoomSlider.value * 100) - 100).toFixed(0) + "%"
horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4
enabled: proportionSizeSlider.value !== proportionSizeSlider.from
}
}
@ -485,7 +486,7 @@ PlasmaComponents.Page {
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 2
visible: dialog.highLevel
visible: dialog.expertLevel
PlasmaComponents.Button {
id: panelShadows
@ -516,72 +517,6 @@ PlasmaComponents.Page {
}
//! END: Background
//! BEGIN: Animations
ColumnLayout {
Layout.fillWidth: true
spacing: units.smallSpacing
enabled: Latte.WindowSystem.compositingActive
LatteExtraControls.Header {
text: i18n("Animations")
}
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 2
property int duration: plasmoid.configuration.durationTime
ExclusiveGroup {
id: animationsGroup
onCurrentChanged: {
if (current.checked)
plasmoid.configuration.durationTime = current.duration
}
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18n("None")
checked: parent.duration === duration
checkable: true
exclusiveGroup: animationsGroup
readonly property int duration: 0
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18n("x1")
checked: parent.duration === duration
checkable: true
exclusiveGroup: animationsGroup
readonly property int duration: 1
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18n("x2")
checked: parent.duration === duration
checkable: true
exclusiveGroup: animationsGroup
readonly property int duration: 2
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18n("x3")
checked: parent.duration === duration
checkable: true
exclusiveGroup: animationsGroup
readonly property int duration: 3
}
}
}
//! END: Animations
//! BEGIN: Active Indicator
ColumnLayout{
spacing: units.smallSpacing
@ -619,7 +554,7 @@ PlasmaComponents.Page {
}
PlasmaComponents.Label {
text: i18nc("active indicator style","Style")
text: i18nc("active indicator style","Style") + " "
horizontalAlignment: Text.AlignLeft
visible: dialog.highLevel
}
@ -668,7 +603,7 @@ PlasmaComponents.Page {
PlasmaComponents.Label {
text: i18n("Applets") + " "
horizontalAlignment: Text.AlignLeft
visible: dialog.highLevel
visible: dialog.expertLevel
}
PlasmaComponents.Button {
@ -678,7 +613,7 @@ PlasmaComponents.Page {
checked: parent.activeIndicator === activeIndicator
checkable: true
exclusiveGroup: activeIndicatorGroup
visible: dialog.highLevel
visible: dialog.expertLevel
tooltip: i18n("Latte will not show any active applet indicator on its own\n except those the plasma theme provides")
readonly property int activeIndicator: Latte.Types.NoneIndicator
@ -690,7 +625,7 @@ PlasmaComponents.Page {
checked: parent.activeIndicator === activeIndicator
checkable: true
exclusiveGroup: activeIndicatorGroup
visible: dialog.highLevel
visible: dialog.expertLevel
tooltip: i18n("Latte will show active applet indicators only for applets that have been adjusted\n by it for hovering capabilities e.g. folderview")
readonly property int activeIndicator: Latte.Types.InternalsIndicator
@ -704,7 +639,7 @@ PlasmaComponents.Page {
checked: parent.activeIndicator === activeIndicator
checkable: true
exclusiveGroup: activeIndicatorGroup
visible: dialog.highLevel
visible: dialog.expertLevel
tooltip: i18n("Latte will show active applet indicators for all applets")
readonly property int activeIndicator: Latte.Types.AllIndicator
@ -713,413 +648,11 @@ PlasmaComponents.Page {
}
//! END: Active Indicator
//! BEGIN: Glow
ColumnLayout {
Layout.fillWidth: true
spacing: units.smallSpacing
visible: dialog.highLevel
LatteExtraControls.Header {
text: i18n("Glow")
}
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 2
ColumnLayout{
RowLayout {
Layout.fillWidth: true
spacing: 2
PlasmaComponents.CheckBox {
id: showGlowChk
text: i18nc("show glow","Show")
checked: plasmoid.configuration.showGlow
onClicked: {
plasmoid.configuration.showGlow = checked
}
}
PlasmaComponents.Label {
text: " | "
horizontalAlignment: Text.AlignLeft
opacity: 0.35
enabled: showGlowChk.checked
}
property int option: plasmoid.configuration.glowOption
ExclusiveGroup {
id: glowGroup
onCurrentChanged: {
if (current.checked)
plasmoid.configuration.glowOption = current.option
}
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("add glow only to active task/applet indicators","Only On Active")
checked: parent.option === option
checkable: true
enabled: showGlowChk.checked
exclusiveGroup: glowGroup
tooltip: i18n("Add glow only to active task/applet indicator")
readonly property int option: Latte.Types.GlowOnlyOnActive
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("Add glow to all task/applet indicators","All")
checked: parent.option === option
checkable: true
enabled: showGlowChk.checked
exclusiveGroup: glowGroup
tooltip: i18n("Add glow to all task/applet indicators")
readonly property int option: Latte.Types.GlowAll
}
}
RowLayout{
PlasmaComponents.Label {
enabled: showGlowChk.checked
text: i18n("Opacity")
horizontalAlignment: Text.AlignLeft
}
LatteExtraControls.Slider {
id: glowOpacitySlider
Layout.fillWidth: true
enabled: showGlowChk.checked
value: plasmoid.configuration.glowOpacity
from: 0
to: 100
stepSize: 5
wheelEnabled: false
function updateGlowOpacity() {
if (!pressed)
plasmoid.configuration.glowOpacity = value;
}
onPressedChanged: {
updateGlowOpacity();
}
Component.onCompleted: {
valueChanged.connect(updateGlowOpacity);
}
Component.onDestruction: {
valueChanged.disconnect(updateGlowOpacity);
}
}
PlasmaComponents.Label {
enabled: showGlowChk.checked
text: glowOpacitySlider.value + " %"
horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4
}
PlasmaComponents.Label {
text: " | "
horizontalAlignment: Text.AlignLeft
enabled: showGlowChk.checked
opacity: 0.35
}
PlasmaComponents.CheckBox {
id: showGlow3D
Layout.leftMargin: units.smallSpacing * 2
text: " " + i18n("3D")
checked: plasmoid.configuration.glow3D
enabled: showGlowChk.checked
tooltip: i18n("Use a 3D style glow")
onClicked: {
plasmoid.configuration.glow3D = checked;
}
}
}
}
}
}
//! END: Glow
//! BEGIN: Shadows
ColumnLayout {
Layout.fillWidth: true
spacing: units.smallSpacing
visible: dialog.highLevel
LatteExtraControls.Header {
text: i18n("Applet shadows")
}
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 2
ColumnLayout{
PlasmaComponents.CheckBox {
id: showAppletShadow
text: i18nc("show applet shadow","Show")
checked: plasmoid.configuration.shadows>0
onClicked: {
if (checked)
plasmoid.configuration.shadows = 2;
else
plasmoid.configuration.shadows = 0;
}
}
PlasmaComponents.Button{
id: backColorBtn
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
Layout.maximumWidth: showAppletShadow.width
text:" "
enabled: showAppletShadow.checked
PlasmaComponents3.ComboBox {
id: restoreCmb
anchors.fill: parent
enabled: backColorBtn.enabled
function addModel() {
var actions = [];
actions.push(i18nc("Use theme shadow","Theme"));
actions.push(i18nc("Clear applet shadow settings","Clear"));
restoreCmb.model = actions;
restoreCmb.currentIndex = -1;
}
function emptyModel() {
var actions = []
actions.push(" ");
restoreCmb.model = actions;
restoreCmb.currentIndex = -1;
}
Component.onCompleted:{
addModel();
}
onActivated: {
if (index===0) {
var strC = String(theme.textColor);
if (strC.indexOf("#") === 0)
plasmoid.configuration.shadowColor = strC.substr(1);
}else if (index===1){
plasmoid.configuration.shadowColor = "080808";
}
if (index===0 || index===1) {
plasmoid.configuration.shadowSize = 20;
plasmoid.configuration.shadowOpacity = 100;
}
restoreCmb.currentIndex = -1;
}
onCurrentIndexChanged: {
if (currentIndex === 0)
currentIndex = -1;
}
onEnabledChanged: {
if (enabled)
addModel();
else
emptyModel();
}
}
//overlayed button
PlasmaComponents.Button {
id: colorBtn
width: parent.width - units.iconSizes.medium + 2*units.smallSpacing
height: parent.height
text: " "
enabled: showAppletShadow.checked
onClicked: {
viewConfig.setSticker(true);
colorDialogLoader.showDialog = true;
}
Rectangle{
anchors.fill: parent
anchors.margins: 1.5*units.smallSpacing
color: "#" + plasmoid.configuration.shadowColor;
opacity: colorBtn.enabled ? 1 : 0.4
Rectangle{
anchors.fill: parent
color: "transparent"
border.width: 1
border.color: theme.textColor
opacity: 0.7
}
}
Loader{
id:colorDialogLoader
property bool showDialog: false
active: showDialog
sourceComponent: ColorDialog {
title: i18n("Please choose shadow color")
showAlphaChannel: false
onAccepted: {
//console.log("You chose: " + String(color));
var strC = String(color);
if (strC.indexOf("#") === 0)
plasmoid.configuration.shadowColor = strC.substr(1);
colorDialogLoader.showDialog = false;
viewConfig.setSticker(false);
}
onRejected: {
colorDialogLoader.showDialog = false;
viewConfig.setSticker(false);
}
Component.onCompleted: {
color = String("#" + plasmoid.configuration.shadowColor);
visible = true;
}
}
}
}
}
}
ColumnLayout {
RowLayout{
PlasmaComponents.Label {
text: " | "
horizontalAlignment: Text.AlignLeft
opacity: 0.35
}
PlasmaComponents.Label {
enabled: showAppletShadow.checked
text: i18n("Opacity")
horizontalAlignment: Text.AlignLeft
}
LatteExtraControls.Slider {
id: shadowOpacitySlider
Layout.fillWidth: true
enabled: showAppletShadow.checked
value: plasmoid.configuration.shadowOpacity
from: 0
to: 100
stepSize: 5
wheelEnabled: false
function updateShadowOpacity() {
if (!pressed)
plasmoid.configuration.shadowOpacity = value;
}
onPressedChanged: {
updateShadowOpacity();
}
Component.onCompleted: {
valueChanged.connect(updateShadowOpacity);
}
Component.onDestruction: {
valueChanged.disconnect(updateShadowOpacity);
}
}
PlasmaComponents.Label {
enabled: showAppletShadow.checked
text: shadowOpacitySlider.value + " %"
horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4
}
}
RowLayout{
PlasmaComponents.Label {
text: " | "
horizontalAlignment: Text.AlignLeft
opacity: 0.35
}
PlasmaComponents.Label {
enabled: showAppletShadow.checked
text: i18n("Size")
horizontalAlignment: Text.AlignLeft
}
LatteExtraControls.Slider {
id: shadowSizeSlider
Layout.fillWidth: true
enabled: showAppletShadow.checked
value: plasmoid.configuration.shadowSize
from: 0
to: 100
stepSize: 5
wheelEnabled: false
function updateShadowSize() {
if (!pressed)
plasmoid.configuration.shadowSize = value;
}
onPressedChanged: {
updateShadowSize();
}
Component.onCompleted: {
valueChanged.connect(updateShadowSize);
}
Component.onDestruction: {
valueChanged.disconnect(updateShadowSize);
}
}
PlasmaComponents.Label {
enabled: showAppletShadow.checked
text: shadowSizeSlider.value + " %"
horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4
}
}
}
}
}
//! END: Shadows
//! BEGIN: Length
ColumnLayout {
Layout.fillWidth: true
spacing: units.smallSpacing
visible: dialog.highLevel
visible: dialog.expertLevel
LatteExtraControls.Header {
text: i18n("Length")
@ -1262,6 +795,134 @@ PlasmaComponents.Page {
}
//! END: Length
//! BEGIN: Appearance
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
Layout.topMargin: units.smallSpacing
visible: dialog.expertLevel
LatteExtraControls.Header {
text: i18n("Appearance")
}
PlasmaComponents.CheckBox {
id: blurPanel
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Blur for panel background")
checked: plasmoid.configuration.blurEnabled
onClicked: {
plasmoid.configuration.blurEnabled = checked
}
}
PlasmaComponents.CheckBox {
id: titleTooltipsChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show applets/task title tooltips on hovering")
checked: plasmoid.configuration.titleTooltips
onClicked: {
plasmoid.configuration.titleTooltips = checked;
}
}
PlasmaComponents.CheckBox {
id: shrinkThickness
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Shrink thickness margins to minimum")
checked: plasmoid.configuration.shrinkThickMargins
onClicked: {
plasmoid.configuration.shrinkThickMargins = checked
}
}
}
//! END: Appearance
//! BEGIN: Dynamic Background
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
enabled: Latte.WindowSystem.compositingActive
visible: dialog.expertLevel
LatteExtraControls.Header {
text: i18n("Dynamic Background")
}
PlasmaComponents.CheckBox {
id: solidForMaximizedChk
Layout.leftMargin: units.smallSpacing * 2
Layout.maximumWidth: (dialog.appliedWidth - units.smallSpacing * 2) - 3*units.smallSpacing
text: i18n("Force solid background for maximized or snapped windows")
checked: plasmoid.configuration.solidBackgroundForMaximized
tooltip: i18n("The panel background removes its transparency setting \n when there is a maximized or snapped window")
style: LatteExtraControls.LatteCheckBoxStyle{}
onClicked: {
plasmoid.configuration.solidBackgroundForMaximized = checked;
}
}
PlasmaComponents.CheckBox {
id: onlyOnMaximizedChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Hide background for not maximized windows")
checked: plasmoid.configuration.backgroundOnlyOnMaximized
tooltip: i18n("The panel background becomes transparent except if \nthere is a maximized or snapped window")
onClicked: {
plasmoid.configuration.backgroundOnlyOnMaximized = checked;
}
}
PlasmaComponents.CheckBox {
id: colorizeTransparentPanelsChk
Layout.leftMargin: units.smallSpacing * 2
Layout.maximumWidth: (dialog.appliedWidth - units.smallSpacing * 2) - units.smallSpacing * 3
text: i18n("Monochrome contents when panel is transparent")
checked: plasmoid.configuration.colorizeTransparentPanels
tooltip: i18n("The panel contents are colorized in order to improve contrast \nwith the underlying desktop background when the panel is transparent")
style: LatteExtraControls.LatteCheckBoxStyle{}
enabled: solidForMaximizedChk.checked || onlyOnMaximizedChk.checked
onClicked: {
plasmoid.configuration.colorizeTransparentPanels = checked;
}
}
PlasmaComponents.CheckBox {
id: colorizeFromActiveWindowSchemeChk
Layout.leftMargin: units.smallSpacing * 2
Layout.maximumWidth: (dialog.appliedWidth - units.smallSpacing * 2) - units.smallSpacing * 3
text: i18n("Paint contents based on active window scheme")
checked: plasmoid.configuration.colorizeFromActiveWindowScheme
tooltip: i18n("The panel contents are colorized from active window scheme \nwhen that window is maximized or is touching the panel.")
style: LatteExtraControls.LatteCheckBoxStyle{}
enabled: solidForMaximizedChk.checked || onlyOnMaximizedChk.checked
onClicked: {
plasmoid.configuration.colorizeFromActiveWindowScheme = checked;
}
}
PlasmaComponents.CheckBox {
id: hideShadowsOnMaximizedChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Hide panel shadow for maximized windows")
checked: plasmoid.configuration.disablePanelShadowForMaximized
onClicked: {
plasmoid.configuration.disablePanelShadowForMaximized = checked;
}
}
}
//! END: Dynamic Background
//! Bottom spacer
PlasmaComponents.Label{
id: bottomMarginSpacer

@ -507,6 +507,99 @@ PlasmaComponents.Page {
}
//! END: Delay
//! BEGIN: Behavior
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
visible: dialog.expertLevel
LatteExtraControls.Header {
text: i18n("Behavior")
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Activate KWin edge after hiding")
checked: latteView.visibility.enableKWinEdges
onClicked: {
latteView.visibility.enableKWinEdges = checked;
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Decrease applets size when it is needed")
checked: plasmoid.configuration.autoDecreaseIconSize
tooltip: i18n("Applets size is decreased automatically when the contents \nexceed the maximum length \n\nHint: this option is disabled when only plasma taskmanagers are present")
enabled: !(latteView.tasksPresent() && !latteView.latteTasksPresent());
onClicked: {
plasmoid.configuration.autoDecreaseIconSize = checked
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Add launchers only in the corresponding area")
checked: plasmoid.configuration.addLaunchersInTaskManager
tooltip: i18n("Launchers are added only in the taskmanager and not as plasma applets")
onClicked: {
plasmoid.configuration.addLaunchersInTaskManager = checked;
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Prefer for global shortcuts activation")
checked: latteView.isPreferredForShortcuts
tooltip: i18n("Enable highest priority for global shortcuts activation")
onClicked: {
latteView.isPreferredForShortcuts = checked
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Above fullscreen windows")
checked: latteView.byPassWM
enabled: !(latteView.visibility.mode === Latte.Types.AlwaysVisible
|| latteView.visibility.mode === Latte.Types.WindowsGoBelow)
tooltip: i18n("BypassWindowManagerHint flag for the window.\nThe view will be above all windows even those set as 'Always On Top'")
onCheckedChanged: {
latteView.byPassWM = checked;
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Raise on desktop change")
checked: latteView.visibility.raiseOnDesktop
enabled: latteView.visibility.mode !== Latte.Types.AlwaysVisible
onClicked: {
latteView.visibility.raiseOnDesktop = checked
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Raise on activity change")
checked: latteView.visibility.raiseOnActivity
enabled: latteView.visibility.mode !== Latte.Types.AlwaysVisible
onClicked: {
latteView.visibility.raiseOnActivity = checked
}
}
}
//! END: Behavior
//! Bottom spacer
PlasmaComponents.Label{
id: bottomMarginSpacer

@ -0,0 +1,518 @@
/*
* Copyright 2018 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.7
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Dialogs 1.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
import "../../controls" as LatteExtraControls
PlasmaComponents.Page {
Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
Layout.maximumHeight: content.height + units.smallSpacing * 2
ColumnLayout {
id: content
width: (dialog.appliedWidth - units.smallSpacing * 2) - Layout.leftMargin * 2
spacing: dialog.subGroupSpacing
anchors.horizontalCenter: parent.horizontalCenter
Layout.leftMargin: units.smallSpacing * 2
//! BEGIN: Animations
ColumnLayout {
Layout.fillWidth: true
Layout.topMargin: units.smallSpacing
spacing: units.smallSpacing
LatteExtraControls.Header {
text: i18n("Animations")
}
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 2
property int duration: plasmoid.configuration.durationTime
ExclusiveGroup {
id: animationsGroup
onCurrentChanged: {
if (current.checked)
plasmoid.configuration.durationTime = current.duration
}
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18n("None")
checked: parent.duration === duration
checkable: true
exclusiveGroup: animationsGroup
readonly property int duration: 0
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18n("x1")
checked: parent.duration === duration
checkable: true
exclusiveGroup: animationsGroup
readonly property int duration: 1
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18n("x2")
checked: parent.duration === duration
checkable: true
exclusiveGroup: animationsGroup
readonly property int duration: 2
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18n("x3")
checked: parent.duration === duration
checkable: true
exclusiveGroup: animationsGroup
readonly property int duration: 3
}
}
}
//! END: Animations
//! BEGIN: Shadows
ColumnLayout {
Layout.fillWidth: true
spacing: units.smallSpacing
LatteExtraControls.Header {
text: i18n("Applet shadows")
}
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 2
ColumnLayout{
PlasmaComponents.CheckBox {
id: showAppletShadow
text: i18nc("show applet shadow","Show")
checked: plasmoid.configuration.shadows>0
onClicked: {
if (checked)
plasmoid.configuration.shadows = 2;
else
plasmoid.configuration.shadows = 0;
}
}
PlasmaComponents.Button{
id: backColorBtn
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
Layout.maximumWidth: showAppletShadow.width
text:" "
enabled: showAppletShadow.checked
visible: dialog.advancedLevel
PlasmaComponents3.ComboBox {
id: restoreCmb
anchors.fill: parent
enabled: backColorBtn.enabled
function addModel() {
var actions = [];
actions.push(i18nc("Use theme shadow","Theme"));
actions.push(i18nc("Clear applet shadow settings","Clear"));
restoreCmb.model = actions;
restoreCmb.currentIndex = -1;
}
function emptyModel() {
var actions = []
actions.push(" ");
restoreCmb.model = actions;
restoreCmb.currentIndex = -1;
}
Component.onCompleted:{
addModel();
}
onActivated: {
if (index===0) {
var strC = String(theme.textColor);
if (strC.indexOf("#") === 0)
plasmoid.configuration.shadowColor = strC.substr(1);
}else if (index===1){
plasmoid.configuration.shadowColor = "080808";
}
if (index===0 || index===1) {
plasmoid.configuration.shadowSize = 20;
plasmoid.configuration.shadowOpacity = 100;
}
restoreCmb.currentIndex = -1;
}
onCurrentIndexChanged: {
if (currentIndex === 0)
currentIndex = -1;
}
onEnabledChanged: {
if (enabled)
addModel();
else
emptyModel();
}
}
//overlayed button
PlasmaComponents.Button {
id: colorBtn
width: parent.width - units.iconSizes.medium + 2*units.smallSpacing
height: parent.height
text: " "
enabled: showAppletShadow.checked
visible: dialog.advancedLevel
onClicked: {
viewConfig.setSticker(true);
colorDialogLoader.showDialog = true;
}
Rectangle{
anchors.fill: parent
anchors.margins: 1.5*units.smallSpacing
color: "#" + plasmoid.configuration.shadowColor;
opacity: colorBtn.enabled ? 1 : 0.4
Rectangle{
anchors.fill: parent
color: "transparent"
border.width: 1
border.color: theme.textColor
opacity: 0.7
}
}
Loader{
id:colorDialogLoader
property bool showDialog: false
active: showDialog
sourceComponent: ColorDialog {
title: i18n("Please choose shadow color")
showAlphaChannel: false
onAccepted: {
//console.log("You chose: " + String(color));
var strC = String(color);
if (strC.indexOf("#") === 0)
plasmoid.configuration.shadowColor = strC.substr(1);
colorDialogLoader.showDialog = false;
viewConfig.setSticker(false);
}
onRejected: {
colorDialogLoader.showDialog = false;
viewConfig.setSticker(false);
}
Component.onCompleted: {
color = String("#" + plasmoid.configuration.shadowColor);
visible = true;
}
}
}
}
}
}
ColumnLayout {
RowLayout{
PlasmaComponents.Label {
text: " | "
horizontalAlignment: Text.AlignLeft
opacity: 0.35
}
PlasmaComponents.Label {
enabled: showAppletShadow.checked
text: i18n("Opacity")
horizontalAlignment: Text.AlignLeft
}
LatteExtraControls.Slider {
id: shadowOpacitySlider
Layout.fillWidth: true
enabled: showAppletShadow.checked
value: plasmoid.configuration.shadowOpacity
from: 0
to: 100
stepSize: 5
wheelEnabled: false
function updateShadowOpacity() {
if (!pressed)
plasmoid.configuration.shadowOpacity = value;
}
onPressedChanged: {
updateShadowOpacity();
}
Component.onCompleted: {
valueChanged.connect(updateShadowOpacity);
}
Component.onDestruction: {
valueChanged.disconnect(updateShadowOpacity);
}
}
PlasmaComponents.Label {
enabled: showAppletShadow.checked
text: shadowOpacitySlider.value + " %"
horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4
}
}
RowLayout{
visible: dialog.advancedLevel
PlasmaComponents.Label {
text: " | "
horizontalAlignment: Text.AlignLeft
opacity: 0.35
}
PlasmaComponents.Label {
enabled: showAppletShadow.checked
text: i18n("Size")
horizontalAlignment: Text.AlignLeft
}
LatteExtraControls.Slider {
id: shadowSizeSlider
Layout.fillWidth: true
enabled: showAppletShadow.checked
value: plasmoid.configuration.shadowSize
from: 0
to: 100
stepSize: 5
wheelEnabled: false
function updateShadowSize() {
if (!pressed)
plasmoid.configuration.shadowSize = value;
}
onPressedChanged: {
updateShadowSize();
}
Component.onCompleted: {
valueChanged.connect(updateShadowSize);
}
Component.onDestruction: {
valueChanged.disconnect(updateShadowSize);
}
}
PlasmaComponents.Label {
enabled: showAppletShadow.checked
text: shadowSizeSlider.value + " %"
horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4
}
}
}
}
}
//! END: Shadows
//! BEGIN: Glow
ColumnLayout {
Layout.fillWidth: true
spacing: units.smallSpacing
LatteExtraControls.Header {
text: i18n("Indicators Glow")
}
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 2
ColumnLayout{
RowLayout {
Layout.fillWidth: true
spacing: 2
PlasmaComponents.CheckBox {
id: showGlowChk
text: i18nc("show glow","Show")
checked: plasmoid.configuration.showGlow
onClicked: {
plasmoid.configuration.showGlow = checked
}
}
PlasmaComponents.Label {
text: " | "
horizontalAlignment: Text.AlignLeft
opacity: 0.35
enabled: showGlowChk.checked
}
property int option: plasmoid.configuration.glowOption
ExclusiveGroup {
id: glowGroup
onCurrentChanged: {
if (current.checked)
plasmoid.configuration.glowOption = current.option
}
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("add glow only to active task/applet indicators","Only On Active")
checked: parent.option === option
checkable: true
enabled: showGlowChk.checked
exclusiveGroup: glowGroup
tooltip: i18n("Add glow only to active task/applet indicator")
readonly property int option: Latte.Types.GlowOnlyOnActive
}
PlasmaComponents.Button {
Layout.fillWidth: true
text: i18nc("Add glow to all task/applet indicators","All")
checked: parent.option === option
checkable: true
enabled: showGlowChk.checked
exclusiveGroup: glowGroup
tooltip: i18n("Add glow to all task/applet indicators")
readonly property int option: Latte.Types.GlowAll
}
}
RowLayout{
visible: dialog.advancedLevel
PlasmaComponents.Label {
enabled: showGlowChk.checked
text: i18n("Opacity")
horizontalAlignment: Text.AlignLeft
}
LatteExtraControls.Slider {
id: glowOpacitySlider
Layout.fillWidth: true
enabled: showGlowChk.checked
value: plasmoid.configuration.glowOpacity
from: 0
to: 100
stepSize: 5
wheelEnabled: false
function updateGlowOpacity() {
if (!pressed)
plasmoid.configuration.glowOpacity = value;
}
onPressedChanged: {
updateGlowOpacity();
}
Component.onCompleted: {
valueChanged.connect(updateGlowOpacity);
}
Component.onDestruction: {
valueChanged.disconnect(updateGlowOpacity);
}
}
PlasmaComponents.Label {
enabled: showGlowChk.checked
text: glowOpacitySlider.value + " %"
horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4
}
PlasmaComponents.Label {
text: " | "
horizontalAlignment: Text.AlignLeft
enabled: showGlowChk.checked
opacity: 0.35
}
PlasmaComponents.CheckBox {
id: showGlow3D
Layout.leftMargin: units.smallSpacing * 2
text: " " + i18n("3D")
checked: plasmoid.configuration.glow3D
enabled: showGlowChk.checked
tooltip: i18n("Use a 3D style glow")
onClicked: {
plasmoid.configuration.glow3D = checked;
}
}
}
}
}
}
//! END: Glow
}
}

@ -195,74 +195,64 @@ PlasmaComponents.Page {
plasmoid.configuration.mouseWheelActions = checked
}
}
}
//! END: Tasks Interaction
RowLayout {
Layout.leftMargin: units.smallSpacing * 2
Layout.topMargin: units.smallSpacing * 3
visible: dialog.highLevel
enabled: !disableAllWindowsFunctionality
//! BEGIN: Tasks Filters
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
PlasmaComponents.Label {
text: i18n("On middle-click")
Layout.alignment: Qt.AlignRight
}
LatteExtraControls.Header {
text: i18n("Filters")
}
PlasmaComponents3.ComboBox {
id: middleClickAction
Layout.fillWidth: true
model: [i18nc("The click action", "None"), i18n("Close Window or Group"),
i18n("New Instance"), i18n("Minimize/Restore Window or Group"), i18n("Cycle Through Tasks"), i18n("Toggle Task Grouping")]
PlasmaComponents.CheckBox {
id: showOnlyCurrentScreen
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current screen")
checked: plasmoid.configuration.showOnlyCurrentScreen
currentIndex: plasmoid.configuration.middleClickAction
onCurrentIndexChanged: plasmoid.configuration.middleClickAction = currentIndex
onClicked: {
plasmoid.configuration.showOnlyCurrentScreen = checked
}
}
RowLayout {
PlasmaComponents.CheckBox {
id: showOnlyCurrentDesktop
Layout.leftMargin: units.smallSpacing * 2
Layout.topMargin: units.smallSpacing
spacing: units.smallSpacing
visible: dialog.highLevel
enabled: !disableAllWindowsFunctionality
PlasmaComponents3.ComboBox {
id: modifier
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 5
model: ["Shift", "Ctrl", "Alt", "Meta"]
currentIndex: plasmoid.configuration.modifier
onCurrentIndexChanged: plasmoid.configuration.modifier = currentIndex
}
text: i18n("Show only tasks from the current desktop")
checked: plasmoid.configuration.showOnlyCurrentDesktop
PlasmaComponents.Label {
text: "+"
onClicked: {
plasmoid.configuration.showOnlyCurrentDesktop = checked
}
}
PlasmaComponents3.ComboBox {
id: modifierClick
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 10
model: [i18n("Left Click"), i18n("Middle Click"), i18n("Right Click")]
currentIndex: plasmoid.configuration.modifierClick
onCurrentIndexChanged: plasmoid.configuration.modifierClick = currentIndex
}
PlasmaComponents.CheckBox {
id: showOnlyCurrentActivity
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current activity")
checked: plasmoid.configuration.showOnlyCurrentActivity
PlasmaComponents.Label {
text: "="
onClicked: {
plasmoid.configuration.showOnlyCurrentActivity = checked
}
}
PlasmaComponents3.ComboBox {
id: modifierClickAction
Layout.fillWidth: true
model: [i18nc("The click action", "None"), i18n("Close Window or Group"),
i18n("New Instance"), i18n("Minimize/Restore Window or Group"), i18n("Cycle Through Tasks"), i18n("Toggle Task Grouping")]
PlasmaComponents.CheckBox {
id: showWindowsOnlyFromLaunchersChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from launchers")
checked: plasmoid.configuration.showWindowsOnlyFromLaunchers
visible: dialog.highLevel
currentIndex: plasmoid.configuration.modifierClickAction
onCurrentIndexChanged: plasmoid.configuration.modifierClickAction = currentIndex
onClicked: {
plasmoid.configuration.showWindowsOnlyFromLaunchers = checked
}
}
}
//! END: Tasks Interaction
//! END: Tasks Filters
//! BEGIN: Launchers Group
ColumnLayout {
@ -308,7 +298,7 @@ PlasmaComponents.Page {
checkable: true
exclusiveGroup: launchersGroup
tooltip: i18n("Use the current layout set of launchers for this latteView. This group provides launchers <b>synchronization</b> between different views in the <b>same layout</b>")
visible: dialog.highLevel || plasmoid.configuration.launchersGroup === group;
visible: dialog.expertLevel || plasmoid.configuration.launchersGroup === group;
readonly property int group: Latte.Types.LayoutLaunchers
}
@ -327,61 +317,95 @@ PlasmaComponents.Page {
}
//! END: Launchers Group
//! BEGIN: Tasks Filters
//! BEGIN: Actions
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
visible: dialog.expertLevel
LatteExtraControls.Header {
text: i18n("Filters")
text: i18n("Actions")
}
PlasmaComponents.CheckBox {
id: showOnlyCurrentScreen
RowLayout {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current screen")
checked: plasmoid.configuration.showOnlyCurrentScreen
Layout.topMargin: units.smallSpacing
enabled: !disableAllWindowsFunctionality
onClicked: {
plasmoid.configuration.showOnlyCurrentScreen = checked
PlasmaComponents.Label {
text: i18n("On middle-click")
Layout.alignment: Qt.AlignRight
}
}
PlasmaComponents.CheckBox {
id: showOnlyCurrentDesktop
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current desktop")
checked: plasmoid.configuration.showOnlyCurrentDesktop
PlasmaComponents3.ComboBox {
id: middleClickAction
Layout.fillWidth: true
model: [i18nc("The click action", "None"), i18n("Close Window or Group"),
i18n("New Instance"), i18n("Minimize/Restore Window or Group"), i18n("Cycle Through Tasks"), i18n("Toggle Task Grouping")]
onClicked: {
plasmoid.configuration.showOnlyCurrentDesktop = checked
currentIndex: plasmoid.configuration.middleClickAction
onCurrentIndexChanged: plasmoid.configuration.middleClickAction = currentIndex
}
}
PlasmaComponents.CheckBox {
id: showOnlyCurrentActivity
RowLayout {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current activity")
checked: plasmoid.configuration.showOnlyCurrentActivity
Layout.topMargin: units.smallSpacing
spacing: units.smallSpacing
enabled: !disableAllWindowsFunctionality
onClicked: {
plasmoid.configuration.showOnlyCurrentActivity = checked
PlasmaComponents3.ComboBox {
id: modifier
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 5
model: ["Shift", "Ctrl", "Alt", "Meta"]
currentIndex: plasmoid.configuration.modifier
onCurrentIndexChanged: plasmoid.configuration.modifier = currentIndex
}
PlasmaComponents.Label {
text: "+"
}
PlasmaComponents3.ComboBox {
id: modifierClick
Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 10
model: [i18n("Left Click"), i18n("Middle Click"), i18n("Right Click")]
currentIndex: plasmoid.configuration.modifierClick
onCurrentIndexChanged: plasmoid.configuration.modifierClick = currentIndex
}
PlasmaComponents.Label {
text: "="
}
PlasmaComponents3.ComboBox {
id: modifierClickAction
Layout.fillWidth: true
model: [i18nc("The click action", "None"), i18n("Close Window or Group"),
i18n("New Instance"), i18n("Minimize/Restore Window or Group"), i18n("Cycle Through Tasks"), i18n("Toggle Task Grouping")]
currentIndex: plasmoid.configuration.modifierClickAction
onCurrentIndexChanged: plasmoid.configuration.modifierClickAction = currentIndex
}
}
PlasmaComponents.CheckBox {
id: showWindowsOnlyFromLaunchersChk
PlasmaComponents.Button {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from launchers")
checked: plasmoid.configuration.showWindowsOnlyFromLaunchers
visible: dialog.highLevel
Layout.topMargin: units.smallSpacing
Layout.fillWidth: true
text: i18n("Remove Latte Tasks Applet")
enabled: latteView.latteTasksPresent()
tooltip: i18n("Remove Latte Tasks plasmoid")
onClicked: {
plasmoid.configuration.showWindowsOnlyFromLaunchers = checked
latteView.removeTasksPlasmoid();
}
}
}
//! END: Tasks Filters
//! END: Actions
//! Bottom spacer
PlasmaComponents.Label{

@ -1,313 +0,0 @@
/*
* 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.Controls 1.4
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
import "../../controls" as LatteExtraControls
PlasmaComponents.Page {
Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
Layout.maximumHeight: content.height + units.smallSpacing * 2
ColumnLayout {
id: content
width: (dialog.appliedWidth - units.smallSpacing * 2) - Layout.leftMargin * 2
spacing: dialog.subGroupSpacing
anchors.horizontalCenter: parent.horizontalCenter
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
//! BEGIN: Appearance
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
Layout.topMargin: units.smallSpacing
LatteExtraControls.Header {
text: i18n("Appearance")
}
PlasmaComponents.CheckBox {
id: blurPanel
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Blur for panel background")
checked: plasmoid.configuration.blurEnabled
onClicked: {
plasmoid.configuration.blurEnabled = checked
}
}
PlasmaComponents.CheckBox {
id: titleTooltipsChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show applets/task title tooltips on hovering")
checked: plasmoid.configuration.titleTooltips
onClicked: {
plasmoid.configuration.titleTooltips = checked;
}
}
PlasmaComponents.CheckBox {
id: shrinkThickness
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Shrink thickness margins to minimum")
checked: plasmoid.configuration.shrinkThickMargins
onClicked: {
plasmoid.configuration.shrinkThickMargins = checked
}
}
}
//! END: Appearance
//! BEGIN: Dynamic Background
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
enabled: Latte.WindowSystem.compositingActive
LatteExtraControls.Header {
text: i18n("Dynamic Background")
}
PlasmaComponents.CheckBox {
id: solidForMaximizedChk
Layout.leftMargin: units.smallSpacing * 2
Layout.maximumWidth: (dialog.appliedWidth - units.smallSpacing * 2) - 3*units.smallSpacing
text: i18n("Force solid background for maximized or snapped windows")
checked: plasmoid.configuration.solidBackgroundForMaximized
tooltip: i18n("The panel background removes its transparency setting \n when there is a maximized or snapped window")
style: LatteExtraControls.LatteCheckBoxStyle{}
onClicked: {
plasmoid.configuration.solidBackgroundForMaximized = checked;
}
}
PlasmaComponents.CheckBox {
id: onlyOnMaximizedChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Hide background for not maximized windows")
checked: plasmoid.configuration.backgroundOnlyOnMaximized
tooltip: i18n("The panel background becomes transparent except if \nthere is a maximized or snapped window")
onClicked: {
plasmoid.configuration.backgroundOnlyOnMaximized = checked;
}
}
PlasmaComponents.CheckBox {
id: colorizeTransparentPanelsChk
Layout.leftMargin: units.smallSpacing * 2
Layout.maximumWidth: (dialog.appliedWidth - units.smallSpacing * 2) - units.smallSpacing * 3
text: i18n("Monochrome contents when panel is transparent")
checked: plasmoid.configuration.colorizeTransparentPanels
tooltip: i18n("The panel contents are colorized in order to improve contrast \nwith the underlying desktop background when the panel is transparent")
style: LatteExtraControls.LatteCheckBoxStyle{}
enabled: solidForMaximizedChk.checked || onlyOnMaximizedChk.checked
onClicked: {
plasmoid.configuration.colorizeTransparentPanels = checked;
}
}
PlasmaComponents.CheckBox {
id: colorizeFromActiveWindowSchemeChk
Layout.leftMargin: units.smallSpacing * 2
Layout.maximumWidth: (dialog.appliedWidth - units.smallSpacing * 2) - units.smallSpacing * 3
text: i18n("Paint contents based on active window scheme")
checked: plasmoid.configuration.colorizeFromActiveWindowScheme
tooltip: i18n("The panel contents are colorized from active window scheme \nwhen that window is maximized or is touching the panel.")
style: LatteExtraControls.LatteCheckBoxStyle{}
enabled: solidForMaximizedChk.checked || onlyOnMaximizedChk.checked
onClicked: {
plasmoid.configuration.colorizeFromActiveWindowScheme = checked;
}
}
PlasmaComponents.CheckBox {
id: hideShadowsOnMaximizedChk
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Hide panel shadow for maximized windows")
checked: plasmoid.configuration.disablePanelShadowForMaximized
onClicked: {
plasmoid.configuration.disablePanelShadowForMaximized = checked;
}
}
}
//! END: Dynamic Background
//! BEGIN: Behavior
ColumnLayout {
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
LatteExtraControls.Header {
text: i18n("Behavior")
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Activate KWin edge after hiding")
checked: latteView.visibility.enableKWinEdges
onClicked: {
latteView.visibility.enableKWinEdges = checked;
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Decrease applets size when it is needed")
checked: plasmoid.configuration.autoDecreaseIconSize
tooltip: i18n("Applets size is decreased automatically when the contents \nexceed the maximum length \n\nHint: this option is disabled when only plasma taskmanagers are present")
enabled: !(latteView.tasksPresent() && !latteView.latteTasksPresent());
onClicked: {
plasmoid.configuration.autoDecreaseIconSize = checked
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Add launchers only in the corresponding area")
checked: plasmoid.configuration.addLaunchersInTaskManager
tooltip: i18n("Launchers are added only in the taskmanager and not as plasma applets")
onClicked: {
plasmoid.configuration.addLaunchersInTaskManager = checked;
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Prefer for global shortcuts activation")
checked: latteView.isPreferredForShortcuts
tooltip: i18n("Enable highest priority for global shortcuts activation")
onClicked: {
latteView.isPreferredForShortcuts = checked
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Above fullscreen windows")
checked: latteView.byPassWM
enabled: !(latteView.visibility.mode === Latte.Types.AlwaysVisible
|| latteView.visibility.mode === Latte.Types.WindowsGoBelow)
tooltip: i18n("BypassWindowManagerHint flag for the window.\nThe view will be above all windows even those set as 'Always On Top'")
onCheckedChanged: {
latteView.byPassWM = checked;
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Raise on desktop change")
checked: latteView.visibility.raiseOnDesktop
enabled: latteView.visibility.mode !== Latte.Types.AlwaysVisible
onClicked: {
latteView.visibility.raiseOnDesktop = checked
}
}
PlasmaComponents.CheckBox {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Raise on activity change")
checked: latteView.visibility.raiseOnActivity
enabled: latteView.visibility.mode !== Latte.Types.AlwaysVisible
onClicked: {
latteView.visibility.raiseOnActivity = checked
}
}
}
//! END: Behavior
//! BEGIN: Extra Actions
ColumnLayout {
Layout.fillWidth: true
spacing: units.smallSpacing
Layout.rightMargin: units.smallSpacing * 2
LatteExtraControls.Header {
text: i18n("Extra Actions")
}
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
spacing: units.smallSpacing
PlasmaComponents.Button {
iconSource: "distribute-horizontal-x"
text: i18n("Add Spacer")
Layout.minimumWidth: 0.5 * (content.width - 5 * units.smallSpacing)
Layout.maximumWidth: Layout.minimumWidth
Layout.alignment: Qt.AlignLeft
tooltip: i18n("Add a spacer to separate applets")
onClicked: {
viewConfig.addPanelSpacer()
}
}
PlasmaComponents.Button {
Layout.fillWidth: true
iconSource: "edit-delete"
text: i18n("Remove Tasks Applet")
enabled: latteView.tasksPresent()
tooltip: i18n("Remove Latte Tasks plasmoid")
onClicked: {
latteView.removeTasksPlasmoid();
}
}
}
}
//! END: Extra Actions
//! Bottom spacer
PlasmaComponents.Label{
id: bottomMarginSpacer
text:" "
}
}
}
Loading…
Cancel
Save