Improve UX, add popover tour, metadata, and hicolor icons
- Redesign tutorial tour from modal dialogs to popovers pointing at actual UI elements - Add beginner-friendly improvements: help buttons, tooltips, welcome wizard enhancements - Add AppStream metainfo with screenshots, branding, categories, keywords, provides - Update desktop file with GTK category and SingleMainWindow - Add hicolor icon theme with all sizes (16-512px) - Fix debounce SourceId panic in rename step - Various step UI improvements and bug fixes
This commit is contained in:
@@ -49,10 +49,24 @@ impl StepIndicator {
|
||||
container.append(&grid);
|
||||
|
||||
// First step starts as current
|
||||
let total = dots.len();
|
||||
if let Some(first) = dots.first() {
|
||||
first.icon.set_icon_name(Some("radio-checked-symbolic"));
|
||||
first.button.set_sensitive(true);
|
||||
first.label.add_css_class("accent");
|
||||
first.button.update_property(&[
|
||||
gtk::accessible::Property::Label(
|
||||
&format!("Step 1 of {}: {} (current)", total, first.label.label())
|
||||
),
|
||||
]);
|
||||
}
|
||||
// Label all non-current dots
|
||||
for (i, dot) in dots.iter().enumerate().skip(1) {
|
||||
dot.button.update_property(&[
|
||||
gtk::accessible::Property::Label(
|
||||
&format!("Step {} of {}: {}", i + 1, total, dot.label.label())
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
Self {
|
||||
@@ -164,11 +178,17 @@ impl StepIndicator {
|
||||
pub fn set_completed(&self, actual_index: usize) {
|
||||
let dots = self.dots.borrow();
|
||||
let map = self.step_map.borrow();
|
||||
let total = dots.len();
|
||||
if let Some(visual_i) = map.iter().position(|&i| i == actual_index) {
|
||||
if let Some(dot) = dots.get(visual_i) {
|
||||
dot.icon.set_icon_name(Some("emblem-ok-symbolic"));
|
||||
dot.button.set_sensitive(true);
|
||||
dot.label.remove_css_class("accent");
|
||||
dot.button.update_property(&[
|
||||
gtk::accessible::Property::Label(
|
||||
&format!("Step {} of {}: {} (completed)", visual_i + 1, total, dot.label.label())
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user