mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
changed stuff in WMSetBoxExpandsToParent
This commit is contained in:
@@ -649,7 +649,7 @@ static void drawRow(WMTableView *table, int row, WMRect clipRect)
|
|||||||
int i;
|
int i;
|
||||||
WMRange cols = columnsInRect(table, clipRect);
|
WMRange cols = columnsInRect(table, clipRect);
|
||||||
WMTableColumn *column;
|
WMTableColumn *column;
|
||||||
|
|
||||||
for (i = cols.position; i < cols.position+cols.count; i++) {
|
for (i = cols.position; i < cols.position+cols.count; i++) {
|
||||||
column = WMGetFromArray(table->columns, i);
|
column = WMGetFromArray(table->columns, i);
|
||||||
|
|
||||||
@@ -718,10 +718,13 @@ static void repaintTable(WMTableView *table, int x, int y,
|
|||||||
table->rows * table->rowHeight + 1);
|
table->rows * table->rowHeight + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (x >= table->tableWidth-1)
|
||||||
|
return;
|
||||||
|
|
||||||
rect.pos = wmkpoint(x,y);
|
rect.pos = wmkpoint(x,y);
|
||||||
rect.size = wmksize(width, height);
|
rect.size = wmksize(width, height);
|
||||||
|
|
||||||
if (table->drawsGrid) {
|
if (table->drawsGrid) {
|
||||||
drawGrid(table, rect);
|
drawGrid(table, rect);
|
||||||
}
|
}
|
||||||
@@ -793,6 +796,9 @@ void WMReloadTableView(WMTableView *table)
|
|||||||
{
|
{
|
||||||
WMRect rect = WMGetScrollViewVisibleRect(table->scrollView);
|
WMRect rect = WMGetScrollViewVisibleRect(table->scrollView);
|
||||||
|
|
||||||
|
if (table->editingRow >= 0)
|
||||||
|
stopRowEdit(table, table->editingRow);
|
||||||
|
|
||||||
/* when this is called, nothing in the table can be assumed to be
|
/* when this is called, nothing in the table can be assumed to be
|
||||||
* like the last time we accessed it (ie, rows might have disappeared) */
|
* like the last time we accessed it (ie, rows might have disappeared) */
|
||||||
|
|
||||||
|
|||||||
1761
WINGs/WINGs.h
Normal file
1761
WINGs/WINGs.h
Normal file
File diff suppressed because it is too large
Load Diff
22
WINGs/wbox.c
22
WINGs/wbox.c
@@ -23,6 +23,11 @@ typedef struct W_Box {
|
|||||||
|
|
||||||
short borderWidth;
|
short borderWidth;
|
||||||
|
|
||||||
|
int topOffs;
|
||||||
|
int bottomOffs;
|
||||||
|
int leftOffs;
|
||||||
|
int rightOffs;
|
||||||
|
|
||||||
unsigned horizontal:1;
|
unsigned horizontal:1;
|
||||||
} Box;
|
} Box;
|
||||||
|
|
||||||
@@ -53,8 +58,11 @@ static void resizedParent(void *self, WMNotification *notif)
|
|||||||
{
|
{
|
||||||
WMView *view = (WMView*)WMGetNotificationObject(notif);
|
WMView *view = (WMView*)WMGetNotificationObject(notif);
|
||||||
WMSize size = WMGetViewSize(view);
|
WMSize size = WMGetViewSize(view);
|
||||||
|
WMBox *box = (WMBox*)self;
|
||||||
|
|
||||||
WMResizeWidget((WMWidget*)self, size.width, size.height);
|
WMMoveWidget(box, box->leftOffs, box->topOffs);
|
||||||
|
WMResizeWidget(box, size.width - (box->leftOffs + box->rightOffs),
|
||||||
|
size.height - (box->topOffs + box->bottomOffs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -242,16 +250,24 @@ WMSetBoxHorizontal(WMBox *box, Bool flag)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetBoxExpandsToParent(WMBox *box)
|
WMSetBoxExpandsToParent(WMBox *box, int topOffs, int bottomOffs,
|
||||||
|
int leftOffs, int rightOffs)
|
||||||
{
|
{
|
||||||
WMSize size = W_VIEW(box)->parent->size;
|
WMSize size = W_VIEW(box)->parent->size;
|
||||||
|
|
||||||
|
box->topOffs = topOffs;
|
||||||
|
box->bottomOffs = bottomOffs;
|
||||||
|
box->leftOffs = leftOffs;
|
||||||
|
box->rightOffs = rightOffs;
|
||||||
|
|
||||||
WMAddNotificationObserver(resizedParent, box,
|
WMAddNotificationObserver(resizedParent, box,
|
||||||
WMViewSizeDidChangeNotification,
|
WMViewSizeDidChangeNotification,
|
||||||
W_VIEW(box)->parent);
|
W_VIEW(box)->parent);
|
||||||
WMSetViewNotifySizeChanges(W_VIEW(box)->parent, True);
|
WMSetViewNotifySizeChanges(W_VIEW(box)->parent, True);
|
||||||
|
|
||||||
WMResizeWidget(box, size.width, size.height);
|
WMMoveWidget(box, leftOffs, topOffs);
|
||||||
|
WMResizeWidget(box, size.width - (leftOffs + rightOffs),
|
||||||
|
size.height - (topOffs + bottomOffs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ WMCreateAlertPanel(WMScreen *scrPtr, WMWindow *owner,
|
|||||||
WMSetWindowTitle(panel->win, "");
|
WMSetWindowTitle(panel->win, "");
|
||||||
|
|
||||||
panel->vbox = WMCreateBox(panel->win);
|
panel->vbox = WMCreateBox(panel->win);
|
||||||
WMSetBoxExpandsToParent(panel->vbox);
|
WMSetBoxExpandsToParent(panel->vbox, 0, 0, 0, 0);
|
||||||
WMSetBoxHorizontal(panel->vbox, False);
|
WMSetBoxHorizontal(panel->vbox, False);
|
||||||
WMMapWidget(panel->vbox);
|
WMMapWidget(panel->vbox);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user