diff options
author | rathnor <rathnor> | 2003-11-19 12:57:27 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-11-19 12:57:27 (GMT) |
commit | d757c08e006dea8147d8219ea2e0ca1c84c9cf7e (patch) | |
tree | c9e803cdfebffccd5f8f6581233511ac6556580c /src/IconButton.cc | |
parent | 8dcca17e1d87375ebb4773e87ebbdb4a1b78ea7a (diff) | |
download | fluxbox-d757c08e006dea8147d8219ea2e0ca1c84c9cf7e.zip fluxbox-d757c08e006dea8147d8219ea2e0ca1c84c9cf7e.tar.bz2 |
some menu tweaking
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r-- | src/IconButton.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc index bc0c9d5..20fca8a 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: IconButton.cc,v 1.11 2003/10/31 20:02:49 rathnor Exp $ | 23 | // $Id: IconButton.cc,v 1.12 2003/11/19 12:57:27 rathnor Exp $ |
24 | 24 | ||
25 | #include "IconButton.hh" | 25 | #include "IconButton.hh" |
26 | 26 | ||
@@ -53,18 +53,7 @@ public: | |||
53 | int x = event.xbutton.x_root - (m_win.menu().width() / 2); | 53 | int x = event.xbutton.x_root - (m_win.menu().width() / 2); |
54 | int y = event.xbutton.y_root - (m_win.menu().height() / 2); | 54 | int y = event.xbutton.y_root - (m_win.menu().height() / 2); |
55 | 55 | ||
56 | if (x < 0) | 56 | m_win.showMenu(x, y); |
57 | x = 0; | ||
58 | else if (x + m_win.menu().width() > m_win.screen().width()) | ||
59 | x = m_win.screen().width() - m_win.menu().width(); | ||
60 | |||
61 | if (y < 0) | ||
62 | y = 0; | ||
63 | else if (y + m_win.menu().height() > m_win.screen().height()) | ||
64 | y = m_win.screen().height() - m_win.menu().height(); | ||
65 | |||
66 | m_win.menu().move(x, y); | ||
67 | m_win.menu().show(); | ||
68 | } | 57 | } |
69 | private: | 58 | private: |
70 | FluxboxWindow &m_win; | 59 | FluxboxWindow &m_win; |