mirror of https://github.com/adamdruppe/arsd.git
ugh tab bugs
This commit is contained in:
parent
b615f51ac8
commit
82558ba1c6
24
minigui.d
24
minigui.d
|
@ -1602,19 +1602,26 @@ class Widget {
|
|||
|
||||
foreach(child; children) {
|
||||
version(win32_widgets)
|
||||
if(child.hwnd) continue;
|
||||
if(child.useNativeDrawing()) continue;
|
||||
child.privatePaint(painter, painter.originX, painter.originY, actuallyPainted);
|
||||
}
|
||||
|
||||
version(win32_widgets)
|
||||
foreach(child; children) {
|
||||
if(child.hwnd){
|
||||
if(child.useNativeDrawing) {
|
||||
painter = child.simpleWindowWrappingHwnd.draw;
|
||||
child.privatePaint(painter, painter.originX, painter.originY, actuallyPainted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool useNativeDrawing() nothrow {
|
||||
version(win32_widgets)
|
||||
return hwnd !is null;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
static class RedrawEvent {}
|
||||
__gshared re = new RedrawEvent();
|
||||
|
||||
|
@ -3062,13 +3069,16 @@ class TabWidget : Widget {
|
|||
}
|
||||
|
||||
private void showOnly(int item) {
|
||||
foreach(idx, child; children)
|
||||
foreach(idx, child; children) {
|
||||
child.hide();
|
||||
}
|
||||
|
||||
foreach(idx, child; children) {
|
||||
if(idx == item) {
|
||||
child.show();
|
||||
recomputeChildLayout();
|
||||
} else {
|
||||
child.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5433,7 +5443,7 @@ int[2] getChildPositionRelativeToParentHwnd(Widget c) nothrow {
|
|||
x += par.x;
|
||||
y += par.y;
|
||||
par = par.parent;
|
||||
if(par !is null && par.hwnd !is null)
|
||||
if(par !is null && par.useNativeDrawing())
|
||||
break;
|
||||
}
|
||||
return [x, y];
|
||||
|
@ -5531,7 +5541,7 @@ class TextLabel : Widget {
|
|||
|
||||
override void paint(ScreenPainter painter) {
|
||||
painter.outlineColor = Color.black;
|
||||
painter.drawText(Point(0, 0), this.label, Point(width,height), alignment);
|
||||
painter.drawText(Point(0, 0), this.label, Point(width, height), alignment);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue