Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/package/contents/ui/ConfigGeneral.qml
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 94 | onDrop: { | |||
---|---|---|---|---|---|
99 | containsAcceptableDrag = false; | 99 | containsAcceptableDrag = false; | ||
100 | } | 100 | } | ||
101 | } | 101 | } | ||
102 | 102 | | |||
103 | KQuickAddons.IconDialog { | 103 | KQuickAddons.IconDialog { | ||
104 | id: iconDialog | 104 | id: iconDialog | ||
105 | 105 | | |||
106 | function setCustomButtonImage(image) { | 106 | function setCustomButtonImage(image) { | ||
107 | cfg_customButtonImage = image || cfg_icon || "start-here-kde" | 107 | configGeneral.cfg_customButtonImage = image || configGeneral.cfg_icon || "start-here-kde" | ||
108 | cfg_useCustomButtonImage = true; | 108 | configGeneral.cfg_useCustomButtonImage = true; | ||
109 | } | 109 | } | ||
110 | 110 | | |||
111 | onIconNameChanged: setCustomButtonImage(iconName); | 111 | onIconNameChanged: setCustomButtonImage(iconName); | ||
112 | } | 112 | } | ||
113 | 113 | | |||
114 | PlasmaCore.FrameSvgItem { | 114 | PlasmaCore.FrameSvgItem { | ||
115 | id: previewFrame | 115 | id: previewFrame | ||
116 | anchors.centerIn: parent | 116 | anchors.centerIn: parent | ||
117 | imagePath: plasmoid.location === PlasmaCore.Types.Vertical || plasmoid.location === PlasmaCore.Types.Horizontal | 117 | imagePath: plasmoid.location === PlasmaCore.Types.Vertical || plasmoid.location === PlasmaCore.Types.Horizontal | ||
118 | ? "widgets/panel-background" : "widgets/background" | 118 | ? "widgets/panel-background" : "widgets/background" | ||
119 | width: units.iconSizes.large + fixedMargins.left + fixedMargins.right | 119 | width: units.iconSizes.large + fixedMargins.left + fixedMargins.right | ||
120 | height: units.iconSizes.large + fixedMargins.top + fixedMargins.bottom | 120 | height: units.iconSizes.large + fixedMargins.top + fixedMargins.bottom | ||
121 | 121 | | |||
122 | PlasmaCore.IconItem { | 122 | PlasmaCore.IconItem { | ||
123 | anchors.centerIn: parent | 123 | anchors.centerIn: parent | ||
124 | width: units.iconSizes.large | 124 | width: units.iconSizes.large | ||
125 | height: width | 125 | height: width | ||
126 | source: cfg_useCustomButtonImage ? cfg_customButtonImage : cfg_icon | 126 | source: configGeneral.cfg_useCustomButtonImage ? configGeneral.cfg_customButtonImage : configGeneral.cfg_icon | ||
127 | } | 127 | } | ||
128 | } | 128 | } | ||
129 | 129 | | |||
130 | Menu { | 130 | Menu { | ||
131 | id: iconMenu | 131 | id: iconMenu | ||
132 | 132 | | |||
133 | // Appear below the button | 133 | // Appear below the button | ||
134 | y: +parent.height | 134 | y: +parent.height | ||
135 | 135 | | |||
136 | onClosed: iconButton.checked = false; | 136 | onClosed: iconButton.checked = false; | ||
137 | 137 | | |||
138 | MenuItem { | 138 | MenuItem { | ||
139 | text: i18nc("@item:inmenu Open icon chooser dialog", "Choose...") | 139 | text: i18nc("@item:inmenu Open icon chooser dialog", "Choose...") | ||
140 | icon.name: "document-open-folder" | 140 | icon.name: "document-open-folder" | ||
141 | onClicked: iconDialog.open() | 141 | onClicked: iconDialog.open() | ||
142 | } | 142 | } | ||
143 | MenuItem { | 143 | MenuItem { | ||
144 | text: i18nc("@item:inmenu Reset icon to default", "Clear Icon") | 144 | text: i18nc("@item:inmenu Reset icon to default", "Clear Icon") | ||
145 | icon.name: "edit-clear" | 145 | icon.name: "edit-clear" | ||
146 | onClicked: { | 146 | onClicked: { | ||
147 | cfg_icon = "start-here-kde" | 147 | configGeneral.cfg_icon = "start-here-kde" | ||
148 | cfg_useCustomButtonImage = false | 148 | configGeneral.cfg_useCustomButtonImage = false | ||
149 | } | 149 | } | ||
150 | } | 150 | } | ||
151 | } | 151 | } | ||
152 | } | 152 | } | ||
153 | 153 | | |||
154 | 154 | | |||
155 | Item { | 155 | Item { | ||
156 | Kirigami.FormData.isSection: true | 156 | Kirigami.FormData.isSection: true | ||
Show All 25 Lines | 179 | CheckBox { | |||
182 | visible: !isDash | 182 | visible: !isDash | ||
183 | 183 | | |||
184 | text: i18n("Flatten sub-menus to a single level") | 184 | text: i18n("Flatten sub-menus to a single level") | ||
185 | } | 185 | } | ||
186 | 186 | | |||
187 | CheckBox { | 187 | CheckBox { | ||
188 | id: showIconsRootLevel | 188 | id: showIconsRootLevel | ||
189 | 189 | | |||
190 | visible: !isDash | 190 | visible: !configGeneral.isDash | ||
191 | 191 | | |||
192 | text: i18n("Show icons on the root level of the menu") | 192 | text: i18n("Show icons on the root level of the menu") | ||
193 | } | 193 | } | ||
194 | 194 | | |||
195 | Item { | 195 | Item { | ||
196 | Kirigami.FormData.isSection: true | 196 | Kirigami.FormData.isSection: true | ||
197 | } | 197 | } | ||
198 | 198 | | |||
Show All 40 Lines | 236 | CheckBox { | |||
239 | Kirigami.FormData.label: i18n("Search:") | 239 | Kirigami.FormData.label: i18n("Search:") | ||
240 | 240 | | |||
241 | text: i18n("Expand search to bookmarks, files and emails") | 241 | text: i18n("Expand search to bookmarks, files and emails") | ||
242 | } | 242 | } | ||
243 | 243 | | |||
244 | CheckBox { | 244 | CheckBox { | ||
245 | id: alignResultsToBottom | 245 | id: alignResultsToBottom | ||
246 | 246 | | |||
247 | visible: !isDash | 247 | visible: !configGeneral.isDash | ||
248 | 248 | | |||
249 | text: i18n("Align search results to bottom") | 249 | text: i18n("Align search results to bottom") | ||
250 | } | 250 | } | ||
251 | } | 251 | } |