diff options
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r-- | src/FbWinFrame.cc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index ca93957..9a00a08 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -19,12 +19,15 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: FbWinFrame.cc,v 1.6 2003/02/15 01:54:54 fluxgen Exp $ | 22 | // $Id: FbWinFrame.cc,v 1.7 2003/02/17 22:45:42 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbWinFrame.hh" | 24 | #include "FbWinFrame.hh" |
25 | #include "ImageControl.hh" | 25 | #include "ImageControl.hh" |
26 | #include "EventManager.hh" | 26 | #include "EventManager.hh" |
27 | #include "App.hh" | 27 | #include "App.hh" |
28 | #ifdef SHAPE | ||
29 | //#include "Shape.hh" | ||
30 | #endif // SHAPE | ||
28 | 31 | ||
29 | #include <iostream> | 32 | #include <iostream> |
30 | using namespace std; | 33 | using namespace std; |
@@ -64,7 +67,8 @@ FbWinFrame::FbWinFrame(FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl, int | |||
64 | m_use_titlebar(true), | 67 | m_use_titlebar(true), |
65 | m_use_handle(true), | 68 | m_use_handle(true), |
66 | m_button_pm(0), | 69 | m_button_pm(0), |
67 | m_themelistener(*this) { | 70 | m_themelistener(*this), |
71 | // m_shape(new Shape(m_window, 0)) { //Shape::TOPLEFT | Shape::TOPRIGHT)) { | ||
68 | theme.addListener(m_themelistener); | 72 | theme.addListener(m_themelistener); |
69 | init(); | 73 | init(); |
70 | } | 74 | } |
@@ -381,6 +385,8 @@ void FbWinFrame::configureNotifyEvent(XConfigureEvent &event) { | |||
381 | 385 | ||
382 | void FbWinFrame::reconfigure() { | 386 | void FbWinFrame::reconfigure() { |
383 | m_window.clear(); | 387 | m_window.clear(); |
388 | // if (m_shape.get()) | ||
389 | // m_shape->update(); | ||
384 | 390 | ||
385 | // align titlebar and render it | 391 | // align titlebar and render it |
386 | if (m_use_titlebar) | 392 | if (m_use_titlebar) |
@@ -397,7 +403,7 @@ void FbWinFrame::reconfigure() { | |||
397 | client_height = m_window.height() - m_handle.height(); | 403 | client_height = m_window.height() - m_handle.height(); |
398 | } | 404 | } |
399 | 405 | ||
400 | m_clientarea.moveResize(0, next_y, | 406 | m_clientarea.moveResize(0, m_titlebar.y() + next_y, |
401 | m_window.width(), client_height); | 407 | m_window.width(), client_height); |
402 | 408 | ||
403 | if (m_clientwin != 0) { | 409 | if (m_clientwin != 0) { |
@@ -476,8 +482,9 @@ void FbWinFrame::redrawTitlebar() { | |||
476 | */ | 482 | */ |
477 | void FbWinFrame::reconfigureTitlebar() { | 483 | void FbWinFrame::reconfigureTitlebar() { |
478 | // resize titlebar to window size with font height | 484 | // resize titlebar to window size with font height |
479 | m_titlebar.resize(m_window.width() - m_titlebar.borderWidth(), m_theme.font().height() == 0 ? | 485 | m_titlebar.moveResize(-m_titlebar.borderWidth(), -m_titlebar.borderWidth(), |
480 | 16 : m_theme.font().height() + m_bevel*2 + 2); | 486 | m_window.width(), |
487 | m_theme.font().height() == 0 ? 16 : m_theme.font().height() + m_bevel*2 + 2); | ||
481 | 488 | ||
482 | // draw left buttons first | 489 | // draw left buttons first |
483 | unsigned int next_x = m_bevel; | 490 | unsigned int next_x = m_bevel; |
@@ -493,7 +500,8 @@ void FbWinFrame::reconfigureTitlebar() { | |||
493 | // space left on titlebar between left and right buttons | 500 | // space left on titlebar between left and right buttons |
494 | unsigned int space_left = m_titlebar.width() - next_x; | 501 | unsigned int space_left = m_titlebar.width() - next_x; |
495 | if (m_buttons_right.size() != 0) | 502 | if (m_buttons_right.size() != 0) |
496 | space_left -= (m_buttons_right.size() + 1)*button_size; | 503 | space_left -= m_buttons_right.size() * (button_size + m_bevel); |
504 | |||
497 | space_left -= m_bevel; | 505 | space_left -= m_bevel; |
498 | 506 | ||
499 | m_label.moveResize( | 507 | m_label.moveResize( |