()
| 209 | } |
| 210 | |
| 211 | toggle() { |
| 212 | if (!this.isExpanded) { |
| 213 | if (!Me.layout!.panelsVisible) { |
| 214 | this.show(); |
| 215 | } |
| 216 | if (this.extendedPanelContent.get_parent() === null) { |
| 217 | if ( |
| 218 | Me.msThemeManager!.verticalPanelPosition === |
| 219 | VerticalPanelPositionEnum.LEFT |
| 220 | ) { |
| 221 | this.insert_child_below( |
| 222 | this.extendedPanelContent, |
| 223 | this.panelContent |
| 224 | ); |
| 225 | } else { |
| 226 | this.insert_child_above( |
| 227 | this.extendedPanelContent, |
| 228 | this.panelContent |
| 229 | ); |
| 230 | } |
| 231 | } |
| 232 | if (this.divider.get_parent() === null) { |
| 233 | if ( |
| 234 | Me.msThemeManager!.verticalPanelPosition === |
| 235 | VerticalPanelPositionEnum.LEFT |
| 236 | ) { |
| 237 | this.insert_child_below(this.divider, this.panelContent); |
| 238 | } else { |
| 239 | this.insert_child_above(this.divider, this.panelContent); |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | this.width = Me.msThemeManager!.getScaledSize(448); |
| 244 | this.translation_x = |
| 245 | (Me.msThemeManager!.getScaledSize(448) - |
| 246 | (Me.layout!.panelsVisible |
| 247 | ? Me.msThemeManager!.getPanelSize() |
| 248 | : 0)) * |
| 249 | (Me.msThemeManager!.verticalPanelPosition === |
| 250 | VerticalPanelPositionEnum.LEFT |
| 251 | ? -1 |
| 252 | : 1); |
| 253 | |
| 254 | this.ease({ |
| 255 | translation_x: 0, |
| 256 | duration: 200, |
| 257 | mode: Clutter.AnimationMode.EASE_OUT_QUAD, |
| 258 | }); |
| 259 | this.extendedPanelContent.searchEntry.grab_key_focus(); |
| 260 | this.panelContent.setIcon('close'); |
| 261 | this.isExpanded = true; |
| 262 | this.add_style_class_name('shadow'); |
| 263 | } else { |
| 264 | this.isExpanded = false; |
| 265 | this.panelContent.setIcon('search'); |
| 266 | this.remove_style_class_name('shadow'); |
| 267 | |
| 268 | this.ease({ |
no test coverage detected