Length = length;
ChangedText = changedText;
}
+ public TextChange Inverse (string src)
+ => new TextChange (Start, string.IsNullOrEmpty (ChangedText) ? 0 : ChangedText.Length,
+ Length == 0 ? "" : src.AsSpan (Start, Length).ToString ());
}
}
void Command_ValueChanged (object sender, ValueChangeEventArgs e)
{
string mName = e.MemberName;
- if (mName == "CanExecute")
+ if (mName == "CanExecute") {
mName = "IsEnabled";
+ RegisterForRedraw ();
+ }
NotifyValueChanged (mName, e.NewValue);
}
}
RectangleD lineRect = new RectangleD (
- Width.IsFit && !Multiline ? cb.X : (int)getX (cb.Width, lines[i]) + cb.X,
+ (int)getX (cb.Width, lines[i]) + cb.X,
y + cb.Top, lines[i].LengthInPixel, lineHeight);
if (encodedBytes > 0) {
return;
TextLine ls = lines[loc.Line];
ReadOnlySpan<char> curLine = _text.GetLine (ls);
- double cPos = Width.IsFit && !Multiline ? 0 : getX (clientWidth, ls);
+ double cPos = getX (clientWidth, ls);
if (loc.Column >= 0) {
//int encodedBytes = Crow.Text.Encoding2.ToUtf8 (curLine.Slice (0, loc.Column), bytes);
isVisible = value;
- if (Visible)
- RegisterForLayouting (LayoutingType.Sizing);
- else
+ if (!Visible)
unshownPostActions ();
+ RegisterForLayouting (LayoutingType.Sizing);
NotifyValueChangedAuto (isVisible);
}
}
void paintDisabled(Context gr, Rectangle rb){
gr.Operator = Operator.Xor;
- gr.SetSource (0.6, 0.6, 0.6, 0.3);
+ gr.SetSource (0.1, 0.1, 0.1, 0.8);
gr.Rectangle (rb);
gr.Fill ();
gr.Operator = Operator.Over;