1/************************************************************************** 2 ** ** 3 ** Copyright (C) 2018 Lukas Spies ** 4 ** Contact: http://photoqt.org ** 5 ** ** 6 ** This file is part of PhotoQt. ** 7 ** ** 8 ** PhotoQt is free software: you can redistribute it and/or modify ** 9 ** it under the terms of the GNU General Public License as published by ** 10 ** the Free Software Foundation, either version 2 of the License, or ** 11 ** (at your option) any later version. ** 12 ** ** 13 ** PhotoQt is distributed in the hope that it will be useful, ** 14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** 15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** 16 ** GNU General Public License for more details. ** 17 ** ** 18 ** You should have received a copy of the GNU General Public License ** 19 ** along with PhotoQt. If not, see <http://www.gnu.org/licenses/>. ** 20 ** ** 21 **************************************************************************/ 22 23import QtQuick 2.5 24import QtQuick.Controls 1.4 25 26import "../../elements" 27 28Rectangle { 29 30 property bool currentlySelected: false 31 32 visible: currentlySelected 33 34 color: "#00000000" 35 width: childrenRect.width 36 height: (currentlySelected ? childrenRect.height : 10) 37 38 Column { 39 40 spacing: 5 41 42 // NOTE (tool not existing) 43 Text { 44 id: gnome_unity_error 45 visible: false 46 color: colour.text_warning 47 font.pointSize: 10 48 width: wallpaper_top.width 49 wrapMode: Text.WordWrap 50 horizontalAlignment: Text.AlignHCenter 51 //: "gsettings", "Gnome" and "Unity" are fixed names, please don't translate 52 text: em.pty+qsTr("Warning: 'gsettings' doesn't seem to be available! Are you sure Gnome/Unity is installed?"); 53 } 54 55 // PICTURE OPTIONS HEADING 56 Text { 57 color: colour.text 58 font.pointSize: 10 59 width: wallpaper_top.width 60 wrapMode: Text.WordWrap 61 horizontalAlignment: Text.AlignHCenter 62 //: 'picture options' refers to options like stretching the image to fill the background, or tile the image, center it, etc. 63 text: em.pty+qsTr("There are several picture options that can be set for the wallpaper image.") 64 } 65 66 Rectangle { color: "#00000000"; width: 1; height: 1; } 67 68 ExclusiveGroup { id: wallpaperoptions_gnomeunity; } 69 Rectangle { 70 71 color: "#00000000" 72 width: childrenRect.width 73 height: childrenRect.height 74 x: (wallpaper_top.width-width)/2 75 76 Column { 77 78 spacing: 10 79 80 CustomRadioButton { 81 text: "wallpaper" 82 fontsize: 10 83 exclusiveGroup: wallpaperoptions_gnomeunity 84 checked: true 85 } 86 CustomRadioButton { 87 text: "centered" 88 fontsize: 10 89 exclusiveGroup: wallpaperoptions_gnomeunity 90 } 91 CustomRadioButton { 92 text: "scaled" 93 fontsize: 10 94 exclusiveGroup: wallpaperoptions_gnomeunity 95 } 96 CustomRadioButton { 97 text: "zoom" 98 fontsize: 10 99 exclusiveGroup: wallpaperoptions_gnomeunity 100 } 101 CustomRadioButton { 102 text: "spanned" 103 fontsize: 10 104 exclusiveGroup: wallpaperoptions_gnomeunity 105 } 106 107 } 108 109 } 110 111 } 112 113 function loadGnomeUnity() { 114 115 verboseMessage("Wallpaper/GnomeUnity","loadGnomeUnity()") 116 117 var ret = getanddostuff.checkWallpaperTool("gnome_unity") 118 gnome_unity_error.visible = (ret === 1) 119 } 120 121 function getCurrentText() { 122 return wallpaperoptions_gnomeunity.current.text 123 } 124 125} 126