mirror of https://github.com/buggins/dlangui.git
fix underline; log widget improvements
This commit is contained in:
parent
bfd5f48589
commit
5bfb363744
|
@ -377,9 +377,8 @@ class Font : RefCountedObject {
|
||||||
dchar ch = text[i];
|
dchar ch = text[i];
|
||||||
uint color = i < charProps.length ? charProps[i].color : charProps[$ - 1].color;
|
uint color = i < charProps.length ? charProps[i].color : charProps[$ - 1].color;
|
||||||
customizedTextFlags = (i < charProps.length ? charProps[i].textFlags : charProps[$ - 1].textFlags) | textFlags;
|
customizedTextFlags = (i < charProps.length ? charProps[i].textFlags : charProps[$ - 1].textFlags) | textFlags;
|
||||||
|
underline = (customizedTextFlags & TextFlag.Underline) != 0;
|
||||||
// turn off underline after hot key
|
// turn off underline after hot key
|
||||||
if (!(customizedTextFlags & TextFlag.Underline))
|
|
||||||
underline = false;
|
|
||||||
if (ch == '&' && (textFlags & (TextFlag.UnderlineHotKeys | TextFlag.HotKeys | TextFlag.UnderlineHotKeysWhenAltPressed))) {
|
if (ch == '&' && (textFlags & (TextFlag.UnderlineHotKeys | TextFlag.HotKeys | TextFlag.UnderlineHotKeysWhenAltPressed))) {
|
||||||
if (textFlags & (TextFlag.UnderlineHotKeys | TextFlag.UnderlineHotKeysWhenAltPressed))
|
if (textFlags & (TextFlag.UnderlineHotKeys | TextFlag.UnderlineHotKeysWhenAltPressed))
|
||||||
underline = true; // turn ON underline for hot key
|
underline = true; // turn ON underline for hot key
|
||||||
|
|
|
@ -2378,6 +2378,7 @@ class LogWidget : EditBox {
|
||||||
minFontSize(8).maxFontSize(32); // allow font zoom with Ctrl + MouseWheel
|
minFontSize(8).maxFontSize(32); // allow font zoom with Ctrl + MouseWheel
|
||||||
onThemeChanged();
|
onThemeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// append lines to the end of text
|
/// append lines to the end of text
|
||||||
void appendText(dstring text) {
|
void appendText(dstring text) {
|
||||||
if (text.length == 0)
|
if (text.length == 0)
|
||||||
|
|
Loading…
Reference in New Issue