mirror of
https://gitlab.com/erkanisik/yali-rs.git
synced 2026-09-30 00:43:42 +00:00
feat: replace KLE JSON keyboard rendering with xkbcommon
xkbcommon ile XKB keymap derlenip tuş pozisyonları/sembolleri çıkarılıyor, egui Painter ile temaya uygun çiziliyor. KLE JSON indirme/kullanma kalktı, ureq ve serde_json bağımlılıkları kaldırıldı. - compile_layout() — xkb::Keymap::new_from_names() ile keymap derleme - key_position() — ISO‑105 tuşları için ondalıklı x,y pozisyonları - keysym_to_label() — xkbcommon keysym → kısa etiket (⌫, ⇥, AltGr, …) - draw_layout() — egui Painter ile ölçeklenebilir klavye çizimi - Her tuşta tek karakter gösterimi (büyük harf tercihli) - keyboard_layout boşken ilk show()'da varsayılana set edilir - Eski KLE JSON önbellek dosyaları silindi
This commit is contained in:
+23
-22
@@ -211,6 +211,7 @@ struct YaliApp {
|
||||
last_step: usize,
|
||||
branding: branding::BrandingConfig,
|
||||
loaded_language: String,
|
||||
#[allow(dead_code)]
|
||||
show_cancel_dialog: bool,
|
||||
}
|
||||
|
||||
@@ -451,9 +452,9 @@ impl eframe::App for YaliApp {
|
||||
} else {
|
||||
t!("next")
|
||||
};
|
||||
if !is_exec && !is_finish && ui::theme::danger_button(ui, &t!("cancel")).clicked() {
|
||||
self.show_cancel_dialog = true;
|
||||
};
|
||||
// if !is_exec && !is_finish && ui::theme::danger_button(ui, &t!("cancel")).clicked() {
|
||||
// self.show_cancel_dialog = true;
|
||||
// };
|
||||
let next_clicked = if is_valid {
|
||||
ui::theme::primary_button(ui, &next_label).clicked()
|
||||
} else {
|
||||
@@ -476,25 +477,25 @@ impl eframe::App for YaliApp {
|
||||
ui.add_space(10.0);
|
||||
});
|
||||
|
||||
// ── İptal onay diyaloğu ───────────────────────────────
|
||||
if self.show_cancel_dialog {
|
||||
egui::Window::new(t!("cancel_confirm_title"))
|
||||
.collapsible(false)
|
||||
.resizable(false)
|
||||
.anchor(egui::Align2::CENTER_CENTER, [0.0, 0.0])
|
||||
.show(ctx, |ui| {
|
||||
ui.label(t!("cancel_confirm_msg"));
|
||||
ui.add_space(12.0);
|
||||
ui.horizontal(|ui| {
|
||||
if ui.button(t!("cancel_confirm_yes")).clicked() {
|
||||
ctx.send_viewport_cmd(egui::ViewportCommand::Close);
|
||||
}
|
||||
if ui.button(t!("cancel_confirm_no")).clicked() {
|
||||
self.show_cancel_dialog = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
// // ── İptal onay diyaloğu ───────────────────────────────
|
||||
// if self.show_cancel_dialog {
|
||||
// egui::Window::new(t!("cancel_confirm_title"))
|
||||
// .collapsible(false)
|
||||
// .resizable(false)
|
||||
// .anchor(egui::Align2::CENTER_CENTER, [0.0, 0.0])
|
||||
// .show(ctx, |ui| {
|
||||
// ui.label(t!("cancel_confirm_msg"));
|
||||
// ui.add_space(12.0);
|
||||
// ui.horizontal(|ui| {
|
||||
// if ui.button(t!("cancel_confirm_yes")).clicked() {
|
||||
// ctx.send_viewport_cmd(egui::ViewportCommand::Close);
|
||||
// }
|
||||
// if ui.button(t!("cancel_confirm_no")).clicked() {
|
||||
// self.show_cancel_dialog = false;
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
|
||||
// ── Merkez panel ─────────────────────────────────────
|
||||
egui::CentralPanel::default()
|
||||
|
||||
Reference in New Issue
Block a user