1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-21 01:05:45 +01:00

various fixes, scrollview scrollers, text painting

This commit is contained in:
kojima
2001-02-20 23:38:36 +00:00
parent 4521852297
commit affcc3babd
12 changed files with 272 additions and 87 deletions

View File

@@ -23,11 +23,6 @@ typedef struct W_Box {
short borderWidth;
int topOffs;
int bottomOffs;
int leftOffs;
int rightOffs;
unsigned horizontal:1;
} Box;
@@ -54,18 +49,6 @@ static W_ViewDelegate delegate = {
static void resizedParent(void *self, WMNotification *notif)
{
WMView *view = (WMView*)WMGetNotificationObject(notif);
WMSize size = WMGetViewSize(view);
WMBox *box = (WMBox*)self;
WMMoveWidget(box, box->leftOffs, box->topOffs);
WMResizeWidget(box, size.width - (box->leftOffs + box->rightOffs),
size.height - (box->topOffs + box->bottomOffs));
}
WMBox*
WMCreateBox(WMWidget *parent)
{
@@ -249,28 +232,6 @@ WMSetBoxHorizontal(WMBox *box, Bool flag)
}
void
WMSetBoxExpandsToParent(WMBox *box, int topOffs, int bottomOffs,
int leftOffs, int rightOffs)
{
WMSize size = W_VIEW(box)->parent->size;
box->topOffs = topOffs;
box->bottomOffs = bottomOffs;
box->leftOffs = leftOffs;
box->rightOffs = rightOffs;
WMAddNotificationObserver(resizedParent, box,
WMViewSizeDidChangeNotification,
W_VIEW(box)->parent);
WMSetViewNotifySizeChanges(W_VIEW(box)->parent, True);
WMMoveWidget(box, leftOffs, topOffs);
WMResizeWidget(box, size.width - (leftOffs + rightOffs),
size.height - (topOffs + bottomOffs));
}
static void
destroyBox(Box *bPtr)
{