chore: refine selection color
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run

This commit is contained in:
2026-11-21 04:40:49 +07:00
parent f850f4c4c1
commit bfe2badb38
3 changed files with 100 additions and 81 deletions
+4 -3
View File
@@ -15,6 +15,7 @@ use ui::dialog::{Dialog, DialogHandle};
use ui::field::Field;
use ui::icons::{Icon, IconRole};
use ui::input::{Input, InputState};
use ui::layout::h_flex;
use ui::select::{Select, SelectOption};
use ui::theme::ActiveTheme as _;
@@ -189,7 +190,7 @@ impl Render for InitRepoDialog {
.gap_3()
.child(
div()
.text_base()
.text_sm()
.text_color(cx.theme().colors.muted_foreground)
.child("Publish this local repository to Nostr."),
)
@@ -207,12 +208,12 @@ impl Render for InitRepoDialog {
Field::new("init-folder", "Folder")
.description("The local repository being published")
.child(
div()
h_flex()
.h_8()
.w_full()
.px_2()
.bg(cx.theme().colors.muted)
.text_base()
.text_sm()
.text_color(cx.theme().colors.muted_foreground)
.rounded(cx.theme().radius.control)
.child(folder.clone()),
+7 -1
View File
@@ -179,8 +179,14 @@ pub(crate) fn resolve(
info: derive_shades(info, colors.background, variant == ThemeVariant::Dark),
};
// Subtle is too faint over field fills; weight the accent so selection reads.
if def_color(|d| d.selection()).is_none() {
colors.selection = ramps.primary.subtle;
colors.selection = mix(
Oklch::from_hsla(ramps.primary.base),
Oklch::from_hsla(colors.background),
0.65,
)
.to_hsla();
}
let material = MaterialTokens::derive(