diff options
author | simonb <simonb> | 2006-06-10 16:31:47 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-06-10 16:31:47 (GMT) |
commit | b8dc91871e116f51a061597e40e60d89d9f715cb (patch) | |
tree | b73dbcb2ce81a8a57456072f2feac84c5be4f589 /src/FbWinFrame.cc | |
parent | 891205c10a124f278b4eb9500ba69efa8c443423 (diff) | |
download | fluxbox_pavel-b8dc91871e116f51a061597e40e60d89d9f715cb.zip fluxbox_pavel-b8dc91871e116f51a061597e40e60d89d9f715cb.tar.bz2 |
couple of alignment fixes, esp for external tabs
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r-- | src/FbWinFrame.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index d3dd682..00583d7 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -348,6 +348,7 @@ void FbWinFrame::alignTabs() { | |||
348 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); | 348 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); |
349 | m_tab_container.setOrientation(FbTk::ROT0); | 349 | m_tab_container.setOrientation(FbTk::ROT0); |
350 | m_tab_container.setAlignment(Container::LEFT); | 350 | m_tab_container.setAlignment(Container::LEFT); |
351 | m_tab_container.setMaxTotalSize(m_window.width()); | ||
351 | tabx = x(); | 352 | tabx = x(); |
352 | taby = y() - yOffset(); | 353 | taby = y() - yOffset(); |
353 | break; | 354 | break; |
@@ -355,6 +356,7 @@ void FbWinFrame::alignTabs() { | |||
355 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); | 356 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); |
356 | m_tab_container.setOrientation(FbTk::ROT0); | 357 | m_tab_container.setOrientation(FbTk::ROT0); |
357 | m_tab_container.setAlignment(Container::RIGHT); | 358 | m_tab_container.setAlignment(Container::RIGHT); |
359 | m_tab_container.setMaxTotalSize(m_window.width()); | ||
358 | tabx = x() + width() - m_tab_container.width(); | 360 | tabx = x() + width() - m_tab_container.width(); |
359 | taby = y() - yOffset(); | 361 | taby = y() - yOffset(); |
360 | break; | 362 | break; |
@@ -362,6 +364,7 @@ void FbWinFrame::alignTabs() { | |||
362 | if (orig_orient != FbTk::ROT270) m_tab_container.hide(); | 364 | if (orig_orient != FbTk::ROT270) m_tab_container.hide(); |
363 | m_tab_container.setOrientation(FbTk::ROT270); | 365 | m_tab_container.setOrientation(FbTk::ROT270); |
364 | m_tab_container.setAlignment(Container::RIGHT); | 366 | m_tab_container.setAlignment(Container::RIGHT); |
367 | m_tab_container.setMaxTotalSize(m_window.height()); | ||
365 | tabx = x() - xOffset(); | 368 | tabx = x() - xOffset(); |
366 | taby = y(); | 369 | taby = y(); |
367 | break; | 370 | break; |
@@ -369,6 +372,7 @@ void FbWinFrame::alignTabs() { | |||
369 | if (orig_orient != FbTk::ROT270) m_tab_container.hide(); | 372 | if (orig_orient != FbTk::ROT270) m_tab_container.hide(); |
370 | m_tab_container.setOrientation(FbTk::ROT270); | 373 | m_tab_container.setOrientation(FbTk::ROT270); |
371 | m_tab_container.setAlignment(Container::LEFT); | 374 | m_tab_container.setAlignment(Container::LEFT); |
375 | m_tab_container.setMaxTotalSize(m_window.height()); | ||
372 | tabx = x() - xOffset(); | 376 | tabx = x() - xOffset(); |
373 | taby = y() + height() - m_tab_container.height(); | 377 | taby = y() + height() - m_tab_container.height(); |
374 | break; | 378 | break; |
@@ -376,6 +380,7 @@ void FbWinFrame::alignTabs() { | |||
376 | if (orig_orient != FbTk::ROT90) m_tab_container.hide(); | 380 | if (orig_orient != FbTk::ROT90) m_tab_container.hide(); |
377 | m_tab_container.setOrientation(FbTk::ROT90); | 381 | m_tab_container.setOrientation(FbTk::ROT90); |
378 | m_tab_container.setAlignment(Container::LEFT); | 382 | m_tab_container.setAlignment(Container::LEFT); |
383 | m_tab_container.setMaxTotalSize(m_window.height()); | ||
379 | tabx = x() + width() + m_window.borderWidth(); | 384 | tabx = x() + width() + m_window.borderWidth(); |
380 | taby = y(); | 385 | taby = y(); |
381 | break; | 386 | break; |
@@ -383,6 +388,7 @@ void FbWinFrame::alignTabs() { | |||
383 | if (orig_orient != FbTk::ROT90) m_tab_container.hide(); | 388 | if (orig_orient != FbTk::ROT90) m_tab_container.hide(); |
384 | m_tab_container.setOrientation(FbTk::ROT90); | 389 | m_tab_container.setOrientation(FbTk::ROT90); |
385 | m_tab_container.setAlignment(Container::RIGHT); | 390 | m_tab_container.setAlignment(Container::RIGHT); |
391 | m_tab_container.setMaxTotalSize(m_window.height()); | ||
386 | tabx = x() + width() + m_window.borderWidth(); | 392 | tabx = x() + width() + m_window.borderWidth(); |
387 | taby = y() + height() - m_tab_container.height(); | 393 | taby = y() + height() - m_tab_container.height(); |
388 | break; | 394 | break; |
@@ -390,6 +396,7 @@ void FbWinFrame::alignTabs() { | |||
390 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); | 396 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); |
391 | m_tab_container.setOrientation(FbTk::ROT0); | 397 | m_tab_container.setOrientation(FbTk::ROT0); |
392 | m_tab_container.setAlignment(Container::LEFT); | 398 | m_tab_container.setAlignment(Container::LEFT); |
399 | m_tab_container.setMaxTotalSize(m_window.width()); | ||
393 | tabx = x(); | 400 | tabx = x(); |
394 | taby = y() + height() + m_window.borderWidth(); | 401 | taby = y() + height() + m_window.borderWidth(); |
395 | break; | 402 | break; |
@@ -397,6 +404,7 @@ void FbWinFrame::alignTabs() { | |||
397 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); | 404 | if (orig_orient != FbTk::ROT0) m_tab_container.hide(); |
398 | m_tab_container.setOrientation(FbTk::ROT0); | 405 | m_tab_container.setOrientation(FbTk::ROT0); |
399 | m_tab_container.setAlignment(Container::RIGHT); | 406 | m_tab_container.setAlignment(Container::RIGHT); |
407 | m_tab_container.setMaxTotalSize(m_window.width()); | ||
400 | tabx = x() + width() - m_tab_container.width(); | 408 | tabx = x() + width() - m_tab_container.width(); |
401 | taby = y() + height() + m_window.borderWidth(); | 409 | taby = y() + height() + m_window.borderWidth(); |
402 | break; | 410 | break; |
@@ -404,7 +412,6 @@ void FbWinFrame::alignTabs() { | |||
404 | 412 | ||
405 | unsigned int w = m_window.width(), h = m_window.height(); | 413 | unsigned int w = m_window.width(), h = m_window.height(); |
406 | translateSize(m_tab_container.orientation(), w, h); | 414 | translateSize(m_tab_container.orientation(), w, h); |
407 | m_tab_container.setMaxTotalSize(w); | ||
408 | 415 | ||
409 | if (m_tab_container.orientation() != orig_orient || | 416 | if (m_tab_container.orientation() != orig_orient || |
410 | m_tab_container.maxWidthPerClient() != orig_tabwidth) { | 417 | m_tab_container.maxWidthPerClient() != orig_tabwidth) { |
@@ -417,6 +424,9 @@ void FbWinFrame::alignTabs() { | |||
417 | } | 424 | } |
418 | 425 | ||
419 | if (m_tab_container.parent()->window() != m_screen.rootWindow().window()) { | 426 | if (m_tab_container.parent()->window() != m_screen.rootWindow().window()) { |
427 | // because the label might be using the same cached pixmap as tab container! | ||
428 | renderTitlebar(); | ||
429 | applyTitlebar(); | ||
420 | m_tab_container.reparent(m_screen.rootWindow(), tabx, taby); | 430 | m_tab_container.reparent(m_screen.rootWindow(), tabx, taby); |
421 | m_layeritem.addWindow(m_tab_container); | 431 | m_layeritem.addWindow(m_tab_container); |
422 | } else { | 432 | } else { |