Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/potd/contents/ui/config.qml
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU Library General Public | 14 | * You should have received a copy of the GNU Library General Public | ||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.5 | 20 | import QtQuick 2.5 | ||
21 | import QtQuick.Layouts 1.0 | 21 | import QtQuick.Layouts 1.0 | ||
22 | import QtQuick.Controls 1.0 as QtControls | 22 | import QtQuick.Controls 1.0 as QtControls1 | ||
23 | import QtQuick.Controls 2.0 as QtControls | ||||
23 | import org.kde.kquickcontrols 2.0 as KQuickControls | 24 | import org.kde.kquickcontrols 2.0 as KQuickControls | ||
24 | import org.kde.plasma.core 2.0 as PlasmaCore | 25 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
25 | 26 | | |||
26 | ColumnLayout { | 27 | ColumnLayout { | ||
27 | id: root | 28 | id: root | ||
28 | property string cfg_Provider | 29 | property string cfg_Provider | ||
29 | property int cfg_FillMode | 30 | property int cfg_FillMode | ||
30 | property alias cfg_Color: colorButton.color | 31 | property alias cfg_Color: colorButton.color | ||
Show All 32 Lines | |||||
63 | Row { | 64 | Row { | ||
64 | spacing: units.largeSpacing / 2 | 65 | spacing: units.largeSpacing / 2 | ||
65 | QtControls.Label { | 66 | QtControls.Label { | ||
66 | width: formAlignment - units.largeSpacing | 67 | width: formAlignment - units.largeSpacing | ||
67 | horizontalAlignment: Text.AlignRight | 68 | horizontalAlignment: Text.AlignRight | ||
68 | anchors.verticalCenter: providerComboBox.verticalCenter | 69 | anchors.verticalCenter: providerComboBox.verticalCenter | ||
69 | text: i18ndc("plasma_wallpaper_org.kde.potd", "@label:listbox", "Providers:") | 70 | text: i18ndc("plasma_wallpaper_org.kde.potd", "@label:listbox", "Providers:") | ||
70 | } | 71 | } | ||
71 | QtControls.ComboBox { | 72 | // TODO: port to QQC2 version once we've fixed https://bugs.kde.org/show_bug.cgi?id=403153 | ||
73 | QtControls1.ComboBox { | ||||
72 | id: providerComboBox | 74 | id: providerComboBox | ||
73 | property int textLength: 24 | 75 | property int textLength: 24 | ||
74 | width: theme.mSize(theme.defaultFont).width * textLength | 76 | width: theme.mSize(theme.defaultFont).width * textLength | ||
75 | model: providerModel | 77 | model: providerModel | ||
76 | textRole: "name" | 78 | textRole: "name" | ||
77 | onCurrentIndexChanged: { | 79 | onCurrentIndexChanged: { | ||
78 | cfg_Provider = providerModel.get(currentIndex)["id"] | 80 | cfg_Provider = providerModel.get(currentIndex)["id"] | ||
79 | } | 81 | } | ||
80 | } | 82 | } | ||
81 | } | 83 | } | ||
82 | 84 | | |||
83 | Row { | 85 | Row { | ||
84 | //x: formAlignment - positionLabel.paintedWidth | 86 | //x: formAlignment - positionLabel.paintedWidth | ||
85 | spacing: units.largeSpacing / 2 | 87 | spacing: units.largeSpacing / 2 | ||
86 | QtControls.Label { | 88 | QtControls.Label { | ||
87 | width: formAlignment - units.largeSpacing | 89 | width: formAlignment - units.largeSpacing | ||
88 | horizontalAlignment: Text.AlignRight | 90 | horizontalAlignment: Text.AlignRight | ||
89 | anchors.verticalCenter: resizeComboBox.verticalCenter | 91 | anchors.verticalCenter: resizeComboBox.verticalCenter | ||
90 | text: i18ndc("plasma_wallpaper_org.kde.potd", "@label:listbox", "Positioning:") | 92 | text: i18ndc("plasma_wallpaper_org.kde.potd", "@label:listbox", "Positioning:") | ||
91 | } | 93 | } | ||
92 | QtControls.ComboBox { | 94 | // TODO: port to QQC2 version once we've fixed https://bugs.kde.org/show_bug.cgi?id=403153 | ||
95 | QtControls1.ComboBox { | ||||
93 | id: resizeComboBox | 96 | id: resizeComboBox | ||
94 | property int textLength: 24 | 97 | property int textLength: 24 | ||
95 | width: theme.mSize(theme.defaultFont).width * textLength | 98 | width: theme.mSize(theme.defaultFont).width * textLength | ||
96 | model: [ | 99 | model: [ | ||
97 | { | 100 | { | ||
98 | 'label': i18ndc("plasma_wallpaper_org.kde.potd", "@item:inlistbox", "Scaled and Cropped"), | 101 | 'label': i18ndc("plasma_wallpaper_org.kde.potd", "@item:inlistbox", "Scaled and Cropped"), | ||
99 | 'fillMode': Image.PreserveAspectCrop | 102 | 'fillMode': Image.PreserveAspectCrop | ||
100 | }, | 103 | }, | ||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |