Пример #1
0
        private void updateSelectors()
        {
            this.Log().Debug("Sending an update request to the dynamic selector");
            // propagate the new size to the selector's children

            Gtk.Widget[] arrayCol    = dynamicrow1.GetControlArray();
            Gtk.Widget[] newArrayCol = new Gtk.Widget[arrayCol.Length];

            int i = 0;

            foreach (RLToolkit.Widgets.DynamicColumn col in arrayCol)
            {
                RLToolkit.Widgets.DynamicColumn newCol = col;
                Gtk.Widget[] arrayRow    = newCol.GetControlArray();
                Gtk.Widget[] newArrayRow = new Gtk.Widget[arrayRow.Length];

                int j = 0;
                foreach (RLToolkit.Widgets.ButtonImage b in arrayRow)
                {
                    b.UpdateSize(currentParams.previewSize);
                    newArrayRow [j] = b;
                    j++;
                }

                newCol.HeightRequest = (currentParams.previewSize > 64) ? currentParams.previewSize : 64;
                newCol.SetControlArray(newArrayRow);
                newArrayCol [i] = newCol;
                i++;
            }

            dynamicrow1.SetControlArray(newArrayCol);
        }
Пример #2
0
        private void ClearSelector()
        {
            Gtk.Widget[] arrayCol    = dynamicrow1.GetControlArray();
            Gtk.Widget[] newArrayCol = new Gtk.Widget[arrayCol.Length];

            int i = 0;

            foreach (RLToolkit.Widgets.DynamicColumn col in arrayCol)
            {
                RLToolkit.Widgets.DynamicColumn newCol = col;
                Gtk.Widget[] arrayRow    = newCol.GetControlArray();
                Gtk.Widget[] newArrayRow = new Gtk.Widget[arrayRow.Length];

                int j = 0;
                foreach (RLToolkit.Widgets.ButtonImage b in arrayRow)
                {
                    b.Clear();
                    newArrayRow [j] = b;
                    j++;
                }

                newCol.SetControlArray(newArrayRow);
                newArrayCol [i] = newCol;
                i++;
            }

            dynamicrow1.SetControlArray(newArrayCol);
        }