Add accessible labels to sliders and watermark position grid
This commit is contained in:
@@ -111,6 +111,9 @@ pub fn build_adjustments_page(state: &AppState) -> adw::NavigationPage {
|
||||
brightness_scale.set_valign(gtk::Align::Center);
|
||||
brightness_scale.set_size_request(200, -1);
|
||||
brightness_scale.set_draw_value(false);
|
||||
brightness_scale.update_property(&[
|
||||
gtk::accessible::Property::Label("Brightness adjustment, -100 to +100"),
|
||||
]);
|
||||
brightness_row.add_suffix(&brightness_scale);
|
||||
adjust_expander.add_row(&brightness_row);
|
||||
|
||||
@@ -125,6 +128,9 @@ pub fn build_adjustments_page(state: &AppState) -> adw::NavigationPage {
|
||||
contrast_scale.set_valign(gtk::Align::Center);
|
||||
contrast_scale.set_size_request(200, -1);
|
||||
contrast_scale.set_draw_value(false);
|
||||
contrast_scale.update_property(&[
|
||||
gtk::accessible::Property::Label("Contrast adjustment, -100 to +100"),
|
||||
]);
|
||||
contrast_row.add_suffix(&contrast_scale);
|
||||
adjust_expander.add_row(&contrast_row);
|
||||
|
||||
@@ -139,6 +145,9 @@ pub fn build_adjustments_page(state: &AppState) -> adw::NavigationPage {
|
||||
saturation_scale.set_valign(gtk::Align::Center);
|
||||
saturation_scale.set_size_request(200, -1);
|
||||
saturation_scale.set_draw_value(false);
|
||||
saturation_scale.update_property(&[
|
||||
gtk::accessible::Property::Label("Saturation adjustment, -100 to +100"),
|
||||
]);
|
||||
saturation_row.add_suffix(&saturation_scale);
|
||||
adjust_expander.add_row(&saturation_row);
|
||||
|
||||
|
||||
@@ -57,6 +57,9 @@ pub fn build_compress_page(state: &AppState) -> adw::NavigationPage {
|
||||
quality_scale.add_mark(3.0, gtk::PositionType::Bottom, Some("Medium"));
|
||||
quality_scale.add_mark(4.0, gtk::PositionType::Bottom, Some("High"));
|
||||
quality_scale.add_mark(5.0, gtk::PositionType::Bottom, Some("Maximum"));
|
||||
quality_scale.update_property(&[
|
||||
gtk::accessible::Property::Label("Compression quality, from Web Optimized to Maximum"),
|
||||
]);
|
||||
|
||||
let quality_label = gtk::Label::builder()
|
||||
.label(quality_description(initial_val as u32))
|
||||
|
||||
@@ -120,6 +120,9 @@ pub fn build_watermark_page(state: &AppState) -> adw::NavigationPage {
|
||||
.halign(gtk::Align::Center)
|
||||
.build();
|
||||
grid_frame.set_child(Some(&grid));
|
||||
grid_frame.update_property(&[
|
||||
gtk::accessible::Property::Label("Watermark position grid. Select where the watermark appears on the image."),
|
||||
]);
|
||||
|
||||
let mut first_button: Option<gtk::ToggleButton> = None;
|
||||
let buttons: Vec<gtk::ToggleButton> = position_names.iter().enumerate().map(|(i, name)| {
|
||||
|
||||
Reference in New Issue
Block a user