random fixes

This commit is contained in:
Adam D. Ruppe 2025-07-20 13:57:11 -04:00
parent 54ceabc404
commit db7db199a2
3 changed files with 14 additions and 1 deletions

View File

@ -671,6 +671,9 @@ class DiscordGatewayConnection {
if(closeEvent.code == 1006 || closeEvent.code == 1001) {
reconnectAndResume();
} else if(closeEvent.code == 4004) {
// auth failed
throw new Exception("Authentication failed");
} else {
// otherwise, unless we were asked by the api user to close, let's try reconnecting
// since discord just does discord things.

View File

@ -7555,6 +7555,11 @@ class HorizontalScrollbar : ScrollbarBase {
}
}
version(custom_widgets)
override void dpiChanged() {
thumb.thumbHeight = scaleWithDpi(16);
}
override int minHeight() { return scaleWithDpi(16); }
override int maxHeight() { return scaleWithDpi(16); }
override int minWidth() { return scaleWithDpi(48); }
@ -7677,6 +7682,11 @@ class VerticalScrollbar : ScrollbarBase {
}
}
version(custom_widgets)
override void dpiChanged() {
thumb.thumbWidth = scaleWithDpi(16);
}
override int minWidth() { return scaleWithDpi(16); }
override int maxWidth() { return scaleWithDpi(16); }
override int minHeight() { return scaleWithDpi(48); }

2
pcx.d
View File

@ -478,7 +478,7 @@ void writeNum(T, string es="LE", ST) (auto ref ST st, T n) if (isGoodEndianness!
} else {
import core.stdc.string : memcpy;
ubyte[T.sizeof] b = void;
memcpy(b.ptr, &v, T.sizeof);
memcpy(b.ptr, &n, T.sizeof);
mixin(reverseBytesMixin);
st.rawWriteExact(b[]);
}