diff options
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r-- | src/FbWinFrame.cc | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index d0d1e21..d4ca980 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -265,7 +265,8 @@ void FbWinFrame::moveResize(int x, int y, unsigned int width, unsigned int heigh | |||
265 | m_window.resize(width, height); | 265 | m_window.resize(width, height); |
266 | } | 266 | } |
267 | 267 | ||
268 | if (move || (resize && m_screen.getTabPlacement() != TOPLEFT)) | 268 | if (move || (resize && m_screen.getTabPlacement() != TOPLEFT && |
269 | m_screen.getTabPlacement() != LEFTTOP)) | ||
269 | alignTabs(); | 270 | alignTabs(); |
270 | 271 | ||
271 | if (resize) { | 272 | if (resize) { |
@@ -273,6 +274,8 @@ void FbWinFrame::moveResize(int x, int y, unsigned int width, unsigned int heigh | |||
273 | switch(m_screen.getTabPlacement()) { | 274 | switch(m_screen.getTabPlacement()) { |
274 | case LEFTTOP: | 275 | case LEFTTOP: |
275 | case RIGHTTOP: | 276 | case RIGHTTOP: |
277 | case LEFT: | ||
278 | case RIGHT: | ||
276 | case LEFTBOTTOM: | 279 | case LEFTBOTTOM: |
277 | case RIGHTBOTTOM: | 280 | case RIGHTBOTTOM: |
278 | m_tab_container.setMaxTotalSize(height); | 281 | m_tab_container.setMaxTotalSize(height); |
@@ -294,6 +297,8 @@ void FbWinFrame::quietMoveResize(int x, int y, | |||
294 | switch(m_screen.getTabPlacement()) { | 297 | switch(m_screen.getTabPlacement()) { |
295 | case LEFTTOP: | 298 | case LEFTTOP: |
296 | case RIGHTTOP: | 299 | case RIGHTTOP: |
300 | case LEFT: | ||
301 | case RIGHT: | ||
297 | case LEFTBOTTOM: | 302 | case LEFTBOTTOM: |
298 | case RIGHTBOTTOM: | 303 | case RIGHTBOTTOM: |
299 | m_tab_container.setMaxTotalSize(height); | 304 | m_tab_container.setMaxTotalSize(height); |
@@ -327,6 +332,14 @@ void FbWinFrame::alignTabs() { | |||
327 | tabx = x(); | 332 | tabx = x(); |
328 | taby = y() - yOffset(); | 333 | taby = y() - yOffset(); |
329 | break; | 334 | break; |
335 | case TOP: | ||
336 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); | ||
337 | m_tab_container.setOrientation(FbTk::ROT0); | ||
338 | m_tab_container.setAlignment(FbTk::Container::CENTER); | ||
339 | m_tab_container.setMaxTotalSize(m_window.width()); | ||
340 | tabx = x() + (width() - m_tab_container.width())/2; | ||
341 | taby = y() - yOffset(); | ||
342 | break; | ||
330 | case TOPRIGHT: | 343 | case TOPRIGHT: |
331 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); | 344 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); |
332 | m_tab_container.setOrientation(FbTk::ROT0); | 345 | m_tab_container.setOrientation(FbTk::ROT0); |
@@ -343,6 +356,14 @@ void FbWinFrame::alignTabs() { | |||
343 | tabx = x() - xOffset(); | 356 | tabx = x() - xOffset(); |
344 | taby = y(); | 357 | taby = y(); |
345 | break; | 358 | break; |
359 | case LEFT: | ||
360 | if (orig_orient != FbTk::ROT270) m_tab_container.hide(); | ||
361 | m_tab_container.setOrientation(FbTk::ROT270); | ||
362 | m_tab_container.setAlignment(FbTk::Container::CENTER); | ||
363 | m_tab_container.setMaxTotalSize(m_window.height()); | ||
364 | tabx = x() - xOffset(); | ||
365 | taby = y() + (height() - m_tab_container.height())/2; | ||
366 | break; | ||
346 | case LEFTBOTTOM: | 367 | case LEFTBOTTOM: |
347 | if (orig_orient != FbTk::ROT270) m_tab_container.hide(); | 368 | if (orig_orient != FbTk::ROT270) m_tab_container.hide(); |
348 | m_tab_container.setOrientation(FbTk::ROT270); | 369 | m_tab_container.setOrientation(FbTk::ROT270); |
@@ -359,6 +380,14 @@ void FbWinFrame::alignTabs() { | |||
359 | tabx = x() + width() + m_window.borderWidth(); | 380 | tabx = x() + width() + m_window.borderWidth(); |
360 | taby = y(); | 381 | taby = y(); |
361 | break; | 382 | break; |
383 | case RIGHT: | ||
384 | if (orig_orient != FbTk::ROT90) m_tab_container.hide(); | ||
385 | m_tab_container.setOrientation(FbTk::ROT90); | ||
386 | m_tab_container.setAlignment(FbTk::Container::CENTER); | ||
387 | m_tab_container.setMaxTotalSize(m_window.height()); | ||
388 | tabx = x() + width() + m_window.borderWidth(); | ||
389 | taby = y() + (height() - m_tab_container.height())/2; | ||
390 | break; | ||
362 | case RIGHTBOTTOM: | 391 | case RIGHTBOTTOM: |
363 | if (orig_orient != FbTk::ROT90) m_tab_container.hide(); | 392 | if (orig_orient != FbTk::ROT90) m_tab_container.hide(); |
364 | m_tab_container.setOrientation(FbTk::ROT90); | 393 | m_tab_container.setOrientation(FbTk::ROT90); |
@@ -375,6 +404,14 @@ void FbWinFrame::alignTabs() { | |||
375 | tabx = x(); | 404 | tabx = x(); |
376 | taby = y() + height() + m_window.borderWidth(); | 405 | taby = y() + height() + m_window.borderWidth(); |
377 | break; | 406 | break; |
407 | case BOTTOM: | ||
408 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); | ||
409 | m_tab_container.setOrientation(FbTk::ROT0); | ||
410 | m_tab_container.setAlignment(FbTk::Container::CENTER); | ||
411 | m_tab_container.setMaxTotalSize(m_window.width()); | ||
412 | tabx = x() + (width() - m_tab_container.width())/2; | ||
413 | taby = y() + height() + m_window.borderWidth(); | ||
414 | break; | ||
378 | case BOTTOMRIGHT: | 415 | case BOTTOMRIGHT: |
379 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); | 416 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); |
380 | m_tab_container.setOrientation(FbTk::ROT0); | 417 | m_tab_container.setOrientation(FbTk::ROT0); |
@@ -878,8 +915,10 @@ void FbWinFrame::reconfigure() { | |||
878 | unsigned int neww, newh; | 915 | unsigned int neww, newh; |
879 | switch (m_screen.getTabPlacement()) { | 916 | switch (m_screen.getTabPlacement()) { |
880 | case TOPLEFT: | 917 | case TOPLEFT: |
918 | case TOP: | ||
881 | case TOPRIGHT: | 919 | case TOPRIGHT: |
882 | case BOTTOMLEFT: | 920 | case BOTTOMLEFT: |
921 | case BOTTOM: | ||
883 | case BOTTOMRIGHT: | 922 | case BOTTOMRIGHT: |
884 | neww = m_tab_container.width(); | 923 | neww = m_tab_container.width(); |
885 | newh = buttonHeight(); | 924 | newh = buttonHeight(); |
@@ -1653,6 +1692,8 @@ int FbWinFrame::widthOffset() const { | |||
1653 | switch (m_screen.getTabPlacement()) { | 1692 | switch (m_screen.getTabPlacement()) { |
1654 | case LEFTTOP: | 1693 | case LEFTTOP: |
1655 | case RIGHTTOP: | 1694 | case RIGHTTOP: |
1695 | case LEFT: | ||
1696 | case RIGHT: | ||
1656 | case LEFTBOTTOM: | 1697 | case LEFTBOTTOM: |
1657 | case RIGHTBOTTOM: | 1698 | case RIGHTBOTTOM: |
1658 | return m_tab_container.width() + m_window.borderWidth(); | 1699 | return m_tab_container.width() + m_window.borderWidth(); |
@@ -1669,8 +1710,10 @@ int FbWinFrame::heightOffset() const { | |||
1669 | 1710 | ||
1670 | switch (m_screen.getTabPlacement()) { | 1711 | switch (m_screen.getTabPlacement()) { |
1671 | case TOPLEFT: | 1712 | case TOPLEFT: |
1713 | case TOP: | ||
1672 | case TOPRIGHT: | 1714 | case TOPRIGHT: |
1673 | case BOTTOMLEFT: | 1715 | case BOTTOMLEFT: |
1716 | case BOTTOM: | ||
1674 | case BOTTOMRIGHT: | 1717 | case BOTTOMRIGHT: |
1675 | return m_tab_container.height() + m_window.borderWidth(); | 1718 | return m_tab_container.height() + m_window.borderWidth(); |
1676 | break; | 1719 | break; |
@@ -1686,6 +1729,7 @@ int FbWinFrame::xOffset() const { | |||
1686 | 1729 | ||
1687 | switch (m_screen.getTabPlacement()) { | 1730 | switch (m_screen.getTabPlacement()) { |
1688 | case LEFTTOP: | 1731 | case LEFTTOP: |
1732 | case LEFT: | ||
1689 | case LEFTBOTTOM: | 1733 | case LEFTBOTTOM: |
1690 | return m_tab_container.width() + m_window.borderWidth(); | 1734 | return m_tab_container.width() + m_window.borderWidth(); |
1691 | break; | 1735 | break; |
@@ -1701,6 +1745,7 @@ int FbWinFrame::yOffset() const { | |||
1701 | 1745 | ||
1702 | switch (m_screen.getTabPlacement()) { | 1746 | switch (m_screen.getTabPlacement()) { |
1703 | case TOPLEFT: | 1747 | case TOPLEFT: |
1748 | case TOP: | ||
1704 | case TOPRIGHT: | 1749 | case TOPRIGHT: |
1705 | return m_tab_container.height() + m_window.borderWidth(); | 1750 | return m_tab_container.height() + m_window.borderWidth(); |
1706 | break; | 1751 | break; |