A fork of pulp-os for the xteink4 adding custom apps
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

reclamp full refresh

hans bc6e889f 37e4b075

+21 -7
+1 -1
kernel/src/kernel/config.rs
··· 35 35 36 36 pub fn sanitize_with_max_font(&mut self, max_font: u8) { 37 37 self.sleep_timeout = self.sleep_timeout.min(120); 38 - self.ghost_clear_every = self.ghost_clear_every.clamp(1, 50); 38 + self.ghost_clear_every = self.ghost_clear_every.clamp(5, 100); 39 39 self.book_font_size_idx = self.book_font_size_idx.min(max_font); 40 40 self.ui_font_size_idx = self.ui_font_size_idx.min(max_font); 41 41 }
+18 -4
src/apps/reader/paging.rs
··· 19 19 let fonts_copy = self.fonts; 20 20 21 21 if let Some(fs) = fonts_copy { 22 - let (c, count) = 23 - wrap_proportional(&self.pg.buf, n, &fs, &mut self.pg.lines, self.max_lines, TEXT_W); 22 + let (c, count) = wrap_proportional( 23 + &self.pg.buf, 24 + n, 25 + &fs, 26 + &mut self.pg.lines, 27 + self.max_lines, 28 + TEXT_W, 29 + ); 24 30 self.pg.line_count = count; 25 31 c 26 32 } else { ··· 128 134 let dir = cache::dir_name_str(&dir_buf); 129 135 let ch_file = cache::chapter_file_name(self.epub.chapter); 130 136 let ch_str = cache::chapter_file_str(&ch_file); 131 - let n = k.read_app_subdir_chunk(dir, ch_str, self.pg.offsets[self.pg.page], &mut self.pg.buf)?; 137 + let n = k.read_app_subdir_chunk( 138 + dir, 139 + ch_str, 140 + self.pg.offsets[self.pg.page], 141 + &mut self.pg.buf, 142 + )?; 132 143 self.pg.buf_len = n; 133 144 } else if self.file_size == 0 { 134 145 let (size, n) = k.read_file_start(name, &mut self.pg.buf)?; ··· 255 266 return true; 256 267 } 257 268 258 - if self.is_epub && self.pg.fully_indexed && (self.epub.chapter as usize + 1) < self.epub.spine.len() { 269 + if self.is_epub 270 + && self.pg.fully_indexed 271 + && (self.epub.chapter as usize + 1) < self.epub.spine.len() 272 + { 259 273 self.epub.chapter += 1; 260 274 self.goto_last_page = false; 261 275 self.state = State::NeedIndex;
+2 -2
src/apps/settings.rs
··· 173 173 } 174 174 1 => { 175 175 self.settings.ghost_clear_every = 176 - self.settings.ghost_clear_every.saturating_add(5).min(50); 176 + self.settings.ghost_clear_every.saturating_add(5).min(100); 177 177 } 178 178 2 => { 179 179 if self.settings.book_font_size_idx < max_size_idx() { ··· 200 200 } 201 201 1 => { 202 202 self.settings.ghost_clear_every = 203 - self.settings.ghost_clear_every.saturating_sub(5).max(1); 203 + self.settings.ghost_clear_every.saturating_sub(5).max(5); 204 204 } 205 205 2 => { 206 206 if self.settings.book_font_size_idx > 0 {