neiam
/markprompter
public · Issues · Pulls · Labels · Forks · Compare · Actions failure · Badges · Packages
⭐
Log in to mark this repository.
fix shit
29d42c5 · gmorell · 2025-07-25 22:48
Files changed
modified
README.md
+3
−3
@@ -39,9 +39,9 @@ A professional Rust-based markdown teleprompter with automatic scrolling, live p
| 39 | 39 | - **9 Built-in Themes**: |
| 40 | 40 | - Light - Clean and bright for well-lit environments |
| 41 | 41 | - Dark - Easy on the eyes for extended use |
| 42 | − - Solarized - Popular color scheme with excellent contrast | |
| 43 | − - After Dark - Purple-based theme with vibrant accents | |
| 44 | − - Her - Warm red tones inspired by the movie | |
| 42 | + - Solarized - A Popular color scheme | |
| 43 | + - After Dark - Purple-based theme | |
| 44 | + - Her - Warm red tones | |
| 45 | 45 | - Forest - Natural green palette |
| 46 | 46 | - Sky - Cool blue theme |
| 47 | 47 | - Clays - Earthy brown tones |
modified
src/main.rs
+12
−4
@@ -1,6 +1,6 @@
| 1 | 1 | use comrak::{markdown_to_html, ComrakOptions}; |
| 2 | 2 | use eframe::{egui, epaint::Color32, App, CreationContext}; |
| 3 | −use egui::ScrollArea; | |
| 3 | +use egui::{RichText, ScrollArea}; | |
| 4 | 4 | use egui_material_icons::icons::*; |
| 5 | 5 | use rfd::FileDialog; |
| 6 | 6 | use serde::{Deserialize, Serialize}; |
@@ -9,6 +9,7 @@ use std::path::PathBuf;
| 9 | 9 | use std::sync::mpsc::{channel, Receiver, Sender}; |
| 10 | 10 | use std::thread; |
| 11 | 11 | use std::time::{Duration, Instant}; |
| 12 | +// use egui::WidgetText::RichText; | |
| 12 | 13 | |
| 13 | 14 | // Theme configuration |
| 14 | 15 | #[derive(Debug, Clone, Serialize, Deserialize)] |
@@ -499,6 +500,12 @@ impl App for MarkPrompter {
| 499 | 500 | style.visuals.window_fill = bg_color; |
| 500 | 501 | ctx.set_style(style); |
| 501 | 502 | |
| 503 | + let text_color_z = Color32::from_rgb( | |
| 504 | + self.current_theme.heading_colors[0][0], | |
| 505 | + self.current_theme.heading_colors[0][1], | |
| 506 | + self.current_theme.heading_colors[0][2], | |
| 507 | + ); | |
| 508 | + | |
| 502 | 509 | egui::CentralPanel::default().show(ctx, |ui| { |
| 503 | 510 | // Use columns with custom width ratio - give more space to controls panel |
| 504 | 511 | ui.with_layout(egui::Layout::left_to_right(egui::Align::TOP), |ui| { |
@@ -507,7 +514,8 @@ impl App for MarkPrompter {
| 507 | 514 | egui::Layout::top_down(egui::Align::LEFT), |
| 508 | 515 | |ui| { |
| 509 | 516 | // Left column - Controls panel |
| 510 | − ui.heading("MP"); | |
| 517 | + ui.colored_label(text_color_z,RichText::new("MarkPrompter", ).size(32.0)); | |
| 518 | + | |
| 511 | 519 | ui.add_space(10.0); |
| 512 | 520 | |
| 513 | 521 | // File controls |
@@ -656,7 +664,7 @@ impl App for MarkPrompter {
| 656 | 664 | ui.heading("Theme"); |
| 657 | 665 | ui.add_space(5.0); |
| 658 | 666 | |
| 659 | − egui::ComboBox::from_label("Select Theme") | |
| 667 | + egui::ComboBox::from_label("") | |
| 660 | 668 | .selected_text(self.current_theme.name.clone()) |
| 661 | 669 | .show_ui(ui, |ui| { |
| 662 | 670 | for theme in &self.available_themes { |
@@ -800,7 +808,7 @@ impl App for MarkPrompter {
| 800 | 808 | } |
| 801 | 809 | }); |
| 802 | 810 | } else { |
| 803 | − ui.colored_label(text_color, "Open a markdown file to begin."); | |
| 811 | + ui.colored_label(text_color_z, RichText::new("Open a markdown file to begin.").size(48.0)); | |
| 804 | 812 | } |
| 805 | 813 | }); |
| 806 | 814 |
Parents: 9bed6cc