gtk4::prelude

Trait ColorChooserExtManual

Source
pub trait ColorChooserExtManual: IsA<ColorChooser> + 'static {
    // Provided method
    fn add_palette(
        &self,
        orientation: Orientation,
        colors_per_line: i32,
        colors: &[RGBA],
    ) { ... }
}
👎Deprecated: Since 4.10
Expand description

Trait containing manually implemented methods of ColorChooser.

Provided Methods§

Source

fn add_palette( &self, orientation: Orientation, colors_per_line: i32, colors: &[RGBA], )

👎Deprecated: Since 4.10

Adds a palette to the color chooser.

If @orientation is horizontal, the colors are grouped in rows, with @colors_per_line colors in each row. If @horizontal is false, the colors are grouped in columns instead.

The default color palette of ColorChooserWidget has 45 colors, organized in columns of 5 colors (this includes some grays).

The layout of the color chooser widget works best when the palettes have 9-10 columns.

Calling this function for the first time has the side effect of removing the default color palette from the color chooser.

If @colors is None, removes all previously added palettes.

§Deprecated since 4.10

Use ColorDialog instead

§orientation

Orientation::Horizontal if the palette should be displayed in rows, Orientation::Vertical for columns

§colors_per_line

the number of colors to show in each row/column

§colors

the colors of the palette

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§