Пример #1
0
        void CreateCheckboxImages()
        {
            if (whiteCheckedCheckBoxImage != null)
            {
                return;
            }

            var widget   = Toolkit.CurrentEngine.GetNativeWidget(ParentWidget);
            var checkbox = new PackageCellViewCheckBox(ParentWidget.ParentWindow.Screen.ScaleFactor);

            checkbox.Container = (Gtk.Widget)widget;
            checkbox.Size      = (int)checkBoxImageSize.Width + 1;

            // White checkbox.
            whiteUncheckedCheckBoxImage = checkbox.CreateImage();
            checkbox.Active             = true;
            whiteCheckedCheckBoxImage   = checkbox.CreateImage();

            // Odd numbered checkbox.
            checkbox.BackgroundColor = BackgroundColor;
            checkedCheckBoxWithBackgroundColorImage = checkbox.CreateImage();
            checkbox.Active = false;
            uncheckedCheckBoxWithBackgroundColorImage = checkbox.CreateImage();

            // Grey check box.
            checkbox.BackgroundColor   = SelectionColor;
            greyUncheckedCheckBoxImage = checkbox.CreateImage();
            checkbox.Active            = true;
            greyCheckedCheckBoxImage   = checkbox.CreateImage();

            // Blue check box.
            checkbox.BackgroundColor   = StrongSelectionColor;
            blueCheckedCheckBoxImage   = checkbox.CreateImage();
            checkbox.Active            = false;
            blueUncheckedCheckBoxImage = checkbox.CreateImage();
        }
		void CreateCheckboxImages ()
		{
			if (whiteCheckedCheckBoxImage != null)
				return;

			var widget = Toolkit.CurrentEngine.GetNativeWidget (ParentWidget);
			var checkbox = new PackageCellViewCheckBox (ParentWidget.ParentWindow.Screen.ScaleFactor);
			checkbox.Container = (Gtk.Widget)widget;
			checkbox.Size = (int)checkBoxImageSize.Width + 1;

			// White checkbox.
			whiteUncheckedCheckBoxImage = checkbox.CreateImage ();
			checkbox.Active = true;
			whiteCheckedCheckBoxImage = checkbox.CreateImage ();

			// Odd numbered checkbox.
			checkbox.BackgroundColor = BackgroundColor;
			checkedCheckBoxWithBackgroundColorImage = checkbox.CreateImage ();
			checkbox.Active = false;
			uncheckedCheckBoxWithBackgroundColorImage = checkbox.CreateImage ();

			// Grey check box.
			checkbox.BackgroundColor = SelectionColor;
			greyUncheckedCheckBoxImage = checkbox.CreateImage ();
			checkbox.Active = true;
			greyCheckedCheckBoxImage = checkbox.CreateImage ();

			// Blue check box.
			checkbox.BackgroundColor = StrongSelectionColor;
			blueCheckedCheckBoxImage = checkbox.CreateImage ();
			checkbox.Active = false;
			blueUncheckedCheckBoxImage = checkbox.CreateImage ();
		}