Improve hand mode panels and recording

This commit is contained in:
lenn
2026-07-01 17:08:07 +08:00
parent 1ed729f8da
commit da77f2f194
5 changed files with 120 additions and 32 deletions

View File

@@ -1,4 +1,4 @@
use eframe::egui;
use eframe::egui::{self, Color32};
#[derive(Clone, Copy)]
pub struct AppTheme {
@@ -213,6 +213,19 @@ pub fn tag_button(label: impl Into<egui::WidgetText>) -> egui::Button<'static> {
.min_size(egui::vec2(0.0, METRICS.button_height))
}
pub fn rich_tag_button(
label: impl Into<String>,
color: impl Into<Color32>,
) -> egui::Button<'static> {
let text = egui::RichText::new(label.into()).color(color);
egui::Button::new(text)
.fill(ONE_DARK_PRO.panel_strong)
.stroke(egui::Stroke::new(1.0, ONE_DARK_PRO.border))
.corner_radius(egui::CornerRadius::same(4))
.min_size(egui::vec2(0.0, METRICS.button_height))
}
pub fn primary_button(label: impl Into<egui::WidgetText>) -> egui::Button<'static> {
egui::Button::new(label)
.fill(ONE_DARK_PRO.accent)