Support slightly rounded window corners too

This commit is contained in:
Elias Batek 2024-09-10 02:29:59 +02:00
parent b6b12995f9
commit a9a596dc20
1 changed files with 13 additions and 3 deletions

View File

@ -1229,7 +1229,7 @@ version(Windows) {
DWM_WINDOW_CORNER_PREFERENCE value,
out CornerStyle result,
) @safe pure nothrow @nogc {
switch(value) with (DWM_WINDOW_CORNER_PREFERENCE) {
switch (value) with (DWM_WINDOW_CORNER_PREFERENCE) {
case DWMWCP_DEFAULT:
result = CornerStyle.automatic;
return true;
@ -1237,9 +1237,11 @@ version(Windows) {
result = CornerStyle.rectangular;
return true;
case DWMWCP_ROUND:
case DWMWCP_ROUNDSMALL:
result = CornerStyle.rounded;
return true;
case DWMWCP_ROUNDSMALL:
result = CornerStyle.roundedSlightly;
return true;
default:
return false;
}
@ -1249,7 +1251,7 @@ version(Windows) {
CornerStyle value,
out DWM_WINDOW_CORNER_PREFERENCE result,
) @safe pure nothrow @nogc {
final switch(value) with (DWM_WINDOW_CORNER_PREFERENCE) {
final switch (value) with (DWM_WINDOW_CORNER_PREFERENCE) {
case CornerStyle.automatic:
result = DWMWCP_DEFAULT;
return true;
@ -1259,6 +1261,9 @@ version(Windows) {
case CornerStyle.rounded:
result = DWMWCP_ROUND;
return true;
case CornerStyle.roundedSlightly:
result = DWMWCP_ROUNDSMALL;
return true;
}
}
@ -1908,6 +1913,11 @@ enum CornerStyle {
Prefer rounded window corners
+/
rounded,
/++
Prefer slightly-rounded window corners
+/
roundedSlightly,
}
/++