diff --git a/applets/mediaframe/package/contents/ui/ConfigGeneral.qml b/applets/mediaframe/package/contents/ui/ConfigGeneral.qml index 2f1e685d3..f2a5f790a 100644 --- a/applets/mediaframe/package/contents/ui/ConfigGeneral.qml +++ b/applets/mediaframe/package/contents/ui/ConfigGeneral.qml @@ -1,179 +1,179 @@ /* * Copyright 2015 Lars Pontoppidan * * This program 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. * * This program 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. */ import QtQuick 2.7 import QtQuick.Controls 1.5 import QtQuick.Layouts 1.1 ColumnLayout { id: root property alias cfg_interval: intervalSpinBox.value property alias cfg_randomize: randomizeCheckBox.checked property alias cfg_pauseOnMouseOver: pauseOnMouseOverCheckBox.checked property alias cfg_useBackground: useBackgroundCheckBox.checked property alias cfg_leftClickOpenImage: leftClickOpenImageCheckBox.checked //property alias cfg_showCountdown: showCountdownCheckBox.checked property alias cfg_fillMode: root.fillMode /* * Image.Stretch - the image is scaled to fit * Image.PreserveAspectFit - the image is scaled uniformly to fit without cropping * Image.PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary * Image.Tile - the image is duplicated horizontally and vertically * Image.TileVertically - the image is stretched horizontally and tiled vertically * Image.TileHorizontally - the image is stretched vertically and tiled horizontally * Image.Pad - the image is not transformed */ property int fillMode: Image.PreserveAspectFit GridLayout { columns: 2 Label { Layout.row: 0 Layout.column: 0 Layout.alignment: Qt.AlignRight text: i18n("Change picture every") } SpinBox { id: intervalSpinBox Layout.row: 0 Layout.column: 1 suffix: i18n("s") decimals: 1 // Once a day should be high enough maximumValue: 24*(60*60) } // end SpinBox Label { id: fillLabel Layout.row: 1 Layout.column: 0 Layout.alignment: Qt.AlignRight text: i18n("Fill mode:") } ComboBox { id: comboBox Layout.row: 1 Layout.column: 1 width: units.gridUnit * 10 currentIndex: fillModeToIndex(fillMode) model: [ { text: i18n("Stretch"), description: i18n("The image is scaled to fit the frame"), value: Image.Stretch }, { text: i18n("Preserve aspect fit"), description: i18n("The image is scaled uniformly to fit without cropping"), value: Image.PreserveAspectFit }, { text: i18n("Preserve aspect crop"), description: i18n("The image is scaled uniformly to fill, cropping if necessary"), value: Image.PreserveAspectCrop }, { text: i18n("Tile"), description: i18n("The image is duplicated horizontally and vertically"), value: Image.Tile }, { text: i18n("Tile vertically"), description: i18n("The image is stretched horizontally and tiled vertically"), value: Image.TileVertically }, { text: i18n("Tile horizontally"), description: i18n("The image is stretched vertically and tiled horizontally"), value: Image.TileHorizontally }, { text: i18n("Pad"), description: i18n("The image is not transformed"), value: Image.Pad } ] // end of ComboBox model onActivated: root.fillMode = comboBox.model[index].value function fillModeToIndex(fillMode) { if(fillMode == Image.Stretch) { return 0 } else if(fillMode == Image.PreserveAspectFit) { return 1 } else if(fillMode == Image.PreserveAspectCrop) { return 2 } else if(fillMode == Image.Tile) { return 3 } else if(fillMode == Image.TileVertically) { return 4 } else if(fillMode == Image.TileHorizontally) { return 5 } else if(fillMode == Image.Pad) { return 6 } } // end of fillModeToIndex function } // end of ComboBox and related functions Label { id: fillModeDescription Layout.row: 2 Layout.column: 1 Layout.fillWidth: true - elide: Text.ElideRight + wrapMode: Text.WordWrap text: comboBox.model[comboBox.currentIndex] ? comboBox.model[comboBox.currentIndex].description : "" } } // end of top section GridLayout // these CheckBoxes should take over as their own ColumnLayout entries CheckBox { id: randomizeCheckBox text: i18n("Randomize items") } CheckBox { id: pauseOnMouseOverCheckBox text: i18n("Pause on mouseover") } CheckBox { id: useBackgroundCheckBox text: i18n("Background frame") } CheckBox { id: leftClickOpenImageCheckBox text: i18n("Left click image opens in external viewer") } Item { // tighten layout Layout.fillHeight: true } } // end ColumnLayout diff --git a/applets/quickshare/plasmoid/contents/ui/settingsGeneral.qml b/applets/quickshare/plasmoid/contents/ui/settingsGeneral.qml index 4c6dff644..218e41319 100644 --- a/applets/quickshare/plasmoid/contents/ui/settingsGeneral.qml +++ b/applets/quickshare/plasmoid/contents/ui/settingsGeneral.qml @@ -1,50 +1,61 @@ /*************************************************************************** * Copyright (C) 2013 by Aleix Pol Gonzalez * * * * This program 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. * * * * This program 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, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * ***************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 1.0 as QtControls -import QtQuick.Layouts 1.0 as QtLayouts -import org.kde.plasma.core 2.0 as PlasmaCore +import QtQuick.Layouts 1.0 -Item -{ +ColumnLayout { id: configRoot property alias cfg_historySize: historySpin.value property alias cfg_copyAutomatically: copyAutomatically.checked - QtLayouts.GridLayout { - anchors { - left: parent.left - right: parent.right - top: parent.top - } + GridLayout { columns: 2 - QtControls.Label { text: i18n("History Size:") } + QtControls.Label { + Layout.row: 0 + Layout.column: 0 + Layout.alignment: Qt.AlignRight + text: i18n("History Size:") + } QtControls.SpinBox { id: historySpin + Layout.row: 0 + Layout.column: 1 value: 3 } - QtControls.Label { text: i18n("Copy Automatically:") } + QtControls.Label { + Layout.row: 1 + Layout.column: 0 + Layout.alignment: Qt.AlignRight + text: i18n("Copy Automatically:") + } QtControls.CheckBox { + Layout.row: 1 + Layout.column: 1 id: copyAutomatically } } + + Item { + Layout.fillHeight: true + } } diff --git a/applets/systemloadviewer/package/contents/ui/ColorSettings.qml b/applets/systemloadviewer/package/contents/ui/ColorSettings.qml index ed87eafac..2bbe4bf48 100644 --- a/applets/systemloadviewer/package/contents/ui/ColorSettings.qml +++ b/applets/systemloadviewer/package/contents/ui/ColorSettings.qml @@ -1,171 +1,170 @@ /* * Copyright (C) 2014 Martin Yrjölä * * This program 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) version 3 or any later version * accepted by the membership of KDE e.V. (or its successor approved * by the membership of KDE e.V.), which shall act as a proxy * defined in Section 14 of version 3 of the license. * * This program 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 */ import QtQuick 2.2 import QtQuick.Controls 1.2 import QtQuick.Layouts 1.0 -Item { +ColumnLayout { id: colorSettings property alias cfg_memApplicationColor: memApplicationColorPicker.chosenColor property alias cfg_memBuffersColor: memBuffersColorPicker.chosenColor property alias cfg_memCachedColor: memCachedColorPicker.chosenColor property alias cfg_cpuUserColor: cpuUserColorPicker.chosenColor property alias cfg_cpuIOWaitColor: cpuIOWaitColorPicker.chosenColor property alias cfg_cpuSysColor: cpuSysColorPicker.chosenColor property alias cfg_cpuNiceColor: cpuNiceColorPicker.chosenColor property alias cfg_swapUsedColor: swapUsedColorPicker.chosenColor property alias cfg_cacheDirtyColor: cacheDirtyColorPicker.chosenColor property alias cfg_cacheWritebackColor: cacheWritebackColorPicker.chosenColor property alias cfg_setColorsManually: setColorsManuallyGroupBox.checked GroupBox { id: setColorsManuallyGroupBox + Layout.fillWidth: true title: i18n("Set colors manually") checkable: true flat: true - - width: parent.width - height: parent.height - GridLayout { columns: 2 - anchors.left: parent.left - anchors.leftMargin: units.largeSpacing Label { text: i18n("CPU") Layout.columnSpan: 2 font.bold: true } Label { text: i18n("User:") Layout.alignment: Qt.AlignRight } ColorPicker { id: cpuUserColorPicker } Label { text: i18n("IOWait:") Layout.alignment: Qt.AlignRight } ColorPicker { id: cpuIOWaitColorPicker } Label { text: i18n("Sys:") Layout.alignment: Qt.AlignRight } ColorPicker { id: cpuSysColorPicker } Label { text: i18n("Nice:") Layout.alignment: Qt.AlignRight } ColorPicker { id: cpuNiceColorPicker } Label { text: i18n("Memory") Layout.columnSpan: 2 font.bold: true } Label { text: i18n("Application:") Layout.alignment: Qt.AlignRight } ColorPicker { id: memApplicationColorPicker } Label { text: i18n("Buffers:") Layout.alignment: Qt.AlignRight } ColorPicker { id: memBuffersColorPicker } Label { text: i18n("Cached:") Layout.alignment: Qt.AlignRight } ColorPicker { id: memCachedColorPicker } Label { text: i18n("Swap") Layout.columnSpan: 2 font.bold: true } Label { text: i18n("Used swap:") Layout.alignment: Qt.AlignRight } ColorPicker { id: swapUsedColorPicker } Label { text: i18n("Cache") Layout.columnSpan: 2 font.bold: true } Label { text: i18n("Dirty memory:") Layout.alignment: Qt.AlignRight } ColorPicker { id: cacheDirtyColorPicker } Label { text: i18n("Writeback memory:") Layout.alignment: Qt.AlignRight } ColorPicker { id: cacheWritebackColorPicker } } } + + Item { + Layout.fillHeight: true + } }