/// <summary>
        /// Resets layout of the widget
        /// </summary>
        protected void ResetLayout()
        {
            if (ResolveColorNames == false)
            {
                name.Text = colorName;
            }
            else
            {
                name.Text = ColorNames.GetName(Color);
            }
            if (SmallFonts == true)
            {
                name.Text = "<small>" + name.Text + "</small>";
            }
            double w, h;

            colorbox.Visible = true;
            name.Visible     = (NameVisible == true);
            MainBox.GetSize(out w, out h);
            if (Allocation.Width < w)
            {
                WidthRequest = System.Convert.ToInt32(w);
            }
            if (Allocation.Height < h)
            {
                HeightRequest = System.Convert.ToInt32(h);
            }
            CellsChanged();
        }
Beispiel #2
0
        /// <summary>
        /// Resets layout of the widget
        /// </summary>
        protected void ResetLayout()
        {
            double w, h;

            icon.Visible = (IconVisible == true) && (Pixbuf != null);
            MainBox.GetSize(out w, out h);
            if (Allocation.Width < w)
            {
                WidthRequest = System.Convert.ToInt32(w);
            }
            if (Allocation.Height < h)
            {
                HeightRequest = System.Convert.ToInt32(h);
            }
            CellsChanged();
        }