diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-01-30 09:42:37 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-01-30 09:42:37 +0100 |
| commit | 9fa17cdc9487e3ba92ef467c0c6d5d9941530de1 (patch) | |
| tree | 0ac2e35c537e132bfa16adc486e7481e166a150d /src/GraphicObjects/Popper.cs | |
| parent | 0bf825fce6f1946034dbea6b1f7eb8d0dacdab8a (diff) | |
NUnit try, renaming, debugging and uniformizating
Diffstat (limited to 'src/GraphicObjects/Popper.cs')
| -rw-r--r-- | src/GraphicObjects/Popper.cs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/GraphicObjects/Popper.cs b/src/GraphicObjects/Popper.cs index 5842faf8..15a209ce 100644 --- a/src/GraphicObjects/Popper.cs +++ b/src/GraphicObjects/Popper.cs @@ -27,7 +27,7 @@ namespace Crow }
#endregion
bool _isPopped;
- string title;
+ string caption;
string image;
GraphicObject _content;
@@ -66,15 +66,16 @@ namespace Crow if (tc == null)
return;
Rectangle r = this.ScreenCoordinates (this.Slot);
- if (e.LayoutType == LayoutingType.Width) {
+ if (((int)e.LayoutType & (int)LayoutingType.Width) > 0) {
if (Content.Slot.Width < tc.ClientRectangle.Width) {
if (r.Left + Content.Slot.Width > tc.ClientRectangle.Right)
Content.Left = tc.ClientRectangle.Right - Content.Slot.Width;
else
Content.Left = r.Left;
- }else
+ } else
Content.Left = 0;
- }else if (e.LayoutType == LayoutingType.Height) {
+ }
+ if (((int)e.LayoutType & (int)LayoutingType.Height) > 0) {
if (Content.Slot.Height < tc.ClientRectangle.Height) {
if (r.Bottom + Content.Slot.Height > tc.ClientRectangle.Bottom)
Content.Top = r.Top - Content.Slot.Height;
@@ -116,13 +117,13 @@ namespace Crow }
[XmlAttributeAttribute()][DefaultValue("Popper")]
- public string Title {
- get { return title; }
+ public string Caption {
+ get { return caption; }
set {
- if (title == value)
+ if (caption == value)
return;
- title = value;
- NotifyValueChanged ("Title", title);
+ caption = value;
+ NotifyValueChanged ("Caption", caption);
}
}
[XmlAttributeAttribute()][DefaultValue("#Crow.Images.Icons.expandable.svg")]
@@ -165,6 +166,7 @@ namespace Crow if (Content.Parent == null)
tc.AddWidget (Content);
tc.PutOnTop (Content);
+ _content_LayoutChanged (this, new LayoutChangeEventArgs (LayoutingType.Sizing));
}
Pop.Raise (this, e);
}
@@ -182,6 +184,5 @@ namespace Crow IsPopped = !IsPopped;
base.onMouseClick (sender, e);
}
-
}
}
|