forked from pisilinux-rs/yali-rs
update
This commit is contained in:
+1
-1
@@ -239,7 +239,7 @@ impl InstallerStep for WelcomeStep {
|
||||
CheckStatus::Fail => ("❌", theme::c_error()),
|
||||
};
|
||||
ui.colored_label(color, icon);
|
||||
ui.strong(&check.name);
|
||||
ui.label(egui::RichText::new(&check.name).strong().color(theme::c_text()));
|
||||
ui.label(
|
||||
egui::RichText::new(&check.message)
|
||||
.size(12.0)
|
||||
|
||||
+5
-4
@@ -253,14 +253,15 @@ impl eframe::App for YaliApp {
|
||||
ui.add_space(8.0);
|
||||
ui.label(
|
||||
egui::RichText::new(t!("os_name"))
|
||||
.size(11.0)
|
||||
.strong()
|
||||
.size(16.0)
|
||||
.color(ui::theme::c_text_dim()),
|
||||
);
|
||||
// get desktop environment
|
||||
let desktop = std::env::var("XDG_CURRENT_DESKTOP").unwrap_or_default();
|
||||
ui.label(
|
||||
egui::RichText::new(&format!("{} Desktop", desktop))
|
||||
.size(11.0)
|
||||
.size(14.0)
|
||||
.color(ui::theme::c_text_dim()),
|
||||
);
|
||||
});
|
||||
@@ -290,7 +291,7 @@ impl eframe::App for YaliApp {
|
||||
});
|
||||
} else if i < cur {
|
||||
ui.horizontal(|ui| {
|
||||
ui.colored_label(ui::theme::c_success(), "✓");
|
||||
ui.colored_label(ui::theme::c_success(), "✅");
|
||||
ui.colored_label(ui::theme::c_text_dim(), label);
|
||||
});
|
||||
} else {
|
||||
@@ -309,7 +310,7 @@ impl eframe::App for YaliApp {
|
||||
ui.add_space(12.0);
|
||||
ui.colored_label(
|
||||
egui::Color32::from_rgb(60, 60, 90),
|
||||
"Yali-RS v0.2.0",
|
||||
format!("YALI (v{})", env!("CARGO_PKG_VERSION")),
|
||||
);
|
||||
ui.add_space(6.0);
|
||||
// Tema değiştirme butonu
|
||||
|
||||
+14
-14
@@ -241,10 +241,10 @@ impl PartitionStep {
|
||||
let disks = state.available_disks.clone();
|
||||
for disk in &disks {
|
||||
let too_small = disk.size_gb < MIN_DISK_GB;
|
||||
let label = format!("{} — {} GB ({})", disk.name, disk.size_gb, disk.model);
|
||||
let label = egui::RichText::new(format!("{} — {} GB ({})", disk.name, disk.size_gb, disk.model)).strong().color(crate::ui::theme::c_accent());
|
||||
ui.add_enabled_ui(!too_small, |ui| {
|
||||
let selected = state.selected_disk.as_deref() == Some(&disk.name);
|
||||
if ui.radio(selected, &label).clicked() {
|
||||
if ui.radio(selected, label).clicked() {
|
||||
state.selected_disk = Some(disk.name.clone());
|
||||
state.partition_plan = make_plan(disk, self.is_uefi);
|
||||
}
|
||||
@@ -259,7 +259,7 @@ impl PartitionStep {
|
||||
ui.add_space(12.0);
|
||||
ui.separator();
|
||||
ui.add_space(8.0);
|
||||
ui.strong(t!("partition_plan_title"));
|
||||
ui.label(egui::RichText::new(t!("partition_plan_title")).strong().color(crate::ui::theme::c_text()));
|
||||
ui.add_space(6.0);
|
||||
partition_bar(ui, plan);
|
||||
ui.add_space(8.0);
|
||||
@@ -269,9 +269,9 @@ impl PartitionStep {
|
||||
.spacing([20.0, 6.0])
|
||||
.striped(true)
|
||||
.show(ui, |ui| {
|
||||
ui.strong(t!("plan_col_part"));
|
||||
ui.strong(t!("plan_col_fs"));
|
||||
ui.strong(t!("plan_col_size"));
|
||||
ui.label(egui::RichText::new(t!("plan_col_part")).strong().color(crate::ui::theme::c_text()));
|
||||
ui.label(egui::RichText::new(t!("plan_col_fs")).strong().color(crate::ui::theme::c_text()));
|
||||
ui.label(egui::RichText::new(t!("plan_col_size")).strong().color(crate::ui::theme::c_text()));
|
||||
ui.end_row();
|
||||
|
||||
if plan.efi_mb > 0 {
|
||||
@@ -326,8 +326,8 @@ impl PartitionStep {
|
||||
let disks = state.available_disks.clone();
|
||||
for disk in &disks {
|
||||
let selected = state.selected_disk.as_deref() == Some(&disk.name);
|
||||
let label = format!("{} — {} GB ({})", disk.name, disk.size_gb, disk.model);
|
||||
if ui.radio(selected, &label).clicked() {
|
||||
let label = egui::RichText::new(format!("{} — {} GB ({})", disk.name, disk.size_gb, disk.model)).strong().color(crate::ui::theme::c_accent());
|
||||
if ui.radio(selected, label).clicked() {
|
||||
state.selected_disk = Some(disk.name.clone());
|
||||
// Disk değişince listeyi sıfırla
|
||||
state.custom_partitions.clear();
|
||||
@@ -347,7 +347,7 @@ impl PartitionStep {
|
||||
};
|
||||
|
||||
// ── Mevcut bölüm listesi tablosu ───────────────────────
|
||||
ui.strong(t!("mp_plan_title"));
|
||||
ui.label(egui::RichText::new(t!("mp_plan_title")).strong().color(crate::ui::theme::c_text()));
|
||||
ui.add_space(4.0);
|
||||
|
||||
let mut delete_idx: Option<usize> = None;
|
||||
@@ -358,11 +358,11 @@ impl PartitionStep {
|
||||
.striped(true)
|
||||
.show(ui, |ui| {
|
||||
// Başlık
|
||||
ui.strong(t!("mp_device"));
|
||||
ui.strong(t!("mp_size"));
|
||||
ui.strong(t!("mp_fstype"));
|
||||
ui.strong(t!("mp_mountpoint"));
|
||||
ui.strong(t!("mp_action"));
|
||||
ui.label(egui::RichText::new(t!("mp_device")).strong().color(crate::ui::theme::c_text()));
|
||||
ui.label(egui::RichText::new(t!("mp_size")).strong().color(crate::ui::theme::c_text()));
|
||||
ui.label(egui::RichText::new(t!("mp_fstype")).strong().color(crate::ui::theme::c_text()));
|
||||
ui.label(egui::RichText::new(t!("mp_mountpoint")).strong().color(crate::ui::theme::c_text()));
|
||||
ui.label(egui::RichText::new(t!("mp_action")).strong().color(crate::ui::theme::c_text()));
|
||||
ui.end_row();
|
||||
|
||||
for (i, part) in state.custom_partitions.iter().enumerate() {
|
||||
|
||||
@@ -105,7 +105,7 @@ impl InstallerStep for SummaryStep {
|
||||
}
|
||||
|
||||
fn summary_row(ui: &mut egui::Ui, label: impl Into<String>, value: &str) {
|
||||
ui.strong(label.into());
|
||||
ui.label(value);
|
||||
ui.label(egui::RichText::new(label.into()).strong().color(crate::ui::theme::c_text()));
|
||||
ui.label(egui::RichText::new(value).color(crate::ui::theme::c_text()));
|
||||
ui.end_row();
|
||||
}
|
||||
|
||||
+10
-3
@@ -89,7 +89,14 @@ fn setup_fonts(ctx: &egui::Context) {
|
||||
// ISO ortamında genellikle DejaVu veya Noto bulunur.
|
||||
// Bulunamazsa egui varsayılanı kullanılır.
|
||||
for path in [
|
||||
"/usr/share/fonts/exo-2/Exo2-Medium.ttf",
|
||||
"/usr/share/fonts/exo-2/Exo2-Regular.ttf",
|
||||
"/usr/share/fonts/google-exo2/Exo2-Medium.ttf",
|
||||
"/usr/share/fonts/google-exo2/Exo2-Regular.ttf",
|
||||
"/usr/share/fonts/exo-1/Exo2-Medium.ttf",
|
||||
"/usr/share/fonts/exo-1/Exo-Medium.otf",
|
||||
"/usr/share/fonts/exo-1/Exo-Regular.otf",
|
||||
"/usr/share/fonts/truetype/exo2/Exo2-Medium.ttf",
|
||||
"/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf",
|
||||
"/usr/share/fonts/noto/NotoSans-Regular.ttf",
|
||||
"/usr/share/fonts/TTF/DejaVuSans.ttf",
|
||||
@@ -122,7 +129,7 @@ fn build_visuals(is_dark: bool) -> Visuals {
|
||||
v.code_bg_color = if is_dark { Color32::from_rgb(0x18, 0x18, 0x28) } else { Color32::from_rgb(0xEE, 0xEE, 0xF5) };
|
||||
|
||||
// Metin
|
||||
v.override_text_color = Some(c_text());
|
||||
v.override_text_color = None;
|
||||
|
||||
// Kenarlıklar
|
||||
v.widgets.noninteractive.bg_stroke = Stroke::new(1.0, c_border());
|
||||
@@ -137,10 +144,10 @@ fn build_visuals(is_dark: bool) -> Visuals {
|
||||
v.widgets.active.bg_fill = c_accent_dim();
|
||||
|
||||
// Metin renkleri
|
||||
v.widgets.noninteractive.fg_stroke = Stroke::new(1.0, c_text_dim());
|
||||
v.widgets.noninteractive.fg_stroke = Stroke::new(1.0, c_text());
|
||||
v.widgets.inactive.fg_stroke = Stroke::new(1.0, c_text());
|
||||
v.widgets.hovered.fg_stroke = Stroke::new(1.5, c_text());
|
||||
v.widgets.active.fg_stroke = Stroke::new(2.0, if is_dark { Color32::WHITE } else { Color32::BLACK });
|
||||
v.widgets.active.fg_stroke = Stroke::new(2.0, Color32::WHITE);
|
||||
|
||||
// Yuvarlak köşeler
|
||||
v.widgets.noninteractive.rounding = Rounding::same(6.0);
|
||||
|
||||
Reference in New Issue
Block a user