diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/FbWinFrame.cc | 44 | ||||
-rw-r--r-- | src/FbWinFrame.hh | 4 |
3 files changed, 28 insertions, 23 deletions
@@ -1,6 +1,9 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.6: | 2 | Changes for 0.9.6: |
3 | *03/10/02: | 3 | *03/10/02: |
4 | * Make grips children of handle (Simon) | ||
5 | - Fixes parentrelative grip texture | ||
6 | FbWinFrame.hh/cc | ||
4 | * Fix updating of window on focus change (Simon) | 7 | * Fix updating of window on focus change (Simon) |
5 | FbWinFrame.cc | 8 | FbWinFrame.cc |
6 | *03/09/29: | 9 | *03/09/29: |
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 77e94ec..ce92813 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -19,7 +19,7 @@ | |||
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.55 2003/10/02 13:09:24 rathnor Exp $ | 22 | // $Id: FbWinFrame.cc,v 1.56 2003/10/02 14:14:45 rathnor Exp $ |
23 | 23 | ||
24 | #include "FbWinFrame.hh" | 24 | #include "FbWinFrame.hh" |
25 | 25 | ||
@@ -57,18 +57,18 @@ FbWinFrame::FbWinFrame(FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl, | |||
57 | ButtonPressMask | ButtonReleaseMask | | 57 | ButtonPressMask | ButtonReleaseMask | |
58 | ButtonMotionMask | ExposureMask | | 58 | ButtonMotionMask | ExposureMask | |
59 | EnterWindowMask | LeaveWindowMask), | 59 | EnterWindowMask | LeaveWindowMask), |
60 | m_grip_right(m_window, 0, 0, 10, 4, | 60 | m_handle(m_window, 0, 0, 100, 5, |
61 | ButtonPressMask | ButtonReleaseMask | | ||
62 | ButtonMotionMask | ExposureMask | | ||
63 | EnterWindowMask | LeaveWindowMask), | ||
64 | m_grip_right(m_handle, 0, 0, 10, 4, | ||
61 | ButtonPressMask | ButtonReleaseMask | | 65 | ButtonPressMask | ButtonReleaseMask | |
62 | ButtonMotionMask | ExposureMask | | 66 | ButtonMotionMask | ExposureMask | |
63 | EnterWindowMask | LeaveWindowMask), | 67 | EnterWindowMask | LeaveWindowMask), |
64 | m_grip_left(m_window, 0, 0, 10, 4, | 68 | m_grip_left(m_handle, 0, 0, 10, 4, |
65 | ButtonPressMask | ButtonReleaseMask | | 69 | ButtonPressMask | ButtonReleaseMask | |
66 | ButtonMotionMask | ExposureMask | | 70 | ButtonMotionMask | ExposureMask | |
67 | EnterWindowMask | LeaveWindowMask), | 71 | EnterWindowMask | LeaveWindowMask), |
68 | m_handle(m_window, 0, 0, 100, 5, | ||
69 | ButtonPressMask | ButtonReleaseMask | | ||
70 | ButtonMotionMask | ExposureMask | | ||
71 | EnterWindowMask | LeaveWindowMask), | ||
72 | m_clientarea(m_window, 0, 0, 100, 100, | 72 | m_clientarea(m_window, 0, 0, 100, 100, |
73 | ButtonPressMask | ButtonReleaseMask | | 73 | ButtonPressMask | ButtonReleaseMask | |
74 | ButtonMotionMask | ExposureMask | | 74 | ButtonMotionMask | ExposureMask | |
@@ -432,9 +432,10 @@ void FbWinFrame::hideHandle() { | |||
432 | void FbWinFrame::showHandle() { | 432 | void FbWinFrame::showHandle() { |
433 | if (m_use_handle) | 433 | if (m_use_handle) |
434 | return; | 434 | return; |
435 | |||
435 | m_handle.show(); | 436 | m_handle.show(); |
436 | m_grip_left.show(); | 437 | m_handle.showSubwindows(); // shows grips |
437 | m_grip_right.show(); | 438 | |
438 | m_use_handle = true; | 439 | m_use_handle = true; |
439 | m_window.resize(m_window.width(), m_window.height() + m_handle.height() + | 440 | m_window.resize(m_window.width(), m_window.height() + m_handle.height() + |
440 | m_handle.borderWidth()); | 441 | m_handle.borderWidth()); |
@@ -640,17 +641,16 @@ void FbWinFrame::reconfigure() { | |||
640 | // align handle and grips | 641 | // align handle and grips |
641 | const int grip_height = m_handle.height(); | 642 | const int grip_height = m_handle.height(); |
642 | const int grip_width = 20; //TODO | 643 | const int grip_width = 20; //TODO |
643 | 644 | const int handle_bw = static_cast<signed>(m_handle.borderWidth()); | |
645 | |||
644 | const int ypos = m_window.height() - grip_height - m_handle.borderWidth(); | 646 | const int ypos = m_window.height() - grip_height - m_handle.borderWidth(); |
647 | m_handle.moveResize(-handle_bw, ypos, | ||
648 | m_window.width(), grip_height); | ||
645 | 649 | ||
646 | m_grip_left.moveResize(-m_handle.borderWidth(), ypos, | 650 | m_grip_left.moveResize(-handle_bw, -handle_bw, |
647 | grip_width, grip_height); | 651 | grip_width, grip_height); |
648 | 652 | ||
649 | m_handle.moveResize(grip_width, ypos, | 653 | m_grip_right.moveResize(m_handle.width() - grip_width - handle_bw, -handle_bw, |
650 | m_window.width() - grip_width*2 - m_handle.borderWidth()*2, | ||
651 | grip_height); | ||
652 | |||
653 | m_grip_right.moveResize(m_window.width() - grip_width - m_handle.borderWidth(), ypos, | ||
654 | grip_width, grip_height); | 654 | grip_width, grip_height); |
655 | } | 655 | } |
656 | } | 656 | } |
@@ -881,6 +881,10 @@ void FbWinFrame::renderHandles() { | |||
881 | } | 881 | } |
882 | } | 882 | } |
883 | 883 | ||
884 | m_handle.setAlpha(theme().alpha()); | ||
885 | m_handle.clear(); | ||
886 | m_handle.updateTransparent(); | ||
887 | |||
884 | m_grip_left.setAlpha(theme().alpha()); | 888 | m_grip_left.setAlpha(theme().alpha()); |
885 | m_grip_left.clear(); | 889 | m_grip_left.clear(); |
886 | m_grip_left.updateTransparent(); | 890 | m_grip_left.updateTransparent(); |
@@ -889,10 +893,6 @@ void FbWinFrame::renderHandles() { | |||
889 | m_grip_right.clear(); | 893 | m_grip_right.clear(); |
890 | m_grip_right.updateTransparent(); | 894 | m_grip_right.updateTransparent(); |
891 | 895 | ||
892 | m_handle.setAlpha(theme().alpha()); | ||
893 | m_handle.clear(); | ||
894 | m_handle.updateTransparent(); | ||
895 | |||
896 | } | 896 | } |
897 | 897 | ||
898 | void FbWinFrame::renderButtons() { | 898 | void FbWinFrame::renderButtons() { |
@@ -940,6 +940,8 @@ void FbWinFrame::init() { | |||
940 | 940 | ||
941 | m_current_label = 0; // no focused button at first | 941 | m_current_label = 0; // no focused button at first |
942 | 942 | ||
943 | m_handle.showSubwindows(); | ||
944 | |||
943 | // clear pixmaps | 945 | // clear pixmaps |
944 | m_title_focused_pm = m_title_unfocused_pm = 0; | 946 | m_title_focused_pm = m_title_unfocused_pm = 0; |
945 | m_label_focused_pm = m_label_unfocused_pm = 0; | 947 | m_label_focused_pm = m_label_unfocused_pm = 0; |
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index f57ce32..6d218d4 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh | |||
@@ -19,7 +19,7 @@ | |||
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.hh,v 1.21 2003/09/24 14:02:25 rathnor Exp $ | 22 | // $Id: FbWinFrame.hh,v 1.22 2003/10/02 14:14:46 rathnor Exp $ |
23 | 23 | ||
24 | #ifndef FBWINFRAME_HH | 24 | #ifndef FBWINFRAME_HH |
25 | #define FBWINFRAME_HH | 25 | #define FBWINFRAME_HH |
@@ -224,9 +224,9 @@ private: | |||
224 | FbTk::FbWindow m_window; ///< base window that holds each decorations (ie titlebar, handles) | 224 | FbTk::FbWindow m_window; ///< base window that holds each decorations (ie titlebar, handles) |
225 | FbTk::FbWindow m_titlebar; ///< titlebar window | 225 | FbTk::FbWindow m_titlebar; ///< titlebar window |
226 | FbTk::FbWindow m_label; ///< holds title | 226 | FbTk::FbWindow m_label; ///< holds title |
227 | FbTk::FbWindow m_handle; ///< handle between grips | ||
227 | FbTk::FbWindow m_grip_right, ///< rightgrip | 228 | FbTk::FbWindow m_grip_right, ///< rightgrip |
228 | m_grip_left; ///< left grip | 229 | m_grip_left; ///< left grip |
229 | FbTk::FbWindow m_handle; ///< handle between grips | ||
230 | FbTk::FbWindow m_clientarea; ///< window that holds client window @see setClientWindow | 230 | FbTk::FbWindow m_clientarea; ///< window that holds client window @see setClientWindow |
231 | //@} | 231 | //@} |
232 | typedef std::vector<FbTk::Button *> ButtonList; | 232 | typedef std::vector<FbTk::Button *> ButtonList; |