fix(styling): fullscreen kraft paper bg, persistence preset refresh, reader cleanup
This commit is contained in:
@@ -39,9 +39,8 @@ pub fn reading_view(
|
||||
sidebar_open: &mut bool,
|
||||
style: &mut StyleProfile,
|
||||
theme: &Theme,
|
||||
_file_path: &str,
|
||||
kraft_texture: Option<&egui::TextureHandle>,
|
||||
use_kraft_bg: bool,
|
||||
_file_path: &str,
|
||||
profile_names: &[String],
|
||||
) -> ReaderAction {
|
||||
let mut action = ReaderAction {
|
||||
@@ -180,19 +179,12 @@ pub fn reading_view(
|
||||
});
|
||||
});
|
||||
|
||||
// --- Center text area ---
|
||||
egui::CentralPanel::default().show_inside(ui, |ui| {
|
||||
let available = ui.available_size();
|
||||
let (rect, response) = ui.allocate_at_least(available, egui::Sense::click());
|
||||
// --- Center text area ---
|
||||
egui::CentralPanel::default().show_inside(ui, |ui| {
|
||||
let available = ui.available_size();
|
||||
let (rect, response) = ui.allocate_at_least(available, egui::Sense::click());
|
||||
|
||||
// Draw kraft paper background if enabled
|
||||
if use_kraft_bg {
|
||||
if let Some(tex) = kraft_texture {
|
||||
crate::texture::draw_tiled_bg(ui.painter(), rect, tex);
|
||||
}
|
||||
}
|
||||
|
||||
// Add reading margins (inset)
|
||||
// Add reading margins (inset)
|
||||
let inset = 24.0;
|
||||
let text_rect = egui::Rect::from_min_size(
|
||||
egui::pos2(rect.min.x + inset, rect.min.y),
|
||||
|
||||
Reference in New Issue
Block a user