mirror of https://github.com/buggins/dlangui.git
fix SimpleTextFormatter
This commit is contained in:
parent
3cb8c86d22
commit
a42c8c0806
|
@ -341,7 +341,7 @@ extern (C) int UIAppMain(string[] args) {
|
|||
window.close();
|
||||
return true;
|
||||
} else if (a.id == 41) {
|
||||
window.showMessageBox(UIString("About"d), UIString("DLangUI demo app\n(C) Vadim Lopatin, 2014\nhttp://github.com/buggins/dlangui\n"d));
|
||||
window.showMessageBox(UIString("About"d), UIString("DLangUI demo app\n(C) Vadim Lopatin, 2014\nhttp://github.com/buggins/dlangui"d));
|
||||
return true;
|
||||
} else if (a.id == ACTION_FILE_OPEN) {
|
||||
UIString caption;
|
||||
|
|
|
@ -481,7 +481,7 @@ struct SimpleTextFormatter {
|
|||
if (ch == '\n' || i == charsMeasured) {
|
||||
// split by EOL char or at end of text
|
||||
dstring line = cast(dstring)text[lineStart .. i];
|
||||
int lineEndX = (i == charsMeasured) || (i == lineStart) ? lineStartX : widths[i - 1];
|
||||
int lineEndX = (i == lineStart) ? lineStartX : widths[i - 1];
|
||||
int lineWidth = lineEndX - lineStartX;
|
||||
sz.y += lineHeight;
|
||||
if (sz.x < lineWidth)
|
||||
|
|
Loading…
Reference in New Issue