()
| 1737 | } |
| 1738 | |
| 1739 | updateWindowPositionBar() { |
| 1740 | // if pref show-window-position-bar, exit |
| 1741 | if (!this.showPositionBar) { |
| 1742 | return; |
| 1743 | } |
| 1744 | |
| 1745 | // show space duplicate elements if not primary monitor |
| 1746 | if (!this.hasTopBar) { |
| 1747 | Utils.actor_raise(this.workspaceIndicator); |
| 1748 | this.workspaceLabel.show(); |
| 1749 | } |
| 1750 | |
| 1751 | // number of columns (a column have one or more windows) |
| 1752 | let cols = this.length; |
| 1753 | if (cols <= 1) { |
| 1754 | this.windowPositionBar.hide(); |
| 1755 | return; |
| 1756 | } else { |
| 1757 | this.windowPositionBar.show(); |
| 1758 | } |
| 1759 | |
| 1760 | let width = this.monitor.width; |
| 1761 | this.windowPositionBarBackdrop.width = width; |
| 1762 | let segments = width / cols; |
| 1763 | this.windowPositionBar.width = segments; |
| 1764 | this.windowPositionBar.height = Topbar.panelBox.height; |
| 1765 | |
| 1766 | // index of currently selected window |
| 1767 | let windex = this.indexOf(this.selectedWindow); |
| 1768 | this.windowPositionBar.x = windex * segments; |
| 1769 | } |
| 1770 | |
| 1771 | /** |
| 1772 | * A space contains several elements that are duplicated (in the topbar) so that |
no test coverage detected