mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-24 03:05:48 +01:00
many bug fixes, finished some delegate code, updated menu file bug from EXEC
to SHEXEC, updated french translations
This commit is contained in:
@@ -37,12 +37,14 @@ typedef struct W_Slider {
|
||||
|
||||
|
||||
|
||||
static void resizeSlider();
|
||||
static void didResizeSlider();
|
||||
|
||||
|
||||
W_ViewProcedureTable _SliderViewProcedures = {
|
||||
W_ViewDelegate _SliderViewDelegate = {
|
||||
NULL,
|
||||
resizeSlider,
|
||||
NULL,
|
||||
didResizeSlider,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -82,6 +84,8 @@ WMCreateSlider(WMWidget *parent)
|
||||
}
|
||||
sPtr->view->self = sPtr;
|
||||
|
||||
sPtr->view->delegate = &_SliderViewDelegate;
|
||||
|
||||
WMCreateEventHandler(sPtr->view, ExposureMask|StructureNotifyMask,
|
||||
handleEvents, sPtr);
|
||||
|
||||
@@ -300,13 +304,15 @@ realizeSlider(Slider *sPtr)
|
||||
|
||||
|
||||
static void
|
||||
resizeSlider(Slider *sPtr, unsigned int width, unsigned int height)
|
||||
didResizeSlider(W_ViewDelegate *self, WMView *view)
|
||||
{
|
||||
Slider *sPtr = (Slider*)view->self;
|
||||
int width = sPtr->view->size.width;
|
||||
int height = sPtr->view->size.height;
|
||||
|
||||
assert(width > 0);
|
||||
assert(height > 0);
|
||||
|
||||
W_ResizeView(sPtr->view, width, height);
|
||||
|
||||
if (width > height) {
|
||||
if (sPtr->flags.vertical) {
|
||||
sPtr->flags.vertical = 0;
|
||||
|
||||
Reference in New Issue
Block a user