mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-05 00:50:53 +00:00
text shadow
This commit is contained in:
@@ -52,6 +52,11 @@ MWDECL const char* MwDefaultDarkSubBackground;
|
|||||||
*/
|
*/
|
||||||
MWDECL const char* MwDefaultDarkSubForeground;
|
MWDECL const char* MwDefaultDarkSubForeground;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief Default shadow difference
|
||||||
|
*/
|
||||||
|
MWDECL const int MwDefaultShadow;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Gets default border width
|
* @brief Gets default border width
|
||||||
* @param handle Widget
|
* @param handle Widget
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ const char* MwDefaultDarkForeground = "#ddd";
|
|||||||
const char* MwDefaultDarkSubBackground = "#333";
|
const char* MwDefaultDarkSubBackground = "#333";
|
||||||
const char* MwDefaultDarkSubForeground = "#ddd";
|
const char* MwDefaultDarkSubForeground = "#ddd";
|
||||||
|
|
||||||
|
const int MwDefaultShadow = -32;
|
||||||
|
|
||||||
int MwDefaultBorderWidth(MwWidget handle) {
|
int MwDefaultBorderWidth(MwWidget handle) {
|
||||||
int bw = MwGetInteger(handle, MwNborderWidth);
|
int bw = MwGetInteger(handle, MwNborderWidth);
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ static void draw(MwWidget handle) {
|
|||||||
MwPoint p;
|
MwPoint p;
|
||||||
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
||||||
MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground));
|
MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground));
|
||||||
MwLLColor shadow = MwLightenColor(handle, base, -32, -32, -32);
|
MwLLColor shadow = MwLightenColor(handle, base, MwDefaultShadow, MwDefaultShadow, MwDefaultShadow);
|
||||||
int align;
|
int align;
|
||||||
const char* str = MwGetText(handle, MwNtext);
|
const char* str = MwGetText(handle, MwNtext);
|
||||||
MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap);
|
MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap);
|
||||||
@@ -317,6 +317,13 @@ static void draw(MwWidget handle) {
|
|||||||
p.x = r.width - MwTextWidth(handle, str) / 2;
|
p.x = r.width - MwTextWidth(handle, str) / 2;
|
||||||
}
|
}
|
||||||
p.y = r.height / 2;
|
p.y = r.height / 2;
|
||||||
|
|
||||||
|
p.x += 1;
|
||||||
|
p.y += 1;
|
||||||
|
MwDrawText(handle, &p, str, MwGetInteger(handle, MwNbold), MwALIGNMENT_CENTER, shadow);
|
||||||
|
|
||||||
|
p.x -= 1;
|
||||||
|
p.y -= 1;
|
||||||
MwDrawText(handle, &p, str, MwGetInteger(handle, MwNbold), MwALIGNMENT_CENTER, text);
|
MwDrawText(handle, &p, str, MwGetInteger(handle, MwNbold), MwALIGNMENT_CENTER, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,8 +91,7 @@ for (my $i = 0 ; $i < 2 ; $i++) {
|
|||||||
foreach my $obj (@objs) {
|
foreach my $obj (@objs) {
|
||||||
print(OUT "\$ WRITE LINK_OPT \"$obj\"\n");
|
print(OUT "\$ WRITE LINK_OPT \"$obj\"\n");
|
||||||
}
|
}
|
||||||
print(OUT
|
print(OUT "\$ WRITE LINK_OPT \"SYS\$LIBRARY:DECW\$XLIBSHR/SHARE\"\n");
|
||||||
"\$ WRITE LINK_OPT \"SYS\$LIBRARY:DECW\$XLIBSHR/SHARE\"\n");
|
|
||||||
print(OUT "\$ WRITE LINK_OPT \"SYS\$LIBRARY:DPML\$SHR/SHARE\"\n");
|
print(OUT "\$ WRITE LINK_OPT \"SYS\$LIBRARY:DPML\$SHR/SHARE\"\n");
|
||||||
print(OUT "\$ CLOSE LINK_OPT\n");
|
print(OUT "\$ CLOSE LINK_OPT\n");
|
||||||
print(OUT "\$ link /SHAREABLE=[.src]MwSHR.exe LINK.OPT/options\n");
|
print(OUT "\$ link /SHAREABLE=[.src]MwSHR.exe LINK.OPT/options\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user