示例#1
0
 protected void OnGraphEventBoxSizeAllocated(object o, SizeAllocatedArgs args)
 {
     if (BaseGraph != null)
     {
         BaseGraph.SetNewSize(this.Allocation.Width, this.Allocation.Height);
     }
 }
示例#2
0
        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();
                }
            }
        }
示例#3
0
        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;
        }
示例#4
0
 /// <summary>
 /// Event Handler for Size Allocated event
 /// </summary>
 private void OnSizeAllocated(object o, SizeAllocatedArgs args)
 {
     foreach (iFolderViewGroup group in viewGroups)
     {
         group.OnSizeAllocated(o, args);
     }
 }
示例#5
0
 void ChatScroller_SizeAllocated(object o, SizeAllocatedArgs args)
 {
     if (doScroll)
     {
         chatScroller.Vadjustment.Value = chatScroller.Vadjustment.Upper - chatScroller.Vadjustment.PageSize;
     }
 }
示例#6
0
 private void OnSizeAllocated(object o, SizeAllocatedArgs args)
 {
     if (Handle != IntPtr.Zero && _initialized)
     {
         ResizeBrowser(args.Allocation.Width, args.Allocation.Height);
     }
 }
示例#7
0
 void HandleSizeRequested(object o, SizeAllocatedArgs args)
 {
     if (!main_expander.Expanded)
     {
         container.Position = container.Allocation.Height - main_expander.LabelWidget.HeightRequest;
     }
 }
示例#8
0
        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();
 }
示例#10
0
        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();
            }
        }
示例#11
0
        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;
            }
        }
示例#12
0
 /// <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;
 }
示例#13
0
        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;
            }
        }
示例#14
0
 void HandleWSizeAllocated(object o, SizeAllocatedArgs args)
 {
     if (UpdateAllocation((Widget)o))
     {
         RedrawAll();
     }
 }
示例#15
0
 void HandleSwSizeAllocated(object o, SizeAllocatedArgs args)
 {
     if (!initialLogShow && outputView.Visible)
     {
         var val = (double)((double)control.Position / (double)control.Allocation.Width);
         PropertyService.Set(logSeparatorPositionPropertyName, val);
     }
 }
示例#16
0
 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;
     }
 }
示例#17
0
 private void OnSizeAllocated(object sender, SizeAllocatedArgs args)
 {
     if (this.child == null)
     {
         return;
     }
     this.child.Allocation = args.Allocation;
 }
示例#18
0
 void HandleControlSizeAllocated(object o, SizeAllocatedArgs args)
 {
     if (initialLogShow && outputView.Visible)
     {
         SetInitialOutputViewSize(args.Allocation.Width);
         initialLogShow = false;
     }
 }
示例#19
0
 void HandleSizeAllocated(object o, SizeAllocatedArgs args)
 {
     if (!sizeAllocated)
     {
         dashboardhpaned.Position = dashboardhpaned.MaxPosition / 2;
         sizeAllocated            = true;
     }
 }
示例#20
0
 void HandleSwSizeAllocated(object o, SizeAllocatedArgs args)
 {
     if (!initialLogShow && outputView.Visible)
     {
         var val = (double)((double)control.Position / (double)control.Allocation.Width);
         LogSeparatorPosition.Value = val;
     }
 }
示例#21
0
        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));
        }
示例#22
0
 private void WindowOnSizeAllocated(object o, SizeAllocatedArgs args)
 {
     if (args.Allocation.Width != 200)
     {
         isShown = true;
         window.SizeAllocated -= WindowOnSizeAllocated;
         Show(initialX, initialY);
     }
 }
示例#23
0
        // 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);
        }
示例#24
0
    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);
    }
示例#25
0
 void Paned_SizeAllocated(object o, SizeAllocatedArgs args)
 {
     if (!lastRecalcSize.Equals(args.Allocation))
     {
         lastRecalcSize = args.Allocation;
         RestoreSizes();
         sizesLoaded = true;
     }
     settingSize = false;
 }
示例#26
0
        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);
        }
示例#27
0
 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);
     }
 }
示例#28
0
 private void Hbox_SizeAllocated(object o, SizeAllocatedArgs args)
 {
     try
     {
         modelHelpLinkImg.HeightRequest = 50;
     }
     catch (Exception err)
     {
         ShowError(err);
     }
 }
示例#29
0
        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);
        }
示例#30
0
 void HandleBarFrameSizeAllocated(object o, SizeAllocatedArgs args)
 {
     if (!lastFrameSize.Equals(args.Allocation.Size))
     {
         lastFrameSize = args.Allocation.Size;
         if (autoShowFrame != null)
         {
             bar.Frame.UpdateSize(bar, autoShowFrame);
         }
     }
 }