… | |
… | |
4 | * |
4 | * |
5 | * Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA> |
5 | * Copyright (c) 1997,1998 mj olesen <olesen@me.QueensU.CA> |
6 | * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> |
6 | * Copyright (c) 1998 Alfredo K. Kojima <kojima@windowmaker.org> |
7 | * - N*XTstep like scrollbars |
7 | * - N*XTstep like scrollbars |
8 | * Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com> |
8 | * Copyright (c) 1999-2001 Geoff Wing <gcw@pobox.com> |
9 | * Copyright (c) 2004-2006 Marc Lehmann <pcg@goof.com> |
9 | * Copyright (c) 2004-2006 Marc Lehmann <schmorp@schmorp.de> |
10 | * |
10 | * |
11 | * This program is free software; you can redistribute it and/or modify |
11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by |
12 | * it under the terms of the GNU General Public License as published by |
13 | * the Free Software Foundation; either version 2 of the License, or |
13 | * the Free Software Foundation; either version 2 of the License, or |
14 | * (at your option) any later version. |
14 | * (at your option) any later version. |
… | |
… | |
264 | SB_LEFT_PADDING, bot + SB_PADDING, |
264 | SB_LEFT_PADDING, bot + SB_PADDING, |
265 | SB_BUTTON_WIDTH, (last_bot - bot)); |
265 | SB_BUTTON_WIDTH, (last_bot - bot)); |
266 | |
266 | |
267 | XFillRectangle (term->dpy, win, grayGC, |
267 | XFillRectangle (term->dpy, win, grayGC, |
268 | SB_LEFT_PADDING, top + SB_PADDING, |
268 | SB_LEFT_PADDING, top + SB_PADDING, |
269 | SB_BUTTON_WIDTH, len); |
269 | SB_BUTTON_WIDTH, bot - top); |
270 | |
270 | |
271 | XCopyArea (term->dpy, dimple, win, whiteGC, 0, 0, |
271 | XCopyArea (term->dpy, dimple, win, whiteGC, 0, 0, |
272 | SCROLLER_DIMPLE_WIDTH, SCROLLER_DIMPLE_HEIGHT, |
272 | SCROLLER_DIMPLE_WIDTH, SCROLLER_DIMPLE_HEIGHT, |
273 | (SB_WIDTH_NEXT - SCROLLER_DIMPLE_WIDTH) / 2, |
273 | (SB_WIDTH_NEXT - SCROLLER_DIMPLE_WIDTH) / 2, |
274 | top + SB_BEVEL_WIDTH_UPPER_LEFT + |
274 | top + SB_BEVEL_WIDTH_UPPER_LEFT + |
275 | (len - SCROLLER_DIMPLE_HEIGHT) / 2); |
275 | (bot - top - SCROLLER_DIMPLE_HEIGHT) / 2); |
276 | |
276 | |
277 | drawBevel (this, SB_BUTTON_BEVEL_X, |
277 | drawBevel (this, SB_BUTTON_BEVEL_X, |
278 | top + SB_PADDING, SB_BUTTON_WIDTH, |
278 | top + SB_PADDING, SB_BUTTON_WIDTH, |
279 | len); |
279 | bot - top); |
280 | drawBevel (this, SB_BUTTON_BEVEL_X, |
280 | drawBevel (this, SB_BUTTON_BEVEL_X, |
281 | height - SB_BUTTON_BOTH_HEIGHT, SB_BUTTON_WIDTH, |
281 | height - SB_BUTTON_BOTH_HEIGHT, SB_BUTTON_WIDTH, |
282 | SB_BUTTON_HEIGHT); |
282 | SB_BUTTON_HEIGHT); |
283 | drawBevel (this, SB_BUTTON_BEVEL_X, |
283 | drawBevel (this, SB_BUTTON_BEVEL_X, |
284 | height - SB_BUTTON_SINGLE_HEIGHT, SB_BUTTON_WIDTH, |
284 | height - SB_BUTTON_SINGLE_HEIGHT, SB_BUTTON_WIDTH, |