mirror of https://github.com/adamdruppe/arsd.git
oops
This commit is contained in:
parent
4bf8ef8e59
commit
a2c223a750
17
minigui.d
17
minigui.d
|
@ -7856,7 +7856,7 @@ class TableView : Widget {
|
||||||
return SendMessage(hwnd, LVM_GETCOLUMNWIDTH, cast(WPARAM) i, 0);
|
return SendMessage(hwnd, LVM_GETCOLUMNWIDTH, cast(WPARAM) i, 0);
|
||||||
auto w = columns[i].width;
|
auto w = columns[i].width;
|
||||||
if(w == -1)
|
if(w == -1)
|
||||||
return 50; // idk, just give it some space so the percents aren't COMPLETELY off
|
return 50; // idk, just give it some space so the percents aren't COMPLETELY off FIXME
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8221,10 +8221,14 @@ private class TableViewWidgetInner : Widget {
|
||||||
// FIXME: add a fixed header to the SMW
|
// FIXME: add a fixed header to the SMW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum padding = 3;
|
||||||
|
|
||||||
void updateScrolls() {
|
void updateScrolls() {
|
||||||
int w;
|
int w;
|
||||||
foreach(column; tvw.columns)
|
foreach(idx, column; tvw.columns) {
|
||||||
w += column.width;
|
if(column.width == 0) continue;
|
||||||
|
w += tvw.getActualSetSize(idx, false);// + padding;
|
||||||
|
}
|
||||||
smw.setTotalArea(w, tvw.itemCount);
|
smw.setTotalArea(w, tvw.itemCount);
|
||||||
columnsWidth = w;
|
columnsWidth = w;
|
||||||
}
|
}
|
||||||
|
@ -8245,17 +8249,11 @@ private class TableViewWidgetInner : Widget {
|
||||||
|
|
||||||
int row = smw.position.y;
|
int row = smw.position.y;
|
||||||
|
|
||||||
enum padding = 3;
|
|
||||||
|
|
||||||
foreach(lol; 0 .. this.height / lh) {
|
foreach(lol; 0 .. this.height / lh) {
|
||||||
if(row >= tvw.itemCount)
|
if(row >= tvw.itemCount)
|
||||||
break;
|
break;
|
||||||
x = 0;
|
x = 0;
|
||||||
foreach(columnNumber, column; tvw.columns) {
|
foreach(columnNumber, column; tvw.columns) {
|
||||||
|
|
||||||
if(column.width == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
auto x2 = x + column.calculatedWidth;
|
auto x2 = x + column.calculatedWidth;
|
||||||
auto smwx = smw.position.x;
|
auto smwx = smw.position.x;
|
||||||
|
|
||||||
|
@ -8268,6 +8266,7 @@ private class TableViewWidgetInner : Widget {
|
||||||
case TextAlignment.Right: endX -= padding; break;
|
case TextAlignment.Right: endX -= padding; break;
|
||||||
default: /* broken */ break;
|
default: /* broken */ break;
|
||||||
}
|
}
|
||||||
|
if(column.width != 0) // no point drawing an invisible column
|
||||||
tvw.getData(row, cast(int) columnNumber, (info) {
|
tvw.getData(row, cast(int) columnNumber, (info) {
|
||||||
// auto clip = painter.setClipRectangle(
|
// auto clip = painter.setClipRectangle(
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue