1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

WINGs: remove constants used for default width+height for the widget

As pointed by gcc, the height is never used and the code make use of the
SCROLLER_WIDTH constant anyway, so this patch updates the code to directly
use that constant instead of intermediate values that just adds noise for
code maintainability.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-12-08 22:42:27 +01:00
committed by Carlos R. Mafra
parent 03385c3d78
commit 781fd777eb

View File

@@ -64,8 +64,6 @@ typedef struct W_Scroller {
} flags;
} Scroller;
#define DEFAULT_HEIGHT 60
#define DEFAULT_WIDTH SCROLLER_WIDTH
#define DEFAULT_ARROWS_POSITION WSAMinEnd
#define BUTTON_SIZE ((SCROLLER_WIDTH) - 4)
@@ -108,7 +106,7 @@ WMScroller *WMCreateScroller(WMWidget * parent)
WMCreateEventHandler(sPtr->view, ExposureMask | StructureNotifyMask
| ClientMessageMask, handleEvents, sPtr);
W_ResizeView(sPtr->view, DEFAULT_WIDTH, DEFAULT_WIDTH);
W_ResizeView(sPtr->view, SCROLLER_WIDTH, SCROLLER_WIDTH);
sPtr->flags.arrowsPosition = DEFAULT_ARROWS_POSITION;
WMCreateEventHandler(sPtr->view, ButtonPressMask | ButtonReleaseMask