105
111
public void Relocate (int x, int y, int w, int h, bool animate)
113
Gdk.Rectangle geometry = Mono.TextEditor.GtkWorkarounds.GetUsableMonitorGeometry (Screen, Screen.GetMonitorAtPoint (x, y));
116
if (x + w > geometry.Right)
117
x = geometry.Right - w;
120
if (y > geometry.Bottom - h)
121
y = geometry.Bottom - h;
107
123
if (x != rx || y != ry || w != rw || h != rh) {
111
127
rx = x; ry = y; rw = w; rh = h;
159
public DockDelegate DockDelegate { get; private set; }
160
public Gdk.Rectangle DockRect { get; private set; }
162
public void SetDockInfo (DockDelegate dockDelegate, Gdk.Rectangle rect)
164
DockDelegate = dockDelegate;
169
class PadTitleWindow: Gtk.Window
171
public PadTitleWindow (DockFrame frame, DockItem draggedItem): base (Gtk.WindowType.Popup)
173
SkipTaskbarHint = true;
175
TransientFor = (Gtk.Window) frame.Toplevel;
176
TypeHint = WindowTypeHint.Utility;
178
VBox mainBox = new VBox ();
180
HBox box = new HBox (false, 3);
181
if (draggedItem.Icon != null) {
182
Gtk.Image img = new Gtk.Image (draggedItem.Icon);
183
box.PackStart (img, false, false, 0);
185
Gtk.Label la = new Label ();
186
la.Markup = draggedItem.Label;
187
box.PackStart (la, false, false, 0);
189
mainBox.PackStart (box, false, false, 0);
191
/* if (draggedItem.Widget.IsRealized) {
192
var win = draggedItem.Widget.GdkWindow;
193
var alloc = draggedItem.Widget.Allocation;
194
Gdk.Pixbuf img = Gdk.Pixbuf.FromDrawable (win, win.Colormap, alloc.X, alloc.Y, 0, 0, alloc.Width, alloc.Height);
196
double mw = 140, mh = 140;
197
if (img.Width > img.Height)
202
double r = Math.Min (mw / img.Width, mh / img.Height);
203
img = img.ScaleSimple ((int)(img.Width * r), (int)(img.Height * r), Gdk.InterpType.Hyper);
204
mainBox.PackStart (new Gtk.Image (img), false, false, 0);
207
CustomFrame f = new CustomFrame ();
208
f.SetPadding (12, 12, 12, 12);
209
f.SetMargins (1, 1, 1, 1);