protected void OnGraphEventBoxSizeAllocated(object o, SizeAllocatedArgs args) { if (BaseGraph != null) { BaseGraph.SetNewSize(this.Allocation.Width, this.Allocation.Height); } }
public void OnSizeAllocated(object o, SizeAllocatedArgs args) { if (currentWidth != args.Allocation.Width) { // Don't delay the rebuild the first time up bool bDelay = currentWidth == 1 ? false : true; currentWidth = args.Allocation.Width; if (bDelay) { if (resizeTableTimeoutID != 0) { GLib.Source.Remove(resizeTableTimeoutID); resizeTableTimeoutID = 0; } resizeTableTimeoutID = GLib.Timeout.Add( resizeTimeout, new GLib.TimeoutHandler(ResizeTableCallback)); } else { ResizeTable(); } } }
void HandleGtkSizeAllocated(object sender, SizeAllocatedArgs e) { var scale = GtkWorkarounds.GetScaleFactor(Widget); var size = new System.Drawing.Size((int)(e.Allocation.Width * scale), (int)(e.Allocation.Height * scale)); view.Size = size; }
/// <summary> /// Event Handler for Size Allocated event /// </summary> private void OnSizeAllocated(object o, SizeAllocatedArgs args) { foreach (iFolderViewGroup group in viewGroups) { group.OnSizeAllocated(o, args); } }
void ChatScroller_SizeAllocated(object o, SizeAllocatedArgs args) { if (doScroll) { chatScroller.Vadjustment.Value = chatScroller.Vadjustment.Upper - chatScroller.Vadjustment.PageSize; } }
private void OnSizeAllocated(object o, SizeAllocatedArgs args) { if (Handle != IntPtr.Zero && _initialized) { ResizeBrowser(args.Allocation.Width, args.Allocation.Height); } }
void HandleSizeRequested(object o, SizeAllocatedArgs args) { if (!main_expander.Expanded) { container.Position = container.Allocation.Height - main_expander.LabelWidget.HeightRequest; } }
void OnTreeSizeChanged(object s, SizeAllocatedArgs a) { int x, y, w, h; GetPosition(out x, out y); h = (int)sw.Vadjustment.Upper; w = (int)sw.Hadjustment.Upper; int dy = y + h - this.Screen.Height; int dx = x + w - this.Screen.Width; if (dy > 0 && sw.VscrollbarPolicy == PolicyType.Never) { sw.VscrollbarPolicy = PolicyType.Always; sw.HeightRequest = h - dy - 10; } else if (sw.VscrollbarPolicy == PolicyType.Always && sw.Vadjustment.Upper == sw.Vadjustment.PageSize) { sw.VscrollbarPolicy = PolicyType.Never; sw.HeightRequest = -1; } if (dx > 0 && sw.HscrollbarPolicy == PolicyType.Never) { sw.HscrollbarPolicy = PolicyType.Always; sw.WidthRequest = w - dx - 10; } else if (sw.HscrollbarPolicy == PolicyType.Always && sw.Hadjustment.Upper == sw.Hadjustment.PageSize) { sw.HscrollbarPolicy = PolicyType.Never; sw.WidthRequest = -1; } // Force a redraw of the whole window. This is a workaround for bug 7538 QueueDraw(); }
private void Graph_SizeAllocated(object sender, SizeAllocatedArgs args) { width = args.Allocation.Width; height = args.Allocation.Width; RecalculateLayout(); drawingArea.QueueResize(); }
private void OnAddinSizeAllocated(object o, SizeAllocatedArgs args) { ScrolledWindow scroll; if (Parent == null || (scroll = Parent.Parent as ScrolledWindow) == null) { return; } AddinTile tile = (AddinTile)o; if (tiles.IndexOf(tile) != selected_index) { return; } Gdk.Rectangle ta = ((AddinTile)o).Allocation; Gdk.Rectangle va = new Gdk.Rectangle(0, (int)scroll.Vadjustment.Value, Allocation.Width, Parent.Allocation.Height); if (!va.Contains(ta)) { double delta = 0.0; if (ta.Bottom > va.Bottom) { delta = ta.Bottom - va.Bottom; } else if (ta.Top < va.Top) { delta = ta.Top - va.Top; } scroll.Vadjustment.Value += delta; QueueDraw(); } }
void MainWindow_SizeAllocated(object o, SizeAllocatedArgs args) { if (startup) { // headerbar can cause offset, this fixes it if (PipelineSettings.Default.Size.X != 0) { this.vpaned2.Position = PipelineSettings.Default.VSeparator; this.hpaned1.Position = PipelineSettings.Default.HSeparator; } if (PipelineSettings.Default.Maximized) { Maximize(); } startup = false; } if (!(PipelineSettings.Default.Maximized = Maximized())) { this.GetSize(out PipelineSettings.Default.Size.X, out PipelineSettings.Default.Size.Y); PipelineSettings.Default.VSeparator = vpaned2.Position; PipelineSettings.Default.HSeparator = hpaned1.Position; } }
/// <summary> /// Handler for the DrawingArea SizeAllocated Event /// </summary> private void da_SizeAllocated(object o, SizeAllocatedArgs args) { allocated = true; current_allocation = args.Allocation; UpdateCache(); args.RetVal = true; }
void OnTreeSizeChanged(object s, SizeAllocatedArgs a) { int x, y, w, h; GetPosition(out x, out y); h = (int)sw.Vadjustment.Upper; w = (int)sw.Hadjustment.Upper; int dy = y + h - this.Screen.Height; int dx = x + w - this.Screen.Width; if (dy > 0 && sw.VscrollbarPolicy == PolicyType.Never) { sw.VscrollbarPolicy = PolicyType.Always; sw.HeightRequest = h - dy - 10; } else if (sw.VscrollbarPolicy == PolicyType.Always && sw.Vadjustment.Upper == sw.Vadjustment.PageSize) { sw.VscrollbarPolicy = PolicyType.Never; sw.HeightRequest = -1; } if (dx > 0 && sw.HscrollbarPolicy == PolicyType.Never) { sw.HscrollbarPolicy = PolicyType.Always; sw.WidthRequest = w - dx - 10; } else if (sw.HscrollbarPolicy == PolicyType.Always && sw.Hadjustment.Upper == sw.Hadjustment.PageSize) { sw.HscrollbarPolicy = PolicyType.Never; sw.WidthRequest = -1; } }
void HandleWSizeAllocated(object o, SizeAllocatedArgs args) { if (UpdateAllocation((Widget)o)) { RedrawAll(); } }
void HandleSwSizeAllocated(object o, SizeAllocatedArgs args) { if (!initialLogShow && outputView.Visible) { var val = (double)((double)control.Position / (double)control.Allocation.Width); PropertyService.Set(logSeparatorPositionPropertyName, val); } }
protected virtual void OnSizeAllocated(object sender, SizeAllocatedArgs e) { /* Align the categories list widget on top of the timeline's horizontal bar */ if (sender == ScrolledWindow.HScrollbar) { Alignment.BottomPadding = (uint)ScrolledWindow.HScrollbar.Allocation.Height; } }
private void OnSizeAllocated(object sender, SizeAllocatedArgs args) { if (this.child == null) { return; } this.child.Allocation = args.Allocation; }
void HandleControlSizeAllocated(object o, SizeAllocatedArgs args) { if (initialLogShow && outputView.Visible) { SetInitialOutputViewSize(args.Allocation.Width); initialLogShow = false; } }
void HandleSizeAllocated(object o, SizeAllocatedArgs args) { if (!sizeAllocated) { dashboardhpaned.Position = dashboardhpaned.MaxPosition / 2; sizeAllocated = true; } }
void HandleSwSizeAllocated(object o, SizeAllocatedArgs args) { if (!initialLogShow && outputView.Visible) { var val = (double)((double)control.Position / (double)control.Allocation.Width); LogSeparatorPosition.Value = val; } }
void HandleSizeAllocateEvent(object o, SizeAllocatedArgs e) { var width = e.Allocation.Width - 330; _grid.SetSizeRequest( width, (int)(((double)width / AppController.Instance.Config.ContactsCount) * AppController.Instance.Config.RowsCount)); }
private void WindowOnSizeAllocated(object o, SizeAllocatedArgs args) { if (args.Allocation.Width != 200) { isShown = true; window.SizeAllocated -= WindowOnSizeAllocated; Show(initialX, initialY); } }
// Handlers // Handlers :: OnSizeAllocated private void OnSizeAllocated(object o, SizeAllocatedArgs args) { int width, height; window.GetSize(out width, out height); Muine.SetGConfValue(GConfKeyWidth, width); Muine.SetGConfValue(GConfKeyHeight, height); }
void SizeAllocatedHandler(object obj, SizeAllocatedArgs args) { Gdk.Rectangle rect = args.Allocation; if (rect.Equals(Gdk.Rectangle.Zero)) { Console.WriteLine("ERROR: Allocation is null!"); } SizeChanged(rect.Width, rect.Height); }
void Paned_SizeAllocated(object o, SizeAllocatedArgs args) { if (!lastRecalcSize.Equals(args.Allocation)) { lastRecalcSize = args.Allocation; RestoreSizes(); sizesLoaded = true; } settingSize = false; }
static void Size_Allocated(object obj, SizeAllocatedArgs args) { Rectangle rect = args.Allocation; if (rect.Width == 0 || rect.Height == 0) { Console.WriteLine("ERROR: Allocation is null!"); } Console.WriteLine("Size: ({0}, {1})", rect.Width, rect.Height); }
void HandleSizeAllocated(object o, SizeAllocatedArgs args) { if (mBaseWidget != null && mBaseWidget.GdkWindow != null) { int x0, y0, x1, y1; mBaseWidget.GdkWindow.GetOrigin(out x0, out y0); mBaseWidget.TranslateCoordinates(mBaseWidget.Toplevel, 0, 0, out x1, out y1); Move(x0 + x1, y0 + y1 - args.Allocation.Height - 10); } }
private void Hbox_SizeAllocated(object o, SizeAllocatedArgs args) { try { modelHelpLinkImg.HeightRequest = 50; } catch (Exception err) { ShowError(err); } }
private void OnActionAreaChildSizeAllocated(object o, SizeAllocatedArgs args) { Widget [] children = ActionArea.Children; if (++action_area_children_allocated != children.Length) { return; } sync_all_button.WidthRequest = Math.Max(sync_all_button.Allocation.Width, (children[1].Allocation.X + children[1].Allocation.Width) - children[0].Allocation.X - 1); }
void HandleBarFrameSizeAllocated(object o, SizeAllocatedArgs args) { if (!lastFrameSize.Equals(args.Allocation.Size)) { lastFrameSize = args.Allocation.Size; if (autoShowFrame != null) { bar.Frame.UpdateSize(bar, autoShowFrame); } } }