feat(gui): explain the disabled Connect button on hover
When the pasted code doesn't decode, Connect is greyed out; hovering it now shows "Paste a valid share code first." so the disabled state is self-explanatory, complementing the amber "doesn't look like a share code" line under the field. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -658,6 +658,7 @@ impl PixelPassApp {
|
|||||||
decoded_id.is_some(),
|
decoded_id.is_some(),
|
||||||
egui::Button::new("Connect").min_size(egui::vec2(140.0, 36.0)),
|
egui::Button::new("Connect").min_size(egui::vec2(140.0, 36.0)),
|
||||||
)
|
)
|
||||||
|
.on_disabled_hover_text("Paste a valid share code first.")
|
||||||
.clicked();
|
.clicked();
|
||||||
if decoded_id.is_some() && (connect_clicked || enter_pressed) {
|
if decoded_id.is_some() && (connect_clicked || enter_pressed) {
|
||||||
self.start_viewer(ui.ctx().clone());
|
self.start_viewer(ui.ctx().clone());
|
||||||
|
|||||||
Reference in New Issue
Block a user