mirror of https://github.com/buggins/dlangui.git
Merge pull request #603 from Maeriden/maeriden
Fix for call to to!string and deprecation warnings
This commit is contained in:
commit
84324e417e
|
@ -498,7 +498,7 @@ final class Setting {
|
||||||
case UINTEGER:
|
case UINTEGER:
|
||||||
return to!string(_store.uinteger);
|
return to!string(_store.uinteger);
|
||||||
case FLOAT:
|
case FLOAT:
|
||||||
return to!string(_store.floating);
|
return to!string(cast(double)_store.floating);
|
||||||
case TRUE:
|
case TRUE:
|
||||||
return "true";
|
return "true";
|
||||||
case FALSE:
|
case FALSE:
|
||||||
|
@ -519,7 +519,7 @@ final class Setting {
|
||||||
case UINTEGER:
|
case UINTEGER:
|
||||||
return to!string(_store.uinteger);
|
return to!string(_store.uinteger);
|
||||||
case FLOAT:
|
case FLOAT:
|
||||||
return to!string(_store.floating);
|
return to!string(cast(double)_store.floating);
|
||||||
case TRUE:
|
case TRUE:
|
||||||
return "true";
|
return "true";
|
||||||
case FALSE:
|
case FALSE:
|
||||||
|
|
|
@ -374,7 +374,7 @@ class FileDialog : Dialog, CustomGridCellAdapter {
|
||||||
return "----.--.-- --:--";
|
return "----.--.-- --:--";
|
||||||
} else {
|
} else {
|
||||||
//date = "%04d.%02d.%02d %02d:%02d:%02d".format(ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.second);
|
//date = "%04d.%02d.%02d %02d:%02d:%02d".format(ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.second);
|
||||||
return "%04d.%02d.%02d %02d:%02d".format(ts.year, ts.month, ts.day, ts.hour, ts.minute);
|
return "%04d.%02d.%02d %02d:%02d".format(ts.get.year, ts.get.month, ts.get.day, ts.get.hour, ts.get.minute);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,6 @@ struct CSSToken {
|
||||||
string text;
|
string text;
|
||||||
string dimensionUnit;
|
string dimensionUnit;
|
||||||
union {
|
union {
|
||||||
bool typeFlagId; // true if identifier is valid ID
|
|
||||||
struct {
|
struct {
|
||||||
long intValue = 0; // for number and dimension
|
long intValue = 0; // for number and dimension
|
||||||
double doubleValue = 0; // for number and dimension
|
double doubleValue = 0; // for number and dimension
|
||||||
|
@ -91,6 +90,7 @@ struct CSSToken {
|
||||||
uint unicodeRangeStart; // for unicodeRange (initialized to 0 via intValue=0)
|
uint unicodeRangeStart; // for unicodeRange (initialized to 0 via intValue=0)
|
||||||
uint unicodeRangeEnd; // for unicodeRange (initialized to 0 via intValue=0)
|
uint unicodeRangeEnd; // for unicodeRange (initialized to 0 via intValue=0)
|
||||||
}
|
}
|
||||||
|
bool typeFlagId; // true if identifier is valid ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -538,7 +538,7 @@ class FreeTypeFontManager : FontManager {
|
||||||
FontFileItem best = null;
|
FontFileItem best = null;
|
||||||
int bestScore = 0;
|
int bestScore = 0;
|
||||||
string[] faces = face ? split(face, ",") : null;
|
string[] faces = face ? split(face, ",") : null;
|
||||||
foreach(int index, FontFileItem item; _fontFiles) {
|
foreach(size_t index, FontFileItem item; _fontFiles) {
|
||||||
int score = 0;
|
int score = 0;
|
||||||
int bestFaceMatch = 0;
|
int bestFaceMatch = 0;
|
||||||
if (faces && face.length) {
|
if (faces && face.length) {
|
||||||
|
|
|
@ -120,7 +120,7 @@ bool visit(Node3d node, bool delegate(Node3d node) visitor) {
|
||||||
if (res)
|
if (res)
|
||||||
return true;
|
return true;
|
||||||
foreach(child; node.children) {
|
foreach(child; node.children) {
|
||||||
bool res = visit(child, visitor);
|
res = visit(child, visitor);
|
||||||
if (res)
|
if (res)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3556,8 +3556,9 @@ class EditBox : EditWidgetBase {
|
||||||
rc.offset(0, yOffset);
|
rc.offset(0, yOffset);
|
||||||
Rect[] wrappedSelection;
|
Rect[] wrappedSelection;
|
||||||
wrappedSelection.length = curSpan.len;
|
wrappedSelection.length = curSpan.len;
|
||||||
foreach (int i, wrapLineRect; wrappedSelection)
|
foreach (size_t i_, wrapLineRect; wrappedSelection)
|
||||||
{
|
{
|
||||||
|
int i = cast(int)i_;
|
||||||
int startingDifference = rc.left - _clientRect.left;
|
int startingDifference = rc.left - _clientRect.left;
|
||||||
wrapLineRect = rc;
|
wrapLineRect = rc;
|
||||||
wrapLineRect.offset(-1 * curSpan.accumulation(i, LineSpan.WrapPointInfo.Width), i * _lineHeight);
|
wrapLineRect.offset(-1 * curSpan.accumulation(i, LineSpan.WrapPointInfo.Width), i * _lineHeight);
|
||||||
|
@ -3906,8 +3907,9 @@ class EditBox : EditWidgetBase {
|
||||||
wrappedLine = _span[i].wrappedContent;
|
wrappedLine = _span[i].wrappedContent;
|
||||||
int accumulativeLength;
|
int accumulativeLength;
|
||||||
CustomCharProps[] wrapProps;
|
CustomCharProps[] wrapProps;
|
||||||
foreach (int q, curWrap; wrappedLine)
|
foreach (size_t q_, curWrap; wrappedLine)
|
||||||
{
|
{
|
||||||
|
int q = cast(int)q_;
|
||||||
auto lineOffset = q + i + wrapsUpTo(i + _firstVisibleLine);
|
auto lineOffset = q + i + wrapsUpTo(i + _firstVisibleLine);
|
||||||
if (highlight)
|
if (highlight)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue