mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-28 19:05:51 +01:00
changed panel to use boxes
This commit is contained in:
20
WINGs/wbox.c
20
WINGs/wbox.c
@@ -47,6 +47,16 @@ static W_ViewDelegate delegate = {
|
||||
|
||||
|
||||
|
||||
|
||||
static void resizedParent(void *self, WMNotification *notif)
|
||||
{
|
||||
WMView *view = (WMView*)WMGetNotificationObject(notif);
|
||||
WMSize size = WMGetViewSize(view);
|
||||
|
||||
WMResizeWidget((WMWidget*)self, size.width, size.height);
|
||||
}
|
||||
|
||||
|
||||
WMBox*
|
||||
WMCreateBox(WMWidget *parent)
|
||||
{
|
||||
@@ -213,6 +223,16 @@ WMSetBoxHorizontal(WMBox *box, Bool flag)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetBoxExpandsToParent(WMBox *box)
|
||||
{
|
||||
WMAddNotificationObserver(resizedParent, box,
|
||||
WMViewSizeDidChangeNotification,
|
||||
W_VIEW(box)->parent);
|
||||
WMSetViewNotifySizeChanges(W_VIEW(box)->parent, True);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
destroyBox(Box *bPtr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user